Skip to content

Enforce pairwise witness-roster disjointness - #9114

Merged
briansrls merged 1 commit into
mainfrom
session/keen-deer-304
Aug 24, 2026
Merged

briansrls merged 1 commit into
mainfrom
session/keen-deer-304

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • share the identity-grain freeze intersection decision across executing witness rosters
  • refuse a typed route-gap identity that is also classified as a frozen no-consumer deferral
  • add discriminating collision and disjoint controls for the newly enforced pair

Main-corpus safety receipt

The identity-grain join was executed directly against unmodified origin/main at bd84f66. The 94 exact qualified identities in v2.workflow.floor_route_gap were joined against 614 unique live frozen identities, each qualified through its entry file own module declaration, matching the production helper. Collision count: 0.

This means the pair was clean at bd84f66 and is enforced from here. The zero is evidence that this guard lands dormant instead of reddening the existing tree; it is not a promise that a moving main remains clean without the guard. The guard makes the future disjointness claim hold.

This pair had not been joined before this work. Its first two measurements found 19 collisions among #9106 additions, which that PR retired, and 0 in main standing population. The former demonstrates why the wall is needed; the latter demonstrates why it can land quietly. Ordering is safe in both directions: #9106 has hand-cleared its additions, while this PR is based independently on main.

Verification

  • cargo fmt --all --check (pre-commit and pre-push)
  • cargo test -p v1-compiler --lib route_gap_freeze_intersection -- --nocapture (2 passed)
  • cargo test -p v1-compiler --lib expected_red_freeze_intersection -- --nocapture (2 passed)

Scaffold and dissolution

This pairwise wall is an interim guard over a contradiction that is writable today: three independently authored partial maps directly determine one identity’s current floor contract, and 19 instances of the newly guarded contradiction were found by hand while nothing else refused them. The terminal construction is one derived per-identity WitnessFloorContract over a minted, closed population, with at most one override per identity and append-only events kept distinct from current state. Its sum-of-products shape has a not-executing arm carrying reason and provenance, and an executing arm carrying consumer, budget, and an expected-terminal coproduct (holds, assertion-false, typed-pre-verdict-refusal, or hermetic-route-gap). Consumer, budget, and expected terminal remain separate fields, so legitimate orthogonal combinations such as expensive-and-expected-red stay expressible; only not-executing plus an expected execution outcome has no representation.

Dissolution condition: every discovered witness identity receives exactly one WitnessFloorContract from the sole contract constructor, and the old freeze / expected-red / route-gap membership lookups no longer feed floor admission or adjudication. When both clauses hold, this pairwise wall and its controls delete. The discriminating red is then unauthorable at every boundary including fixtures because the terminal type has no constructor for the contradictory state; deleting the permanently green-by-construction control is the guarantee climb, not a loss of coverage.

Do not author a fourth pairwise wall if another roster appears. Another wall would confirm that enforcement is scaling quadratically in rosters and that the rosters are the wrong carrier; proceed to the total contract instead.

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 24, 2026 14:03
@briansrls
briansrls merged commit 96cd1bf into main Aug 24, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the session/keen-deer-304 branch August 24, 2026 18:10
@gunbai-bot

gunbai-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Non-blocking, from product direction. Review 55434 approved this with no findings; nothing here changes that verdict. Two notes for whoever reads this PR next.

One hazard checked and cleared. This PR touches exactly one file, src/v1/stage0/src/cli_run.rs. The obvious concern with a wall hand-authored into the v1 seed is regen erasure — a .dag authority regenerating over it, deleting the wall with nobody touching the file. That does not apply here: dag/test/claim/required_regen_admission_witness_test.dag lists cli_run under hand_maintained_homes and carries HandMatches { filename: "cli_run.rs" }, so the file is hand-maintained by declaration and is not a generated mirror. The check is per-file, so it is worth re-running rather than assuming, but for this file the answer is clean.

One thing the review did not weigh. cli_run.rs is under an active hollowing program — gunbc.plans.cli_run_hollowing_plan, with a live item-grain ledger at gunbc.cli_run_hand_rust_area_ledger carrying sixteen functional areas and a disposition each, including UnclassifiedStopLine. This PR adds roughly a hundred lines of new hand-Rust to a file whose whole program is to shrink toward zero. That is not a defect and the code belongs where the admission decision is made, which is there today.

It does mean the dissolution recorded above discharges two obligations rather than one: the pairwise-wall contradiction closes, and the hand-Rust area shrinks by what this added. Worth stating explicitly, because a future hollowing lane that finds fresh lines in that file with no acknowledgement will read it as growth on a surface that was supposed to be closing, and will have to reconstruct from scratch why it was admissible.

— sent from swift-badger-524

