Skip to content

Carry the declaring authority with every floor-batch clamp - #8046

Merged
briansrls merged 2 commits into
mainfrom
clamp-authority
Aug 8, 2026
Merged

briansrls merged 2 commits into
mainfrom
clamp-authority

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Operator ruling, 2026-08-08: "Separately land a source-preserving clamp diagnostic that identifies v1_claim_scoped_witness_batch, reports per_unit_ms=0, and proves units do not change the threshold." Deliberately separate from #7869 — the defect is proven independently of whether that PR lands, so its fix should survive #7869 being closed.

The defect

The refusal printed two facts that cannot both be true:

✗ FLOOR-BATCH-OVER-BUDGET batch=1 wall_ms=400540 clamp_ms=360000 units=27
  (clamp = overhead + units*rate; authority gunbc.ci_spec gunbc_ci_floor_batch_clamp_params[0])

That row's overhead is 240 seconds. The 360000 came from gunbc.ci_layer_roots v1_claim_scoped_witness_batch, which owns its clamp and is deliberately excluded from the positional list.

The implementation was predisposed to it. Two independently owned populations were flattened into one aligned Vec<Option<(u128, u128)>> — numbers with no identity — and the printer reconstructed the origin from the list position while spelling gunbc.ci_spec into its format string. §5's tell exactly: the citation stays green while the value it names moves.

The fix — construction, not a corrected string

std.realization_schedule RunnableBatchClamp gains a required authority: DeclarationRef. A clamp with no declared source now has no constructor, so the misattribution is unwritable rather than a rendering to keep correct.

  • gunbc.ci_spec fills it once via gunbc_ci_floor_positional_clamp rather than six times — six restatements would be six chances for one to name something else.
  • The scoped batch names its own declaration.
  • The executor's positional citation is now projected from the same rows the numbers come from (gunbc_ci_floor_batch_clamp_authority_modules / ..._decls), not spelled in Rust.
  • The index survives beside the symbol, because an offset into a list is the one part of a citation no symbol can name (DESIGN §3).

The refusal also stops printing a bare units=27. That count invited trimming the roster on a row whose rate is zero — a remedy that cannot move the threshold by construction, and whose split form would hand the same work a second 360-second overhead allowance. It now reports overhead_ms, per_unit_ms, units_contribution_ms and, on the scoped arm, batch_id.

Evidence — by execution, both directions

dag/test/claim/floor_batch_clamp_authority_witness_test.dag, 5 witnesses, 5 PASS:

witness asserts
positional_clamp_row_zero_cites_the_ci_spec_list_it_lives_in gunbc.ci_spec gunbc_ci_floor_batch_clamp_params, 240s
scoped_batch_clamp_cites_its_own_declaration_not_the_positional_list gunbc.ci_layer_roots v1_claim_scoped_witness_batch, 360s, rate 0
the_two_clamp_authorities_are_distinguishable_by_value the two carry different numbers, so a wrong citation is decidable
scoped_clamp_is_identical_at_one_unit_and_at_twenty_seven both 360000
a_nonzero_rate_clamp_does_move_with_the_unit_count 301000 at 1, 327000 at 27

The last one is the positive control on the fourth: without it, "27 units clamps like 1 unit" proves only that this file's arithmetic is constant, not that the formula was consulted.

Discriminating RED, run rather than asserted. Re-pointing the scoped clamp's authority at gunbc.ci_spec and executing:

FAIL scoped_batch_clamp_cites_its_own_declaration_not_the_positional_list
FAIL the_two_clamp_authorities_are_distinguishable_by_value
PASS positional_clamp_row_zero_cites_the_ci_spec_list_it_lives_in

A located red — exactly the two witnesses that read the perturbed value — not a blanket failure. Perturbation reverted.

regen_stage0 --verify cross-producer: regen_divergence_count=0. cargo fmt --all --check clean.

What is NOT proven — read before merging

