Skip to content

Root-cause disk-tier repeat-resolve memory growth (>8GiB OOM on second resolve through v1 disk cache seam) - #7728

Merged
briansrls merged 5 commits into
mainfrom
session/crisp-boar-681
Aug 3, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/crisp-boar-681

Conversation

@briansrls

@briansrls briansrls commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Root cause

The resolved-graph disk seam suppressed materialization-provider routing on the probe (read) direction only. The store (write) direction never consulted the same flag.

So when the provider's own authority closure (dag/std/materialization_provider.dag) was being resolved during bootstrap, that nested resolve reached the store branch, which called resolve_closure_request_key_from_digests → materialization_provider_ctx(). The ctx memo slot is written only after build_materialization_provider_ctx_cold() returns, so the re-entrant demand read an empty slot and rebuilt the whole provider closure — a fresh nested resolve, which re-entered the store again, unbounded.

The observed shape was an OOM kill, not a diagnostic.

Evidence by execution

Reproduced on unmodified origin/main (7024637) via the already-merged sibling test same_subject_resolves_share_one_graph_store_hits_v2_disk — SIGKILL, zero diff to the seam files. Phase-RSS probes (temporary, removed before this PR's final state) located it exactly:

test:after-index1-build:                                     9 MiB
seam:enter depth=1 subject=085f8ffb30a15f7e nsources=3:     11 MiB
seam:before-probe:                                          11 MiB
seam:after-probe:                                           11 MiB
store:enter depth=1 suppressed=false:                       13 MiB
seam:enter depth=2 subject=fd663d39a4ac42de nsources=34:  1064 MiB
store:enter depth=2 suppressed=true:                      1251 MiB
   <SIGKILL>

Window/denominator for those numbers: single process, one cargo test --release run of that one test on a ctrl-build remote host whose available-memory signal read ~1.9–2.3 GiB ([floor-drain] degraded_budget_source: cap=1895..2285 source=/proc/meminfo MemAvailable). RSS is field 2 of /proc/self/statm × 4096. The absolute kill threshold is therefore host-dependent — this host dies at ~1.3 GiB where the reporting session saw >8 GiB — but the shape (unbounded recursion, ~1 GiB of resolved graph per level) is the same defect.

The decisive readings:

  • depth=2 with nsources=34 — the nested resolve is a different, larger closure (the provider's own), not a repeat of the 3-module fixture.
  • depth=2 suppressed=true — the suppression flag was correctly set; the store branch simply ignored it.
  • The backtrace at depth 2 confirmed the cycle: resolved_graph_from_sources_with_index → resolve_closure_request_key_from_digests → build_materialization_provider_ctx_cold → resolve_entry_graph_shared → resolved_graph_from_sources_with_index.

Refuted hypotheses (recorded so nobody re-derives them)

  • Not the decode/rewire path. My first hypothesis was that serde drops Rc sharing and the rewire_*_parent_links functions rebuild it badly. Refuted by execution: probes placed inside decode_v3_payload_from_file never printed at all — decode is not reached before the process dies.
  • Not install_cross_process_materialization_hit (the candidate named in the dispatch). It is a memo insert plus three Rc clones; it is never reached.
  • Not the second resolve. The dispatch described growth "on the second resolve against a fresh MultiEntryIndex". Measured, the growth is entirely inside the first resolve — test:after-g1 never printed. The second resolve is where a reader notices, not where the memory goes.

The fix

Two changes, both in the seed:

  1. The store direction honours the same bootstrap suppression as the probe (cli_run.rs). The flag names a window in which provider routing may not be re-entered at all; honouring it in one direction only left the recursion one seam away. The skip is counted (provider_bootstrap_store_skip_count), not silent — the window is bounded (only the provider's own closure resolves inside it) and its frequency stays observable, per DESIGN §5 (a failure arm must refuse, never widen; a degradation must stay countable).

  2. Re-entrant provider-ctx construction is a typed, located refusal (materialization_provider_consumer.rs). Suppressing routing at each known seam is validation — it concedes the re-entrant state is writable and depends on remembering every call site. The wall makes the recursion unreachable regardless of which caller re-enters, and fails loud and located rather than as a dead runner (DESIGN §5, construction over validation).

Change 1 alone fixes the observed defect. Change 2 is what stops the class coming back as an OOM if a future caller re-enters from a seam nobody guarded.

Status

DONE, green by execution:

  • same_subject_resolves_share_one_graph_store_hits_v2_disk — SIGKILL on origin/main, passes with this change (41.73s).
  • repeat_resolve_through_disk_seam_does_not_reenter_provider (new) — asserts the bootstrap store skip is counted and the provider ctx is built exactly once across a repeat resolve through the disk seam.
  • reentrant_provider_ctx_construction_refuses (new) — drives the wall directly; fails if the wall is removed.

BLOCKED — origin/main does not compile. The dashboard asked me to merge main into this branch. I did; the merge conflict was genuine and is resolved (main landed a placeholder comment where my tests go — I kept both, and rewrote the placeholder to say the finding is now root-caused rather than pending). The resulting tree then stopped compiling, inherited, not caused by me:

error[E0061]: this function takes 9 arguments but 6 arguments were supplied
  src/v1/stage0/src/v1_compiler_emit_rust.rs:14088   v1_generic_params_needing_clone_bound(...)  // 6 args
  src/v1/stage0/src/v1_compiler_trait_derive_emit.rs:321  pub fn v1_generic_params_needing_clone_bound(  // 9 params

How that attribution was derived, because it matters: I read both sides out of origin/main blobs with git cat-file, not out of my working tree. The caller is ordinary code, not text inside an emitter string literal. My branch differs from origin/main in exactly 3 files and none of them touch either file. CI on this PR reproduces the identical E0061 independently (run 30784776982, build job). Caveat I will not paper over: I never executed a standalone build of a clean main checkout — my observation is on the merge commit, whose copies of both files are byte-identical to main.

Suspected but not bisected: #7708 added bounds/type_decl_items/source_indices to the callee; #7709 is the most recent commit touching the caller file and landed after it. That shape matches a stale copy overwriting an updated call site. Someone should confirm before acting. Reported to still-bat-561 at high priority.

Module test status, measured BEFORE the merge (so these numbers stand): serial run, --test-threads=1, 20 passed; 3 failed; 664.22s. The 3 are one real failure plus two collateral:

  • provider_disposition_four_arm_matrix — panics at resolve_cross_process_cache_test.rs:867, "v3 disk hit must install into share". This is the only real failure.
  • repeat_resolve_through_disk_seam_does_not_reenter_provider (mine) and same_subject_resolves_share_one_graph_store_hits_v2_disk — both die on GUNBC_RESOLVED_GRAPH_CACHE_DIR env mutex poisoned. The first test panicked while holding CACHE_ENV_MUTEX, poisoning it; everything downstream that takes that lock dies. Pure collateral, not independent failures.

Running serially refuted my earlier parallel-interference hypothesis, and it also refuted my other one: this is not memory pressure.

Is provider_disposition_four_arm_matrix my fault? NO — settled by execution. Baselined on 7024637b05 (my pre-merge base) in a clean clone, running that test in isolation:

thread '...provider_disposition_four_arm_matrix' panicked at
  src/v1/tests/src/resolve_cross_process_cache_test.rs:865:9:
v3 disk hit must install into share

test result: FAILED. 0 passed; 1 failed; 730 filtered out; finished in 32.28s

Identical assertion, unmodified tree, no involvement of this change (line 865 vs 867 on my branch is the two-line import shift). This failure is pre-existing on main.

So the accounting for this PR is: zero test regressions. The module's 3 failures are one pre-existing real failure plus two collateral deaths on the mutex it poisons.

That pre-existing failure is itself a finding worth routing. provider_disposition_four_arm_matrix asserts Rc::ptr_eq across graphs from two different MultiEntryIndex instances plus exactly one decode — i.e. a process-level share that does not appear to exist (install_cross_process_materialization_hit installs into the per-index resolved_graph_memo). Whether the test or the implementation is wrong is an open question I did not chase; it is not this defect and not this PR.

Why it went unnoticed — and what is and is not new here. The non-execution itself is not a discovery: it is a deliberate operator ruling, recorded at gunbc.commit_workflow commit_gate_rust_suite_removed_disposition (2026-07-11), which removed the nextest run half (~37 GiB, red on main, non-required) as a permanent tolerated red under DESIGN §5 — and notably refused an escape hatch, deleting the heavy arm from the model rather than hiding it behind a skip toggle. What I observed is its deliberately narrower successor, ci_v1_compiler_tests_compile_gate_note (re-enrolled 2026-07-31 on #7490, compile-only by design, ~41s). The step name "compile gate; no test execution" is that gate honestly saying what it is. I initially reported this as an undiscovered coverage gap; that framing was wrong and is corrected here.

The new part is the blast radius, and it is what this PR is evidence for. The ruling priced the removal in nextest's own costs — size, runtime, a tolerated red. What was never priced is which tests fell into the non-executing set. Two receipts from this work:

  1. the test that reproduces the OOM defect I was dispatched to root-cause lives in that module, so the defect was structurally unobservable rather than merely unnoticed;
  2. provider_disposition_four_arm_matrix is a genuine failure that has been sitting on main unobserved, in the same module.

So the removal did not only drop a noisy suite — it made a specific class of defect invisible by construction. That is an argument about the ruling's blast radius, not a rediscovery of the ruling, and it is the part worth putting in front of the operator.

NOT ready to merge, and it cannot be evaluated at all until main compiles again.

Note on the red control. The honest limitation, stated plainly: the discriminating RED for change 1 is the OOM — revert it and the test does not fail cleanly, it takes the runner down. That is exactly why the dispatch declined to enroll cross_process_hit_skips_semantic_recompute. Change 2 is the part with a clean loud control, and repeat_resolve_through_disk_seam_does_not_reenter_provider asserts on the counted skip rather than on memory, which is the closest well-behaved proxy available. I did not find a way to make the store-suppression half fail loudly-but-safely without bounding resolve depth, which would be a larger change than this defect warrants.

Side finding, not fixed here

A 34-module closure resolve costs ~1.05 GiB of RSS in a single level (11 MiB → 1064 MiB across one nested resolve_entry_graph_shared). That is the known per-module env-duplication cost (DESIGN open thread: v1 whole-corpus run stability / build_type_env closure materialization), not something this PR touches. It is what made this recursion fatal within two levels instead of merely slow. Same window and derivation as the trace above.

What downstream needs

The warm-hit-skips-semantic-recompute clause in gunbc.materialization_kernel_closing_frontier_audit (currently PartiallyDelivered, blocked on this) can be re-attempted once this merges: a second resolve through the disk seam no longer recurses, so a witness for it no longer OOMs the runner.

Next if continued

  1. Route the pre-existing provider_disposition_four_arm_matrix failure and the "CI never executes this module" coverage gap to owners — both are recorded above, neither is this PR's scope. If my new test is the flaky one, either serialize it behind the existing CACHE_ENV_MUTEX (the module already uses that to serialize env-dependent tests) or assert on a delta captured inside that lock rather than on absolute global counts.
  2. Run the broader v1-compiler-tests suite — the suppression change alters when artifacts are written during bootstrap, and I have not swept for a test asserting on that write.
  3. Consider whether the counted skip deserves a modeled disposition row rather than a bare atomic counter.

Doc obligation this PR creates (not done here)

The finding's single home is the DESIGN Open Threads entry "disk-tier repeat-resolve memory growth", whose carrier is gunbc.design_document (dag/gunbc/design_document.dag) — DESIGN.md is a projection of it, so it must never be hand-edited.

I deliberately did not update that row. It is still accurate for main: the defect exists there until this merges, and it correctly records the state at the time it was written. It becomes stale the moment this lands, because it names as "next trigger: root-cause" two candidates (install_cross_process_materialization_hit, and the decode path failing to share across MultiEntryIndex instances) that are now both refuted by execution.

Whoever merges this should update that row in the same motion, or the next person will re-derive two dead ends. gunbc.materialization_kernel_closing_frontier_audit cites the same entry and will need its PartiallyDelivered blocking-evidence clause revisited.

Tooling note (cost me two attempts; will cost the next person the same two)

To baseline an old commit under ctrl-build:

  • git worktree add + ctrl-build from that path fails — ctrl-build does not resolve the worktree's .git file; it emits a branch listing and runs nothing, exit 0 with no usable output.
  • git clone --local <worktree> also fails — ctrl-build re-fetches the checkout on the remote build host (git fetch --depth=1 origin <sha>), and a local-path origin does not exist there: fatal: '<path>' does not appear to be a git repository, exit 128.
  • What works: clone, then git remote set-url origin https://github.com/gunb-ai/gunbc, then run ctrl-build from the clone. Add --no-local at clone time if /tmp is a different filesystem (hardlinking fails with Invalid cross-device link).

Brian Searls and others added 2 commits August 3, 2026 04:13
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts:
#	src/v1/tests/src/resolve_cross_process_cache_test.rs
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 3, 2026 13:59
@gunbai-bot

gunbai-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Flipped to ready. The stated blocker — origin/main does not compile — cleared when #7733 landed (19cc776d4e, restoring the #7708 emitter fixes that #7709's stale seed regen dropped). This branch is now green on all jobs: build, ci, regen, heal. Nothing about the PR's content changed; its blocker was external and is gone.

Note for whoever reads the body next: the paragraph explaining the E0061 breakage is now historical, and the materialization_kernel_closing_frontier_audit row it declines to update becomes stale the moment this merges — as the body itself says.

— sent from still-bat-561

@briansrls
briansrls merged commit b12027c into main Aug 3, 2026
10 checks passed
@briansrls
briansrls deleted the session/crisp-boar-681 branch August 3, 2026 16:59
briansrls added a commit that referenced this pull request Aug 3, 2026
…en (#7697)

* WIP: Lane E: self-host frontier 27-row exact-head closeout, totality wall gre

* WIP: Lane E: self-host frontier 27-row exact-head closeout, totality wall gre

* WIP audit: push interim exact-head frontier probe census (17/27 at HEAD).

Land execution-measured TSV + audit note for 17 surveyed compiler modules:
dominant RealizationGap(parse_grammar_choice_overlap_residue) at ProbeStageAssemble,
minority NameResolutionGap(resolve_module_not_found) on three modules. This is an
interim survey receipt, not roster acceptance or totality-wall closeout.

Move per-module survey driver from scripts/ (does not exist on main) to
docs/probes/ as a declared scaffold with dissolution trigger on frontier transport.

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

* WIP audit: hand-authored 17 frontier rows from survey; add compare oracle.

Document 12 pre-closeout declared-vs-survey mismatches in audit md (not
silently reconciled). Update measured_probe on 17 surveyed modules by hand
using TSV evidence; migration triggers remain authored claims. Add
diff_frontier_declared_vs_survey.sh (refuses on mismatch; does not write rows).
Do not land row-writer script — measurement is not declaration.

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

* Fix CI: doc-graph bind for probe audit md; reorder sweep for rank monotonicity.

Hand-updating roster rows to RealizationGap raised tractability ranks above
interleaved NameResolutionGap modules and broke compiler_frontier_sweep_order
rank nondecreasing. Reorder sweep by blocker band. Register the interim survey
receipt in doc_graph_roots so doc_reachability does not orphan it.

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

* Align per-module survey scaffold order with frontier sweep_order.

Keeps the hand-Rust probe driver consistent with compiler_frontier_sweep_order
after the tractability-rank reorder fix.

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

* WIP: Lane E: self-host frontier 27-row exact-head closeout, totality wall gre

* Fix invalid enum accessor impl after stage0 regen.

Regen with a stale emitter seed duplicated `<N: Clone>` onto the impl
target (`OccurrenceBindingFoldState<N: Clone>`), which rustc rejects
(E0229). Restore `OccurrenceBindingFoldState<N>`; regen --verify green.

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

* Name offline consumer for frontier per-module probe witness.

Per-PR CI excludes test/claim/long/ at dir grain but never ran this probe;
add a file-grain exclusion row and exclusion note with the full local
claim_batch recipe so survey evidence is not implied by green CI.

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

* Document survey stale-head drift and spot-check at current main.

State 9f978aa is 44 commits behind 19cc776 with five emitter-path
commits in between; record four-module spot-check where verdicts held.

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

* P2: selection degradation receipts (selected/total + reason) (#7722)

* WIP: P2: selection degradation receipts (selected/total + reason)

* P2: emit selection degradation receipts on every floor discovery run.

Every discovery completion now prints selection_state, selected/total entry groups, ratio, and fallback_reason so whole-corpus affected runs are counted degradations, not quiet success.

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

* P2: wire selection degradation into every floor receipt path.

Publish selection_state, counts, ratio, and fallback_reason on the
measurement tail, resolve receipt, floor-component JSON, and dedicated
receipt file so carrier-only emission cannot satisfy the P2 bar.

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

* P2: drop stale prep-tax doc; prove executed-only selected count.

Remove docs/plans/floor-prep-tax-program.md (owned by #7721). Add a
discriminating test that skip-before-resolve rows do not inflate
selected_entry_groups toward total.

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

* P2: drop duplicate selection-degradation stderr emission.

run_discovery_corpus_with_options already emits via
emit_selection_degradation_receipt; remove the second DAG eval in
run_discovery_batch_node (review 47735).

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

* P2: thread walk source_roots into resolve receipt writer.

Fix E0425: claim_executor bin cannot call pub(crate) default_source_roots;
pass the walk's source_roots through write_resolve_receipt_at like the
selection-degradation receipt path already does.

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

* WIP: P2: selection degradation receipts (selected/total + reason)

* P2: add SELECTION_DEGRADATION_CENSUS_MARKER to cli_run seed.

Roster bidirectional hygiene: observation_emit_census cites
cli_run.rs for [selection-degradation]; mirror other frontier sites
with a const the witness grep can find (review 47746).

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

* WIP: P2: selection degradation receipts (selected/total + reason)

* P2: rustfmt selection_degradation_interp_ctx map_err closure.

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

* Merge origin/main; restore v1_generic_params_needing_clone_bound arity.

Main merge regressed emit_rust to the 6-arg call site; trait_derive_emit
requires ret/bounds/type_decl_items (E0061 on CI merge commit).

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

* P2: witness unknown-tag SelectionUnavailable path (review 47814).

Document that Unavailable is fail-closed for unknown mode tags only;
categorization_unavailable stays on Applied/Superset fallback_reason.

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

* WIP: P2: selection degradation receipts (selected/total + reason)

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* Discharge namespace occurrence identity receipts (#7559)

* WIP: Namespace occurrence debt receipts

* WIP: Namespace occurrence debt receipts

* Restore generated occurrence allocator

* Enroll occurrence debt receipts in Cargo CI

* Track parser receipt CI enrollment debt

* WIP: Namespace occurrence debt receipts

* Track split rebuild receipt enrollment

* WIP: Namespace occurrence debt receipts

* Keep parser receipts outside compile-clean roots

* Prepare governed parser receipt enrollment

* Keep occurrence debts live until roster enrollment

* Import receipt newline index in generated projection

* WIP: Namespace occurrence debt receipts

* Derive occurrence acceptance closure from receipts

* Bind occurrence closure to its law authority

* Clarify occurrence denominator tripwire

* WIP: Namespace occurrence debt receipts

* Complete occurrence acceptance workflow relocation

* WIP: debt receipts

* Register std.occurrence_binding{,_resolve} seed modules; regen

PR #7559's build job fails because the generated witness
v1_tests_claim_occurrence_identity_debt_receipt_test.rs imports
crate::std_occurrence_binding and crate::std_occurrence_binding_resolve,
neither of which is a registered seed module. This registers both in
gunbc.stage0_emit_model generated_stage0_files and stage0 lib.rs and
regenerates.

Regeneration leaves the other 114 generated files byte-identical, but the
two newly emitted modules do not compile: 24 errors, all in
std_occurrence_binding.rs. See the escalation note -- the emitter does not
propagate a Clone bound through a user-declared generic type.

* chore: regenerate drifted generated artifacts (ci auto-heal)

* WIP: Finish PR 7559 adoption: main is repaired (19cc776), so the inherited

* Roster occurrence_identity_closing_complete for non-fold residue gate

PR #7559's acceptance-closure carrier introduces a wildcard match arm that
must be enrolled in gunbc.non_fold_residue before the always-on corpus witness
can pass. Companion to the regenerated ci.yml heal exclude for the new stage0
projection file.

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

* WIP: Finish PR 7559 adoption: main is repaired (19cc776), so the inherited

* Fix main-merge regen: restore keyed stage0 modules and total receipt_passed

Merge resolution dropped main's std_keyed_roster/row from the generated emit
plan and lib.rs; regen_stage0 from the merged tree restores both alongside
the debt-receipt module. Total occurrence_identity_receipt_passed over the
closed OccurrenceIdentityReceiptExecution coproduct instead of rostering a
non-fold residue row (closing_complete remains total from 806a0d8).

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

* WIP: Finish PR 7559 adoption: main is repaired (19cc776), so the inherited

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* Root-cause disk-tier repeat-resolve memory growth (>8GiB OOM on second resolve through v1 disk cache seam) (#7728)

* WIP: Root-cause disk-tier repeat-resolve memory growth (>8GiB OOM on second r

* WIP: Root-cause disk-tier repeat-resolve memory growth (>8GiB OOM on second r

* Remove debug RSS instrumentation swept in by auto-WIP

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Coordinator replay: wet witness per-row outcomes visible in CI job log (#7702)

* Coordinator replay for wet witness row outcomes in claim_executor.

Ordinary floor worker writes target/floor-wet-witness-row-outcome-receipt.tsv
with passed | failed | selection-skipped per row; coordinator replays into
job log on worker exit and spawn-failure paths. Unit tests discriminate the
three outcomes (claim_executor binary, not claim_batch).

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

* Fix wet witness outcome TSV parsing for empty detail columns.

Rust tab-split drops trailing empty fields; accept 4- or 5-column rows
so passed rows with no detail replay correctly.

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: falsifier is flakey on budget - please investigate (#7738)

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>

* P1 retention vs drain cohort receipt (authoritative) (#7725)

* WIP: P1 retention vs drain cohort receipt (authoritative)

* P1 retention vs drain cohort receipt: REJECT — eviction is not the tax source

Fixed 50-entry cohort run through the real floor path
(run_discovery_corpus_with_options, Adaptive width) in two modes: A
(production eviction on) and B (GUNBC_SCHEDULE_RETENTION_EVICT=0,
retain-all pole). Entries 2..34 (Mode B OOM-killed at 34/50 after
unbounded RSS growth, honestly reported and not backfilled) show
statistically indistinguishable wall/resolve times between modes —
disabling schedule-retention eviction does not collapse the ~1-2s
per-entry tax. Verdict: REJECT the retention hypothesis; redirect to
assembly/materialization reuse, per the parent's stated criterion.

Also fixes the cargo fmt violation from the prior P1 instrumentation
commit that was failing CI on this PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* WIP: P1 retention vs drain cohort receipt (authoritative)

* P1 receipt: fix cited SHA, rename mislabeled field, align scaffold wording

Per review 47754 (cursor/composer-2.5, REQUEST_CHANGES), three fixes:

1. Receipt cited b53aec1 (this PR's initial WIP commit) as the
   reproduction SHA, but p1_cohort_probe.rs doesn't exist in that
   commit's tree. Corrected to dddc795, where the probe first
   lands in git history.

2. emit_p1_cohort_entry_line's `schedule_cache_hit` field actually
   logged typecheck_compute_count() movement (a typecheck-memo
   hit/miss), not schedule-retention cache occupancy -- mislabeled
   instrumentation on a measurement-only PR. Renamed to
   `typecheck_cache_hit` everywhere (code, doc comment, receipt);
   raw checked-in logs left unedited as captured evidence, with a
   note explaining the field rename maps onto the same underlying
   signal.

3. Receipt said the probe was "kept in tree; reusable for future
   retention receipts", contradicting the in-code scaffold/dissolve-on
   framing now that P1's REJECT verdict is recorded. Reworded to
   match: probe-only scaffolding, deletes per its named trigger.

No measurement data or verdict changed -- only citation accuracy and
field/wording honesty.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* WIP: P1 retention vs drain cohort receipt (authoritative)

* chore: retrigger CI now that main's E0061 (v1_generic_params_needing_clone_bound arity) is fixed by #7733

No content change on this branch — forces GitHub to recompute the PR merge-ref against main's current (fixed) tip, since a rerun of the prior failed run reused a stale merge-ref captured before #7733 landed.

* P1 scaffold: gate per-group timing/subject-tracking behind p1_cohort_receipt_enabled()

Per review 47844: the Instant/typecheck_compute_count() timing pair and
the resolved_graph_hit subject-set scan ran on every width-1 inline
discovery-drain group regardless of GUNBC_P1_COHORT_RECEIPT — only the
eprintln emission was gated. Wraps the bookkeeping in the same
p1_cohort_detail check as its emission, so the default production floor
path (env unset) pays none of this scaffold's cost, matching the
env-gated discipline the receipt doc already claims.

---------

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

* Sole modeled publisher (model + shadow): policy-derived projection, publisher authority, shadow replay (#7594)

* Sole modeled publisher (model + shadow): rebase PR-B onto main.

Replay only PR-B carriers onto current main — no #7591 deletion content
(placement gate/roster removal stays on vivid-newt-418 until that PR
merges). Includes review 46354 digest/deletion-delta fixes and 13 witness
tests.

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

* Address review 46417: prune dead variant and dissolve parallel argv surface.

Remove unreachable AmbiguousSubtreeRule; argv authority stays only on
PublicationTransport service rows. Document slice-1 validation vs live
unforgeable-construction acceptance bar.

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

* WIP: Sole modeled publisher: ordinary sessions lose public-write capability;

* Address review 46429: align transport, delta taxonomy, and publisher gates.

Split RecordEmptyCommit so allow_empty maps to argv; prune unreachable
ProjectionDeltaClass arms for slice-1; wire decision-receipt and push-head
checks in admit_public_write with witnesses for both refusal classes.

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

* Refuse sole-publisher admission when no pushed refs are presented.

Close the empty-pushed_refs vacuous-pass fail-open before live-slice
binding; witness sole_publisher_refuses_empty_pushed_refs.

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

* Gate projection on AdmittedPublicationPolicy; match disposition directly.

derive_public_projection_plan requires construction-admitted policy so
conflicting/unknown-root policies cannot reach the derived path; dissolve
publication_disposition_is_public in favor of coproduct match. Witness
publication_policy_refuses_conflicting_prefix_rules.

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

* Address review 46476: full receipt auth and posture fold.

publication_decision_authorizes_newly_public checks policy_version,
authority, and universal audience; invalid receipts refuse with
DecisionReceiptNotAuthorizing. Replace posture Bool predicate with
session_publication_posture_fold.

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

* WIP: Sole modeled publisher: ordinary sessions lose public-write capability;

* Route publication ContentHash through std.content_hash.

Main moved ContentHash off std.types and renamed content_hash_combine to content_hash_combine_structural; update publication projection, witnesses, and publisher refusal strings to the family-grounded API.

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

* WIP: Sole modeled publisher: ordinary sessions lose public-write capability;

---------

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* Lane A: R1 invert interpreter dispatch authority (roster becomes the authority) (#7682)

* fix(r1-dispatch): restore regen fixed-point and enroll dispatch generated module

Regen was failing because type_ref_hit_ne_bind_measure_active was accidentally
dropped from the builtin registry, and v1_interpreter_dispatch_generated was
not enrolled in the stage0 crate layout (lib.rs drift). Register the scaffold in
frontier, sync crate-layout projections, and land R1 roster authority on main.

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

* WIP: Lane A: R1 invert interpreter dispatch authority (roster becomes the aut

* docs(r1-dispatch): refresh authority notes for roster inversion

Update v1_interpreter_primitive_surface authority prose and handler macro
comments to describe the post-R1 model: authored roster in .dag, generated
lookup routing, and compile-time handler alignment — not the pre-inversion
macro-token derivation story review 47740 flagged.

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

* fix(r1-dispatch): refuse emit when roster row maps to unknown site

Close review 47777 fail-open: expected_v1_interpreter_dispatch_generated_rs
now refuses when any authored row's roster_site_key falls outside
known_dispatch_emit_site_keys instead of silently omitting it from
generated lookup. Witnesses cover live-roster success and bare eval_call
site-key RED control.

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

* WIP: Lane A: R1 invert interpreter dispatch authority (roster becomes the aut

* fix(r1-dispatch): restore clone-bound call after main merge

Merge main (#7709) regressed v1_generic_params_needing_clone_bound to a
6-arg call site against the 9-arg signature; restore ret/bounds/type_decl
arguments so the build job compiles.

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

* chore: regenerate drifted generated artifacts (ci auto-heal)

* fix(r1-dispatch): honest exhaustiveness note and ci heal paths

Tighten closing-contract prose per review 47801: single-family dispatch
sites get compile-time enum exhaustiveness; bridge/native-intercept
multi-family sites honestly disclose the wildcard/unreachable! backstop.
Propagate V1InterpreterDispatchGenerationRefused.reason through artifact
emit. Add v1_interpreter_dispatch_generated.rs to ci.yml heal staging.

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

* WIP: Lane A: R1 invert interpreter dispatch authority (roster becomes the aut

* fix(r1-dispatch): repair invalid OccurrenceBindingFoldState impl emit

Revert the regen typo that emitted `OccurrenceBindingFoldState<N: Clone>`
(E0229). With emit_bare_type_params already in the seed, the correct
application form is `OccurrenceBindingFoldState<N>`; regen --verify passes.

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

* fix(r1-dispatch): regen ci.yml and dispatch artifact to clear drift gate

HealAuthorCommitRequired was failing because hand-edited ci.yml skew-guard
exclude ordering did not match expected_ci_yml(). Regenerated via main_wet.

Fixed v1_interpreter_dispatch_emit to emit fully-qualified enum paths in
identity arm macros and #![rustfmt::skip] so pre-commit fmt does not fight
the generated-artifact fixed point.

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

* WIP: Lane A: R1 invert interpreter dispatch authority (roster becomes the aut

* fix(r1-dispatch): use item-level rustfmt::skip in dispatch emit

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

#![rustfmt::skip] is unstable in submodule files (E0658 on CI). Emit
#[rustfmt::skip] on each generated enum, lookup fn, and arm macro instead.

* fix(r1-dispatch): module-scope arm macros, not macro_export

macro_export arm macros cannot be invoked via $crate:: from another
macro (macro_expanded_macro_exports_accessed_by_absolute_paths). Drop
#[macro_export] from dispatch emit and call through
v1_interpreter_dispatch_generated:: in handler macro expansions.

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

* fix(r1-dispatch): hoist arm macros via macro_use for nested handler expansion

macro_export arm macros cannot be invoked from nested macro_rules! via
$crate:: (macro_expanded_macro_exports_accessed_by_absolute_paths) and
non-exported module-path invocation does not resolve. Import generated
arm macros with #[macro_use] on v1_interpreter_dispatch_generated before
v1_interpreter and call them by bare name in handler expansions.

Align roadmap node v1-interpreter-primitive-dispatch-authority with the
site-scoped exhaustiveness contract (review 47830): compile-time refusal
on single-family sites, unreachable! backstop on bridge/native-intercept.

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

* WIP: Lane A: R1 invert interpreter dispatch authority (roster becomes the aut

* chore: regenerate drifted generated artifacts (ci auto-heal)

* fix(r1-dispatch): make lib.rs macro_use survive regen fixed-point

Hand-editing lib.rs for #[macro_use] was overwritten by regen_stage0.
Teach emit_lib_rs_from_files to emit macro_use on
v1_interpreter_dispatch_generated and order it before v1_interpreter in
the file-derived mod list; sync gunbc_stage0_crate_layout_generated.rs
with the frontier hand-maintained block. regen_stage0 --verify now passes.

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

* fix(r1-dispatch): resolve main merge — lib.rs modules and ci.yml drift

Merge main (#7606 keyed-roster) left lib.rs missing std_keyed_roster and
std_keyed_row module declarations. Regenerated ci.yml and .gitattributes via
main_wet so heal skew-guard excludes match expected_ci_yml() after the merge.

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

* docs(r1-dispatch): narrow authority note to site-scoped exhaustiveness

Review 47840: v1_interpreter_primitive_surface_authority_note claimed all
roster/handler mismatches fail at compile time; align with the honest
site-scoped bar already in roadmap_authority and the acceptance contract
(single-family sites compile-time; bridge/native-intercept unreachable!
until per-family enum split).

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

* WIP: Lane A: R1 invert interpreter dispatch authority (roster becomes the aut

* fix(r1-dispatch): repair dispatch emit dag parse for collision RED

v1_interpreter_dispatch_emit.dag failed v1 parse (expected expression,
found EqEq) when == started a continuation line in
rust_variant_collision_synthetic_red_control. Single-line the equality
and use negated == for identity inequality.

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>

* Fix audit scaffold fail-open and rename inflated closeout note.

Probe survey script now refuses on per-module failure instead of || true
stale-row widening; rename frontier_probe_exact_head_interim_audit_note
to match 17/27 interim state and empty manifest stub.

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

* chore: regenerate drifted generated artifacts (ci auto-heal)

* Align probe note and survey md with interim audit framing.

Rename closeout wording in wave2 sizing note; document that 17 frontier.dag
rows were hand-authored in this PR and oracle diff greens for surveyed slice.

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

* WIP: Lane E: self-host frontier 27-row exact-head closeout, totality wall gre

* Regen stage0 lib.rs for regen_verify gate.

Adds v1_tests_claim_occurrence_identity_debt_receipt_test mod export
so regen_verify_gate_passes matches fresh self-compile.

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.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>
Co-authored-by: gunbai-bot[bot] <289086189+gunbai-bot[bot]@users.noreply.github.com>
gunbai-bot Bot pushed a commit that referenced this pull request Aug 4, 2026
…OOM wording.

Public closeout walls use std.measure.Millisecond; design open-thread no longer treats OOM as the warm-hit skip blocker after #7728.

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbai-bot Bot pushed a commit that referenced this pull request Aug 4, 2026
Witness comparison must stay on one line (multiline `>` parsed as Gt); regenerate DESIGN.md open-thread to match design_document after #7728 wording.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Aug 4, 2026
…nosis lanes (#7760)

* WIP: CI perf

* Close CI-cost research arc with harvested production receipt and terminal dispositions.

Bank measured walls from main run 30863019228; settle #7522/#7671/#7534 as MEASURED or OPEN-with-trigger; retire stale in-flight/probable claims in five-minute and roadmap authorities.

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

* chore: regenerate drifted generated artifacts (ci auto-heal)

* Address review 47900: Millisecond duration surface and design-thread OOM wording.

Public closeout walls use std.measure.Millisecond; design open-thread no longer treats OOM as the warm-hit skip blocker after #7728.

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

* Fix CI parse panic and DESIGN.md drift after closeout edits.

Witness comparison must stay on one line (multiline `>` parsed as Gt); regenerate DESIGN.md open-thread to match design_document after #7728 wording.

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

* WIP: CI perf

* Model the CI-cost closeout as typed walls and settles, not prose strings.

Expose unattributed_ci_wall (1902042 ms) with pipeline/CI reconciliation; narrow assembly to compiler_next_measured_target; freeze entry-view until PR2 assigns the remainder.

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

---------

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.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