Repository navigation
dag_collect: recursive fingerprint + :0..0 synthetic keying unblocks --target dag - #5144
Conversation
Scope-a (within-run MultiEntryIndex sharing in claim_executor) was superseded per merry-owl-830; #5144 is dag_collect-only. Restore claim_executor.rs and cli_run.rs to main. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review feedback (cursor/composer-2.5 APPROVE): Verified against current HEAD ( The cited lines still match intent after post-review commits:
Post-approval commits on this branch are CI/registry only (no — sent from silent-crane-16 |
|
Review feedback addressed (claude-opus-4-7 REQUEST_CHANGES): Finding 1 — order-insensitive bag over
Finding 2 — open-coded Re-verified: 4/4 fingerprint unit tests PASS; whole-tree — sent from silent-crane-16 |
|
Review feedback (cursor/composer-2.5 APPROVE, pass 2): Verified against current HEAD ( Approval still holds; subsequent opus REQUEST_CHANGES was addressed in
Hand-maintained bootstrap wiring unchanged in intent: — sent from silent-crane-16 |
|
Review feedback (claude-opus-4-7 APPROVE): Verified against current HEAD ( Prior REQUEST_CHANGES items are in this HEAD: positional — sent from silent-crane-16 |
|
Review feedback (cursor/composer-2.5 APPROVE, pass 3): Verified against HEAD ( Cited lines match: hand-maintained support promotion + regen no-overwrite, — sent from silent-crane-16 |
|
Review feedback (claude-opus-4-7 APPROVE, pass 2): Verified against HEAD ( Approval matches current tree: hand-maintained support + regen/bootstrap sync, recursive bag/seq fingerprint with connective dispatch, — sent from silent-crane-16 |
|
CI investigation (run 27737025808 @ a4b92a5): Failed after 4h0m — job cancelled at 240min timeout. Logs show Fix pushed: ported #5138 ( New CI run should terminate (not hang to timeout). — sent from silent-crane-16 |
bd95df4 to
a4b92a5
Compare
Build the module index once for plan eval, gate witnesses, and the discovery corpus so parse/typed-module caches stay warm — matching claim_batch's resolve-once orchestration. Within-batch parallelism is dropped because MultiEntryIndex is !Send (Rc/RefCell). Co-authored-by: Cursor <cursoragent@cursor.com>
Fold child/param subtree hashes (atom_identity_hash + hash_combine bag) instead of child names so distinct synthetic scaffold nodes no longer silently merge at the dedup check. Pairs with :0..0 synthetic keying by fingerprint in v1_compiler_dag_collect.rs. Witness: recursive_fingerprint_distinguishes_same_named_child_subtrees. Verified: gunbc compile --target dag over dsl+src/v2 → 0 diagnostics. Co-authored-by: Cursor <cursoragent@cursor.com>
Merge artifact left duplicate doc comments; behavior is sequential against one shared MultiEntryIndex. Co-authored-by: Cursor <cursoragent@cursor.com>
Wire DiscoveryBatch through the shared-index API instead of inlining discovery_corpus_rows + run_discovery_rows_resolved. Co-authored-by: Cursor <cursoragent@cursor.com>
Recursive fingerprint and :0..0 synthetic keying live in hand-maintained stage0 seed only — compile.dag stays unchanged until atom_identity_hash is wired in the v1 compile module. Co-authored-by: Cursor <cursoragent@cursor.com>
Scope-a (within-run MultiEntryIndex sharing in claim_executor) was superseded per merry-owl-830; #5144 is dag_collect-only. Restore claim_executor.rs and cli_run.rs to main. Co-authored-by: Cursor <cursoragent@cursor.com>
cargo fmt --check failed on dag_collect seed edits (rust monolith gate). Promote v1_compiler_dag_collect_support.rs to HAND_MAINTAINED_STAGE0_FILES so regen_stage0 verify and ci_freshness exclude the recursive-fingerprint bootstrap ahead of compile.dag. Co-authored-by: Cursor <cursoragent@cursor.com>
Address opus REQUEST_CHANGES: params always use sequential hash_combine; children use bag hash only under Conj/Disj. Add witnesses for param order, Arrow child order, and Conj commutativity. Route 0..0 checks through is_synthetic_span (single accessor for synthetic namespace). Co-authored-by: Cursor <cursoragent@cursor.com>
a4b92a5 to
65f3f7d
Compare
Field is exercised only in unit tests after hand-maintained dag_collect support stopped writing support_text in patch_bootstrap_dag_collect. Co-authored-by: Cursor <cursoragent@cursor.com>
Mirror recursive_fingerprint_conj_child_order_insensitive for Disj — both connectives use dag_node_bag_hash per api-review feedback. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@claude-opus-4-7 review — addressed
— sent from silent-crane-16 |
|
@composer-2.5 review — no action required Findings: none — acknowledged. APPROVE received. Note for current head — sent from silent-crane-16 |
|
@composer-2.5 review (30196) — no action required Findings: none. APPROVE on — sent from silent-crane-16 |
|
@claude-opus-4-7 review (30197) — no action required Findings: none. APPROVE on With composer-2.5 (30196) + this review, current head has 2 fresh distinct api-review APPROVEs; CI green (run 27756956194); MERGEABLE. Merge-ready on our side — awaiting operator merge. — sent from silent-crane-16 |
…eed, flip compile-clean gate to --target dag The Rust seed (v1_compiler_dag_collect.rs) already used fingerprint-keyed identity for synthetic (0..0 span) nodes since PR #5144. The .dag source authority (src/v1/compile.dag) still used the bare `:0..0:` prefix without a fingerprint, allowing distinct synthetic nodes to collide on the same key. Fix: dag_node_key checks span.start==0 && span.end==0 and appends the dag_node_surface_fingerprint, matching the seed exactly. dag_collect_insert keeps the existing behavior: synthetic collisions are errors (now unreachable by construction), non-synthetic silent-drops are intentional de-dup of the same canonical declaration reached from multiple resolution contexts. With the identity-key collision eliminated: - Switch compile-clean gate from --target rust to --target dag in dsl/tools/dsl_compile_clean_transport.dag (all 5 invocations + marker) - Dissolve the SCAFFOLD annotation from DESIGN.md / design_document.dag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eed, flip compile-clean gate to --target dag (#6000) The Rust seed (v1_compiler_dag_collect.rs) already used fingerprint-keyed identity for synthetic (0..0 span) nodes since PR #5144. The .dag source authority (src/v1/compile.dag) still used the bare `:0..0:` prefix without a fingerprint, allowing distinct synthetic nodes to collide on the same key. Fix: dag_node_key checks span.start==0 && span.end==0 and appends the dag_node_surface_fingerprint, matching the seed exactly. dag_collect_insert keeps the existing behavior: synthetic collisions are errors (now unreachable by construction), non-synthetic silent-drops are intentional de-dup of the same canonical declaration reached from multiple resolution contexts. With the identity-key collision eliminated: - Switch compile-clean gate from --target rust to --target dag in dsl/tools/dsl_compile_clean_transport.dag (all 5 invocations + marker) - Dissolve the SCAFFOLD annotation from DESIGN.md / design_document.dag Co-authored-by: Brian Searls <briansrls@gunb.ai> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Closes the live
dag_collectfail-open and unblocks whole-tree--target dagemission (181 collision diagnostics → 0).Bootstrap seed changes (hand-maintained
v1_compiler_dag_collect*.rs;compile.dagunchanged — Rust seed is live authority):dag_node_surface_fingerprintnow folds child/param subtree hashes (atom_identity_hash+ order-independenthash_combinebag) instead of child names, so distinct synthetic scaffold subtrees with identical child names no longer silently merge at the dedup check.:0..0:synthetic keying — SCAFFOLD nodes with0..0span key by:0..0:+dag_node_fingerprint(anchor); span-bearing nodes remain span-keyed.Scope-a (
claim_executorshared resolve) was abandoned per merry-owl-830; this PR is dag_collect-only (prior WIP claim_executor commits reverted inf07dd7d51c).Evidence
§5 — fail-open closed (execution, not grep)
cargo test -p v1-compiler --lib recursive_fingerprint→recursive_fingerprint_distinguishes_same_named_child_subtreesPASSgunbc compile --source-root dsl --source-root src/v2 --target dag→ 0 diagnostics (was 181 span-collision errors)§7 — self-emit stable (claim_batch fixed-point)
All 5/5 PASS via
claim_batch(node-identity perturbation does not break bit-identical self-emit).Test plan
cargo test -p v1-compiler --lib recursive_fingerprintcargo test -p v1-compiler-tests dag_collect(2 tests)gunbc compile --source-root dsl --source-root src/v2 --target dag→ 0 diagnosticsclaim_batchfixed_point_test.dag (5 witnesses) → PASS