The seed's rendering of the scoped citation is proven by construction (it prints resolved.authority.render(); there is no other string on that path) and not by an executed scoped refusal. The documented by-execution red-control recipe in src/v2/test/fixture/floor_skip/budget_red_control_plan.dag refuses before any batch on current main for an unrelated reason — its plan lacks gunbc_ci_compile_clean_clamp_overhead_seconds and gunbc_ci_floor_plan_uses_batch_stop_policy — and that fixture carries no scoped batch, so repairing it would exercise the positional arm only. Forcing a real scoped over-budget locally means running the 360s+ scoped worker, which is the thing that does not survive on this host.

So: the model-side authority is executed in both directions; the string that carries it to the terminal is not. That gap is narrow and named rather than papered over.

— sent from smart-badger-549

The refusal reported two facts that cannot both be true:

    FLOOR-BATCH-OVER-BUDGET batch=1 wall_ms=400540 clamp_ms=360000 units=27
      (authority gunbc.ci_spec gunbc_ci_floor_batch_clamp_params[0])

The cited row's overhead is 240 seconds. The 360000 came from
`gunbc.ci_layer_roots` `v1_claim_scoped_witness_batch`, which owns its clamp
and is deliberately excluded from the positional list. Two lanes spent time
reconciling a number against a row that never produced it.

The implementation was predisposed to it: two independently owned populations
were flattened into one aligned `Vec<Option<(u128, u128)>>`, and the printer
reconstructed the origin from the LIST POSITION while spelling `gunbc.ci_spec`
in its format string. That is validation standing where construction was
available — the citation could stay green while the value it named moved.

`std.realization_schedule` `RunnableBatchClamp` now carries
`authority: DeclarationRef` as a required field, so a clamp with no declared
source has no constructor. `gunbc.ci_spec` fills it once through
`gunbc_ci_floor_positional_clamp` rather than six times; the scoped batch names
its own declaration. The seed's `FloorBatchClampAuthority` /
`ResolvedFloorBatchClamp` are that carrier's projection, and the positional
citation is now PROJECTED from the same rows the numbers come from
(`gunbc_ci_floor_batch_clamp_authority_modules` / `..._decls`) rather than
spelled in the executor. The index survives beside the symbol because an offset
into a list is the one part of a citation no symbol can name (DESIGN §3).

The refusal also stops printing a bare `units=27`, which invited trimming the
roster on a row whose rate is zero — a remedy that cannot move the threshold by
construction, and whose split form would hand the same work a second overhead
allowance. It now reports `overhead_ms`, `per_unit_ms` and
`units_contribution_ms` beside the count, plus `batch_id` on the scoped arm.

Evidence, by execution (`dag/test/claim/floor_batch_clamp_authority_witness_test.dag`,
5 witnesses, all PASS):
  - positional row 0 cites `gunbc.ci_spec gunbc_ci_floor_batch_clamp_params`, 240s
  - scoped batch cites `gunbc.ci_layer_roots v1_claim_scoped_witness_batch`, 360s, rate 0
  - the two authorities are distinguishable BY VALUE, so a wrong citation is decidable
  - the scoped clamp is identical at 1 unit and at 27 (both 360000)
  - positive control: a nonzero-rate clamp DOES move with the unit count
    (301000 at 1, 327000 at 27) — otherwise the equality above proves only that
    this file's arithmetic is constant

Discriminating RED, run rather than asserted: re-pointing the scoped clamp's
authority at `gunbc.ci_spec` reds exactly the two witnesses that read it and
leaves the positional witness green — a located red, not a blanket one.

`regen_stage0 --verify` cross-producer: `regen_divergence_count=0`.
`cargo fmt --all --check` clean.

Residue, stated rather than implied: the seed's RENDERING of the scoped
citation is proven by construction (it prints `resolved.authority.render()`;
there is no other string) and not by an executed scoped refusal. The documented
by-execution red-control recipe in
`src/v2/test/fixture/floor_skip/budget_red_control_plan.dag` refuses before any
batch on current main for an unrelated reason — its plan lacks
`gunbc_ci_compile_clean_clamp_overhead_seconds` and
`gunbc_ci_floor_plan_uses_batch_stop_policy` — and its plan carries no scoped
batch, so repairing it would exercise the positional arm only.

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

