Implements T-1076 — the final D-242 story. Road-graph hub selection over the corrected settlement model, plus the placement-boundary re-tune Jeroen ruled during refinement (the shipped map had over-generalized Standalone).
Item 0 — placement boundary re-tune (data)
Standalone ONLY where the HQ is itself an industrial complex / company town: 11 values (extraction/mining/quarrying, heavy vehicle+shipyard, heavy energy, gate infrastructure, military-industrial). 9 values flipped to CityTenant (agriculture offices, craft/consumer manufacturing, high-tech fabs, marine farming) — the winery-as-belt-settlement failure mode is gone.
Counts: Standalone corps 95 -> 11; CityTenant 60 -> 144; settlements emitted 94 -> 11; city rows 423 -> 340; tenant links 58 -> 129. Fixpoint verified (runs 2-3 byte-identical across all 165 corps). Cygni NameLocked pin moved to Metropolis.
D-242 amendment states the boundary explicitly; Jeroen`s edge-of-settlement/cluster color recorded as CityTenant rendering detail for later phases.
Items 1-4 — road graph (Rust)
is_standalone_hq threaded through CityRecord/CityPlacement (corporations LEFT JOIN in both readers — the threading the T-1074 test comment predicted).
Hub selection: top-cap by population among non-HQ settlements; HUB_SPACING_DIAG_PX=64 (cap 8 on the current planet grid), HUB_CAP_MIN=6; Gate Corporation (909M, HQ) verified non-hub on live cascade.
Hybrid minor attach: nearest-point-on-polyline snap within SNAP_MAX_PX=8 with Junction edge-split (from<to preserved via norm_edge, maintenance/route identity inherited), else A*-spur to nearest hub.
RailHeadFacing: new FoundingOrientation variant with octant bearing_degrees toward the dominant incident edge at degree>=3 junctions; skeleton_gen railhead_edge() feeds the D-234b flush-frontage machinery (coastal wins if both). D-213 amended.
Drive-by fix: believability reader honoured a hardcoded PopulationBudget (stale since T-1075) — now reads the baked settlement_class.
Verification
regen-db x3 (fixpoint stable), check-systems-db fresh, test-tooling PASS, cargo check clean; 11 new targeted tests, all touched suites green (road_graph 17, skeleton_gen 53, attractor_matching 11, city_context_reader 32, cascade 8, layer_proxy 9, plugin 20, believability 3); 4-body live-cascade hub sanity report in the ticket.
Known/expected
calluna-wellness + namsan-collective unmatched-by-design (their belt-HQ tenancy targets correctly vanished under the boundary; re-link via T-1115 content).
rail_facing fires on no current real body (max degree 2 today) — mechanism unit-tested, engages as density grows.
T-1116 filed: water-heavy bodies produce 0 routable edges (pre-existing A* drop path, now more visible).
## Summary
Implements T-1076 — the final D-242 story. Road-graph hub selection over the corrected settlement model, plus the placement-boundary re-tune Jeroen ruled during refinement (the shipped map had over-generalized Standalone).
### Item 0 — placement boundary re-tune (data)
- Standalone ONLY where the HQ is itself an industrial complex / company town: 11 values (extraction/mining/quarrying, heavy vehicle+shipyard, heavy energy, gate infrastructure, military-industrial). 9 values flipped to CityTenant (agriculture offices, craft/consumer manufacturing, high-tech fabs, marine farming) — the winery-as-belt-settlement failure mode is gone.
- Counts: Standalone corps 95 -> 11; CityTenant 60 -> 144; settlements emitted 94 -> 11; city rows 423 -> 340; tenant links 58 -> 129. Fixpoint verified (runs 2-3 byte-identical across all 165 corps). Cygni NameLocked pin moved to Metropolis.
- D-242 amendment states the boundary explicitly; Jeroen`s edge-of-settlement/cluster color recorded as CityTenant rendering detail for later phases.
### Items 1-4 — road graph (Rust)
- is_standalone_hq threaded through CityRecord/CityPlacement (corporations LEFT JOIN in both readers — the threading the T-1074 test comment predicted).
- Hub selection: top-cap by population among non-HQ settlements; HUB_SPACING_DIAG_PX=64 (cap 8 on the current planet grid), HUB_CAP_MIN=6; Gate Corporation (909M, HQ) verified non-hub on live cascade.
- Co-location collapse: exact (body_id,name), keep lowest id, loud warn (defensive, unit-tested with synthetic duplicate).
- Hybrid minor attach: nearest-point-on-polyline snap within SNAP_MAX_PX=8 with Junction edge-split (from<to preserved via norm_edge, maintenance/route identity inherited), else A*-spur to nearest hub.
- RailHeadFacing: new FoundingOrientation variant with octant bearing_degrees toward the dominant incident edge at degree>=3 junctions; skeleton_gen railhead_edge() feeds the D-234b flush-frontage machinery (coastal wins if both). D-213 amended.
- Drive-by fix: believability reader honoured a hardcoded PopulationBudget (stale since T-1075) — now reads the baked settlement_class.
### Verification
regen-db x3 (fixpoint stable), check-systems-db fresh, test-tooling PASS, cargo check clean; 11 new targeted tests, all touched suites green (road_graph 17, skeleton_gen 53, attractor_matching 11, city_context_reader 32, cascade 8, layer_proxy 9, plugin 20, believability 3); 4-body live-cascade hub sanity report in the ticket.
### Known/expected
- calluna-wellness + namsan-collective unmatched-by-design (their belt-HQ tenancy targets correctly vanished under the boundary; re-link via T-1115 content).
- rail_facing fires on no current real body (max degree 2 today) — mechanism unit-tested, engages as density grows.
- T-1116 filed: water-heavy bodies produce 0 routable edges (pre-existing A* drop path, now more visible).
95->11 Standalone / 60->144 CityTenant per Jeroen's boundary ruling: only extraction/mining/quarrying, heavy vehicle+shipyard, heavy energy, gate infrastructure keep their own settlements; craft/consumer manufacturing, agriculture offices, high-tech fabs flip to CityTenant. Cygni pin moved to Metropolis (its HQ settlement vanishes under the flip). Regen systems.db: 340 city rows, 129 tenant links, fixpoint stable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
is_standalone_hq threaded through CityRecord/CityPlacement via corporations LEFT JOIN (both readers); hubs = top-cap by population among non-HQ settlements (HUB_SPACING_DIAG_PX=64, HUB_CAP_MIN=6); exact-name collapse keeping lowest city_id with loud warn; nearest-point-on-polyline snap (SNAP_MAX_PX=8) with Junction edge-split preserving from<to via norm_edge, else A*-spur to nearest hub; FoundingOrientation::RailHeadFacing{bearing_degrees} assigned at degree>=3 junctions (octant bearing toward dominant incident edge), consumed by skeleton_gen railhead_edge() through the D-234b flush-frontage machinery; believability reader now honours baked settlement_class (stale hardcode since T-1075). 11 new targeted tests; existing suites green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review: road-hub-refinement → main (type: code + content slice)
Reviewers: Hoshe (code quality), Tyre (architecture), Miri (world consistency — placement-boundary slice). All read source from the branch worktree (HEAD = branch tip, not sparse). Pre-push gate passed before push and was not duplicated. Runtime verification: 4-body live-cascade hub sanity report in the ticket; no client/merge-path code touched.
Hoshe (Code Quality): REQUEST_CHANGES
Hub/minor partition, collapse, and RailHeadFacing correctly implemented and well unit-tested; DB spot-checks match the D-242 amendment exactly (11/144 corps, 340 rows, 129 links, 0 dupes, stamp fresh). One real reachable bug + three coverage gaps in exactly the places that hide it.
#
File
Issue
H1
server/src/atlas/road_graph.rs:629-631
split_edge_at length split unsound for 2-point parents: l1 = length*(path1.len()-1)/total_segs gives l1=full/l2=0 whenever total_segs==1, regardless of where jpos falls. Reachable: A*-collapsed 2-point paths AND every snap-spur (vec![apos,mpos]) — so a later minor snapping onto an earlier minor's spur (the documented accreting behavior) always hits it. Proved with a temporary diagnostic test (reverted). Fix: split by the geometric segment-fraction t (available from project_onto_segment at the call site) when total_segs==1, or proportional-floor both halves — never all-or-nothing on a real interior split.
H2
server/src/atlas/road_graph.rs:1614-1671
No test exercises the chained-snap scenario (minor B onto minor A's spur) — the load-bearing accretion path where H1 surfaces. Both snap tests use one minor; the determinism test uses 5 placements (all hubs under HUB_CAP_MIN=6) so attach_minors never runs in it. Add: chained-snap test + a determinism assertion on a 2+-minor scenario that actually exercises attach_minors.
H3
server/src/atlas/cascade.rs:314-323
The Layer2→Layer3 RailHeadFacing wiring has no cascade-level assertion — the integration test executes the path but never inspects placements[..].founding_orientation, so a wiring regression (wrong field/layer/silently-skipped if-let) passes everything. Assert the mutation end-to-end.
H4
server/src/atlas/believability.rs:542-568
The settlement_class drive-by fix is correct but untested; both doc comments say "keep the two in lockstep" yet nothing catches drift mechanically. Add a synthetic-DB unit test mirroring the city_context_reader fixture, asserting settlement_class + is_standalone_hq.
Tyre (Architecture): REQUEST_CHANGES
Deterministic by construction (iteration traced to ORDER BY id, integer octant math, pure-function derivation); .or_else() composition cleanly reuses D-234b flush-frontage; pin-file contract coherent; believability drive-by ruled scope-appropriate. Two gaps:
#
File
Issue
T1
server/src/atlas/road_graph.rs:105-113
HUB_SPACING_DIAG_PX keys on today's fixed 512×256 grid diagonal with no cross-reference to D-243's elastic planetary seam — when grid size varies per body, this premise silently goes stale. Add a one-line [D-243] cross-ref to the doc comment (and/or a matching note in D-243).
The is_standalone_hq LEFT JOIN is duplicated verbatim across the two readers, synced only by comments. Extract a shared helper/const (single source of truth, per the codebase's own registry pattern) so a predicate change can't be forgotten in one place.
Miri (World Consistency): REQUEST_CHANGES
19 of 20 boundary judgments correct and faithful to Jeroen's ruling; all 11 keep-Standalone values verified corp-by-corp as genuine company-town identities; edge cases (geothermal_hub, military_industrial, lattice_material_source, marine_farming) all correctly sided; Cygni pin move canon-clean (Metropolis is a real pool name on Ferrath); D-242 amendment locks the boundary properly; D-213 amendment consistent.
The general_industrial flip is correct as a rule but leaves 5 real steel-complex/shipyard corps on the wrong side: stalownia-kowalski (300-year steelworks that IS its system's identity), westphalia-heavy-works, sede-chemical-works, sova-station-works, cygni-combines (the canonical Reach shipyard cluster — whose standalone settlement this PR just retired). The flip's own justification comment describes them exactly. Fix: re-tag the five corps' corp_specialization frontmatter to existing Standalone-shaped values (shipbuilding / military_industrial are the closest fits — both currently have ZERO corps, so this also closes a content hole; sede is the closest call, fuel_production-adjacent in shape) + regen. Content fix, not a boundary-rule change — the craft-majority framing stays.
Verdict: CHANGES REQUESTED
7 findings. H1 is the only correctness bug (proved reachable); H2-H4 are the tests that pin it and the wiring; T1/T2 are small hardening; M1 is a 5-page content re-tag + regen whose cascade consequences (settlements re-emerging, Cygni pin interaction) need coherent handling.
## Review: road-hub-refinement → main (type: code + content slice)
Reviewers: Hoshe (code quality), Tyre (architecture), Miri (world consistency — placement-boundary slice). All read source from the branch worktree (HEAD = branch tip, not sparse). Pre-push gate passed before push and was not duplicated. Runtime verification: 4-body live-cascade hub sanity report in the ticket; no client/merge-path code touched.
### Hoshe (Code Quality): REQUEST_CHANGES
Hub/minor partition, collapse, and RailHeadFacing correctly implemented and well unit-tested; DB spot-checks match the D-242 amendment exactly (11/144 corps, 340 rows, 129 links, 0 dupes, stamp fresh). One real reachable bug + three coverage gaps in exactly the places that hide it.
| # | File | Issue |
|---|------|-------|
| H1 | server/src/atlas/road_graph.rs:629-631 | **split_edge_at length split unsound for 2-point parents**: l1 = length*(path1.len()-1)/total_segs gives l1=full/l2=0 whenever total_segs==1, regardless of where jpos falls. Reachable: A*-collapsed 2-point paths AND every snap-spur (vec![apos,mpos]) — so a later minor snapping onto an earlier minor's spur (the documented accreting behavior) always hits it. Proved with a temporary diagnostic test (reverted). Fix: split by the geometric segment-fraction t (available from project_onto_segment at the call site) when total_segs==1, or proportional-floor both halves — never all-or-nothing on a real interior split. |
| H2 | server/src/atlas/road_graph.rs:1614-1671 | No test exercises the chained-snap scenario (minor B onto minor A's spur) — the load-bearing accretion path where H1 surfaces. Both snap tests use one minor; the determinism test uses 5 placements (all hubs under HUB_CAP_MIN=6) so attach_minors never runs in it. Add: chained-snap test + a determinism assertion on a 2+-minor scenario that actually exercises attach_minors. |
| H3 | server/src/atlas/cascade.rs:314-323 | The Layer2→Layer3 RailHeadFacing wiring has no cascade-level assertion — the integration test executes the path but never inspects placements[..].founding_orientation, so a wiring regression (wrong field/layer/silently-skipped if-let) passes everything. Assert the mutation end-to-end. |
| H4 | server/src/atlas/believability.rs:542-568 | The settlement_class drive-by fix is correct but untested; both doc comments say "keep the two in lockstep" yet nothing catches drift mechanically. Add a synthetic-DB unit test mirroring the city_context_reader fixture, asserting settlement_class + is_standalone_hq. |
### Tyre (Architecture): REQUEST_CHANGES
Deterministic by construction (iteration traced to ORDER BY id, integer octant math, pure-function derivation); .or_else() composition cleanly reuses D-234b flush-frontage; pin-file contract coherent; believability drive-by ruled scope-appropriate. Two gaps:
| # | File | Issue |
|---|------|-------|
| T1 | server/src/atlas/road_graph.rs:105-113 | HUB_SPACING_DIAG_PX keys on today's fixed 512×256 grid diagonal with no cross-reference to D-243's elastic planetary seam — when grid size varies per body, this premise silently goes stale. Add a one-line [D-243] cross-ref to the doc comment (and/or a matching note in D-243). |
| T2 | server/src/atlas/city_context_reader.rs:271-278 + believability.rs:536-552 | The is_standalone_hq LEFT JOIN is duplicated verbatim across the two readers, synced only by comments. Extract a shared helper/const (single source of truth, per the codebase's own registry pattern) so a predicate change can't be forgotten in one place. |
### Miri (World Consistency): REQUEST_CHANGES
19 of 20 boundary judgments correct and faithful to Jeroen's ruling; all 11 keep-Standalone values verified corp-by-corp as genuine company-town identities; edge cases (geothermal_hub, military_industrial, lattice_material_source, marine_farming) all correctly sided; Cygni pin move canon-clean (Metropolis is a real pool name on Ferrath); D-242 amendment locks the boundary properly; D-213 amendment consistent.
| # | File | Issue |
|---|------|-------|
| M1 | wiki/economics/corp_hq_placement.toml:124-131 + 5 corp pages | The general_industrial flip is correct as a rule but leaves 5 real steel-complex/shipyard corps on the wrong side: stalownia-kowalski (300-year steelworks that IS its system's identity), westphalia-heavy-works, sede-chemical-works, sova-station-works, cygni-combines (the canonical Reach shipyard cluster — whose standalone settlement this PR just retired). The flip's own justification comment describes them exactly. Fix: re-tag the five corps' corp_specialization frontmatter to existing Standalone-shaped values (shipbuilding / military_industrial are the closest fits — both currently have ZERO corps, so this also closes a content hole; sede is the closest call, fuel_production-adjacent in shape) + regen. Content fix, not a boundary-rule change — the craft-majority framing stays. |
### Verdict: CHANGES REQUESTED
7 findings. H1 is the only correctness bug (proved reachable); H2-H4 are the tests that pin it and the wiring; T1/T2 are small hardening; M1 is a 5-page content re-tag + regen whose cascade consequences (settlements re-emerging, Cygni pin interaction) need coherent handling.
No retractions requested. Lead independently verified the DB end-state (16/139 split with all five re-tags, 344 city rows, 125 tenant links, 0 dupes) before this comment.
#
Finding
Resolution
H1
split_edge_at all-or-nothing on 2-point parents
Fixed via the subsuming option: length_cells now splits geometric-distance proportionally (fixed-order f64 polyline sums per the module's determinism doctrine; halves always sum exactly to the parent; degenerate all-coincident geometry → 0). No 2-point special case needed.
H2
No chained-snap / attach_minors determinism coverage
Fixed: direct 2-point-split unit test (midpoint 5/5, quarter-point both>0 sum-exact); chained-snap test — minor B snaps onto minor A's spur, the interior 2-point-parent split firing in the accreting path, full invariants asserted; the same scenario carries run()==run(). Confirmed the pre-existing determinism test never reached attach_minors.
H3
RailHeadFacing wiring unasserted end-to-end
Fixed: new cascade test on a plus-shaped landmass whose arm geometry deterministically yields 2 degree-3 settlement junctions (the default slope fixture structurally cannot — diagnosed and documented). Asserts junction ⇔ RailHeadFacing both directions on layer3.placements plus BodyWorldState propagation, with a fixture-changed message distinct from wiring-broken.
H4
Believability settlement_class fix untested
Fixed: synthetic-DB unit test mirroring the city_context_reader fixture — NameLocked honoured, unknown class → default, HQ flag via the shared join.
T1
HUB_SPACING_DIAG_PX fixed-grid premise unmarked
Fixed: doc comment states the 512×256 premise and names D-243's elastic seam as the revisit trigger; matching scale note in the D-242 amendment.
T2
is_standalone_hq join duplicated
Fixed: pub(crate) const STANDALONE_HQ_JOIN_SQL in city_context_reader.rs; both readers compose it — single source of truth, plus the H4 lockstep test.
M1
5 steel-complex corps on the wrong side of the general_industrial flip
Fixed: cygni-combines → shipbuilding; sova-station-works, stalownia-kowalski, westphalia-heavy-works → military_industrial; sede-chemical-works → fuel_production (closest call, flagged in the frontmatter comment). Each re-tag carries an in-frontmatter justification. Cascade consequences handled: Cygni yards settlement returns on GJ820Bc, Metropolis pin STAYS (canon-clean; the yard is a place beside the city — recorded in the TOML); sova emits nothing pending its broken HQ ref (T-1054, cited). Counts: Standalone 11→16, HQ settlements 11→15, city rows 340→344, tenant links 129→125 (unmatched reconciled to exactly the 14 loop-logged cases); fixpoint immediate (2 regens, 0 differences). Design note recorded in D-242: military_industrial now carries three civilian heavy-works corps — if that reads wrong later, the clean split is a new heavy_works vocabulary value, never re-coarsening general_industrial.
Battery: gate re-run green on push (fmt/clippy/full cargo test/deny/ruff/test-tooling/stamp); touched suites road_graph 19, cascade 9, believability 4, city_context_reader 32; pql decisions validate ok. Reviewers asked to verify their own findings for the re-review verdict.
## Review response — all 7 findings fixed (commits 1fee6fd9d, cd71d7728, d8f350c74)
No retractions requested. Lead independently verified the DB end-state (16/139 split with all five re-tags, 344 city rows, 125 tenant links, 0 dupes) before this comment.
| # | Finding | Resolution |
|---|---------|------------|
| H1 | split_edge_at all-or-nothing on 2-point parents | **Fixed via the subsuming option**: length_cells now splits geometric-distance proportionally (fixed-order f64 polyline sums per the module's determinism doctrine; halves always sum exactly to the parent; degenerate all-coincident geometry → 0). No 2-point special case needed. |
| H2 | No chained-snap / attach_minors determinism coverage | **Fixed**: direct 2-point-split unit test (midpoint 5/5, quarter-point both>0 sum-exact); chained-snap test — minor B snaps onto minor A's spur, the interior 2-point-parent split firing in the accreting path, full invariants asserted; the same scenario carries run()==run(). Confirmed the pre-existing determinism test never reached attach_minors. |
| H3 | RailHeadFacing wiring unasserted end-to-end | **Fixed**: new cascade test on a plus-shaped landmass whose arm geometry deterministically yields 2 degree-3 settlement junctions (the default slope fixture structurally cannot — diagnosed and documented). Asserts junction ⇔ RailHeadFacing both directions on layer3.placements plus BodyWorldState propagation, with a fixture-changed message distinct from wiring-broken. |
| H4 | Believability settlement_class fix untested | **Fixed**: synthetic-DB unit test mirroring the city_context_reader fixture — NameLocked honoured, unknown class → default, HQ flag via the shared join. |
| T1 | HUB_SPACING_DIAG_PX fixed-grid premise unmarked | **Fixed**: doc comment states the 512×256 premise and names D-243's elastic seam as the revisit trigger; matching scale note in the D-242 amendment. |
| T2 | is_standalone_hq join duplicated | **Fixed**: pub(crate) const STANDALONE_HQ_JOIN_SQL in city_context_reader.rs; both readers compose it — single source of truth, plus the H4 lockstep test. |
| M1 | 5 steel-complex corps on the wrong side of the general_industrial flip | **Fixed**: cygni-combines → shipbuilding; sova-station-works, stalownia-kowalski, westphalia-heavy-works → military_industrial; sede-chemical-works → fuel_production (closest call, flagged in the frontmatter comment). Each re-tag carries an in-frontmatter justification. Cascade consequences handled: Cygni yards settlement returns on GJ820Bc, Metropolis pin STAYS (canon-clean; the yard is a place beside the city — recorded in the TOML); sova emits nothing pending its broken HQ ref (T-1054, cited). Counts: Standalone 11→16, HQ settlements 11→15, city rows 340→344, tenant links 129→125 (unmatched reconciled to exactly the 14 loop-logged cases); fixpoint immediate (2 regens, 0 differences). Design note recorded in D-242: military_industrial now carries three civilian heavy-works corps — if that reads wrong later, the clean split is a new heavy_works vocabulary value, never re-coarsening general_industrial. |
Battery: gate re-run green on push (fmt/clippy/full cargo test/deny/ruff/test-tooling/stamp); touched suites road_graph 19, cascade 9, believability 4, city_context_reader 32; pql decisions validate ok. Reviewers asked to verify their own findings for the re-review verdict.
All three reviewers re-verified their own findings against branch tip d8f350c74:
Hoshe: APPROVE. H1-H4 resolved and mutation-tested — he temporarily reintroduced each bug (split math, cascade wiring, believability hardcode) and confirmed the new tests fail with clear diagnostics, then reverted cleanly. Re-ran his original bug-reproduction scenario against the geometric split: 12-cell parent → 10+2 proportional, sum conserved. Full atlas suite 505/505. Bundled M1/DB state spot-checked to exact match.
Tyre: APPROVE. T1 (D-243 revisit trigger on the hub-cap premise) and T2 (STANDALONE_HQ_JOIN_SQL single source of truth + lockstep test) fully resolved. His one re-review comment — the heavy_works split living only as prose — is now tracked as T-1117 (with his full blast-radius analysis: live CompatibilityMatrix military-row scoring + latent FortifiedPerimeter hazard), which he verified before flipping to approve.
Miri: APPROVE. All five re-tags verified (shipbuilding a direct fit; the three military_industrial placements correct with the documented tension; sede flagged honestly as loosest); Metropolis pin + returned Cygni yard settlement verified live in the DB as a coherent "yard beside the city" outcome; D-242 note faithful.
Merging to main and closing. Follow-ups tracked: T-1115 (wiki coverage), T-1116 (water-heavy bodies 0 routable edges), T-1117 (heavy_works vocabulary split).
## Re-review verdict: APPROVED
All three reviewers re-verified their own findings against branch tip d8f350c74:
- **Hoshe: APPROVE.** H1-H4 resolved and mutation-tested — he temporarily reintroduced each bug (split math, cascade wiring, believability hardcode) and confirmed the new tests fail with clear diagnostics, then reverted cleanly. Re-ran his original bug-reproduction scenario against the geometric split: 12-cell parent → 10+2 proportional, sum conserved. Full atlas suite 505/505. Bundled M1/DB state spot-checked to exact match.
- **Tyre: APPROVE.** T1 (D-243 revisit trigger on the hub-cap premise) and T2 (STANDALONE_HQ_JOIN_SQL single source of truth + lockstep test) fully resolved. His one re-review comment — the heavy_works split living only as prose — is now tracked as T-1117 (with his full blast-radius analysis: live CompatibilityMatrix military-row scoring + latent FortifiedPerimeter hazard), which he verified before flipping to approve.
- **Miri: APPROVE.** All five re-tags verified (shipbuilding a direct fit; the three military_industrial placements correct with the documented tension; sede flagged honestly as loosest); Metropolis pin + returned Cygni yard settlement verified live in the DB as a coherent "yard beside the city" outcome; D-242 note faithful.
Merging to main and closing. Follow-ups tracked: T-1115 (wiki coverage), T-1116 (water-heavy bodies 0 routable edges), T-1117 (heavy_works vocabulary split).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Implements T-1076 — the final D-242 story. Road-graph hub selection over the corrected settlement model, plus the placement-boundary re-tune Jeroen ruled during refinement (the shipped map had over-generalized Standalone).
Item 0 — placement boundary re-tune (data)
Items 1-4 — road graph (Rust)
Verification
regen-db x3 (fixpoint stable), check-systems-db fresh, test-tooling PASS, cargo check clean; 11 new targeted tests, all touched suites green (road_graph 17, skeleton_gen 53, attractor_matching 11, city_context_reader 32, cascade 8, layer_proxy 9, plugin 20, believability 3); 4-body live-cascade hub sanity report in the ticket.
Known/expected
is_standalone_hq threaded through CityRecord/CityPlacement via corporations LEFT JOIN (both readers); hubs = top-cap by population among non-HQ settlements (HUB_SPACING_DIAG_PX=64, HUB_CAP_MIN=6); exact-name collapse keeping lowest city_id with loud warn; nearest-point-on-polyline snap (SNAP_MAX_PX=8) with Junction edge-split preserving from<to via norm_edge, else A*-spur to nearest hub; FoundingOrientation::RailHeadFacing{bearing_degrees} assigned at degree>=3 junctions (octant bearing toward dominant incident edge), consumed by skeleton_gen railhead_edge() through the D-234b flush-frontage machinery; believability reader now honours baked settlement_class (stale hardcode since T-1075). 11 new targeted tests; existing suites green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>Review: road-hub-refinement → main (type: code + content slice)
Reviewers: Hoshe (code quality), Tyre (architecture), Miri (world consistency — placement-boundary slice). All read source from the branch worktree (HEAD = branch tip, not sparse). Pre-push gate passed before push and was not duplicated. Runtime verification: 4-body live-cascade hub sanity report in the ticket; no client/merge-path code touched.
Hoshe (Code Quality): REQUEST_CHANGES
Hub/minor partition, collapse, and RailHeadFacing correctly implemented and well unit-tested; DB spot-checks match the D-242 amendment exactly (11/144 corps, 340 rows, 129 links, 0 dupes, stamp fresh). One real reachable bug + three coverage gaps in exactly the places that hide it.
Tyre (Architecture): REQUEST_CHANGES
Deterministic by construction (iteration traced to ORDER BY id, integer octant math, pure-function derivation); .or_else() composition cleanly reuses D-234b flush-frontage; pin-file contract coherent; believability drive-by ruled scope-appropriate. Two gaps:
Miri (World Consistency): REQUEST_CHANGES
19 of 20 boundary judgments correct and faithful to Jeroen's ruling; all 11 keep-Standalone values verified corp-by-corp as genuine company-town identities; edge cases (geothermal_hub, military_industrial, lattice_material_source, marine_farming) all correctly sided; Cygni pin move canon-clean (Metropolis is a real pool name on Ferrath); D-242 amendment locks the boundary properly; D-213 amendment consistent.
Verdict: CHANGES REQUESTED
7 findings. H1 is the only correctness bug (proved reachable); H2-H4 are the tests that pin it and the wiring; T1/T2 are small hardening; M1 is a 5-page content re-tag + regen whose cascade consequences (settlements re-emerging, Cygni pin interaction) need coherent handling.
Review response — all 7 findings fixed (commits
1fee6fd9d,cd71d7728,d8f350c74)No retractions requested. Lead independently verified the DB end-state (16/139 split with all five re-tags, 344 city rows, 125 tenant links, 0 dupes) before this comment.
Battery: gate re-run green on push (fmt/clippy/full cargo test/deny/ruff/test-tooling/stamp); touched suites road_graph 19, cascade 9, believability 4, city_context_reader 32; pql decisions validate ok. Reviewers asked to verify their own findings for the re-review verdict.
Re-review verdict: APPROVED
All three reviewers re-verified their own findings against branch tip
d8f350c74:Merging to main and closing. Follow-ups tracked: T-1115 (wiki coverage), T-1116 (water-heavy bodies 0 routable edges), T-1117 (heavy_works vocabulary split).
Pull request closed