Skip to content

cli_run.rs hollowing: retype the gate-global builtins to typed receipts and cut the GenerateNow areas - #9222

Merged
briansrls merged 3 commits into
mainfrom
session/deep-ram-742
Aug 26, 2026
Merged

briansrls merged 3 commits into
mainfrom
session/deep-ram-742

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

What this is

Two CI gates answered the substrate through a process global collapsed to a Bool, with a second String builtin beside it carrying the located detail.

consume_floor_compile_clean_gate_verdict() -> bool folded five distinct host states into false:

  • receipt lock poisoned
  • receipt install failed
  • no in-run receipt at all
  • the receipt's own typed Refused arm
  • a real Compiled { ok: false }

…and folded the scope disposition's Skipped into true.

So at the .dag call site, "the gate did not run in this process" and "the compile found hard diagnostics" rendered identically, and "the scope disposition selected nothing" rendered identically to "the tree is clean". That is DESIGN's execution-provenance-loss row sitting underneath not-applicable-rendered-as-malformed, in one Bool.

The detail companions did not repair it — they were second builtins over the same global, so recovering one fact took two correlated reads, and the generated-artifact one fabricated prose ("gate body did not run in this process") for exactly the state the Bool had already erased.

The retype

gunbc.ci_gate now carries

type GateReceipt
  = GateObserved { outcome: GateOutcome }
  | GateNotApplicable { reason: NonEmptyStr }
  | GateNotRun { cause: NonEmptyStr }

modelled on gunbc.compile_diagnostic_census's CensusObserved/CensusNotRunnable split for the same reason. Three arms, three owners: the gate decided; the scope disposition decided; the instrument never arrived. The located detail rides the arm that produced it, so it cannot be read without the verdict.

This is not a relaxation. The line still stops on GateNotRun — gate_receipt_exit refuses it — it stops in its own vocabulary instead of the subject's, so analysis can precede restart.

The builtin is renamed, because the old name was false

Under the executor's lazy-install arm the first "consume" calls install_floor_compile_clean_receipt(), which runs a whole-tree compile, while its doc comment read "reads the receipt only … never runs a second compile". Comment and code disagreed and the compile was invisible at the .dag call site. It is now install_or_consume_floor_compile_clean_gate_receipt.

The clean side is now recorded

The generated-artifact gate body only wrote on the failing side, so the global's unset state carried both "ran, no drift" and "never ran". Recording the clean side is what makes GateNotRun mean only the thing it says.

Second half — the area ledger's dispositions had gone unearned

gunbc.cli_run_hand_rust_area_ledger had eight rows reading GenerateNow ("the v2 replacement exists, generate it") while the 2026-08-15 floor cut had deleted the machinery two of them named (gunbc.ci_floor_plan, src/v2/workflow/ci_floor_plan.dag — both absent from the tree) and nothing established the other six. A row asserting a readiness with no referent is rung inflation, and an inflated row never ranks for climbing.

The fix is construction, not a corrected transcription: GenerateNow now carries the entry point that emits the area, so the claim cannot be written without naming the thing that discharges it. No such entry point can be named today, so no row is GenerateNow — a fact about the tree rather than a judgement about it. UnclassifiedStopLine likewise carries its cause, separating replacement deleted from replacement never established.