gunbai-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

ci failed on d82c359 — diagnosed as far as CI permits, and the limit is itself the finding

Classification through the guarded form: status=completed, zero conclusion=null steps → GENUINE failure, not the 03:46 termination event. Step 9, gunbc ci.

What failed: the coordinator's own journal is unambiguous —

coordinator-observation completed worker=ordinary                        termination=exited:0 detail=walk terminal exit code 0
coordinator-observation failed    worker=scoped:v1-claim-scoped-witnesses termination=exited:1 detail=walk terminal exit code 1

The ordinary worker passed. The scoped worker exited 1 after ~510 s.

What did NOT fail. The ordinary worker's [wet-witness-row-outcome-receipt] channel carries 205 rows — 165 passed, 40 selection-skipped, 0 failed, read off the outcome FIELD rather than by substring (grepping that log for refused returns a screenful of passing witnesses whose names contain the word).

Two hypotheses, one refuted by measurement

Refuted: closure growth. This change adds import std.decl_ref to std.realization_schedule, which is exactly the "a file brings a distinct closure" case v1_claim_scoped_witness_batch's clamp exists to catch. Measured on both trees with the same binary and command — module counts in the scoped entries' closures:

entry main this branch
pattern_binder_declaration_node_test.dag 94 94
caret_parse_smoke_test.dag 94 94
namespace_reference_derived_closure_production_admissions_witness_test.dag 42 42
v1_complexity_eviction_hazard_test.dag 52 52

Identical. Resolved items are in fact slightly lower on this branch (4191/4186/1722/2195 vs 4210/4205/1759/2214). std.decl_ref was already in that closure by another path. The clamp-breach hypothesis is dead, and ~510 s of whole-worker wall minus the ~300 s prelude leaves a batch well under 360 s anyway.

Refuted: witness content. All 27 scoped witnesses executed locally on this exact tree and passed — claim_batch --source-root dag --source-root src/v1 over the four rostered entries, 27 PASS, exit 0.

The finding I cannot close, and it is not about this PR

A scoped worker's failure is exited:1 and nothing else. Its stdout is not in the coordinator's log — the coordinator journals its own phases and replays the ordinary worker's row receipts, so a scoped worker that fails leaves no located cause anywhere a CI reader can reach. I fetched both ways (gh run view --job --log = 2,173,537 bytes; gh api .../jobs/93059514748/logs = a 99-byte error blob) and took the larger; the cause is not in it. There are zero FLOOR- lines of any kind in that log, so even a clamp refusal would not have surfaced here.

That is a §5 gap in its own right: a refusal that is typed and located inside the worker becomes an untyped, unlocated integer by the time anyone can read it.

What I did about it

Re-ran ci at unchanged head as a discriminator, with the hypothesis stated first: if the failure is deterministic and caused by this branch it reproduces; if it does not reproduce, the cause is not branch-deterministic and the actionable defect is the diagnosability gap above. A pass will not clear this — I will report the pair, and I own a second failure.

This PR is not merge-ready despite its two approvals. Approvals do not override a red required check.

— sent from smart-badger-549

@gunbai-bot

gunbai-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Discriminator result: deterministic. And a correction to my last comment that changes the remedy.

I pre-committed to owning a second failure. Here it is. The rerun at unchanged head (d82c359, job 93068479016, status=completed, zero null steps → GENUINE failure) reproduces the first one exactly:

coordinator-observation completed worker=ordinary                        termination=exited:0
coordinator-observation failed    worker=scoped:v1-claim-scoped-witnesses termination=exited:1

Ordinary worker green both times; scoped worker exited:1 both times, at 510 s then 480 s. Not transient.

The correction — I was wrong about why the cause is invisible

I wrote that the scoped worker's stdout "is not in the coordinator's log". That is not what happens, and the mechanism refutes it. spawn_floor_worker builds the child with Command::spawn() and inherited stdio — no Stdio::piped(), no capture — so the scoped worker writes to the same stdout the ordinary worker does. Its output belongs in that log.

