Skip to content

research(layout): preserve corridor cohort planning checkpoint - #1743

Draft
pinin4fjords wants to merge 159 commits into
mainfrom
codex/1671-strict-seed-scoreboard
Draft

research(layout): preserve corridor cohort planning checkpoint#1743
pinin4fjords wants to merge 159 commits into
mainfrom
codex/1671-strict-seed-scoreboard

Conversation

@pinin4fjords

@pinin4fjords pinin4fjords commented Aug 12, 2026

Copy link
Copy Markdown
Member

Status: non-mergeable research checkpoint

This draft preserves the investigation for #1671, but it is not ready to merge. The implementation deliberately stops before member and convergence ownership are unified, and CI is skipped on checkpoint commit 3f11f175.

The clean continuation is tracked by #1745 as a bounded stacked-PR programme from main.

Aggregate contents

  • Exact one-dimensional corridor allocation prototype with deterministic equality, directed separation, coordinate domains, named forbidden intervals, and typed shortfall provenance.
  • Coordinate-free corridor ledger, endpoint rank/frame evidence, owner-typed footprint/contact/order records, and scalar request/grant prototypes.
  • Fixed GENERAL -> cohort intent -> one APERTURE batch -> final solve/freeze render-stage scaffolding and self-contained deferred-final-guard validation.
  • Direction-qualified owners and tests intended to prevent opposite-running equality/bundling.
  • Mechanical convergence grant contract tests and provisional convergence request/application plumbing.
  • Removal of the late shared-opening conflict pass, _shared_left_exit_opening, and snapshot _landing_domains path in favor of the footprint model under development.
  • Preserved validation/CLI/theme cleanup needed for layout validation to reach settled geometry.

Why it must not merge

  • Member components and convergence scalar components are still solved separately; shared relations can be dropped.
  • Seed 15 still lacks canonical order classification for its convergence scalar component.
  • The convergence request does not yet expose every dependent landing/opening/continuation footprint.
  • Grant application still delegates to proximity-based _move_trunk_axis, which can infer ownership and direction.
  • Accepted plans are not persisted; later carried-port/header/envelope/containment resettles can recompile and solve after the nominal freeze.
  • finalized_owned_segments, replay compilation, reserved-trunk setters, and other competing ownership paths remain live.

Merging this aggregate would leave old and new planners sharing coordinates. Use it as prototype code and evidence only.

Checkpoint verification

Passing:

git diff --check
ruff check src/ tests/
ruff format --check src/ tests/
mypy --no-incremental
  Success: no issues found in 120 source files

pytest -q -n 0 -o addopts='' \
  tests/test_corridor_cohorts.py \
  tests/test_convergence_corridor_grants.py \
  tests/test_deferred_final_guards.py
  100 passed, 4 warnings

Expected failing checkpoint evidence:

pytest -q -n 0 -o addopts='' \
  tests/test_member_geometry.py \
  tests/test_corridor_cohort_integration.py
  42 passed, 22 failed, 70 warnings

four-case gate
  1 passed, 3 failed
  PASS opposing-bypass mandatory canonical replay
  FAIL Seed 15: scalar convergence component infeasible, no typed shortfall
  FAIL Seed 77: convergence continuation member differs from planned endpoints
  FAIL stacked collector: planned trunk flank absent from emitted member

No behavioral failure should be fixed on this draft branch. Continue through the child issues under #1745 in fresh worktrees and stacked draft PRs.

Restart from the commit-pinned solver, typed witness, component, convergence recipe, persistence, and replay links in #1745 and its ordered child checklist. The early children establish reusable scalar and ownership foundations; later children replace proximity grant application, persist the accepted plan, delete replay ownership, and run the aggregate #1653/render/CI gate.

Ordered restart programme

  1. Trace final settlement and resolve seed-72 routing defects #1746 instrumentation
  2. Extract the exact scalar corridor constraint foundation, verbatim #1747 exact scalar foundation
  3. Extract owner-typed corridor records and the typed footprint relation graph #1748 typed records and footprints
  4. Close corridor components over typed footprint relations #1749 relation-connected component closure
  5. Complete the member footprint lowering and patch publication slice #1750 Seed 15 member ownership
  6. Expose complete convergence trunk control recipes including trunk flanks #1751 complete convergence control recipes
  7. Join convergence variables into the one cohort problem #1752 one joint member/convergence cohort problem
  8. Add scalar APERTURE provenance and one-batch handoff #1753 one-batch APERTURE provenance
  9. Apply convergence grants mechanically and complete Seed 77 #1754 mechanical convergence grants and Seed 77
  10. Persist the accepted cohort plan and make re-observation consume it #1755 accepted-plan persistence
  11. Materialize accepted grants once through owner frames #1756 one typed materialization before the final geometry freeze
  12. Publish and enforce the cohort-final freeze #1757 final-freeze enforcement and displaced-owner deletion
  13. Run the aggregate checkpoint with the mechanical ownership audit #1758 aggregate routing, render, simplify, CI, and Architecture programme: semantic route planning for first-render robustness #1653 review

