Skip to content

Representation-min Lever B(i): minimal per-kind Node sum type in std/ (model sketch FIRST; arena/u32 container is (ii), separate; lands in v2/.dag not the Rust seed; escalate on load-bearing Node/build_type_env) - #5936

Merged
briansrls merged 21 commits into
mainfrom
session/deep-seal-583
Jun 29, 2026

Conversation

@briansrls

@briansrls briansrls commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Lever B(i) model sketch v2.std.node_minimal — a per-kind MinimalResolvedNode sum type that replaces the v1 seed's 18-field superset with six variants, each carrying only the fields its kind uses. Side-table refs (SpanRef, IdentRef, InferenceSlot) are modeled; arena/u32 container (Lever B(ii)) is explicitly out of scope.

Test plan

  • CTRL_BUILD_MODE=local cargo test -p v1-compiler-tests v2_node_minimal_representation_compiles_and_witnesses_hold — ok
  • Floor witness auto-enrollment: src/v2/test/claim/manual/node_minimal_representation_test.dag (test fn × 5)

Brian Searls and others added 4 commits June 29, 2026 04:54
Correct ResolvedGraph import in the Rust runner, fix dag syntax that blocked
resolve, and tighten witnesses so Lever B(i) compiles and runs green.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 29, 2026 06:42
Brian Searls and others added 8 commits June 29, 2026 06:44
Design-first review artifact for stern-moth-225: v2 authority confirmation,
variant split, NOT-edited boundary, witness checkpoint status, and explicit
exclusion of sub-move (ii) arena/u32 container.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Place transport, properties, type_annotation, and fn descent flags on
MnkSurfaceNamedDecl with matching payload slots; add executing witness that
the union across all kinds covers every NodeSupersetField.

Co-authored-by: Cursor <cursoragent@cursor.com>
Retriggers floor discovery on current HEAD; prior dashboard failure was at
83f843f before parse/fmt/partition fixes landed.

Co-authored-by: Cursor <cursoragent@cursor.com>
Split fields into placed (12 on kind arms), owed_placement (3 staged arms),
and migrated_to_facts (3 to InferredFacts). witness_partition_covers_superset
executes disjointness and count==18 — drops fail closed, not prose.

Co-authored-by: Cursor <cursoragent@cursor.com>
…B(i).

The design sketch was an orphan doc; roster node_superset_field_eq as the eq-kernel
wildcard pattern the wall expects for closed-coproduct field equality.

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

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response (deep-seal-583)

Re-verified both dashboard APPROVE artifacts against current HEAD 0bf8edd4f5. No code changes requested — posting confirmation because the artifacts are dashboard-only (not GitHub review comments).

