Skip to content

Wave 3c-F FINISH-LINE-B Arc 1: eager-materialize the exemplared productions (mvp1/wave2a_task/pr3_identity) via derive_grammar_relation_row_node with DEDUP-CUTOVER (eager row replaces fixture twin, dedup by lhs+token-spine — avoids ForwardRowMany) + mandatory dag self-emit bit-identical round-trip g - #5342

Merged
briansrls merged 29 commits into
mainfrom
session/fierce-raven-399-arc1
Jun 20, 2026

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Arc 1 eager-materializes grammar-relation rows for exemplared TypeScript productions (wave2a_task, pr3_identity) via derive_grammar_relation_row_node, with emitted exemplars in a lhs-keyed side-table (ts_exemplar_emitted_for_lhs → ts_eager_grammar_relation_row_witness). Fixture twins are replaced (dedup-cutover), not coexisting — forward Conj cardinality unchanged, so ForwardRowMany never arises.

Coverage ceiling (stated explicitly):

  • wave2a_task (type-alias): eager row replaces inline derive call
  • pr3_identity (typed fn): eager row replaces inline derive call
  • mvp1 fn-add: keeps scaffold fallback — Arrow emitted derives to Violates (^grammar_relation_emitted_not_conj, PR-1.5b Conj-only path); marked ts_mvp1_fn_add_scaffold_relation_row_node, Arc 2 cutover

What this dissolves: the within-leg lazy/eager fork for exemplared productions (row authored once, not re-derived per-serialize). CP-1b (ParseGrammar vs FormalProduction) untouched.

Witnesses (green + RED)

GREEN (typescript_eager_materialize_dedup_cutover_test.dag):

  • ts_arc1_wave2a_eager_row_content_hash_round_trip_holds
  • ts_arc1_pr3_eager_row_content_hash_round_trip_holds
  • ts_arc1_wave2a_eager_serialize_source_holds / ts_arc1_pr3_eager_serialize_source_holds
  • ts_arc1_forward_row_dedup_cutover_green_holds
  • ts_arc1_mvp1_arrow_exemplar_keeps_scaffold_fallback_holds

RED (discriminating):

  • ts_arc1_forward_row_many_without_dedup_red_holds — duplicate token-spine rows → ForwardRowMany
  • ts_arc1_wave2a_perturbed_eager_emitted_derive_red_holds — surplus Conj slot → derive Violates

Dag self-emit: existing floor witness candidate_generation_translate_self_emit_mvp1_slice_holds (no duplicate whole-corpus self-emit witness — OOM at spawn_width=7).

Test plan

  • Individual Arc 1 witnesses via gunbc run --claim-run (wave2a/pr3 round-trip, mvp1 scaffold, perturbed RED all green locally)
  • Dropped arc1_dag_self_emit_bit_identical_round_trip_holds after CI exit 137 (per manager guidance)
  • Full CI floor (claim_executor batch-2 at spawn_width=7) — re-running on f8e874c

briansrls and others added 10 commits June 19, 2026 22:49
…) into Arc 1 branch to resolve serial-floor OOM
The added arc1_dag_self_emit_bit_identical_round_trip_holds duplicated
generate_translate_self_emit_candidate in the floor corpus and tipped
batch-2 over the memory cap even at spawn_width=7. Dag self-emit
regression stays covered by the existing candidate_generation_mvp1_dag_slice
witness; Arc 1 round-trip proof is the cheap content_hash gates.

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

Copy link
Copy Markdown
Contributor

Intentionally held in draft — blocked on a CI-infra bug, NOT abandoned. (Re: the automated stale-draft nudges / parent loop-in.)