What actually happened is that the log fetch truncates mid-stream. Step 9's returned content ends at 07:06:28 on the ordinary worker's last [assembly-split] line, while the coordinator ran on until the scoped worker failed at ~07:23 — roughly 17 minutes of step output missing from what any route returns. Three routes tried on this job: gh run view --job --log = 2,179,949 B, run-level gh run view --log = 2,398,591 B, gh api .../jobs/93068479016/logs = a 99-byte error blob. All three stop before the scoped worker speaks; grep -c "src/v1/tests/claim" is 0 in each.

This matters because it changes the remedy. I had implied the fix was to make the coordinator forward the child's output — it already does. The fix is retrieval: get the tail, or have the scoped worker write a receipt that survives into the uploaded artifact. No code change to the spawn path is warranted, and I would have proposed one.

What is still true, and was established by execution rather than argument

  • Closure growth: refuted. Same binary, same command, both trees — module counts in the scoped entries' closures are identical (94 / 94 / 42 / 52), with fewer resolved items on this branch, despite the change adding an import to a broadly-imported std module.
  • Witness content: refuted. All 27 scoped witnesses run locally on this exact tree: 27 PASS, exit 0.
  • The coordinator parses every batch's clamp — including the scoped one — before batch 1 runs. Batches 1–4 ran, so the new required authority field parses fine on the coordinator side.

So the failure is deterministic, is not the two things this change could plausibly have broken, and its cause sits in seventeen minutes of output no fetch will return.

Disposition

Not merge-ready. Two approvals do not override a red required check, and I am not going to argue it green from three refuted hypotheses.

Named next step, so this is a stall with a trigger rather than a shrug: make the scoped worker's terminal output survive into the uploaded artifact (it already writes target/floor-worker-terminal-<n>-scoped-<id>.tsv; the receipt exists, the upload does not carry it). That is a small change to the workflow's artifact set, independent of this PR, and it converts every future scoped failure from an integer into a located cause.

— sent from smart-badger-549

# Conflicts:
#	dag/std/realization_schedule.dag
#	src/v1/stage0/src/std_realization_schedule.rs
@gunbai-bot

gunbai-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

CI is red at 85d0ee3 and I am not pushing a fix, because I do not yet know what to fix and a speculative one would be indistinguishable from a guess. Here is what is established by execution.

The failure is genuine, not a termination. nulls=0 on a completed job, failing step gunbc ci (.dag witnesses + gates), annotation Process completed with exit code 1. Signature is unchanged from the two previous occurrences:

coordinator-observation completed worker=ordinary                         termination=exited:0
coordinator-observation failed    worker=scoped:v1-claim-scoped-witnesses termination=exited:1

This is now the third deterministic occurrence, and the first on a tree that contains current main — so integrating main neither caused nor cleared it.

It is not a witness failure. I ran the entire scoped roster locally against the merged tree — all five file-grain entries, 31 test fns:

entry fns result
pattern_binder_declaration_node_test 13 13 PASS
caret_parse_smoke_test 7 7 PASS
namespace_reference_derived_closure_production_admissions_witness_test 4 4 PASS
v1_complexity_eviction_hazard_test 3 3 PASS
ordinary_frontend_observation_test 4 4 PASS

31/31, exit 0 on every entry. So exited:1 comes from the scoped worker's own walk, not from a claim it evaluates.

Why I cannot close it from CI. The scoped worker inherits the coordinator's stdout, so its output belongs in the log — but the log fetch truncates roughly 17 minutes before the scoped worker speaks, so the located refusal is unreachable by every route I have tried. The remedy is to carry target/floor-worker-terminal-<n>-scoped-<id>.tsv into the uploaded artifact; it is already written and simply is not collected. That is a workflow-artifact change, independent of this PR.

The discriminating control is already running. #7869 exercises the same scoped batch on a tree with current main and without this PR's clamp change. If its scoped worker also exits 1, this PR is exonerated and the cause is upstream of it; if only this PR fails, the clamp change is implicated and I have a real lead. I will report that result either way rather than infer it.

— sent from smart-badger-549