1. cursor/composer-2.5 APPROVE @ 0b45374 (review #33117)

Finding: None (APPROVE).

Verification on 0bf8edd4f5: Still valid. The approval’s claims hold:

  • node_minimal_representation_scaffold Disposition still binds to v2.std.node.Node with dissolves_to: SingleAuthority (src/v2/std/node_minimal.dag:390-397).
  • Load-bearing boundary intact: src/v2/std/node.dag and v1 seed infer/emit paths untouched.
  • minimal_node_superset_field_unused_by_kind remains list-membership metadata over the closed NodeSupersetField census, not a variant predicate over an undeclared sum (src/v2/std/node_minimal.dag:360+).
  • Witnesses are behavior-driven and fail-closed (src/v2/test/claim/manual/node_minimal_representation_test.dag:65-77 substrate round-trip; three-bucket partition witness added post-review).
  • Owed gaps (transport, properties, type_annotation) remain explicitly staged in minimal_kind_owed_placement, not silently dropped.

Post-approval commits (36568eaa, 0bf8edd4f5) only strengthen coverage (executable 12/3/3 partition witness) and CI hygiene (doc-graph inbound link, node_superset_field_eq non-fold roster entry). No scope expansion.

2. claude/opus APPROVE @ 0b45374 (review #33119, queued sibling)

Same SHA/content as #33117. Same verification — no action required.


Local execution: cargo test -p v1-compiler-tests v2_node_minimal_representation_compiles_and_witnesses_hold — green on 0bf8edd4f5.

— sent from deep-seal-583

Brian Searls and others added 2 commits June 29, 2026 08:37
Replace literal 18 with count(node_superset_field_all) as single authority
for NodeSupersetField arity; collapse if/else false/true to !any(...) per
review feedback (claude-opus APPROVE #33119).

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

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — claude/opus APPROVE #33119 (deep-seal-583)

Both non-blocking findings verified and fixed in 159d95d673.

1. Hand-rolled boolean negation (minimal_node_superset_field_unused_by_kind)

Valid. Replaced if any(...) { false } else { true } with unary negation:

!(minimal_node_kind_placed_fields(kind: kind) |> any(f => node_superset_field_eq(left: f, right: field)))

Note: .dag surface uses prefix ! (parses as UnaryOpKind::Not); a bare not(...) function call is not in scope today — ! is the dag-language negation operator the emit layer maps to not in other targets.

2. Literal node_superset_field_count = 18 parallel representation

Valid. Added closed roster node_superset_field_all: List<NodeSupersetField> enumerating all 18 variants and derive node_superset_field_count() via count(node_superset_field_all). Partition witness and expr-leaf field-count witness updated to call the derived fn.

Execution: cargo test -p v1-compiler-tests v2_node_minimal_representation_compiles_and_witnesses_hold — green on 159d95d673.

— sent from deep-seal-583

Brian Searls and others added 2 commits June 29, 2026 08:43
Rename node_superset_field_all → all_node_superset_fields; restore census
node_superset_field_count=18 as independent authority; witness roster length
and per-field partition coverage fold. Hold at sketch checkpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Addresses claude-opus #33136 minor finding; scaffold eq/kind-bridge debt
unchanged (Disposition + non-fold roster + #5879 hold per sketch checkpoint).

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

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — claude/opus APPROVE #33136 (deep-seal-583)

Re-verified on 4875fb97d5 (+ cosmetic commit pending push). APPROVE — no blocking action.

1. node_superset_field_eq hand-rolled closed-coproduct equality

Valid observation; intentionally deferred. Named irreducible kernel / non-fold residue pattern — already on NON_FOLD_RESIDUE_ROSTER (src/v1/stage0/src/non_fold_residue_project.rs: src/v2/std/node_minimal.dag::node_superset_field_eq). Dissolution path: generic Eq derivation or coproduct reflection at emit-integration (#5879), not a sketch-phase rewrite. Bound by node_minimal_representation_scaffold: Scaffold { dissolves_to: SingleAuthority, bind: v2.std.node.Node }.

2. MinimalNodeKind parallel to MinimalResolvedNode + minimal_node_kind_of bridge

Valid observation; intentionally deferred. MinimalNodeKind indexes the per-kind field-placement table (minimal_node_kind_placed_fields) without re-matching full variant payloads — deliberate sketch ergonomics. Emit-integration follow-up (stern-moth-225): fuse kind tag into variant identity or derive via reflection. Hold at sketch checkpoint — no emit work until #5879.

3. Minor: if cond { true } else { false } witnesses

Valid — fixed. witness_partition_covers_superset and witness_expr_leaf_field_count_below_superset now return the Bool expression directly.

Execution: cargo test -p v1-compiler-tests v2_node_minimal_representation_compiles_and_witnesses_hold — green.

— sent from deep-seal-583

@gunbai-bot

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — cursor/composer-2.5 APPROVE #33137 (deep-seal-583)

Finding: None (APPROVE). Re-verified on current HEAD 7c15b04e6a — no code changes requested.

Approval claims still hold (line refs shifted post-review):

  • Scaffold + boundary: node_minimal_representation_scaffold Disposition binds dissolution to v2.std.node.Node with dissolves_to: SingleAuthority (src/v2/std/node_minimal.dag:423-430). src/v2/std/node.dag and v1 infer seed paths not in PR diff.
  • Three-bucket wall: 12 placed + 3 owed + 3 migrated == 18, pairwise disjoint, green-by-execution (witness_partition_covers_superset + roster-length guard + per-field fold over all_node_superset_fields).
  • Witness transport: src/v1/tests/src/node_minimal_representation_test.rs is supplementary bootstrap runner; floor-discoverable test fn witnesses in node_minimal_representation_test.dag remain the authority.
  • Scope: B(i) model sketch only; arena/u32 container (B(ii)) explicitly out of scope; Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879 gate unchanged.

Post-approval commits (4875fb97, 7c15b04e) only add roster-length guard (stern-moth follow-on) and cosmetic Bool-return cleanup — no scope expansion.

Local execution: cargo test -p v1-compiler-tests v2_node_minimal_representation_compiles_and_witnesses_hold — green.

— sent from deep-seal-583

36568ea failed discovery corpus (doc_graph orphan + non_fold roster).
Fixed in 0bf8edd (doc inbound link, node_superset_field_eq roster) and
ebdf95 (generated-artifact authority for representation-minimization.md).
Local floor batches 1-2 green on HEAD.

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

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — cursor/composer-2.5 APPROVE #33150 (deep-seal-583)

Finding: None (APPROVE). Re-verified on current HEAD 367349f1aa — no code changes requested.

Approval claims still hold:

  • Scope: Lever B(i) sibling v2.std.node_minimal scaffold only — src/v2/std/node.dag, v1 seed, and build_type_env not in PR diff.
  • Scaffold: node_minimal_representation_scaffold: Scaffold { dissolves_to: SingleAuthority, bind: v2.std.node.Node } (src/v2/std/node_minimal.dag:423-430), gated on Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879.
  • Non-fold residue: node_superset_field_eq on NON_FOLD_RESIDUE_ROSTER (non_fold_residue_project.rs).
  • Witnesses: floor-discoverable node_minimal_representation_test.dag + supplementary Rust runner; three-bucket partition wall green-by-execution.

Post-review commits (0bf8edd–367349f1aa) only fix doc-graph inbound link, non-fold roster, generated-artifact authority, roster-length guard, and cosmetic Bool-return cleanup — no scope expansion.

Local execution: cargo test -p v1-compiler-tests v2_node_minimal_representation_compiles_and_witnesses_hold — green; floor batch 2 discovery corpus 1157/1157 PASS locally.

— sent from deep-seal-583

@gunbai-bot

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — claude/opus APPROVE #33152 (deep-seal-583)

Finding: None blocking (APPROVE). Re-verified on current HEAD 367349f1aa — no code changes requested.

Observations acknowledged:

Three-bucket partition wall (12+3+3=18, disjoint, per-field fold) green-by-execution on HEAD.

— sent from deep-seal-583

@gunbai-bot

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — claude/opus APPROVE #33164 (deep-seal-583)

Finding: None blocking (APPROVE). Re-verified on current HEAD 367349f1aa — no code changes requested.

Approval claims hold (line refs on HEAD):

  • Scope / boundary: Lever B(i) model sketch in src/v2/std/node_minimal.dag only. src/v2/std/node.dag, build_type_env, and v1 seed infer/emit paths absent from PR diff.
  • Scaffold disposition: node_minimal_representation_scaffold: Scaffold { dissolves_to: SingleAuthority, bind: v2.std.node.Node WholeDeclaration } (src/v2/std/node_minimal.dag:423-430), gated on Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879 emit-integration.
  • Witness wall: roster-length guard + three-bucket partition (12 placed + 3 owed + 3 migrated == 18, pairwise disjoint, per-field fold) green-by-execution via floor-discoverable node_minimal_representation_test.dag + supplementary Rust runner.
  • node_superset_field_eq debt: 18-arm closed-coproduct equality kernel — enrolled on NON_FOLD_RESIDUE_ROSTER alongside key_source_eq / diagnostic_interface_kind_eq siblings (non_fold_residue_project.rs). Tracked scaffold debt, not untracked; dissolves with emit-integration (Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879), not a sketch-phase rewrite.
  • No unit-modeling: SpanRef uses opaque file_id/UInt32 offsets, not domain Measure quantities.

Queued sibling #33165 (cursor/composer-2.5 APPROVE @ 7c15b04) — same verification, no action.

Execution: GitHub CI on 367349f1aa — ci + rust_tests SUCCESS.

— sent from deep-seal-583

@gunbai-bot

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — cursor/composer-2.5 APPROVE #33165 (deep-seal-583)

Finding: None (APPROVE). Re-verified on current HEAD 367349f1aa — no code changes requested.

Approval claims hold:

  • Narrow Lever B(i) scope: sibling scaffold src/v2/std/node_minimal.dag with declared per-kind MinimalResolvedNode coproduct (6 variants), executable partition witnesses (12+3+3=18, disjoint, roster-length guard), and explicit Disposition scaffold binding dissolution to v2.std.node.Node WholeDeclaration (node_minimal.dag:423-430), gated on Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879.
  • Load-bearing boundary intact: src/v2/std/node.dag, v1 seed Node/infer paths, and build_type_env absent from PR diff.
  • Non-fold residue: node_superset_field_eq enrolled on NON_FOLD_RESIDUE_ROSTER (non_fold_residue_project.rs) per existing std practice — tracked debt, not untracked.
  • Witness transport: floor-discoverable node_minimal_representation_test.dag is authority; src/v1/tests/src/node_minimal_representation_test.rs is supplementary bootstrap runner to execute witnesses pre-emit.
  • Hygiene: no unit-modeling forks, hand-shell, or fail-open patterns in diff.

Note: #33165 reviewed @ 7c15b04; post-review commits (367349f1aa) are CI retrigger only — no scope change. Fresh cursor approval on HEAD is #33171.

Execution: GitHub CI on 367349f1aa — ci + rust_tests SUCCESS.

— sent from deep-seal-583

@gunbai-bot

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — cursor/composer-2.5 APPROVE #33171 (deep-seal-583)

Finding: None blocking (APPROVE). Re-verified on current HEAD 367349f1aa — no code changes requested.

Approval claims hold:

  • Lever B(i) scope: sibling v2.std.node_minimal scaffold with declared MinimalResolvedNode 6-variant coproduct (node_minimal.dag:179-214), executable partition witnesses over all 18 v1 superset fields (12 placed + 3 owed + 3 migrated, disjoint, roster-length guard), and explicit Disposition scaffold binding dissolution to v2.std.node.Node WholeDeclaration (node_minimal.dag:423-430), gated on Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879.
  • NOT-edited boundary: src/v2/std/node.dag, v1 seed Node/infer paths, and build_type_env absent from PR diff. B(ii) arena container explicitly out of scope.
  • Construction-first substrate: illegal cross-kind fields are unrepresentable on the sum type; partition coverage is executable test fn witnesses in node_minimal_representation_test.dag, not silent post-hoc validation.
  • Non-fold residue: node_superset_field_eq enrolled on NON_FOLD_RESIDUE_ROSTER (non_fold_residue_project.rs).
  • Witness transport: v1 Rust runner (node_minimal_representation_test.rs) is thin executor for .dag witnesses (same manual-claim pattern); authority stays in .dag.
  • Planning grounding: intent in hand-authored node-minimal-representation-sketch.md + generated representation-minimization.md Lever B link (.dag authority in representation_minimization.dag); Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879 deferral documented.
  • Hygiene: no unit-modeling forks, no unmarked shell, no load-bearing substrate edits.

Execution: GitHub CI on 367349f1aa — ci + rust_tests SUCCESS.

— sent from deep-seal-583

@gunbai-bot

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — claude/opus APPROVE #33175 (deep-seal-583)

Finding: None blocking (APPROVE). Re-verified on current HEAD 367349f1aa — no code changes requested.

Approval claims hold:

  • Sketch-only scope: model lands in src/v2/std/node_minimal.dag with Disposition: Scaffold { dissolves_to: SingleAuthority, bind: v2.std.node.Node WholeDeclaration } (node_minimal.dag:423-430), gated on Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879.
  • Partition wall: witness_partition_covers_superset asserts 12 placed + 3 owed + 3 migrated = 18, pairwise disjoint, plus roster-length guard and per-field fold (node_minimal.dag:386-392) — green-by-execution via node_minimal_representation_test.dag.
  • Tracked debt: hand-rolled node_superset_field_eq enrolled on NON_FOLD_RESIDUE_ROSTER (non_fold_residue_project.rs:125) alongside existing predicate-eq siblings — tracked, not hidden.
  • Escalation boundary: load-bearing files (src/v2/std/node.dag, build_type_env, v1 seed) absent from PR diff — matches PR title boundary.
  • Hygiene: no unit-modeling violations; no new hand-Rust beyond test runner + roster entry.

Execution: GitHub CI on 367349f1aa — ci + rust_tests SUCCESS.

— sent from deep-seal-583

Brian Searls and others added 2 commits June 29, 2026 13:45
…links.

Merge #5935 func_env.sigs design-sketch link with PR #5936 Lever B(i)
node-minimal sketch link in the .dag authority; regen generated md via main_wet.

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

gunbai-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Dashboard review response — claude/opus APPROVE #33178 (deep-seal-583)

Finding: None blocking (APPROVE). Re-verified on current HEAD 2553813655 (post-conflict merge + latest main sync) — no code changes requested.

Approval claims hold:

  • Model-only sketch: lands in src/v2/std/node_minimal.dag with executable witnesses, Disposition: Scaffold { dissolves_to: SingleAuthority, bind: v2.std.node.Node WholeDeclaration } (node_minimal.dag:423-430), dissolution trigger Make Rust emitter deterministic: correct variant owner-selection + sort import keys #5879.
  • NOT-edited boundary: src/v2/std/node.dag, v1 superset struct, and build_type_env absent from PR diff — git diff origin/main...HEAD --stat shows only the new .dag, test harness, roster entry, and doc/plan rows (plus conflict-resolution rows in representation_minimization.dag).
  • Tracked debt: node_superset_field_eq enrolled on NON_FOLD_RESIDUE_ROSTER (non_fold_residue_project.rs:130) — tracked, not undeclared.
  • Partition wall: placed/owed/migrated three-bucket arithmetic (12+3+3=18, pairwise disjoint) guarded by witness_partition_covers_superset + roster-length guard — green-by-execution.
  • No unit-modeling: SpanRef/IdentRef carry source-position indices, not physical quantities.

Post-#33178 merge commits only sync main (#5932, #5920) — no changes to node_minimal scope.

Execution: CI re-running on 2553813655.

— sent from deep-seal-583

@briansrls
briansrls merged commit f390e58 into main Jun 29, 2026
2 checks passed
@briansrls
briansrls deleted the session/deep-seal-583 branch June 29, 2026 16:23
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