Alongside, at anchor-symbol grain (never row grain — deleting a row to retire one symbol unmarks every live area in it):

  • retired, each naming no declaration: load_both_closure, run_witness_batch (resolve nowhere in src/v1/stage0/src), merge_envs (deleted 2026-07-06; survives only inside a generated file's prose), regen_stage0 (binary deleted at the root by the regen cut)
  • re-homed, both live and neither in cli_run.rs: eval_builtin → v1_interpreter.rs, floor_materialization → dag/gunbc/floor_materialization.dag
  • respelled: compile_clean was a prefix, not a symbol — it matches a dozen declarations and names none, so any liveness check over it answers yes forever. Now compile_clean_scope_plan_for_ci.

Reported, not closed: the ledger has no executable measurement route

Its cited instrument scripts/rust_item_census.py was deleted in the 2026-08-24 measurement bankruptcy, so the ledger has been citing a dead producer since. Two measurements have no route, for different reasons — live scale (nothing re-derives it) and anchor liveness (no host builtin answers "does this Rust symbol exist, and where"; the module-fact builtins reach .dag modules, not .rs items, so this is not a wiring job). Declared in cli_run_ledger_measurement_route_missing with its restoration trigger rather than papered over. gunbc.seed_growth_admission's sibling count is updated 5 → 3 with the two departures named.

One pre-existing repair, carried because the evidence could not execute without it

The hand-written #[cfg(test)] TypeEnv constructor in cli_run.rs was missing authored_import_names, so the whole lib-test target failed to compile on main. No gate could see it — CI builds the binary, and the Rust suite left CI on 2026-07-11.

Evidence, green by execution

Four cargo tests in cli_run.rs, pinning arms against installed receipt fixtures (measured: 4 passed; 0 failed):

  • floor_compile_clean_gate_refuses_without_receipt → NotRun
  • floor_compile_clean_gate_refuses_on_failed_compile_receipt → Failed carrying its located detail
  • floor_compile_clean_gate_separates_not_applicable_from_clean (new) — Skipped/Compiled ok/Refused reach three different arms
  • generated_artifact_drift_gate_separates_unrecorded_from_clean (new)

The first two are the discriminating pair: under the predecessor Bool they asserted the same value.

Two .dag witness entries:

  • dag/test/claim/gate_receipt_witness_test.dag — asserts the two Bool collapses reach different places (NotApplicable vs NotRun; NotRun vs Failed, which share an exit status, so the reason carries the distinction), and that every arm projects its own detail
  • the ledger witness — rewritten around a fixture positive control, so its live zero-GenerateNow assertion is a check rather than a decoration. Its previous form asserted a prose row contained the substring "scripts/rust_item_census.py": the prose-self-match antipattern, and the thing holding the dead citation green.

What this does not claim

That the eight retyped areas are un-generatable, or that the six whose named authority still stands are as far from generation as the two whose authority was deleted. Only that nothing in the tree currently establishes readiness — which is what the row is now shaped to record. A row climbs back to GenerateNow the moment someone can name its emitting entry: a one-field edit rather than an argument.

The three sibling Bool gate builtins (witness_layer_roots_compile_clean_check, _emit_check, witness_compile_clean_cli_floor_verdicts_agree) carry the same collapse and are not retyped here — they are not gate-globals, and they are named as the remainder rather than half-done.

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 2 commits August 25, 2026 19:19
…ype the gate-global builtins to typed receipts

Two CI gates answered the substrate through a process global collapsed to a
Bool, with a second String builtin beside it carrying the located detail.

consume_floor_compile_clean_gate_verdict() -> bool folded FIVE distinct host
states into `false` -- receipt lock poisoned, receipt install failed, no in-run
receipt at all, the receipt's own typed Refused arm, and a real
Compiled { ok: false } -- and folded the scope disposition's Skipped into
`true`. So "the gate did not run in this process" and "the compile found hard
diagnostics" rendered identically at the .dag call site, and "the scope
disposition selected nothing" rendered identically to "the tree is clean".
That is DESIGN's execution-provenance-loss row sitting underneath
not-applicable-rendered-as-malformed, in one Bool.

The detail companions did not repair it. They were SECOND builtins over the
SAME global, so recovering one fact took two correlated reads, and the
generated-artifact one FABRICATED prose ("gate body did not run in this
process") for the very state the Bool had already erased.

gunbc.ci_gate now carries GateReceipt = GateObserved { outcome } |
GateNotApplicable { reason } | GateNotRun { cause }, modelled on
gunbc.compile_diagnostic_census's Observed/NotRunnable split for the same
reason. Three arms, three owners: the gate decided; the scope disposition
decided; the instrument never arrived. The line still stops on GateNotRun --
gate_receipt_exit refuses it -- it stops in its own vocabulary instead of the
subject's.

The builtin is also RENAMED, because the old name was false. Under the
executor's lazy-install arm the first "consume" installs the receipt, which is
a whole-tree compile, while the doc comment said it "reads the receipt only ...
never runs a second compile". install_or_consume_floor_compile_clean_gate_receipt
says what it may cost.

The generated-artifact gate body now records the CLEAN side too. Only the
failing side wrote before, so the global's unset state carried both "ran, no
drift" and "never ran" -- recording the clean side is what makes GateNotRun
mean only the thing it says.

Also retypes gunbc.cli_run_hand_rust_area_ledger, whose dispositions had gone
unearned underneath it. Eight rows read GenerateNow ("the v2 replacement
exists, generate it") while the 2026-08-15 floor cut had DELETED the machinery
two of them named and nothing established the other six. GenerateNow now
CARRIES the entry point that emits the area, so an unearned readiness is
unwritable rather than merely wrong; no entry point can be named today, so no
row is GenerateNow. Four dead anchors are retired per symbol (load_both_closure,
merge_envs, run_witness_batch, regen_stage0 -- none names a declaration), two
live ones are re-homed, and one prefix masquerading as a symbol is respelled.
The ledger's cited instrument (scripts/rust_item_census.py) was deleted in the
measurement bankruptcy, so the missing measurement route is DECLARED rather
than papered over.

One pre-existing repair carried because the evidence could not execute without
it: the hand-written #[cfg(test)] TypeEnv constructor in cli_run.rs was missing
authored_import_names, so the whole lib-test target failed to compile on main.
No gate could see it -- CI builds the binary, and the Rust suite left CI on
2026-07-11.

Evidence, green by execution: four cargo tests in cli_run.rs pinning the arms
against installed receipt fixtures (two of them new, and under the predecessor
Bool the two "refuses" tests asserted the same value); two .dag witness
entries, dag/test/claim/gate_receipt_witness_test.dag asserting the two Bool
collapses reach different places, and the ledger witness carrying a fixture
positive control so its live zero-GenerateNow assertion is a check rather than
a decoration. That ledger witness previously asserted a prose row CONTAINED
"scripts/rust_item_census.py" -- it was the thing holding the dead citation
green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
--required-regen refused v1_compiler_infer_method.rs: the new
gate_receipt_rows_note data row in src/v1/04_method.dag emits a
pub fn into the stage0 mirror, and the mirror was hand-updated for
the registry rows only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Aug 25, 2026
… cli_run tests review 55847 caught

Review 55847 found four tests in cli_run.rs still referencing corpus_judgment_*
symbols the census deletion removed. It was right, and it had found one end of a
larger population: 542 test functions across the two files tested machinery this
branch deleted. claim_executor 11,380 -> 6,270.

WHY THE REVIEWER SAW FOUR AND NOT 546. Two masks, and the second is the one worth
recording. My own verification ran `cargo check --bin claim_executor` WITHOUT
`--tests`, so a test module referencing a deleted symbol produced no diagnostic
at all -- the deletion was verified against a target that does not compile tests.
Then, when I did run --tests, the seed's lib failed FIRST on main's unrelated
TypeEnv breakage, and 526 downstream errors were masked behind that one. A masked
run and a clean run rendered identically: 526 errors and 1 error look like
progress rather than a different question being answered. DESIGN's
execution-provenance row names exactly this, and it cost two wasted sweeps here.

DELETED SURGICALLY, NOT WHOLESALE, and the distinction is load-bearing. The
obvious cut was `mod tests` entire -- 5,514 lines, 518 of the 526 errors. It
would have been wrong: `verify_build_artifacts_reds_on_zero_byte` lives in that
module and is the discriminating RED for a mode fleet-converge.yml invokes twice.
So the cut deletes only test functions that FAIL TO COMPILE because their subject
is gone, iterated to a fixed point against the compiler. 38 tests survive,
including all four verify_build_artifacts controls (accepts / zero-byte / missing
/ empty-arglist) and the five attempt_identity refusals.

That is the enumerate-before-deleting rule applied to a test module: a module is
deleted for one reason and takes everything in it unless its contents are
enumerated first. The compiler did the enumeration.

WHAT IS NOT CLAIMED. src/v1/stage0/src/bin/infer_semantics_witness.rs is still
broken by #8952 (six TypeEnv initializers) and is untouched here; it is in
fleet-converge.yml's build list and does not compile on main. The one-line lib
fix at cli_run.rs is present because without it nothing on this branch can
compile tests at all -- deep-ram-742 ships the same repair in #9222 and the
duplicate is deliberate, not a fork: identical text, and whichever lands second
merges clean or drops out.

.gitattributes loses its corpus-type-judgment merge row, which review 55847 also
flagged. That row is DERIVED from the artifact roster this branch already
trimmed, so the committed file was stale against its own authority rather than
carrying an independent fact.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
--required-regen refused v1_compiler_infer_method.rs on the import block
alone: the emitter now puts UnaryOpKind in this module's import and
re-export set, which regroups the CompilerDiagnostic re-export beside it.
The committed mirror carried the pre-regroup form.

Recorded because it is not obvious and I did not predict it: nothing in
src/v1/04_method.dag references UnaryOpKind, and the only edit to that
module here was a registry retype plus one data row. So the emitted
import set for a module is not a function of that module's own
references alone. Installing the generator's bytes is the right move
regardless -- a generated artifact is stored as a fixed point of its
generator, not as what a reader expects it to say -- but the derivation
is worth a look by whoever owns the emitter.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 25, 2026 22:04
@gunbai-bot

gunbai-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — both notes traced. Note 1 checked out; note 2 is already the invariant. No code change, and the reasoning for not making one on note 1 is the part worth recording.

Note 1 — can the failure-receipt companion ever pay the first-call compile? No, on the live path, and the reason is stronger than "it's idempotent".

The companion is not evaluated independently. claim_executor claim_result_for_outcome calls append_failure_receipt_companion_loudness only on the ClaimOutcome::Fail arm — same process, same InterpContext, immediately after the witness body returned false. For dag_compile_clean_gate_passes, that body is gate_receipt_exit(r: run_clean_tree_compile()), so the body has already been through the builtin by the time the companion runs. And install_floor_compile_clean_receipt always stores a receipt when it returns Ok — including its typed Refused arm — so after any successful install floor_compile_clean_receipt_installed() is true and the companion's call takes the read path. The install's Err arm is reachable only from already installed or lock poisoned, and the first of those is exactly the state that makes the second call a read anyway.

Why I did not add a latch for it. I wrote one — an attempted-once AtomicBool so a failed install could never be retried — and then removed it, because its only genuinely reachable trigger is a poisoned mutex. That is machinery whose RED is not authorable in any fixture that isn't contrived, which is the shape §4b calls worse than absent: permanently green, and citable as coverage for a cost it never actually prevents. Verifying the ordering and saying so is the honest answer; the latch would have been a decoration wearing a safety name.

The residue that is real, named rather than left for the next reader: this is a property of one caller's control flow, not of the carrier. Nothing structurally stops a future consumer from calling the companion first, and the builtin's name is the only thing that would warn them — which is precisely what the install_or_consume rename buys and the full extent of what it buys.

Note 2 — GateFailed.detail: NonEmptyStr. Agreed, and it is guarded on purpose rather than by luck: the Compiled { ok: false } arm substitutes a located fallback line when failure_detail is empty, so an empty-detail receipt cannot reach GateFailed. That guard is the thing a new producer has to reproduce, and it is worth saying that the type does not enforce it — the .dag side takes whatever str_value hands it, exactly as CompileDiagnosticCensus's cause: NonEmptyStr does. Same seam, same unenforced invariant, same one-line cost to a new producer that forgets.

— sent from deep-ram-742

briansrls pushed a commit that referenced this pull request Aug 25, 2026
…66 -> 11,508) (#9228)

* Delete the plan/walk surface nothing could reach, and the 27 cli_run symbols it was importing to do it

claim_executor: 21,366 -> 11,508 lines. Zero dead-code warnings, zero errors,
fmt clean, and the two live modes verified by execution.

WHY THIS IS A REACHABILITY CUT AND NOT AN OCCUPANCY ONE. run() required
--plan-entry after every --required-* arm returned, and nothing supplies
--plan-entry: not a workflow, not a hook, not an emitted yml. The plan function
it defaulted to named src/v2/workflow/ci_floor_plan.dag, which the 2026-08-15
floor cut deleted. So the plan walk, the batch executor, the coordinator/worker
protocol, the scoped-request machinery, the perturb re-walk, the falsifier
failure-class helpers and their terminal reporting were not quiet guards that
happened to be empty -- their governing MECHANISM was removed, and no input any
caller can author reaches them. DESIGN's reachability-read-as-occupancy row asks
three questions; this population answers no to the first two, not merely to the
third.

The coordinator is the sharpest case: maybe_run_floor_coordinator is the first
thing main() does, and it returns None immediately unless --plan-function names
a plan entry that does not exist. It spawned this binary as its own child with
--floor-worker-role/--scoped-batch-id, from an arm that never armed.

WHAT THE CENSUS SURFACED, which is the point of cutting at the root rather than
the leaves. Removing the walk left 251 items unreferenced; deleting those left
27 cli_run imports unused -- active_workset_admit, the heartbeat feed, the
discovery roster snapshot, the histogram/percentile projections,
install_floor_compile_clean_receipt and the rest. That is a measurement about
cli_run.rs, not about this file: a quarter of the seam between the two existed
only to feed machinery with no caller.

WHAT REMAINS AND IS PROVEN BY EXECUTION (release binary, four cases):
  --required-ci                          the one mode witnesses.yml invokes
  --verify-build-artifacts               fleet-converge.yml, both jobs
  no mode                     -> exit 2, typed refusal naming the live modes
  --plan-entry                -> exit 2, unknown argument
  --verify-build-artifacts on a present binary   -> exit 0
  --verify-build-artifacts on an absent one      -> exit 1, fail-closed
The last pair is the discriminating red: the mode's whole purpose is refusing a
'successful' build that produced a missing or zero-byte artifact, so a green
without its red would establish nothing.

The no-mode arm REFUSES rather than falling through to a default. An argv this
binary no longer understands must stop the line; a silent success would be the
absorbing fallback one level up from the machinery just deleted.

WHAT THIS DOES NOT CLAIM. The .dag residue is NOT repaired here and is named
rather than left to be rediscovered: gunbc.cli_invoke still builds
--plan-entry/--plan-function/--notice-title argv (dead transport -- no workflow
contains those words), PlanFunction survives in ci_spec/cli_services with its
witness, and src/v2/test/fixture/walk_plan_stage/ is a fixture family whose only
execution route was the recipes this commit deletes. That family has eight
external touchpoints including a Rust integration test, so it is its own census
and its own cut, not a tail this one can sweep. Nothing in CI executed any of it
before this commit or after it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Delete the five empty impl stubs the method deletion left behind

Review on #9228 named two (FloorBatchClampAuthority, ResolvedFloorBatchClamp) as
the ones it spot-checked. There were five: ParsedRunnableProfile,
ProcessTermination and ScopedExecutionRequest carry the same shape. Swept by
pattern rather than by the two cited, because a cosmetic residue found by
inspection is a population, not a list -- fixing only the named two would leave
three identical stubs behind and read as though the class had been handled.

Each is the shell of an impl whose every method was deleted as unreachable. The
types themselves are still constructed and are unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Delete corpus-type-judgment at the root: mode, workflow, emitter and census

A workflow_dispatch job with ZERO runs in its entire existence, its .dag emitter
(286 lines), its GeneratedArtifact registration, the claim_executor mode, and the
266-line cli_run census that had no other consumer.

WHY THE WHOLE CHAIN AND NOT JUST THE FLAG. The mode was the census's only caller
and the workflow was the mode's only caller, so deleting any one link would have
left the other two as an authority for a fact nothing asks. The fail-closed
census did the finding: removing the GeneratedArtifact variant surfaced five more
sites (the roster list, the commit-policy arm, the equality arm, the emit import
and the yml-parse arm) that a name-grep of the workflow path alone would have
missed.

THIS IS A DECLARED CAPABILITY DROP, not a dead-code sweep, and saying so is the
point of the entry. WHAT IS GONE: the only route to a located corpus-wide
type-judgment population -- the blocking/advisory/unclassified partition over the
required run's own subject, with its planted control. DESIGN 4b names exactly
this gap in the other direction: the advisory residue is computed on every
required run and counted by nothing, and a frontier whose deficit frequency is
unobservable never ranks for climbing. That argument is why the mode was built.

WHY IT GOES ANYWAY: it was never executed once. An instrument nobody has ever
run is specification-without-execution, not coverage, and a workflow_dispatch job
nobody dispatches cannot be the thing that makes a frequency observable. Keeping
the flag while deleting the workflow would be worse -- a surviving mode no
workflow invokes guards nothing and would be cited as though it did.

POPULATION: one capability, the corpus type-judgment measurement. PREVIOUS
STATE: reachable by manual dispatch, never reached. TEMPORARY STATE: no route.
RESTORATION TRIGGER: the measurement returns as a QUERY over the build/test
target graph -- the population is a property of what the required run compiled,
which is exactly what a target-graph query answers -- rather than as a mode on a
binary this program is deleting. It does not return as a flag.

NOT CLAIMED: this does not repair src/v1/stage0/src/bin/infer_semantics_witness.rs,
which #8952 (ffb0170) broke by adding TypeEnv.authored_import_names without
updating six initializers there. That binary is in fleet-converge.yml's build
list and does not compile on main today; it is untouched here and is not this
cut's to fix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Delete the 542 tests whose subjects this branch deleted, and the four cli_run tests review 55847 caught

Review 55847 found four tests in cli_run.rs still referencing corpus_judgment_*
symbols the census deletion removed. It was right, and it had found one end of a
larger population: 542 test functions across the two files tested machinery this
branch deleted. claim_executor 11,380 -> 6,270.

WHY THE REVIEWER SAW FOUR AND NOT 546. Two masks, and the second is the one worth
recording. My own verification ran `cargo check --bin claim_executor` WITHOUT
`--tests`, so a test module referencing a deleted symbol produced no diagnostic
at all -- the deletion was verified against a target that does not compile tests.
Then, when I did run --tests, the seed's lib failed FIRST on main's unrelated
TypeEnv breakage, and 526 downstream errors were masked behind that one. A masked
run and a clean run rendered identically: 526 errors and 1 error look like
progress rather than a different question being answered. DESIGN's
execution-provenance row names exactly this, and it cost two wasted sweeps here.

DELETED SURGICALLY, NOT WHOLESALE, and the distinction is load-bearing. The
obvious cut was `mod tests` entire -- 5,514 lines, 518 of the 526 errors. It
would have been wrong: `verify_build_artifacts_reds_on_zero_byte` lives in that
module and is the discriminating RED for a mode fleet-converge.yml invokes twice.
So the cut deletes only test functions that FAIL TO COMPILE because their subject
is gone, iterated to a fixed point against the compiler. 38 tests survive,
including all four verify_build_artifacts controls (accepts / zero-byte / missing
/ empty-arglist) and the five attempt_identity refusals.

That is the enumerate-before-deleting rule applied to a test module: a module is
deleted for one reason and takes everything in it unless its contents are
enumerated first. The compiler did the enumeration.

WHAT IS NOT CLAIMED. src/v1/stage0/src/bin/infer_semantics_witness.rs is still
broken by #8952 (six TypeEnv initializers) and is untouched here; it is in
fleet-converge.yml's build list and does not compile on main. The one-line lib
fix at cli_run.rs is present because without it nothing on this branch can
compile tests at all -- deep-ram-742 ships the same repair in #9222 and the
duplicate is deliberate, not a fork: identical text, and whichever lands second
merges clean or drops out.

.gitattributes loses its corpus-type-judgment merge row, which review 55847 also
flagged. That row is DERIVED from the artifact roster this branch already
trimmed, so the committed file was stale against its own authority rather than
carrying an independent fact.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Delete the second argv reader: the coordinator was reachable the whole time

Review 55875 is correct and the finding is the important kind -- not a leftover,
a REACHABLE MUTATING PATH behind a deletion I had claimed was complete.

WHAT I GOT WRONG. main() read std::env::args() ITSELF and dispatched
maybe_run_floor_coordinator before run() parsed anything. So deleting
--plan-function from run()'s parser did nothing to the coordinator's
reachability. My earlier claim that the coordinator "returns None immediately
unless --plan-function names a plan entry that does not exist" described the
guard correctly and the DISPATCH not at all: the guard tests argv, and argv still
carried the flag.

WHY IT WAS WORSE THAN BEFORE THIS BRANCH, which is what makes it a defect rather
than an incomplete cut. With --plan-function deleted from one parser and live in
the other, the flag answered `unknown argument` for every value EXCEPT
gunbc_ci_floor_plan -- the one value that ran the entire coordinator. And that
path is not inert: it create_dir_all's a receipt directory, remove_file's the
worker-observation receipt, the scoped-execution requests and the phase journal,
arms a scoped receipt and spawns workers, all before any refusal could fire. A
deletion that leaves the single most destructive entry point as the only reachable
one is the opposite of fail-closed.

THE LESSON IS THE CUT'S, NOT THE COORDINATOR'S: a flag is not deleted when one of
two parsers stops reading it. The repair is at the root -- main() no longer reads
argv at all, run() is the only thing that does -- and the census then took the
worker/scoped-request machinery with it: 6,275 -> 5,069 lines, 57 further test
functions whose subjects went, iterated to a joint fixed point over errors and
dead code.

PROVEN BY EXECUTION, on the exact invocation the review named:
  claim_executor --plan-function gunbc_ci_floor_plan --source-root dag
    -> "unknown argument: --plan-function", EXIT=2, and no receipt file created
  --verify-build-artifacts on a present binary -> 0
  --verify-build-artifacts on an absent one    -> 1
The negative control matters here specifically: the bug was that a mutating path
ran before the refusal, so "it refuses" is only half the claim -- the other half
is that nothing was written on the way to refusing.

claim_executor is now 5,069 lines against 21,366 on main.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Drop the four imports the coordinator cut orphaned; CI builds with -D warnings and my check did not

CI red at bda1331, all three jobs, one root cause: ExitStatus, std::time::Instant,
build_floor_discovery_request and verify_floor_discovery_terminal_for_coordinator
lost their last users when the coordinator and its worker machinery went, and the
required build compiles with -D warnings, so an unused import is an ERROR there.
`floor` failed identically; `witnesses` is only the gate that reports both.

THIS IS THE THIRD TIME ON THIS BRANCH THAT A CHECK WAS GREEN AND THE CLAIM WAS
WRONG, and it is the same defect each time: verifying a deletion against a target
that cannot observe its dependents. --bin without --tests could not see 526
orphaned test references. A broken lib masked those behind one error. And a bare
cargo check cannot see an unused import, because unused-imports is a WARNING
until -D warnings makes it fatal -- so the instrument I was steering by was
strictly weaker than the one that gates merge.

The repair is to use the gating instrument, and to PROVE it is the one running
rather than assume the flag arrived. Planted control, executed: with
RUSTFLAGS="-D warnings" forwarded (ctrl-build prints `forwarding env: RUSTFLAGS`),
an added `use std::collections::BTreeSet;` produces `error: unused import`, not a
warning. The clean result on the real tree is therefore load-bearing rather than
a flag that silently never reached rustc.

No behavior change: four import names, zero call sites.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

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
briansrls merged commit fcda7aa into main Aug 26, 2026
7 of 12 checks passed
@briansrls
briansrls deleted the session/deep-ram-742 branch August 26, 2026 01:09
@gunbai-bot

gunbai-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Verifying the first non-blocking note from review 55891, since the authoring session has closed and the question deserves an answer on the record rather than a re-derivation later.

The note: dag_compile_clean_failure_receipt() calls run_clean_tree_compile() a second time; is the "first call may compile" cost ever paid there?

Checked, and the answer is no under the current harness — but this PR is the reason that is now knowable. tools.dag_compile_clean_transport run_clean_tree_compile_receipt_note states it outright:

under the executor's lazy-install arm the FIRST call here RUNS THE WHOLE-TREE COMPILE. The predecessor was spelled consume_ and documented as reading the receipt only, so nothing at this call site said that a boolean read could cost a whole-tree compile.

So the hazard the reviewer is pointing at is real, was found by this PR's author, and is exactly what the consume_ → install_or_consume_ rename exists to surface. Before the rename the call site claimed to be a pure read and could silently compile the tree; the risk did not appear in this PR, it became visible in it.

Why it does not fire today: the only consumer is tools.floor_effect_gate_witness, which exposes gates as a _passes / _failure_receipt pair and reaches the receipt on the failure side of the gate it pairs with. The body therefore runs first and installs the receipt, so the companion's call is the idempotent read the gate's own note claims.

The residual, stated precisely because it is an ordering invariant and not a structural one: nothing prevents a future consumer from calling dag_compile_clean_failure_receipt() without having called the gate. That consumer would pay a whole-tree compile on a path whose only job is to describe a failure. The construction fix — should anyone want it — is for the companion to read the installed receipt and refuse when none exists, rather than installing one; a function that describes a failure should not be able to trigger the work it describes. That is a follow-up, not this PR's debt: the ordering holds, the cost is now named at the call site, and the alternative would be holding an approved scope-narrowing PR for a hazard it made visible rather than introduced.

The second note (GateFailed.detail: NonEmptyStr) I read as fine as-is — both Rust producers guard is_empty(), so the invariant holds; making it unwritable via a smart constructor is a real climb but unrelated to this change.

No action needed. Recording it so the open question does not outlive the session that could answer it.

— sent from merry-bear-547

gunbai-bot Bot pushed a commit that referenced this pull request Aug 26, 2026
…eted correction

Both sides edited outside_index_works_note and the edits are disjoint, so neither
side could be taken whole. Main narrowed the exempted population from four documents
to two -- the other two named probe witnesses the measurement bankruptcy deleted, and
the partition witness went red by exactly two when the bind was removed without them.
Ours rewrote the cited-symbol sentence from "the flag still exists and no workflow
invokes it" to the flag being deleted outright. Composed by applying our sentence onto
main's text, verified by word-diffing each side against the merge base rather than by
reading the hunk.

DESIGN.md was regenerated rather than hand-resolved, and the first regeneration
attempt FAILED in a way worth recording: consume_generated_artifact_drift_gate_receipt
not found in scope. Main now carries #9222's consume_ -> install_or_consume_ retype, so
the committed gunbc binary predated the builtin rename and could not interpret the
current tree. Rebuilt from the merged sources first, then regenerated. A stale seed
binary silently generating against a renamed builtin is exactly the failure that gate
exists to make loud, and it was loud.

Cargo.lock carries main's v1-stage0-v1-infer -> v1-stage0-v1-artifact crate rename.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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