Rejected directions

  • A general 2D solver would cross Architecture programme: semantic route planning for first-render robustness #1653's constructive-layout boundary.
  • A separate convergence solve recreates sequential planning with stale member witnesses.
  • Sensitivity-aware APERTURE projection wraps obsolete snapshots instead of replacing ownership.
  • Raw coordinate replay, proximity ownership, retries, extra APERTURE cycles, post-freeze nudges, fixture branches, guard exemptions, and opposite-running equality are not permitted continuations.

Exact restart points are commit-pinned in the child issues. In particular, corridor_cohorts.py and its pure tests are reusable; _component_plan/_scalar_component_plan, _move_trunk_axis grant application, finalized_owned_segments, _settle_reserved_trunk_axes, and render replay compilation are provisional or negative evidence. The target final order is final solve -> typed materialization -> cohort-final freeze -> validation only; “mechanical replay” is not an allowed post-freeze phase.

Narrow the optional openings, offsets and radii at their use sites, give the
two distinctly-typed move keys distinct names, and read the exit-turn query
off the attribute rather than through getattr so its None arm is visible.
A merge junction seated off its entry port is placed relative to that port,
so nothing keeps it clear of a feeder's column. Where the feeder is itself a
divergence, landing inside its near-vertical band leaves that feeder's members
no run along their exit's own axis, and one such member costs the whole exit
group its planned turn. Step the merge outward until it owns its column.

Bundle the feeders landing in one flow entry by that port rather than by the
sign of each hop, so a merge seated on the far side of the port from a
sibling descent no longer splits one corridor into two single-line bundles.
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Render preview is ready for review:
🖼️ https://seqeralabs.github.io/nf-metro/_pr/1743/

This preview shows only the renders that changed compared to main.

Two trunk-band slots whose members share one planned exit turn are
lanes of one frame the plan already nested, so the band packer may
compress them onto the stack's pitch but not swap them.  A swap seated
the frame's reference on the band's content-side lane, and re-imposing
the planned offsets on that anchor drew the top lane through clearance
the corridor's reservation had spent.

(cherry picked from commit 407fc28962b77785d7c5477cea765c54e5ae7c85)
A typed geometry warning from a rendered seed is a drawn corridor
taking clearance a reservation spent; the render must emit none.  Gate
coverage follows the band packer's planned-order arms.

(cherry picked from commit cdcf804f45bad92a578d318ced1945e39628404d)
…s by

A left exit whose line splits toward two right entries a row below plans one
corridor for both members.  It reached that corridor around the far side of
the section it had just left - out through the header band above, down the
outer canvas margin, and back - so the stroke enclosed three sides of its own
box before turning toward targets that were beside it all along.  The detour
bought nothing but the avoidance of a merge trunk lying across the way, which
the map already draws as a bridged crossing.

The corridor now drops straight down the column the exit port faces, keeping
the barrier trunk only as the measure of how far down both members must part.

tests/test_source_section_wrap_invariant.py sweeps the render corpus for the
shape: a route whose destination lies on the side its exit port faces never
reaches past the section's opposite edge.

(cherry picked from commit 50c6a2556da8d0f8d4e14a3854677f91a2ffd30e)
…s into

The opening measured its branch corridor as a full turn radius below every
trunk it had to pass, so the pair landed in a band of its own beneath the
whole bottom-corridor stack.  That band deepens the corridor for every route
sharing it and re-packs the columns feeding it: risers that had been seated
outside an exempt trunk's reach were pushed inside it, and one of them then
crossed the trunk it was cleared off instead of running parallel to it.

The corridor the pair parts on now sits one lane pitch under the deepest
trunk it passes, which is the pitch that stack is already packed on; the full
radius is kept only against a section box, which is what needs the room.

(cherry picked from commit 68c399c57f79bc7087dd4a7e274709d90c376389)
…led corridor

The pair parts one lane pitch under the trunks it passes rather than a turn
radius below them, so its branch corridor and the bypass sharing that gap
both sit a band higher.

(cherry picked from commit c905cc573676f00fb1002fe1d6ac7d6d7cda1235)
@pinin4fjords pinin4fjords changed the title fix(layout): make frozen seed routing deterministic research(layout): preserve corridor cohort planning checkpoint Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant