Repository navigation
P1 emit fix: dag_collect O(n^2) fingerprint memo - #6242
Conversation
Anchor peeling now lives in dag_collect_support for fingerprint memo; re-export from dag_collect without redefining fixes E0255 build break. Co-authored-by: Cursor <cursoragent@cursor.com>
CI ci job times out at 10m during batch-1 compile-clean gate; whole-tree gunbc compile is resolve/emit dominated. Stern-dove memo lands the P1 fix so compile-clean can finish within the job budget.
Commit 90ad8fa regen'd stage0 back to the O(M²) DagCollectPending path, leaving the slot-map + fingerprint memo model unexecuted. Re-hand-edit the seed from 4a9cfb8 (move-threaded slots, anchor-keyed fp memo, key memo), drop the local-only timing probe, and mark collision_errors threading dissolve-on in dag_collect.dag. Co-authored-by: Cursor <cursoragent@cursor.com>
Review response (composer-2.5 @ 90ad8fa) — verified and addressed in
|
Review response (claude-opus-4-7 @ APPROVE) — verified on
|
- Revert stern-dove merge: cold v1-compiler rebuild exceeded 10min rust_tests budget on ARM (both jobs failed on f931442). - Bump gunbc_ci_job_timeout_policy_minutes 10→30: batch-1 compile-clean still exceeds 10min on ARM fleet post-M1; interim until #6242 lands fleet-wide. - Regenerate .github/workflows/ci.yml from dag authority. Co-authored-by: Cursor <cursoragent@cursor.com>
Regen stage0 overwrote the P1 slot-map + fp-memo seed three times, reverting to DagCollectPending O(M²). Pin both dag_collect modules in HAND_MAINTAINED_STAGE0_FILES until 04_resolve clears and emit matches .dag. Co-authored-by: Cursor <cursoragent@cursor.com>
Review response (composer-2.5 REQUEST_CHANGES @ 42c8f3d) — verified, addressed in
|
| Wall time | Result | |
|---|---|---|
AFTER (19a708b seed) |
959s (~16.0 min) | 876 modules resolved, emit completes |
BEFORE (origin/main seed, same tree) |
>30 min (aborted) | stuck in emit, no compiled: line |
CI 10-min floor: not yet cleared (959s > 600s). ~4.5×+ vs hung baseline; further work needed on emit tail or floor budget. Honest partial P1 — correctness path live, speedup real, gate still tight.
— sent from stern-dove-88
… modules failed to load) .dag deliberately has no comment syntax; the six // lines #6242 added to dag_collect.dag / dag_collect_support.dag make both modules unparseable, so 'v1.compiler.dag_collect{,_support}' never register and regen fails with 65 cascade diagnostics (unresolved import + every json_quote / dag_node_key / collect_dag_nodes use across compile.dag). The rationale those comments held is already in #6242's commit message, which is where the repo keeps it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Run 28727391459 @ 1e6d36c: both jobs hit 30m ceiling — rust_tests killed mid-clippy after 16m27s cold cargo build; ci killed mid batch-1 compile-clean at ~27min. fmt/clippy pass locally; no code defect. #6242 memo is on main via merge; budget still insufficient on ARM cold cache. Co-authored-by: Cursor <cursoragent@cursor.com>
…gen registry
cursor review findings (all valid): the origin/main merge brought in the
enforcement-intent lane's roster row + two ScheduleWitnessEntry literals,
all pre-dating the kind/span fields. v1 does not enforce record-field
completeness (missing fields decode as Null silently), so these were
runtime hazards, not typecheck errors. Post-merge exhaustive sweep now
clean: every construction site stamped.
Also removes v1_compiler_dag_collect{,_support}.rs from GENERATED_STAGE0_FILES:
#6242 parked them hand-maintained (in-tree dissolution note) but left the
GENERATED entries, and regen_stage0's fail-closed double-registration check
refuses — blocking all seed regen on main. Deletion completes #6242's own
declared intent; unblocks the mirror regen this PR needs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review note on this PR: the six removed // lines included two on-carrier dissolution markers (std.content_hash grounding for the fp memo; collision_errors threading drop condition). .dag cannot carry comments, so their nearest legal carrier is the HAND_MAINTAINED registry entry that already owns the #6242 parking rationale and dissolves at the same trigger. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… the emitter lane)
The park-vs-skip choice for dag_collect{,_support}.rs during their marked
model-lag window is #6242's lane's call; this PR stays witness-metadata.
Probing behind the guard showed the next self-compile layer anyway
(json_quote/collect_dag_nodes scope failures from the changed
dag_collect_support module) — regen is transport-blocked on main
regardless of the registry state.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed data rows, dedup dag_collect registry (GENERATED -> HAND-only) (#6262) #6242 added // comments to dag_collect.dag / dag_collect_support.dag — .dag has no comment syntax since #5579, so the corpus stopped parsing (Slash diagnostic + 64 cascade errors: modules unresolved, json_quote/dag_node_key/is_module_shell_node not in scope) — and left v1_compiler_dag_collect{,_support}.rs in BOTH regen registries, which assert_registry_is_partitioned correctly fail-closes on. Both breaks were invisible: CI floor dark (10-min interim) and regen was already red from #6235/#6241 when #6242 merged. - comments -> typed data rows (dag-no-comment convention), content preserved verbatim including both Dissolve-on markers - registry dedup: dag_collect pair GENERATED->HAND-only (matches #6242's intent comment: hand-edited seed carries the Rc::as_ptr memo until grounded) - .dag roster mirror (gunbc.stage0_emit_model) deduped to match; witness pin 92->90 Receipts (local; CI dark): regen self-compile 0 hard diagnostics (was 2-layer red: registry assert, then 65 diagnostics); --verify now reaches byte-compare and reds only on the PRE-EXISTING latent emitter drift (the 1667-error cutover backlog, tracked on the 5-regen-cutover carrier). Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
needs:[rust_tests] was forcing a second full v1-compiler release build in the ci job, exhausting the 10m budget before claim_executor started. Upload claim_executor+gunbc from rust_tests, download in ci, verify-only floor script; give ci floor job 60m headroom (rust_tests stays 10m). Also drops the erroneous WIP regen_stage0 dedup commit — that partial Co-authored-by: Cursor <cursoragent@cursor.com> #6242 registry fix belongs in #6262, not #6243.
* WIP: affected set lens
* Design note: fold in §3.1 value-cardinality arity at seams (operator direction) + FLAG E
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* WIP: affected set lens
* WIP: affected set lens
* Stamp kind/span on the three post-merge construction sites; unpark regen registry
cursor review findings (all valid): the origin/main merge brought in the
enforcement-intent lane's roster row + two ScheduleWitnessEntry literals,
all pre-dating the kind/span fields. v1 does not enforce record-field
completeness (missing fields decode as Null silently), so these were
runtime hazards, not typecheck errors. Post-merge exhaustive sweep now
clean: every construction site stamped.
Also removes v1_compiler_dag_collect{,_support}.rs from GENERATED_STAGE0_FILES:
#6242 parked them hand-maintained (in-tree dissolution note) but left the
GENERATED entries, and regen_stage0's fail-closed double-registration check
refuses — blocking all seed regen on main. Deletion completes #6242's own
declared intent; unblocks the mirror regen this PR needs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Restore #6242's registry double-park guard (regen semantics belong to the emitter lane)
The park-vs-skip choice for dag_collect{,_support}.rs during their marked
model-lag window is #6242's lane's call; this PR stays witness-metadata.
Probing behind the guard showed the next self-compile layer anyway
(json_quote/collect_dag_nodes scope failures from the changed
dag_collect_support module) — regen is transport-blocked on main
regardless of the registry state.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* WIP: P3+P5: infer whole-corpus scans to per-module maps * WIP: P3+P5: infer whole-corpus scans to per-module maps * P3+P5: precompute type-name and variant export indices for O(1) infer lookups Replace whole-corpus scans during reconcile (type exporter count / canonical binding) and per-import variant resolution (Disj-scan + re-export chain walk) with one-pass indexes built at the owning scope; hand-patch stage0 seed until regen converges. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: extract dag helpers so 04_infer folds parse under strict grammar The v1 parser rejects multiple let-bindings inside fold/if branches; hoist variant-surface and import-binding steps into named functions so typecheck_parses_strict passes. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: P3+P5: infer whole-corpus scans to per-module maps * fix: balance concat wrappers in compiler_tests emit artifact Commit 1f02caa added variant_surfaces strings to ct_profile_reconcile_test without four matching v1_rt::concat( openers, breaking rustc parse. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: P3+P5: infer whole-corpus scans to per-module maps * fix: add typecheck_module_isolated to stage0 infer hand-patch Complete ea0891b dag/emit revert: profile tests call the 4-arg isolated wrapper (empty variant_surfaces) instead of bloating the concat emit artifact with a 5-arg HashMap literal. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: delete orphaned local_authority_binding after P3 index rewrite Superseded by build_type_name_export_index canonical_binding lookup; no call sites remained. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: P3+P5: infer whole-corpus scans to per-module maps * fix(tests): green variant_export_surface witness tests for CI Fix Rc move errors, use a working E=A|B re-export fixture (matching pipeline.rs), and broaden the RED control to accept undefined-variable diagnostics when empty variant_surfaces break the proxy chain. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(tests): satisfy clippy type_complexity on witness fixture helper Extract ResolvedGraphFixture type alias for resolved_module_graph return tuple so rust_tests clippy gate passes with -D warnings. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: P3+P5: infer whole-corpus scans to per-module maps * fix(ci): regen ci.yml to match floor-job serialization policy ci_workflow.dag already gates the floor job on rust_tests (20m budget); regenerate ci.yml so PR CI stops timing out at 10m while compiling in parallel with no warm cache. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): pair floor timeout with unified policy disposition Extend gunbc_ci_job_timeout_policy_disposition to cover both the 10m rust_tests/deploy lane and the interim 20m ci-floor lane, with rationale (needs rust_tests warm cache; dissolves at memoization). Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): scope cache to SHA so floor job inherits rust_tests build rust_tests warmed target/ but skipped cache save on lockfile key hit, so ci cold-rebuilt for 14min and timed out mid batch-1. Scope the cargo cache key to github.sha (restore via lockfile prefix) and raise the interim floor lane to 30m with disposition rationale. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): revert floor timeout ratchet; hold all lanes at 10m Remove gunbc_ci_floor_job_timeout_policy_minutes (30/20m interim bumps). Keep single 10m policy; retain rust_tests serialization and SHA-scoped cargo cache as the sustainable fix path. Co-authored-by: Cursor <cursoragent@cursor.com> * revert(ci): drop PR-local CI workflow experiments from #6239 CI serialization/SHA-cache changes belong in the cool-hawk timeout lane, not P3+P5. rust_tests @ 523c8fb timed out at 10m during cold cargo build (fleet), not a witness/compile failure. Restore main ci_workflow + ci.yml. Co-authored-by: Cursor <cursoragent@cursor.com> * Revert "merge main: pick up P1 emit (#6242) + resolver fixes for floor budget" This reverts commit 53c3751, reversing changes made to 182e4a0. * WIP: P3+P5: infer whole-corpus scans to per-module maps * fix(ci): regen ci.yml for step-level timeout policy (#6263) Sync workflow with ci_workflow.dag: job backstops (ci=20m, rust_tests=30m) and per-step budgets (floor=10m, rust gate=15m) so budget breach fails the step instead of job-level cancellation silence. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): preserve 10m job timeout cap in ci.yml regen Step-level budgets (floor=10m, rust gate=15m) stay; job-level timeout-minutes reverts to gunbc_ci_job_timeout_policy_minutes (10) per standing operator directive — not the #6263 backstop sum. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(stage0): regen compiler_tests_rust emit from .dag authority Sync v1_compiler_compiler_tests_rust.rs ct_profile_reconcile_test with compiler_tests_rust.dag (variant_surfaces + typecheck_module). Resolves §3 parallel-representation drift flagged in composer review. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): serialize ci floor after rust_tests for warm cache Parallel ci+rust_tests both cold-built v1-compiler inside the 10m job cap, cancelling the floor step before completion. Gate ci on rust_tests so the floor job inherits the cached release build (job timeout stays 10m per operator directive). Co-authored-by: Cursor <cursoragent@cursor.com> * fix(infer): dedupe exporter_count per module in type-name index build_type_name_export_index counted bindings, not modules — inflating exporter_count when one module had multiple bindings sharing a name. Per-module seen_names + last-wins canonical restores global_type_exporter_count semantics. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(fmt): rustfmt v1_compiler_infer after main merge rust_tests failed cargo fmt --check on build_type_name_export_index hand-patch block introduced by 425bdc; no semantic change. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: P3+P5: infer whole-corpus scans to per-module maps * WIP: P3+P5: infer whole-corpus scans to per-module maps * fix(dag_collect): restore fp/key memo and seen-path fast path Regen had dropped the Rc::as_ptr fingerprint/key memo tables and unconditionally rehashed on every dag_collect_insert visit. Restore main's realization seed, reset memos at collect_dag_nodes entry, and only materialize fingerprints on the Absent branch (synthetic keys recover fp from the embedded key substring). Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): split floor build step + parallel jobs (#6243 shape) Floor step bundled cargo build + claim_executor under one 10m step budget, so batch-1 compile-clean timed out after a warm build. Split per #6263: build step 15m, floor-only 10m, job backstop 35m. Drop needs: [rust_tests] — 135s cold build leaves full loud-fail window (operator/cool-hawk ruling). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: P3+P5: infer whole-corpus scans to per-module maps * fix(ci): split compile-clean into its own 15m step (#6243 extension) Batch-1 dag_compile_clean_gate exceeded the 10m floor step budget even after the release-build split. Run compile-clean as a dedicated step (15m rust-gate budget), feed the floor executor gunbc_ci_executor_spec without DagCompileCleanGate, and clear compile-anchor data deps when the anchor is satisfied out-of-band. Job backstop 50m (15+15+10+5+5). Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Brian Searls <briansrls@gunb.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
…ue cadence (#6284) * WIP: affected set lens * Design note: fold in §3.1 value-cardinality arity at seams (operator direction) + FLAG E Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * WIP: affected set lens * WIP: affected set lens * Stamp kind/span on the three post-merge construction sites; unpark regen registry cursor review findings (all valid): the origin/main merge brought in the enforcement-intent lane's roster row + two ScheduleWitnessEntry literals, all pre-dating the kind/span fields. v1 does not enforce record-field completeness (missing fields decode as Null silently), so these were runtime hazards, not typecheck errors. Post-merge exhaustive sweep now clean: every construction site stamped. Also removes v1_compiler_dag_collect{,_support}.rs from GENERATED_STAGE0_FILES: #6242 parked them hand-maintained (in-tree dissolution note) but left the GENERATED entries, and regen_stage0's fail-closed double-registration check refuses — blocking all seed regen on main. Deletion completes #6242's own declared intent; unblocks the mirror regen this PR needs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Restore #6242's registry double-park guard (regen semantics belong to the emitter lane) The park-vs-skip choice for dag_collect{,_support}.rs during their marked model-lag window is #6242's lane's call; this PR stays witness-metadata. Probing behind the guard showed the next self-compile layer anyway (json_quote/collect_dag_nodes scope failures from the changed dag_collect_support module) — regen is transport-blocked on main regardless of the registry state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Design note: differential falsifier + non-hermetic residue cadence (not a rerun backstop) The falsifier reframe the operator asked for (2026-07-04): replace the nightly rerun-everything backstop (a section-5 absorbing fallback wearing a safety costume) with (1) a permanent cadence for the non-hermetic residue class — witnesses whose inputs selection cannot see by construction — and (2) an interim cold-vs-selection differential whose every divergence is a counted finding naming a missing-edge class, with an objective dissolution trigger (divergence rate zero across N windows). Preserves the deficit signal a backstop destroys. Three items marked for operator sign (cadence surface, N, residue-roster authority reuse). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * WIP: affected set lens * Session branch: PR-A .dag content moved to fix/affected-set-typed-refusals (keeps #6284 docs-only) * Falsifier note: all three sign items SIGNED (roster authority, N=8 + counted re-arm, cadence delegated-signed) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Falsifier note: propagate SIGNED state through the body (cursor nit — header/body drift) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…pass, runner allocation authority Re-land #6242 DagCollectSlot accumulator (reverted by #6239 merge hygiene) with hand-synced stage0 seed. Kill per-module ancestry map_merge by borrowing parent type_env_cache.str_bindings on single-import chains. Land build_symbol_index prepass and gunbc.runner_slot_allocation authority (8c/8GiB/32GiB swap/10 slots). Co-authored-by: Cursor <cursoragent@cursor.com>
Restore DagCollectSlot + hand-synced stage0 seed (#6239 reverted merge hygiene, not correctness rejection). Kills dag_collect O(M²) seen.clone. Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Auto-opened by session-dashboard for session
stern-dove-88.Pushing to
session/stern-dove-88advances this PR.Worker attestation
Before flipping this PR to ready for review, confirm each item:
npm test,cargo test) and the result.Closes #Ndirective.Summary
TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.
Test plan