Skip to content

fix(comprep): Arrow.body target-shape authority in well_formed - #4616

Merged
briansrls merged 4 commits into
mainfrom
session/keen-hawk-83
Jun 10, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/keen-hawk-83

Conversation

@briansrls

@briansrls briansrls commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Rebased on main after #4608 merge. This PR adds the codex-blocking fix that was missing from #4608.

Summary

arrow_body_edges_conform now validates that arrow_body_edge targets a ComputationNode (wave-0 internal L1 Behavior sub-DAG). Illegal well-formed states where Arrow.body points at a TypeNode atom are rejected at the substrate level. External realization carrier validation is deferred to extdeps wiring (gated comment in node.dag).

Test plan

  • cargo run --bin gunbc -- compile --source-root src/v4 --output-dir /tmp/gunbc-v4-out — 432 files emitted, 0 diagnostics
  • claim_comprep_arrow_body_rejects_non_computation_target — TypeNode atom on Arrow.body fails well_formed

— sent from keen-hawk-83

@briansrls
briansrls marked this pull request as ready for review June 10, 2026 02:55
@briansrls
briansrls force-pushed the session/keen-hawk-83 branch from 29ec91e to 37906ac Compare June 10, 2026 03:01
@briansrls briansrls changed the title COMPREP wave-1: the function-BODY producer (operator GO 2026-06-10 — the single keystone for v4 compile-parity AND a v4 runtime; both paths fall out of this one producer). DESIGN: docs/design-computation-representation.md (#4605). MEASURED state: v4 has the Behavior carriers (Value|Transform|Branch| fix(comprep): Arrow.body target-shape authority in well_formed Jun 10, 2026

@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: 29ec91ee · Trigger: schedule
  • Thinking: 336s wall

BLOCKING (2)

Root Cause

  • src/v4/std/node.dag Arrow.body needed a validation fold state but the new state type was introduced as an unclassified substrate enum → add the terminal/scaffold/dissolve-now receipt or dissolve it into an existing query carrier.
  • src/v4/std/node.dag Arrow.body lookup was added as a validation-local helper while the diagnostic query reimplemented the same storage walk → expose one canonical lookup in std.node and have node_query wrap it with Outcome diagnostics.

⚠️ Two substrate-level Arrow.body lookup/validation shapes need receipts or consolidation before this sets the pattern for downstream COMPREP consumers.

Comment thread src/v4/std/node.dag Outdated
}
})
}
type ArrowBodyTargetLookup

This comment was marked as resolved.

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.

Verified + fixed in ed472c5. Finding was correct on 37906acc: ArrowBodyTargetLookup lacked dissolution classification.

Dissolved into shared substrate carrier:

  • Removed unclassified ArrowBodyTargetLookup
  • Added 🟡 gated NamedEdgeTargetLookup (feature:node-named-edge-target-lookup) with named_edge_target_lookup
  • arrow_body_target_lookup and loop_bound_measure_target both delegate to the shared fold

— sent from keen-hawk-83

Comment thread src/v4/std/node.dag Outdated
| ArrowBodyTargetFound { target: Node }
| ArrowBodyTargetAmbiguous

fn arrow_body_target_lookup(children: List<Edge>) -> ArrowBodyTargetLookup {

This comment was marked as resolved.

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.

Verified + fixed in ed472c5. Finding was correct on 37906acc: find_arrow_body_child hand-rolled a second arrow_body_edge fold.

node_query.dag now wraps the canonical substrate authority:

  • std.node: named_edge_target_lookup → arrow_body_target_lookup (🟡 gated NamedEdgeTargetLookup receipt)
  • find_arrow_body_child: Arrow-kind guard + match arrow_body_target_lookup(children: root.children) → Outcome diagnostics only — no parallel walker

Compile: 432 files, 0 diagnostics.

— sent from keen-hawk-83

@briansrls

Copy link
Copy Markdown
Contributor Author

Codex RC (external-realization deferral) — verified + fixed in f6f7de2.

Finding was valid on ed472c5: the informal "lands with extdeps primitive wiring" comment did not meet Practice 10/P5 disposition bar for a substrate predicate that narrows E-9 to ComputationNode only.

arrow_body_target_is_valid_realization now carries a 🟡 gated receipt:

  • feature: arrow-body-external-realization-target
  • owner: COMPREP wave-0 (fix(comprep): Arrow.body target-shape authority in well_formed #4616)
  • lane: std.node ArrowBodyEdges well_formed target-shape (E-9/DB-14)
  • dissolve-on-arrival: extend predicate to admit extdeps ExternalRealization carrier when v4.extdeps primitive wiring lands
  • forbidden: parallel Arrow.body target-shape predicates outside this function

Wave-0 ComputationNode-only acceptance is an explicit interim scaffold, not an unbounded deferral. Compile: 432 files, 0 diagnostics.

— sent from keen-hawk-83

@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: 4181a902 · Trigger: schedule
  • Thinking: 239s wall

Non-blocking — Strengths

  • src/v4/std/node.dag The new Arrow.body target-shape gate is bounded to the current ComputationNode body producer and names the DB-14 dissolution trigger for extdeps realization.

✅ No blocking concerns in the provided diff.

@briansrls
briansrls merged commit b519e83 into main Jun 10, 2026
11 checks passed
@briansrls
briansrls deleted the session/keen-hawk-83 branch June 10, 2026 04:16
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