The Arc 1 work is correct and complete: branch is at 00d9eda9f3 (latest main merged, all 8 witnesses intact; the bash main-red fix and #5356 are in). The blocker is external:

  • CI floor batch-2 OOMs (exit 137) deterministically on both hosts at spawn_width=7 — confirmed on srv1-36 (52% cap) and srv2-38 (70% cap, the host main passes on). Three attempts; attempt 2 was a separate transient sccache build flake under fleet pressure.
  • Root cause: bounded_host_spawn_width(shard_count, hardware_threads) is memory-blind — floor spawn_width: derive from spec breadth (parallelize CI batch-2, 1→7) #5356 set spawn_width=7 with no memory margin, so any corpus growth (this PR's eager-materialization is the first) peaks over MemoryMax. Fix-modeling exists unwired (ResourceEnvelope.memory + BMC total_memory_bytes).
  • Routed to the spawn_width owner (the dedicated "CI flakiness" session) for a memory-aware spawn_width bound. I've stopped re-running to avoid loading an already-oversubscribed fleet (11 concurrent runs).

Will mark ready for review the moment the floor has memory headroom and #5342 goes green by execution. Please do not auto-close.

briansrls and others added 18 commits June 20, 2026 04:36
Same-name fn+test fn pairs in forward-dedup and serialize modules blew resolve RSS ~45×; *_body suffix on helpers drops peak child RSS from >31 GiB to ~0.68 GiB. All 9 Arc 1 witnesses + self-emit gate pass locally.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 20, 2026 08:58
@gunbai-bot

gunbai-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Review response (claude-opus-4-7 minor observation, ts_arc1_pr3_eager_row_round_trip_holds):

Verified — the prior version called ts_eager_grammar_relation_row_witness twice (pure determinism). Agreed the substantive cross-path round-trip is already covered by claim_typescript_pr3_identity_derive_grammar_relation_row_round_trip in typescript_derive_grammar_relation_row_round_trip.dag.

Aligned pr3 with the wave2a pattern on c38cd8b306: first arm now goes through ts_pr3_identity_relation_row_witness(), second through ts_eager_grammar_relation_row_witness dispatch — same structural receipt as wave2a, still a floor-local determinism gate. Witness ts_arc1_pr3_eager_row_content_hash_round_trip_holds re-executed PASS.

— sent from fierce-raven-399

@gunbai-bot

gunbai-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Review response (claude-opus-4-7 minor observation, ts_exemplar_emitted_for_lhs / ts_exemplared_formal_productions_for_lhs if-chain):

Verified — both fns use chained if lhs == over the closed Arc 1 exemplar set (wave2a, pr3, mvp1-violates). Accurate that a fourth lhs would want a single match over (emitted, productions) rows.

No code change (non-blocking, intentionally deferred): Arc 1's stated coverage ceiling is exactly these three lhs symbols; the if-chain keeps the Violates-vs-Holds split for mvp1 Arrow explicit beside the two Conj exemplars. Folding into one row table is the natural Arc 2 cutover shape once mvp1 fn-add materializes (same dissolution trigger as the 🟡 scaffold at typescript.dag:1251). Premature abstraction here would add a parallel carrier before the fourth row exists.

— sent from fierce-raven-399

@gunbai-bot

gunbai-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Review response (cursor/composer-2.5 — clean APPROVE, no findings):

Verified against head c38cd8b306: scope matches receipt — wave2a/pr3 rows dispatch through ts_eager_grammar_relation_row_witness(lhs) (typescript.dag:1230), mvp1 fn-add remains sole 🟡 scaffold with Arc 2 cutover trigger (typescript.dag:1251–1255), floor witnesses enroll round-trip / forward dedup RED+GREEN / serialize-source / perturbed derive RED across the three split *_test.dag modules, and dag self-emit stays on existing candidate_generation_translate_self_emit_mvp1_slice_holds (not duplicated in cutover module). No code change required.

— sent from fierce-raven-399

@briansrls
briansrls merged commit 0578fff into main Jun 20, 2026
1 check passed
@briansrls
briansrls deleted the session/fierce-raven-399-arc1 branch June 20, 2026 14:30
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