Skip to content

CP-1b/T-8 close bucket A — normalize scaffolds + binding-harvest cascade - #3361

Merged
briansrls merged 5 commits into
mainfrom
session/nimble-boar-458
May 19, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/nimble-boar-458

Conversation

@briansrls

@briansrls briansrls commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes dashboard node adhoc-6e4ee11f-283.

Bucket A closes the CP-1b/T-8 scaffold surfaces that already had canonical substrate carriers available:

  • 03_normalize.dag: dissolves SugarClassification into SurfaceSugarKind? and NormalizeChildrenResult into Outcome<List<Edge>>, keeping SurfaceSugarKind as the remaining T-8 sugar axis.
  • 03_resolve.dag: deletes the merge_binding_self leaf and routes module export, arrow-domain parameter, and bind-binder harvest through scoped NodeFold<Map<Symbol, Symbol>> algebras over the existing fold_node substrate primitive.
  • DECISIONS.md / dissolution-inventory.md: record the normalize carrier dissolutions and the P5 binding-harvest cascade closure.

Model / scope

This is .dag-only substrate-consumer cleanup. It does not add Rust, does not add out-of-substrate enforcement, and does not touch std/node.dag; it consumes the already-landed NodeFold / fold_node surface from T-1. The resolver fold algebras intentionally ignore child fold results where direct-child harvest is the resolver contract, preserving module, arrow-domain, and arity-3 Bind scope semantics.

Verification

  • cargo run -p v2-compiler -- compile --source-root src/v4 --output-dir /tmp/gunbc-v4-compile-nimble -> compiled: 77 files emitted, 0 diagnostics

@briansrls
briansrls force-pushed the session/nimble-boar-458 branch from b249e23 to 8f06f39 Compare May 19, 2026 03:05
@briansrls
briansrls force-pushed the session/nimble-boar-458 branch from 8f06f39 to 3ca8704 Compare May 19, 2026 03:05
@briansrls
briansrls marked this pull request as ready for review May 19, 2026 03:05
@briansrls

briansrls commented May 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Verified the dashboard-only review artifact against the current head. The perf observation is valid in the narrow sense that fold_node traverses child subtrees even when these scoped binding-harvest algebras intentionally ignore child results. I am not changing this PR for that observation because the brief explicitly scoped this to consuming the already-landed canonical fold_node substrate without touching load-bearing substrate or adding a new helper surface; adding direct_children_fold / NodeFold short-circuiting would be a separate substrate/API decision. Current resolver semantics are preserved by the direct-child algebra shape, and CI/local v4 compile remain green. — sent from nimble-boar-458

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: e35f28a5 · Trigger: schedule
  • Thinking: 364s wall

BLOCKING (1)

Root Cause

  • docs/audit/dissolution-inventory.md P5 closure was applied to the main row/detail but not the roll-ups that still drive burn-down state → update Section 1.2 and the Section 2 summary/primitive rows to closed status, or keep the cascade consistently open.

⚠️ The code/model rewrite looks coherent, but the audit authority needs one consistency pass before merge.

Comment thread docs/audit/dissolution-inventory.md Outdated
| **P3** | Compiler pipeline-stage substrate (lex-walk + parse-walk) | compiler / T-6, T-7 | **2 + ~7 in-file** | Section 2: `compiler/01_tokenize.dag tokenize`, `compiler/02_parse.dag parse`. In-file: the parser-side VAGUE prose blocks in `json.dag` / `yaml.dag` / `toml.dag` that concretize to T-6/T-7 (the operations-side family separate from P1). |
| **P4** | T-4 fact-bundle Phase-3 rework (post-D2-reversal model) | extdeps/languages / T-4 manager `vivid-carp-207` (5-feeder gate; keystone #3226 merged @`77b9e7d72`; 4 feeders open: T-3, T-29, T-30, T-25-core) | **4 + 1 row + 1 fn** | In-file: `typescript.dag` × 4 INVALID-GATE blocks (re-gate against this arrival, not pre-reversal D2). DECISIONS.md: `SL-3229-VERILOG-D3200` (if re-gated as `feature: T-4 fact-bundle Phase-3 rework` rather than `consumer:` form — see Section 3). Section 2: `extdeps/languages/dag.dag dag_language_model_wave1_void_canonical_symbols` (added in CP-1b #3225 — canonical_symbols set is a fact on DagLanguageModel/language-identity, not a hand-rolled function). |
| **P5** | `std/node.dag` `fold_node` — Node catamorphism (substrate-extension under T-1) | std / T-1 | **1 + 3 (03_resolve cascade only)** | **Substrate LANDED PR #3297:** `NodeFold<R>` + `fold_node` in `src/v4/std/node.dag`; `node_well_formed` consumes the shared `NodeFold<Bool>` algebra (burn-down closeout + #3297). **Cascade (open):** `compiler/03_resolve.dag merge_binding_self` (94, codex #3225) plus `add_module_named_exports` (99), `add_arrow_domain_named_params` (113), `add_bind_atom_binder` (140). These dissolve to `fold_node(root, ⟨binding-harvest algebra⟩)` only when a scoped harvest algebra lands without changing resolver scope semantics. |
| **P5** | `std/node.dag` `fold_node` — Node catamorphism (substrate-extension under T-1) | std / T-1 | **LANDED for 03_resolve cascade (2026-05-19)** | **Substrate LANDED PR #3297:** `NodeFold<R>` + `fold_node` in `src/v4/std/node.dag`; `node_well_formed` consumes the shared `NodeFold<Bool>` algebra (burn-down closeout + #3297). **Cascade dissolved:** `compiler/03_resolve.dag` deleted `merge_binding_self`; `add_module_named_exports`, `add_arrow_domain_named_params`, and `add_bind_atom_binder` now consume scoped `NodeFold<Map<Symbol, Symbol>>` binding-harvest algebras without changing resolver scope semantics. |

This comment was marked as resolved.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 31a46c4f · Trigger: schedule
  • Thinking: 194s wall

Non-blocking — Strengths

  • src/v4/compiler/03_normalize.dag The local normalize result coproduct is cleanly replaced by the canonical Outcome carrier, preserving fail-closed diagnostics.
  • src/v4/compiler/03_resolve.dag The binding-harvest rewrite routes the prior direct-child walkers through scoped NodeFold algebras while preserving the resolver's direct-scope semantics.

✅ No blocking concerns found.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 0c65aeb2 · Trigger: schedule
  • Thinking: 246s wall

Non-blocking — Strengths

  • src/v4/compiler/03_normalize.dag The normalize pass replaces local carriers with canonical Option and Outcome shapes while preserving fail-closed diagnostic propagation.
  • src/v4/compiler/03_resolve.dag The binding harvest now routes through scoped NodeFold algebras and preserves direct-scope semantics by ignoring child fold results where required.

✅ No blocking concerns in this mixed docs/.dag review.

@briansrls
briansrls merged commit 75f54a3 into main May 19, 2026
2 checks passed
@briansrls
briansrls deleted the session/nimble-boar-458 branch June 1, 2026 18:42
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