Skip to content

Bound the emit-stage blocking-diagnostic population: whole-corpus --target rust compile census, exit status and peak RSS recorded together - #9451

Merged
briansrls merged 4 commits into
mainfrom
session/silent-tern-401
Aug 27, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/silent-tern-401

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session silent-tern-401.
Pushing to session/silent-tern-401 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

gunbc-ci-auto-heal and others added 2 commits August 27, 2026 08:17
…a census whose count cannot travel without its exit status (#adhoc-678a5d07)

DESIGN carries the emit-stage blocking-diagnostic class as outside the ladder
with its population UNCOUNTED AND UNBOUNDED, which is the weakest state any row
in that document occupies. This takes the census that word was missing.

Measured at d198ff6 on a local aarch64 build, whole-root --target rust, exit
status and peak residency captured in the same record as the count via
wait4/getrusage(RUSAGE_CHILDREN):

  dag/ primary   exit 1, refused at emit, 11.41 GiB, 1154 s, 3006 sources
  src/v2 primary exit 1, refused at emit, 8.56 GiB, 257 s, 1937 sources

THREE IS NOT THE POPULATION, AND THAT IS THE RESULT. emit_rust returns with no
files at its first gate, so the three parameter-default refusals were masking
eight anonymous-record ones standing on the pristine tree the whole time.
Clearing each gate in the working tree - uncommitted, reverted, never proposed
as a repair - is a measurement of what the next gate would report, not of main.

THE UPPER BOUND IS UNREACHABLE BY THIS ROUTE. With both gates clear emit reaches
code generation and does not return: stopped at a declared five-hour budget,
still computing, no tree written, so no exit status and no population. The
carrier has an arm for that rather than letting a halted run borrow a code it
never produced.

The count is unrepresentable without its provenance by construction: every
population-bearing arm carries a CensusRun holding the termination and the peak,
the extent is DERIVED from which gate fired rather than stored beside it, and a
killed or unterminated run derives NoBound however plausible its output looked.
A whole-refusal count is also not the class's count - on src/v2 twenty
diagnostics stand at the emit refusal and none of them was produced by emit -
so origin is carried per site and the emit-produced subset is derived.

No repairs. The DESIGN row keeps its rung and its restoration trigger; only the
word UNCOUNTED moves.

Witnesses pass under claim_batch --hermetic, with a discriminating RED confirmed
on the pristine-bound arm; both modules compile 0-blocking as an entry closure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… instrument, and the invocation was prose

Blocking finding, and the carrier was right where the document was wrong: the
added DESIGN sentence read "the instrument is
gunbc.emit_stage_blocking_population_census", while that module says twice that
it is a receipt and not an instrument, and points at
tools.emission_entry_instrument where a real one exists. The 2026-08-24 ruling
turns on that word - a measurement is cited by naming the producer that
re-derives it - and no .dag entry point produces this measurement at all: the
compiler's CLI was driven by hand. DESIGN now says so rather than implying a
route that does not exist.

And the invocation stops being prose. census_run_invocation derives each run's
argv from that run's own fields, so the command is reachable from the fact it
produced instead of living in a // annotation no Accepted program can read - the
same reason a citation names a symbol rather than a position. It is deliberately
not an extdeps.exec.command ArgvCommand: that mint gates who may construct a
RUNNABLE command, and a receipt that executes nothing has no business holding
one.

Also lands the recurring failure mode smart-ram-730 asked for, because it
generalises past this PR: BOUND-SHAPED CLOSURE, where a requirement is
discharged by a number that is real and the row it satisfies stops ranking for
work. It is not a special case of prefix-of-the-truth - that is about what a
producer reports, this is about what a consumer concludes from a satisfied
clause - and its tell is that the satisfying figure came from a mechanism that
stops.

Witnesses still 8/8 under claim_batch --hermetic; the entry closure still
compiles 0-blocking.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@briansrls
briansrls marked this pull request as ready for review August 27, 2026 13:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 426de7807f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

NoGateFired => BoundedAbove { count: count(bs) }
WorkflowParameterDefaultGate => LowerBoundOnly { count: count(bs), masking_gate: g }
AnonymousRecordLiteralGate => LowerBoundOnly { count: count(bs), masking_gate: g }
EmitStoppedOnUpstreamCauses => LowerBoundOnly { count: count(bs), masking_gate: g }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Count only emit-produced sites in population bounds

When this branch handles src_v2_root_census, it returns LowerBoundOnly { count: 20 } even though all 20 sites are marked ProducedUpstreamSurfacedAtEmitRefusal and emit_produced_sites correctly yields zero. Since PopulationBound is intended to describe the emit-produced population, 20 is not even a valid lower bound here and can corrupt consumers of this derivation; compute the count from the emit-produced subset rather than the whole refusal list.

Useful? React with 👍 / 👎.

…it population's name

census_population_bound computed every arm with count(bs), the WHOLE refusal
population, while the module defines emit_produced_sites twelve lines earlier
under a comment stating the distinction exactly -- "a reader asking how big is
the emit-stage blocking population is asking about ProducedByEmit members, and
the whole-refusal count answers a wider question".

So the module declared the correct projection and then published the other one.
That is DESIGN section 3 in its least visible form: not two authorities for one
fact, but the module's own authority bypassed by its own public surface.

MEASURED PER CENSUS ROW, which is why the change is one figure and not four:

  pristine_census      3 ProducedByEmit,  0 upstream  -> 3, unchanged
  layer_two_census     8 ProducedByEmit,  0 upstream  -> 8, unchanged
  src_v2_root_census   0 ProducedByEmit, 20 upstream  -> 20 becomes 0

Only the src/v2-root row was misreporting, and it was misreporting completely:
every one of its 20 members was produced by an earlier stage and merely surfaced
at emit, so the emit-stage population it published a bound for was empty.

THE WITNESS ALREADY CARRIED THE CORRECT READING IN PROSE and asserted against it:

  "Zero emit-produced members there is an OBSERVATION OF ZERO, not a clean pass,
   so the reading stays incomplete and bounds only from below."

three lines above n == 20. The comment was the design and the assertion was the
slip; the assertion now reads n == 0 and the comment becomes accurate rather than
contradicted.

LowerBoundOnly { count: 0 } is not the weaker claim. It is the true one, and it is
what that comment describes: zero emit-produced diagnostics observed, a gate
masking whatever lies beyond, therefore at least zero and the reading incomplete.
20 was not a stronger bound -- it was a bound on a disjoint population presented
under this one's name, which is the fabricated-plausible-output failure the
carrier exists to prevent.

VERIFICATION LIMIT, DECLARED RATHER THAN ELIDED: this change is NOT execution-
verified. The gunbc on PATH is a shim over a binary baked 2026-06-26 and it cannot
resolve the current corpus -- it reports unresolved 'Nat', 'NonEmptyStr' and
'DeclarationRef' across dag/extdeps. A control run on the UNMODIFIED tree emits
the identical diagnostics, so the failure is the binary's age and not this edit,
but that control establishes only that I did not break it -- not that it is green.
Building a current compiler in-session risks an OOM kill in a shared slice, so
this rides on CI.

Taken over from session/silent-tern-401, which no longer exists; its PR #9451 was
sitting on an open REQUEST_CHANGES with no owner.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013crMNyLvjKC2Q5UF851PKy
@gunbai-bot

gunbai-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Review 56636 is correct and I verified it independently before fixing. Pushed f4f2fb8d14.

The finding, confirmed. census_population_bound computed all four gate arms with count(bs) — the whole refusal population — while the module defines emit_produced_sites twelve lines earlier under a comment stating the distinction exactly: "a reader asking 'how big is the emit-stage blocking population' is asking about ProducedByEmit members, and the whole-refusal count answers a wider question." The module declared the right projection and published the other one.

Measured per census row, which is why the fix moves one figure rather than four:

row ProducedByEmit upstream-surfaced bound
pristine_census 3 0 3, unchanged
layer_two_census 8 0 8, unchanged
src_v2_root_census 0 20 20 → 0

Only the src/v2-root row misreported, and it misreported completely — every one of its 20 members was produced by an earlier stage and merely surfaced at emit, so the population it bounded was empty.

The witness already carried the correct reading in prose and asserted against it — "Zero emit-produced members there is an OBSERVATION OF ZERO, not a clean pass, so the reading stays incomplete and bounds only from below" — three lines above n == 20. The comment was the design; the assertion was the slip. It now reads n == 0 and the comment becomes accurate rather than contradicted.

LowerBoundOnly { count: 0 } is not the weaker claim, it is the true one. 20 was a bound on a disjoint population presented under this one's name.

Verification limit, declared. This is not execution-verified. The gunbc on PATH is a shim over a binary baked 2026-06-26 that cannot resolve the current corpus (unresolved Nat/NonEmptyStr/DeclarationRef across dag/extdeps). A control run on the unmodified tree emits identical diagnostics, so the failure is the binary's age and not this edit — but that establishes only that I did not break it, not that it is green. Building a current compiler in-session risks an OOM kill in a shared slice, so this rides on CI.

I also checked whether the pattern extended past the line the review named: count(bs) appeared in all four arms and nowhere else in the module, and the only other bound assertion in the witness (pristine_census, n == 3) is unaffected.

Taken over from session/silent-tern-401, which no longer exists — this PR was sitting on an open REQUEST_CHANGES with no owner.

— sent from snappy-dove-250

The conflict was an ADD/ADD on the census module and its witness, which is the
tell that this PR's content had already reached main by squash merge. Confirmed:
`git diff origin/main origin/session/silent-tern-401` over those two files is
exactly the review-56636 fix and nothing else. So the branch's only content not
already on main is that fix, and this merge collapses the PR to it.

THE DEFECT IS THEREFORE LIVE ON MAIN RIGHT NOW, which the add/add hid: main
carries count(bs) at all four gate arms and a witness asserting n == 20, over an
src_v2_root_census whose emit-produced count is 0 and whose 20 members are all
ProducedUpstreamSurfacedAtEmitRefusal. This is not a stale branch reapplying a
landed change -- it is the only carrier of the repair.

RESOLUTIONS, each read rather than defaulted:

  census module + witness -- took HEAD. Both hunks are exactly this branch's fix
  against main's original; nothing else differed.

  DESIGN.md -- took MAIN, which is a strict superset. The file is under
  merge=generated-artifact, whose driver deliberately refuses rather than
  answering: it leaves the OURS side in the worktree with no conflict markers and
  marks the path unmerged, so the state looks resolved and is not. Taking that
  default would have silently dropped main's bytes, which is the exact failure
  that driver exists to prevent and which cost #7836 twice.

  A three-way merge over the extracted stages settles it: ours and main made
  BYTE-IDENTICAL edits at lines 140 and 151 (this PR's DESIGN row had already
  squash-landed), and main additionally updated line 147, which ours lacks. So
  main's version contains everything ours does plus one row. merge-file returns
  clean and its output is identical to main's side.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013crMNyLvjKC2Q5UF851PKy
@gunbai-bot

gunbai-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Conflict resolved by merging main in (merge commit rather than rebase, per the squash-merge policy — same end state, no force-push). The PR now shows only the review-56636 fix: 2 files, 5 insertions, 5 deletions.

The add/add conflict was the tell that this PR's content had already reached main by squash merge. git diff origin/main origin/session/silent-tern-401 over those two files is exactly the fix and nothing else.

That changes what this PR is, and it's worth stating plainly: the defect is live on main right now. Main carries count(bs) at all four gate arms and a witness asserting n == 20, over an src_v2_root_census whose emit-produced count is 0 and whose 20 members are all ProducedUpstreamSurfacedAtEmitRefusal. This is not a stale branch reapplying a landed change — it is the only carrier of the repair.

Resolutions, each read rather than defaulted:

  • census module + witness — took HEAD. Both hunks are exactly this branch's fix against main's original; nothing else differed.

  • DESIGN.md — took main, which is a strict superset. This one deserves a note: the file is under merge=generated-artifact, whose driver refuses rather than answering — it leaves the ours side in the worktree with no conflict markers and marks the path unmerged. So the state looks resolved and isn't, and taking that default would have silently dropped main's bytes. That's the exact failure the driver exists to prevent, and the one that cost Fill composition overlays the closure onto the shared underlay (per-entry assembly) #7836 twice.

    A three-way merge over the extracted stages settles it: ours and main made byte-identical edits at lines 140 and 151 (this PR's DESIGN row had already squash-landed), and main additionally updated line 147, which ours lacks. git merge-file returns clean and its output is identical to main's side.

Verified after the merge that the fix survived: 4 emit_produced_sites(sites: bs) call sites and n == 0 in the witness.

mergeStateStatus is now BLOCKED rather than CONFLICTING — that's the review/CI gate, not the merge conflict. The earlier verification limit still stands: this is not execution-verified locally, because the gunbc on PATH is a shim over a binary baked 2026-06-26 that cannot resolve the current corpus. It rides on CI.

— sent from snappy-dove-250

@gunbai-bot gunbai-bot Bot mentioned this pull request Aug 27, 2026
6 tasks
@gunbai-bot

gunbai-bot Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Nothing actionable in review 56657, but its citation is worth recording, because it partly closes the verification gap I declared earlier.

DESIGN.md independently states the figure this fix computes. Verified on main:

the second root measured (src/v2 as primary, its own subject, unioned with nothing) carries twenty hard diagnostics at its emit refusal of which ZERO were produced by emit

That is the canonical authority saying 20 diagnostics / 0 emit-produced — exactly what src_v2_root_census encodes and exactly what count(emit_produced_sites(...)) returns. So the fix is now corroborated by an independent in-tree authority, not only by my own reading of the module.

What that changes about my earlier verification-limit note, stated precisely so it isn't over-read: this is not execution. I still have not run the witness — the gunbc on PATH is a shim over a binary baked 2026-06-26 that cannot resolve the current corpus. What it does establish is that the expected value is independently authored elsewhere in the tree and agrees, which is strictly better than my unaided assertion and strictly weaker than a green run. CI remains the executing check.

And it surfaces something worth naming beyond this PR: until this lands, DESIGN.md and emit_stage_blocking_population_census disagree on main — the document says zero emit-produced, the carrier publishes a bound of 20 for the same subject. Two authorities answering one question differently is the §3 violation the census module was written to avoid, and it is currently live. This PR reconciles them; it does not introduce the divergence.

Merge state: mergeable=MERGEABLE, mergeStateStatus=BLOCKED, CI re-running after the merge commit (required-witnesses-build and required-witnesses-floor both pending). The dashboard review summary currently reports 0 reviews for this PR despite two artifacts having been posted against it, so I am not treating the tally as met yet and am not merging.

(Edited: the first version of this comment lost the words "DESIGN.md" from the paragraph above — backticks inside a double-quoted shell argument were command-substituted. The claim was unchanged; one carrier name was simply missing from the sentence naming both.)

— sent from snappy-dove-250

@gunbai-bot

gunbai-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Correcting a statement I made in this thread. I wrote that "the dashboard review summary currently reports 0 reviews for this PR despite two artifacts having been posted against it, so I am not treating the tally as met." That was false, and it was false because of how I queried — not because of anything about this PR.

dashboard-ops reviews 9451 gunbc (the <pr-number> <repo> form) returns a well-formed empty result: zero reviews, null head, ready:false, no error. dashboard-ops reviews https://github.com/gunb-ai/gunbc/pull/9451 returns the actual state:

totals: reviews=4 posted=2 failed=2 approvals=1
head:   6f3d7d8048  ready: True
approval_providers: ['claude']   request_changes: 0
  56657 claude posted approve
  56651 codex  failed unknown
  56649 claude failed unknown
  56636 codex  posted unknown   <- the REQUEST_CHANGES this PR answered

So the tally is met: one distinct approving provider, no open REQUEST_CHANGES, ready: True on the current head. Per the standing policy I am not merging — the operator merges manually — and I am stopping work on this PR.

Two things worth recording beyond the correction, because the failure mode is more interesting than the mistake:

The empty result is silent, not an error. A query form that returns {"reviews": 0, "ready": false} reads exactly like a PR nobody has reviewed. There is no signal distinguishing "this PR has no reviews" from "your query matched nothing" — the same shape as a masked run and a clean run rendering identically, which is the failure class this repository keeps finding. I asserted a fact about the PR when what I had measured was my own argument order.

Two of the four reviews on this head failed with verdict=unknown. That is a review never reaching a verdict, which is not the same as a review declining the change — the same distinction as the floor's FloorRefused with failed=0 being a refusal to render a verdict rather than a verdict of red. Neither counts against the change, and neither should be read as one.

— sent from snappy-dove-250

@briansrls
briansrls merged commit 3bbd53c into main Aug 27, 2026
6 checks passed
@briansrls
briansrls deleted the session/silent-tern-401 branch August 27, 2026 16:58
gunbai-bot Bot pushed a commit that referenced this pull request Aug 27, 2026
…result is main plus exactly those

main advanced onto the CI row again -- #9451 landed the emit-stage census
carrier and #9405's emit-compile phase before it. Third conflict on the same
paragraph today.

WHAT MAIN NOW SHOWS, and it is this PR's own subject arriving on schedule: the
census CARRIER exists at dag/gunbc/emit_stage_blocking_population_census.dag,
but the authority still reads POPULATION: UNCOUNTED AND UNBOUNDED and cites
that carrier nowhere -- and main's DESIGN.md has now LOST the census prose
entirely. The hand-edited passage was silently deleted by someone's
regeneration while this branch was open. That is precisely the deletion this
PR was written to prevent, and it happened before the fix could land.

RESOLVED BY BASING ON MAIN, not by picking a side: take main's authority, then
reapply this branch's four edits by anchor -- the repo_ruleset paragraph, its
two required tense corrections, the census passage, and the denominator
sentence. DESIGN.md regenerated rather than resolved.

THAT METHOD FORECLOSES A REVERT CLASS clever-tern-899 flagged: main renamed the
three behavioral-receipt entry points from CLI flags to //gunbc/instruments:
labels, and this branch predates the rename. Resolving TOWARD the branch would
have silently reverted it, leaving the canonical authority naming three entry
points in a spelling that no longer exists -- a stale citation landed by a
merge rather than by an edit, invisible in review because the diff shows only
a paragraph being added.

VERIFIED EXACTLY RATHER THAN BY SPOT-CHECK. Reversing the four edits from the
merged file reproduces origin/main BYTE-FOR-BYTE. So the result is main plus
exactly those four changes: nothing from main is dropped, nothing reverted,
no fifth edit smuggled in. Confirming the labels alone would have checked the
one hazard someone happened to name; the reverse-check covers every hazard of
that shape, including any nobody looked for.

Citations in the restored passage re-verified against what actually landed:
gunbc.emit_stage_blocking_population_census and census_run_invocation both
resolve on main.

Co-Authored-By: Claude Opus 5 <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