Skip to content

02_parse Level-1c: migrate capture span folds onto fold_node_tree_span - #4651

Merged
briansrls merged 2 commits into
mainfrom
session/bold-owl-685
Jun 11, 2026
Merged

briansrls merged 2 commits into
mainfrom
session/bold-owl-685

Conversation

@briansrls

@briansrls briansrls commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Migrates hand-written capture span merging in 02_parse.dag onto the fold_node_tree_span substrate catamorphism (first consumer), following the Level-1b fold_grammar_expr pattern from #4639.

  • Deletes parse_merge_captured_spans, parse_fold_node_span_step, and parse_fold_node_spans
  • Adds parse_conj_captured_tree_span / parse_sequence_captured_span / parse_repeat_captured_span as fold_node_tree_span consumers
  • Adds Receipt F Bool witness in parse_table_claims.dag (same-file merge, cross-file fail-closed, repeat empty → Unanchored)

Scope: 02_parse + parse claims only. No emit/translate/target_model/grammar-signature changes.

Test plan

  • gunbc run --source-root src/v4 --entry src/v4/test/claim/parse/parse_table_claims.dag --claim-run --function parse_table_captured_tree_span_morphism_holds → true
  • All six parse_table_claims.dag Bool witnesses green by execution
  • gunbc compile --source-root src/v4 --output-dir /tmp/v4-compile-bold-owl → 441 files, 0 diagnostics

Brian Searls and others added 2 commits June 11, 2026 00:57
@briansrls
briansrls marked this pull request as ready for review June 11, 2026 01:05
@briansrls briansrls changed the title M-F stage-adoption Level-1c — de-anemize the next pipeline-stage hand-match queries onto the std/ catamorphisms (fold_node in src/v4/std/node.dag, find_witness in find_witness.dag, fold_node_tree_span in provenance.dag), carrying forward the #4639 Level-1b pattern that migrated GrammarExpr queries o 02_parse Level-1c: migrate capture span folds onto fold_node_tree_span Jun 11, 2026
@briansrls

Copy link
Copy Markdown
Contributor Author

Verified both dashboard APPROVE artifacts against HEAD 318307b:

  • Hand-rolled span folds (parse_merge_captured_spans, parse_fold_node_span_step, parse_fold_node_spans) are deleted; sequence/repeat capture routes through parse_conj_captured_tree_span → fold_node_tree_span with existing grammar_sequence_* / grammar_repeat_element_* projections.
  • Receipt F (parse_table_captured_tree_span_morphism_holds) exercises same-file merge, cross-file fail-closed, multi-element repeat, and empty-repeat Unanchored — all green locally via gunbc run --claim-run.
  • Scope guard respected: only 02_parse.dag + parse_table_claims.dag; no emit/translate/grammar-signature changes.

No code changes requested by either review. ci_floor_parity failed once on an sccache broken-pipe infra flake (not a diff regression); job is re-running.

— sent from bold-owl-685

@briansrls
briansrls merged commit 8ab0ee7 into main Jun 11, 2026
31 of 33 checks passed
@briansrls
briansrls deleted the session/bold-owl-685 branch June 11, 2026 02:29
briansrls pushed a commit that referenced this pull request Jun 11, 2026
Successor to #4651 parse_table_captured_tree_span_morphism: exercises
parse_production stamping inside a single memo cell — terminal FromSource
ByteRange + sequence DerivedBy child-id pair. Registered in lens_ci_gate
for v4_lens_gate execution with perturb-check.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 11, 2026
…e SpanIndex substrate (honest scope) (#4643)

* WIP: Provenance A-pivot (off-tree id+index) — RE-SPAWN (prior swift-cat died

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* fix(v4): re-anchor provenance comments after Node.span dissolution

Update provenance.dag scope and source_authority.dag R3 gate comment to
reflect off-tree SpanIndex + FromSource parse-mint as the surviving authority.

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

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* fix(v4): merge main + drop stale node_span_unanchored in comprep eval claim

Main #4634 added exact-arity gate fixtures using node_span_unanchored();
rebase onto occurrence_id substrate with SyntheticOccurrence. Fixes
ci_floor_emit on PR #4643 merge commit.

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

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* WIP: #4643 recovery closeout: fix OccurrenceIdRef sole-mint (no -1 sentinel),

* fix(ci): execute occurrence_id exclusion witness in v4_lens_gate

Register witness_occurrence_id_model_substrate_holds in lens_ci_gate.dag
so v4-lens-ci-gate.sh runs the distinct-minted-id structural-equality
proof with perturb-check — closes still-raven load-bearing gap (A).

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

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* fix: deep occurrence_id exclusion in source_authority and edit_locus

Shallow node_for_structural_equality only clears the root occurrence_id;
nested minted ids still break bare ==. Route source_authority_node_equal
and edit_locus node_eq through exact_structural_equality_zip_fold (P2
single authority). Strengthen witness with nested-mint case + shallow
RED guard.

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

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* WIP: Take over ORPHANED PR #4643 (prov-a-pivot-phase1-2) — prior owner lively

* test(provenance): add wave-1 parse_stamp SpanIndex witness (option A)

Successor to #4651 parse_table_captured_tree_span_morphism: exercises
parse_production stamping inside a single memo cell — terminal FromSource
ByteRange + sequence DerivedBy child-id pair. Registered in lens_ci_gate
for v4_lens_gate execution with perturb-check.

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.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