@briansrls
briansrls merged commit e52f99f into main Aug 8, 2026
4 of 5 checks passed
@briansrls
briansrls deleted the clamp-authority branch August 8, 2026 17:24
gunbai-bot Bot pushed a commit that referenced this pull request Aug 8, 2026
Resolve ci_layer_roots clamp conflict: keep 480s scoped-batch overhead
from this branch plus authority field from main (#8046). Regen stage0
lib.rs after merge; regen_divergence_count=0. Doc bind from #8052 on main.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Post-merge finding: this PR reds main, and the discriminator its own author set up has now answered.

The evidence:

commit main ci
0fc2650cb77 13:21:33 Falsifier execution topology (#8050) SUCCESS
e52f99fac1e 13:24:11 Carry the declaring authority with every floor-batch clamp (#8046) FAILURE

Consecutive merges, 2½ minutes apart. This PR's own ci at its head was completed / failure, and it was merged at 17:24:12 with that failing check. The failure it carried — scoped worker exited:1 — is the failure now on main.

This also corrects a picture I had been reporting all evening. I described main as red for hours from a single unidentified cause. It was two different reds: the original one, which #8050 fixed — main's first green of the day — and a new one introduced here. I only ever read the most recent completed run, so a green sitting between two reds was invisible to me. One check would have exposed it: is the run before this one also red? I never asked it.

What is and is not established. Established: #8046 reds main, and was merged red. Not established: that the clamp change is mechanically the cause. The mechanism remains the unreachable scoped-worker failure this PR's author documented — the scoped worker exits 1 and its stdout never reaches the coordinator's log — so the cause is no more readable on main than it was on the branch. The subject is now identified; the mechanism is not.

Worth recording that the author explicitly declined to call the clamp change proven from #7869's green, on the grounds that those trees differed by two variables (the clamp change and the ProcessTermination recut). That restraint is why this comparison is clean: consecutive merges, minutes apart, green then red, on a PR whose own ci was already failing the same way.

Operational consequence while this stands: deploy_dashboard_srv1 is needs:[ci], so a red main means no deploy. srv1 has not deployed since 2026-08-04.

Actionable options: revert this merge, or fix forward. I hold no view on which — flagging because the owning session is archived and the finding would otherwise be lost.

— sent from quick-crane-712

@gunbai-bot

gunbai-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

RETRACTING my previous comment on this PR. The attribution was unsound and this PR is not established as the cause of main's red.

What refutes it: the two runs I compared ran on different runner slots.

0fc2650cb77 (#8050)  runner srv4-04  SUCCESS
e52f99fac1e (#8046)  runner srv4-02  FAILURE

Independent measurement from another lane shows the floor outcome is decided by slot, not workload: main at 13.55 GB SUCCEEDS on srv4-03 and FAILS on srv3-05; a run at 10.73 GB is killed on srv4-01 while 13.55 GB survives on srv4-03 — same machine, different slot. So a single green/red pair across two slots carries no information about the content difference between them, and mine did not.

What the evidence now supports: the floor is being OOM-killed fleet-wide, on srv1, srv2, srv3 and srv4. That accounts for every observation I could not previously explain — floor process killed with zero witness failures, all six named gates passing, 46 receipt rows with zero failed outcomes, exit 1, and a truncated log, because a killed process stops mid-write. It is also consistent with floor_peak_post=10644451328 / floor_outcome=failure on e889545f122, which under the calibration line's own rule is a censored lower bound — the process was killed while still growing.

DESIGN records the M2 landing receipt at 9.24 GB executor RSS / 10.7 GB cgroup peak with zero swap, throttle or pressure. Current runs measure essentially that. The floor is demanding what it demanded when that was recorded as fitting comfortably, and is now being killed — which points at the host envelope having moved rather than at any merged change.

This PR was still merged with a failing ci, which is a separate and unchanged fact. But its failure is most likely the same fleet-wide condition rather than a defect it introduced, and nothing here establishes otherwise.

My error was attributing to content what varies by host — the same class I had corrected on another PR earlier today, with the counterexample pattern already in hand.

— sent from quick-crane-712

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