This was referenced Aug 24, 2026
briansrls pushed a commit that referenced this pull request Aug 25, 2026
…oster both walls read (#9145)

Two walls read frozen_path_deferrals -- expected_red_freeze_intersection and
route_gap_freeze_intersection, both in v1_compiler.cli_run -- each refusing an
identity simultaneously frozen here and enrolled in a roster asserting the
required floor executes it. They landed five days apart and only one landed
against an empty population.

NOT A NEW PRINCIPLE. It is DESIGN's own admission test seen from the arming side
rather than the phase-enrolment side it is stated on: "the admission test is
whether every red is closable by the author who caused it at the moment they
caused it". A wall armed over an already-non-empty population fails it by
construction -- the author who causes the red is whoever pushes next, and the row
that makes it red was authored elsewhere.

SATISFIED  #8494 521d4cf 2026-08-19: 38 colliding rows deleted and the wall
           wired in ONE diff.
VIOLATED   #9114 96cd1bf 2026-08-24 14:10: armed over a population of 4.
           Retired by #9133.

WHY THE VIOLATION IS NOT CARELESSNESS, which is the reason the row is worth
reading rather than a caution to recall. #9049 (664b339) enrolled the four
identities at 14:09 -- SIXTY SECONDS earlier -- and is an ancestor of #9114, so
the arming commit's base already carried them. Sixty seconds is far less than a
witnesses run, so #9114's green was established against a base WITHOUT the
collision and it landed on a base WITH it. Neither author could see the
contradiction from inside their own change: #9049 added rows to a roster no wall
yet guarded, #9114 armed a wall it had correctly measured as empty. The union was
red and neither half was.

So the test is NOT "count the population before arming" -- that would have changed
nothing here. It is that a wall's green must be established on the base the wall
LANDS on. The satisfied instance got that for free by clearing and arming in one
diff, leaving no interval in which another change could enter the population.

RUNG AND TRIGGER (DESIGN 4b(2)), written as a trigger rather than a ceiling
because an unnamed stall and a real ceiling read identically. The class sits at
mitigatable, held by a one-diff discipline nothing enforces. No roster-shaped
check can climb it: at the moment #9114 was authored and reviewed its governed
population was genuinely empty, so no state in either roster could have been
refused, and a check over authored rows would be a ratchet. The next-rung trigger
is named at the layer the defect lives on -- up-to-date-with-base before merge,
strict required checks or a merge queue, which makes "green on the base it lands
on" true by construction. That is an operator decision and the row does NOT
assert how it is configured today; the setting was not readable when it was
written.

HOME. Proposed for v2.workflow.required_floor; the walls are not there and it
names neither, so a row there asserting how they landed would be authority
substitution. This file is the one roster both walls read, already names one of
them, and already carries both polarities as shrink-log entries -- so the row
joins facts in the file rather than importing them, and avoids hand-LOC growth in
the frozen seed.

Re-derivable: join floor_route_gap_roster (110 entries) against
frozen_path_deferrals (128 rows, 614 qualified identities), qualifying every
frozen row through its own entry's module line and not its path string -- 4 of
614 at 8ab8a8e, matching the wall's count=4. Corroborated on this branch:
frozen_path_deferral_identity_count returns 610, which is 614 less the 4 #9133
retired.

Verified: the module parses and evaluates after the annotation.

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
briansrls pushed a commit that referenced this pull request Aug 25, 2026
#9163)

Two main reds in one evening, and a third pair before them, all one class:
two PRs independently green, jointly broken. #9049 with #9114, #9057 with
#9062, #8919 with #8992. No textual conflict in any of them -- the first
change altered a semantic API and the second was checked against a base
where the old API still existed, so both greens were true of trees that
never existed together. The #9057/#9062 pair took the whole fleet red for
about an hour and produced four uncoordinated repair PRs plus a fifth
branch, two of which proposed deleting live code.

No wall inside this repository can close that. The invariant needed is that
the commit admitted to main is the exact composed commit that passed the
required checks, and nothing in the substrate can constrain what GitHub
admits.

WHAT THIS CHANGE IS: the in-repository half, and it is INERT ON ITS OWN.
witnesses.yml listens only to workflow_dispatch, push and pull_request, so
enabling a merge queue today would create a merge-group commit for which the
required check never schedules -- pending forever. This adds the trigger so
the prerequisite exists BEFORE the setting is changed, with no window in
between. With no queue configured the event never fires, so CI behaviour is
unchanged by this diff.

WHAT IT IS NOT: the repository setting. The ruleset currently carries
strict_required_status_checks_policy false, no merge-queue rule, and an
always-bypass role. That is an operator decision and this PR does not
presume it.

MergeGroup already exists in extdeps.github.actions WorkflowTrigger and the
YAML emitter already renders it, so this is one row, not new modelling.

EVIDENCE, including what I could NOT establish. Evaluating the workflow
authority on this branch and on clean origin/main gives byte-identical
diagnostic sets (2232 lines, zero diff), so nothing is introduced. I could
NOT run the emitter to regenerate witnesses.yml: the local gunbc shim is a
Jun 26 build that cannot resolve this corpus. The one yml line was derived by
reading the emitter -- `MergeGroup => kv(key: "merge_group", value: YamlNull)`
renders exactly as `workflow_dispatch:` does, in the position its entry
occupies in the `on:` list. DESIGN records the generated-artifact drift gates
as currently unguarded, so nothing will catch that line if I have it wrong,
which is why it is stated rather than assumed. Regenerating in CI and
diffing is the check I want on this PR.

Co-authored-by: Brian Searls <briansearls1@gmail.com>
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