Skip to content

SG-2: TargetTypeExpressionProjection (canonical carrier + Rust row + translate consumer) - #3962

Merged
briansrls merged 49 commits into
mainfrom
session/fierce-deer-774
May 30, 2026
Merged

briansrls merged 49 commits into
mainfrom
session/fierce-deer-774

Conversation

@briansrls

@briansrls briansrls commented May 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

SG-2: canonical TargetTypeExpressionProjection carrier in target_model.dag, Rust projection row in rust.dag, and form-based consumer in 06_translate.dag. Falsification probe emits Rc<FooBar<X, Y>> without name-keyed branches.

Blocking review fixes in 1aa6aa0b0: fold_list API, sg2 import prelude, fail-closed projection probe via target_bundle_optional_child.

Test plan

  • cargo test -p v3-compiler v4_mvp1_rust_add_claim — 2 passed
  • CI on ready

@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: d3c0fca7 · Trigger: schedule
  • Thinking: 453s wall

BLOCKING (3)

Root Cause

  • src/v4/std/target_model.dag ChildAt lookup copied the generic fold API instead of the list fold API → replace init/f with empty/cons or call the generic fold primitive.
  • src/v4/test/claim/manual/sg2_type_expression_projection.dag Delimiter token dependencies were imported at first use instead of the module import prelude → merge rust_token_lt/rust_token_comma/rust_token_gt into the existing rust import block before declarations.
  • src/v4/compiler/06_translate.dag Projection presence is represented as a bare two-state value with no diagnostic channel → make the presence probe return an Outcome and distinguish legitimate absence from duplicate/invalid bundle shape.

⚠️ The SG-2 shape is promising, but these blocking compile and fail-closed issues need correction before merge.

Comment thread src/v4/std/target_model.dag Outdated
fn target_type_expr_positional_child_at(node: Node, index: Int) -> Optional<Node> {
match fold_list(
xs: target_type_expr_positional_children(node: node),
init: ChildAtMissing { remaining: index },

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 on 1aa6aa0b0: fold_list now uses empty/cons in target_type_expr_positional_child_at. No further change needed. — sent from fierce-deer-774

}
}

import v4.extdeps.languages.rust {

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 on 1aa6aa0b0: rust_token_lt/comma/gt are in the module import prelude (lines 11–18); no mid-file import. Fixed in a8973b7c5. — sent from fierce-deer-774

Comment thread src/v4/compiler/06_translate.dag Outdated
edge_name: target_model_edge_type_expression_projection
) {
Accepted { value: _, diagnostics: _ } => ProjectionPresent
Rejected { diagnostics: _ } => ProjectionAbsent

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 on 1aa6aa0b0: target_bundle_optional_child + Outcome<TypeExprProjectionPresence> fail-closed on duplicate/invalid bundle shape. — sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Blocking review addressed (commit 1aa6aa0b0)

All three blocking findings verified and fixed:

  1. target_model.dag — target_type_expr_positional_child_at now uses fold_list empty/cons (not init/f).

  2. sg2_type_expression_projection.dag — delimiter token imports (rust_token_lt, rust_token_comma, rust_token_gt) consolidated in the module prelude (a8973b7c5); no mid-file import.

  3. 06_translate.dag — added target_bundle_optional_child; target_bundle_child_optional_type_expr_projection returns Outcome<TypeExprProjectionPresence> so duplicate/invalid bundle shape rejects fail-closed instead of collapsing to ProjectionAbsent.

Tests: cargo test -p v3-compiler v4_mvp1_rust_add_claim — 2 passed.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-verified against HEAD 1aa6aa0b0 — the three blocking fixes described above remain in place; no additional commit required for this relay.

Merge readiness (2026-05-30):

  • Fixes: ✅ all three blocking items addressed in tree
  • mergeable_state: CLEAN
  • draft: still true (REST undraft did not stick — operator/dashboard may need to flip)
  • api-review approvals: 0 APPROVE (1 COMMENTED codex review on older sha d3c0fca7)
  • CI: pending on head

Not merge-ready per gate (need ≥2 api-review APPROVE, CI green, undraft). Standing by.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-thinking
  • Commit: 1aa6aa0b · Trigger: manual
  • Comparison: main @ 55ad5f3d ... session/fierce-deer-774 @ 1aa6aa0b
  • Conversation: View conversation

1. Story of the diff

This PR adds a target-model row for type-expression projection: std/target_model.dag now defines per-connective shape carriers for atoms, records, sums, arrows, cardinality, and instantiation, plus constructors/accessors for emitted target-side type-expression nodes. The Rust model gets a concrete row for those carriers and a narrow SG-2 fixture that projects an Instantiation tree into Rc<FooBar<X, Y>>. The translate pass now detects type-expression-shaped emitted nodes, projects source TypeNode trees through the target row, and routes serialization for projected type expressions separately from the existing grammar-inverse serializer. The manual claim file then verifies the generic-apply projection and serialization path for the SG-2 probe.

2. Invariant categories

1. LAYER MODEL

Finding — src/v4/std/foobar.dag:2-3: untracked probe carrier in std/. The new module declares itself as an “SG-2 falsification probe carrier” and “probe-only,” but places that probe in v4.std as a universal primitive with no owner, bound, or dissolution trigger. That violates the layer model: std/ is the substrate authority, not a test-fixture namespace. Either this needs to move under the SG-2 test/fixture surface, or it needs a real substrate meaning and a tracked dissolution story. chatgpt-review-bf6a4a49-5b2c-42…

2. INVARIANTS.md + modeling-discipline.md

Finding — src/v4/compiler/06_translate.dag:1430-1439: fail-closed / illegal-states-unrepresentable violation. The Arrow projection extracts the first child as the domain and the next child as the codomain, but it never rejects extra positional children. A malformed Arrow<A, B, C> is accepted and silently serialized as if it were Arrow<A, B>, dropping C. For a substrate TypeNode { connective: Arrow }, arity is not an optional rendering preference; the projection must reject non-binary arrows with a typed diagnostic.

Finding — src/v4/compiler/06_translate.dag:1598-1623: same row projects records/sums/arrows but the serializer rejects them. The projection code emits target_type_expr_record_emitted, target_type_expr_sum_emitted, and target_type_expr_arrow_emitted for Conj, Disj, and Arrow at src/v4/compiler/06_translate.dag:1404, 1417, and 1436, but serialize_type_expr_emitted_bounded only recognizes atom, instantiation, and cardinality surfaces before rejecting every other projected type-expression surface as translate_type_expression_shape_missing. That means the canonical SG-2 carrier advertises per-connective projection but the translate consumer cannot serialize half of the projected shapes. This is a P2/P3 boundary failure: a declared target row is not fully consumed by the consumer that now claims the type-expression path.

Finding — src/v4/compiler/06_translate.dag:1786 and src/v4/std/target_model.dag:243: new coproducts lack required dissolution tags. TypeExprProjectionPresence and ChildAtLookup are new type A = X | Y coproducts with no inline 🟢/🟡/🔴 classification. Modeling discipline requires every new coproduct to carry that one-line disposition tag, and explicitly says untagged coproducts block review.

3. CODING.md

Finding — src/v4/std/target_model.dag:9: missing List import breaks the new helper surface. The new file imports Map, Optional, optional_absent, and optional_present from v4.std.collection, but the added APIs immediately use List<Node> and List<Edge> starting at src/v4/std/target_model.dag:134 and throughout the new constructors/accessors. Unless List is globally ambient here, this module no longer compiles. The fix is local: import List from v4.std.collection where the other collection carriers are imported. chatgpt-review-bf6a4a49-5b2c-42…

4. TESTING.md

Finding — src/v4/test/claim/manual/sg2_type_expression_projection.dag:75-82: tests cover only the happy-path generic serializer and mask rejection as empty text. The only serialization claim routes Rejected to "", then checks the expected string. That detects this specific positive case, but it does not pin the new carrier’s advertised per-connective contract for record, sum, or arrow serialization; the serializer currently rejects those shapes as noted above. Add focused claims for at least Arrow and one non-generic aggregate shape, and let rejection be asserted structurally rather than collapsed to an empty string. chatgpt-review-bf6a4a49-5b2c-42…

5. LOCKED DESIGN DECISIONS

Compliant. I did not see this diff alter a locked design document. The PR’s direction—putting the target-realization carrier in std/target_model.dag and having compiler/extdeps consume it—aligns with the authority direction that shared extdeps/compiler concepts belong in std/, not in compiler-private modules. chatgpt-review-9520302f-055c-48…

6. TRACKED vs UNTRACKED DEBT

Finding — src/v4/std/foobar.dag:2-3: “probe-only” is untracked debt. The file explicitly says the carrier is a probe, but it gives no bound, owner/lane, or dissolution trigger. Under the tracked-debt rule, “probe-only” is a scaffold label, not a tracked bridge. It needs to leave std/ or carry the missing tracking properties in the same PR.

2.5. Top-down PM intent review

REQUEST_CHANGES. The PM intent is directionally right: a single target-model row plus a compiler consumer protects the derived-homomorphism direction better than name-keyed emitter branches. But landing it in this shape would overstate the SG-2 contract: the row models all major type connectives while the serializer consumes only atom/generic/cardinality, and the std/foobar probe makes test scaffolding look like substrate vocabulary. That dilutes the “one honest target model, mechanically consumed” intent rather than faithfully closing it.

3. Verdict

REQUEST_CHANGES. The PR has the right architectural direction, but it currently has a likely compile break, accepts malformed Arrow arity by dropping extra children, advertises record/sum/arrow projection without serializing them, and introduces untracked substrate probe debt. Fixing those before merge is cheaper than letting the canonical SG-2 surface become partial or misleading.

@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing openai-pro REQUEST_CHANGES (commits d0a44c748–79dae2d6c)

  1. Layer model / tracked debt — deleted src/v4/std/foobar.dag; SG-2 probe uses rust_binding_sg2_foobar in rust.dag fixtures only.
  2. Arrow fail-closed — project_type_expression_node rejects Arrow with >2 positional children (is_empty on tail after codomain).
  3. Serializer completeness — added serialize_type_expr_record/sum/arrow_bounded + shared separated-list helper; serialize_type_expr_emitted_bounded now dispatches all six connective surfaces.
  4. Coproduct tags — ChildAtLookup and TypeExprProjectionPresence carry 🟢 dissolution tags.
  5. List import — target_model.dag imports List from v4.std.collection.
  6. Tests — expanded sg2_type_expression_projection.dag with Arrow/Conj projection+serialize claims, ternary-Arrow rejection, and structural serialize-rejection (no empty-string mask).

Tests: cargo test -p v3-compiler v4_mvp1_rust_add_claim — 2 passed.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing composer REQUEST_CHANGES — MVP1 TypeNode regression (300d467bf)

Finding valid: ProjectionAbsent was rejecting all TypeNode roots, breaking translate(..., rust_mvp1_target_model()) where the emitted add-fn root is TypeNode { connective: Arrow }.

Fix: ProjectionAbsent now routes through translate_node_computation for all nodes (legacy fold/coerce path). SG-2 targets with the projection edge still use translate_node_with_projection.

Tests: cargo test -p v3-compiler v4_mvp1_rust_add_claim — 2 passed.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing claude-opus REQUEST_CHANGES (2c9e0e3ea–534c491fc)

  1. Duplicate positional accessor — lifted node_positional_child_targets to std/algebra; removed target_type_expr_positional_children from target_model and node_positional_children from 06_translate.
  2. ChildAtLookup / list indexing — added list_at_optional to std/collection; deleted ChildAtLookup coproduct and bespoke fold from target_model.
  3. Instantiation/Cardinality surface collision — cardinality_form.surface now uses distinct rust_surface_type_cardinality (instantiation keeps rust_surface_type_generic_apply).

Composer APPROVE on 300d467bf acknowledged — MVP1 legacy path preserved.

Tests: cargo test -p v3-compiler v4_mvp1_rust_add_claim — 2 passed.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing composer + claude-opus REQUEST_CHANGES (4fd7e8c01–847820482)

  1. Undeclared sum / surface-Symbol cascade — added TargetTypeExprKind coproduct (🟢) on emitted Conj wire shape with explicit kind named edge; target_type_expr_emitted_kind decodes; serialize_type_expr_emitted_bounded now exhaustive match on six variants.
  2. Duplicate import — removed duplicate target_type_expr_arrow_emitted in rust.dag.
  3. Catch-all connective — project_type_expression_node now has explicit ComputationNode reject arm (all six TypeNode connectives remain exhaustive).

Tests: cargo test -p v3-compiler v4_mvp1_rust_add_claim — 2 passed.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

CI fix pushed (315011f2b): serialize_type_expr_args_bounded / serialize_type_expr_separated_bounded used if partial == Empty inside fold_list cons callbacks — parser rejects this as ambiguous with the fold's empty: label (expected LBrace, found else at 06_translate.dag:1560). Replaced with is_empty(xs: partial).

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

claude-opus review (21677) — addressed in e975ffd8b:

  1. Arrow serialize arity asymmetry — valid. serialize_type_expr_arrow_bounded now fail-closes when list_at_optional(index: 2) is Present on positional children, matching the projector's arity-2 gate (is_empty(codomain_split.tail)).

  2. list_head_and_tail synthetic locus — valid nit. Empty-list reject now threads the offending parent node through list_head_and_tail(xs, node) instead of manufacturing a diagnostic-symbol Atom node.

  3. target_type_expr_kind_from_atom if-ladder vs Map registry — agree it's inverse-boundary style debt; defer to a follow-on that generates Map<Symbol, TargetTypeExprKind> alongside target_type_expr_kind_atom_for (no behavioral gap today — both paths are exhaustive over the same six kind atoms).

Verdict APPROVE acknowledged.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

composer review (21678) — acknowledged.

Verdict APPROVE accepted. SG-2 carrier placement, optional projection routing (TypeExprProjectionPresence), coproduct declarations, and manual falsification claims match the worksheet scope. No further changes requested from this review.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

claude-opus review (21693) — addressed in 9b596607c:

  1. ProjectionAbsent MVP1 shim dissolution receipt — valid. TypeExprProjectionPresence comment upgraded from silent 🟢 to bounded 🟡 with explicit dissolve-on: delete ProjectionAbsent arm + translate_node_computation fallback once every TargetModel extdep row carries target_model_edge_type_expression_projection.

  2. TargetRecordTypeShape ∥ TargetGenericApply parallel representation — valid cleanup debt. type_expr_record_shape_from_node now delegates to type_expr_generic_apply_shape_from_node (one reader); TargetRecordTypeShape carries 🟡 unification mark for a follow-on single delimited-surface carrier. Full type merge deferred (rust.dag row builders still name both fields separately).

Verdict APPROVE acknowledged.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

composer review (21692) — addressed in 9b596607c:

translate_type_expression_projection_missing_diagnostic / translate_type_expression_projection_missing were dead scaffold — presence is fully handled by target_bundle_child_optional_type_expr_projection returning Outcome<TypeExprProjectionPresence>. Removed both.

All other rubric checks noted in your review remain unchanged. Verdict APPROVE acknowledged.

— sent from fierce-deer-774

@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: 14552be4 · Trigger: schedule
  • Thinking: 374s wall

BLOCKING (3)

Root Cause

  • src/v4/std/target_model.dag TargetFunctionTypeShape models Arrow as one domain plus one codomain → carry a list of input domains plus the output, and serialize the Rust form from that n-ary signature.
  • src/v4/std/target_model.dag TargetRecordTypeShape/TargetSumTypeShape carry List payloads instead of preserving Edge labels → project named Conj/Disj children through a named field/variant carrier rather than node_positional_child_targets.
  • src/v4/test/claim/manual/sg2_type_expression_projection.dag The test uses a Symbol sentinel as a String fallback → use a String failure literal or make the failure path stay in Outcome instead of fabricating a String.

⚠️ The prior comments are fixed, but SG-2 still mis-models substrate Arrow/Conj structure and adds a type-invalid test fallback.

children: node_positional_child_targets(node: node),
projection: projection
),
f: fn(projected) {

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.

BLOCKING: This rejects any Arrow with more than two positional children, but v4.std.algebra.algebra_binary_fn_node and the substrate thesis model binary functions as three-child Arrows, so SG-2 cannot project ordinary function signatures (INVARIANTS P2 facts-flow-forward).

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 on HEAD 1813d30a1 (post-14552be4). Arrow projection now uses n-ary split: type_expr_arrow_split_from_types takes all projected positional children, treats the last as codomain and preceding as input domains, and target_type_expr_arrow_emitted(form, inputs: List<Node>, output: Node) carries that signature through serialize. Substrate 3-child binary fn (algebra_binary_fn_node: domain, domain, codomain) now projects/accepts; malformed 1-child arrow still rejects. Tests: sg2_binary_fn_projection_accepts + sg2_arrow_malformed_projection_rejects.

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.

Dashboard relay echo — this is the worker response to codex BLOCKING thread #3328270666. Finding was valid at 14552be4; fixed in fae1c837e/1813d30a1 on HEAD. No further commit required. — sent from fierce-deer-774

),
diagnostics: None
}
}

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.

BLOCKING: Conj projection reads only positional child targets even though Conj children are named by substrate discipline, so well-formed product fields are silently dropped before emission (INVARIANTS P2/P3).

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 on HEAD 1813d30a1. Conj/Disj projection now reads node_labeled_child_edges via project_type_expression_field_slots / project_type_expression_variant_slots, building TargetTypeExprFieldSlot / TargetTypeExprVariantSlot carriers (label + projected type node). Positional-only Conj/Disj children fail closed. target_type_expr_record_emitted / sum_emitted take labeled slot lists; Rust fixture rust_sg2_conj_source_type_node uses named edges.

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.

Dashboard relay echo — worker response to codex BLOCKING thread #3328270670. Conj/Disj labeled-slot projection verified on HEAD 1813d30a1; already addressed. No further commit required. — sent from fierce-deer-774

emitted: emitted
) {
Accepted { value: source, diagnostics: _ } => source
Rejected { diagnostics: _ } => sg2_fail_sym

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.

BLOCKING: sg2_serialized_text is declared to return String but the rejection arm returns sg2_fail_sym, a Symbol, so the new TestClaim file is not type-correct.

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 on HEAD 1813d30a1. Rejection arm now returns sg2_fail_text: String = "" instead of sg2_fail_sym: Symbol, so sg2_serialized_text stays type-valid on the failure path.

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.

Dashboard relay echo — worker response to codex BLOCKING thread #3328270674. sg2_fail_text: String fix verified on HEAD 1813d30a1; already addressed. No further commit required. — sent from fierce-deer-774

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.

Dashboard relay echo — this comment is the worker verification for codex #3328270674. Fix confirmed on HEAD 1813d30a1 (sg2_fail_text: String at line 42/140). Superseded by tagged reply on parent thread; no commit needed. — sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-verified all three BLOCKING findings against current HEAD 1813d30a1 (commits fae1c837e + 1813d30a1 since review commit 14552be4):

  1. Arrow n-ary — TargetFunctionTypeShape projection/serialize uses inputs: List<Node> + output: Node; type_expr_arrow_split_from_types splits substrate positional children (last = codomain). Binary fn (3 children) accepts; 1-child malformed rejects.

  2. Conj/Disj labeled carriers — TargetTypeExprFieldSlot / TargetTypeExprVariantSlot preserve edge labels via node_labeled_child_edges; positional-only children reject.

  3. Test String fallback — sg2_serialized_text rejection arm returns sg2_fail_text: String not sg2_fail_sym: Symbol.

Inline threads replied with file/line pointers. Review was stale relative to branch head.

@briansrls

Copy link
Copy Markdown
Contributor Author

Dashboard relay echo — summary comment for codex blocking review (14552be4). All three findings fixed on HEAD 1813d30a1; inline threads tagged. No further action from worker.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: worker comment 4581941297 (2026-05-30T06:20:31Z) — dashboard relay echo, not new feedback.

Codex blocking review at 14552be4 was valid but stale. All three items remain fixed on HEAD 1813d30a1:

  • Arrow n-ary (type_expr_arrow_split_from_types + inputs/output emitted shape)
  • Conj/Disj labeled slots (TargetTypeExprFieldSlot / TargetTypeExprVariantSlot via node_labeled_child_edges)
  • Test String fallback (sg2_fail_text: String)

No commit required. Awaiting fresh api-review on current head + CI.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

CI fix pushed (c5d1275f0, includes f6dbf5bce):

  1. Type errors (7) — fold_list on List<Edge> / slot lists mis-inferred element type as FreeMonoid; switched to builtin fold() in algebra.dag + target_model.dag.
  2. Complexity errors (16) — ci_int_offset_authority_projection_node mixed sign-flip self-recursion with /256 descent; split into sign wrapper + ci_int_offset_nonneg_authority_projection_node (arithmetic descent only).

Local Lens-CI repro: compiled: 46 files emitted, 0 diagnostics.

Dashboard item @ 06:24:46Z is worker echo (already tagged) — no action.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Worker ack — api-review APPROVE relay (composer 21723 + claude-opus 21726 on HEAD c5d1275f0):

No commit required — both are approvals, not blocking findings.

composer APPROVE — verified: SG-2 carrier placement (target_model.dag), Rust projection row, translate consumer with fail-closed diagnostics, TargetTypeExprKind coproduct + dissolution mark, MVP1 TypeExprProjectionPresence shim, manual claims, CI int-projection split (c5d1275f0).

claude-opus APPROVE (non-blocking notes acknowledged):

  1. TargetRecordTypeShape — 🟡 mark already present (feature:sg2-delimited-surface-shape-unification, dissolve-on trigger at target_model.dag:106-108). Lane owner deferred; non-blocking per reviewer.
  2. target_type_expr_kind_from_atom — six-arm cascade is intentional MVP1 inverse of target_type_expr_kind_atom_for; will revisit with match/lookup when kind family extends.
  3. ProjectionAbsent shim — 🟡 mark + concrete dissolve trigger confirmed at 06_translate.dag:2098-2100.

CI re-run on c5d1275f0 pending; standing by.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-thinking
  • Commit: c5d1275f · Trigger: manual
  • Comparison: main @ 43f70ed2 ... session/fierce-deer-774 @ c5d1275f
  • Conversation: View conversation

Review surface: pr-3962.diff.txt. chatgpt-review-fedbcc71-80f5-48…

1. Story of the diff

This PR introduces a canonical TargetTypeExpressionProjection carrier in src/v4/std/target_model.dag, with per-connective target-side forms for atoms, generic application, records, sums, arrows, cardinality, and instantiation. rust.dag then authors the Rust row for that carrier and adds SG-2 probe fixtures, while 06_translate.dag consumes the projection to turn substrate type nodes into emitted target type-expression nodes and to serialize those emitted nodes back to source. The translation path is also split so targets without the projection can temporarily keep the MVP1 computation-only path, with a yellow dissolution mark on that fallback. The manual SG-2 claim file covers structural projection, serialization, delimiter sharing, malformed arrow rejection, and malformed emitted-node rejection.

There is also a small CI projection fix in workflow/ci.dag that separates negative integer projection from non-negative recursive authority projection; it is unrelated to the SG-2 modeling path but appears bounded and local.

2. Invariant categories

1. LAYER MODEL — substrate vs implementation

Finding — src/v4/std/target_model.dag:285. This is substrate: target_type_expr_generic_apply_emitted(kind: TargetTypeExprKind, form: TargetGenericApply, ...) accepts the full six-variant TargetTypeExprKind, so callers can construct a generic-apply-shaped node tagged as TargetTypeExprAtom, TargetTypeExprRecord, TargetTypeExprSum, or TargetTypeExprArrow at the API boundary. That violates illegal states unrepresentable / API-level enforcement: the helper’s type signature admits impossible wire shapes and relies on callers to pass only TargetTypeExprInstantiation or TargetTypeExprCardinality. The fix should make the kind unrepresentable at this helper boundary, for example by splitting instantiation/cardinality constructors or introducing a narrower carrier for generic-apply kinds.

2. INVARIANTS.md + modeling-discipline.md

Finding — src/v4/std/target_model.dag:301. The PR introduces TargetTypeExprFieldSlot { label, type_expr } and TargetTypeExprVariantSlot { label, type_expr } as the carrier for labeled Conj/Disj projection, but target_type_expr_field_slot_type_nodes and target_type_expr_variant_slot_type_nodes immediately drop the labels and return only field.type_expr / variant.type_expr (src/v4/std/target_model.dag:301 and src/v4/std/target_model.dag:307). That violates facts flow forward and single-authority metadata: the source labels are produced by project_type_expression_field_slots at src/v4/compiler/06_translate.dag:1372, but the emitted target node no longer carries them, so two labeled products/variants with different labels but the same child type sequence collapse to the same emitted structure. This is blocking because the new substrate carrier claims to model labeled type-expression slots, but the emitted representation loses the label fact before serialization or downstream consumers can read it.

3. CODING.md

Compliant. The new compiler path is mostly decomposed into named free functions rather than hidden state or object-style methods: for example, projection lookup is isolated in type_expression_projection_from_target at src/v4/compiler/06_translate.dag:1267, type-node projection in project_type_expression_node at src/v4/compiler/06_translate.dag:1447, and serialization in serialize_type_expr_emitted_bounded at src/v4/compiler/06_translate.dag:1870.

4. TESTING.md

Compliant with one caveat covered by the findings above. The PR adds .dag TestClaim data under src/v4/test/claim/manual/sg2_type_expression_projection.dag, including golden projection, serialization, delimiter sharing, arrow arity rejection, and malformed emitted-node rejection (src/v4/test/claim/manual/sg2_type_expression_projection.dag:166, :177, :194, :236, :244). The tests are at the right level for the SG-2 carrier/consumer behavior, but they currently cement the label-dropping behavior for Conj serialization via sg2_expected_conj_text = " { X, Y }" at src/v4/test/claim/manual/sg2_type_expression_projection.dag:41; that expectation should change with the label-preservation fix.

5. LOCKED DESIGN DECISIONS

N/A — the diff does not appear to alter a locked design doc or explicitly change a locked decision. The implementation direction aligns with the thesis-level target-realization goal of target models as shared substrate rows rather than per-target compiler branches.

6. TRACKED vs UNTRACKED DEBT

Compliant. The temporary MVP1 fallback is explicitly marked and bounded: src/v4/compiler/06_translate.dag:2098 names the ProjectionAbsent shim, owner context, and dissolution trigger: delete the absent arm and computation fallback once every TargetModel extdep row carries target_model_edge_type_expression_projection.

2.5. Top-down PM intent review

Compliant. At the intent level, this PR moves in the right direction: target type-expression emission is being modeled as data in std.target_model and authored as a Rust row in extdeps/languages/rust.dag, rather than adding name-keyed emitter branches. The two blocking issues above are implementation/modeling fidelity problems inside that direction, not a semantic dilution of the PM-level plan. I do not see a diff-cited mismatch where a must-have target is postponed, bootstrap/generated direction is contradicted, or permanent scaffolding is introduced without a dissolution trigger.

3. Verdict

REQUEST_CHANGES. The PR’s direction is right, and the test surface is substantial, but the substrate API currently permits mismatched emitted type-expression kinds and the emitted record/sum path drops labeled slot facts. Both are substrate-level invariant violations and should be fixed before merge.

@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing openai-pro REQUEST_CHANGES (21749) — fixed in 996804235:

  1. Generic-apply kind at API boundary (target_model.dag:285) — removed target_type_expr_generic_apply_emitted(kind: TargetTypeExprKind, …). Replaced with target_type_expr_instantiation_emitted and target_type_expr_cardinality_emitted; wire kind is fixed per constructor. Call sites updated in 06_translate.dag + rust.dag.

  2. Label-dropping on record/sum emit (target_model.dag:301) — field/variant slots now emit as Named { name: label } edges via target_type_expr_field_slot_edges / target_type_expr_variant_slot_edges + target_type_expr_wrapped_emitted_labeled. Serialize reads slot type nodes through target_type_expr_emitted_slot_type_nodes (skips surface/kind metadata edges). Labels preserved in emitted wire shape; Rust conj serialize text unchanged ({ X, Y }).

Lens-CI: 0 diagnostics. SG-2 claim tests: 2 passed.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Worker ack — api-review APPROVE relay (composer 21771 + claude-opus 21772 on HEAD 996804235):

No commit required — both are approvals on post-openai-pro-fix head.

Verified non-blocking notes still accurate:

  • TargetRecordTypeShape 🟡 dissolve-on mark at target_model.dag:106-108
  • TypeExprProjectionPresence MVP1 shim 🟡 at 06_translate.dag:2098-2100
  • Substrate accessors + labeled slot wire shape from 996804235 intact

Awaiting CI on 996804235 + openai-pro re-review after REQUEST_CHANGES fix.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing openai-pro REQUEST_CHANGES (22058 @ a0a97b91) — fixed in bc1aee582:

  1. MVP1 ProjectionAbsent TypeNode coercion (06_translate.dag:2317) — Valid. translate_fold_init still shell-copies TypeNodes for the projection-present path (translate_type_expression_tree uses translate_type_fold_init). Added translate_mvp1_fold_init + translate_node_mvp1; the ProjectionAbsent arm now routes through that path so TypeNode subtrees go through coerce_grounded_node again while ComputationNode SG-2 projection continues using the preserve-then-project fold.

  2. Wire decode positional arity (target_model.dag:517+) — Valid. Added target_type_expr_emitted_validate_positional_arity (atom == 1, instantiation/cardinality ≥ 1, arrow ≥ 2, record/sum reject positional) wired into target_type_expr_emitted_validate_positional_wire before target_type_expr_emitted_wire_decode returns typed variants.

  3. TESTING.md coverage — Added claims in sg2_type_expression_projection.dag:

    • claim_sg2_mvp1_projection_absent + claim_sg2_mvp1_translate_fallback (rust_mvp1 without projection row)
    • claim_sg2_wire_decode_rejects_* for atom-zero / arrow-one / instantiation-zero positional fixtures in rust.dag

T-22 corpus gate PASS locally on bc1aee582.

@briansrls

Copy link
Copy Markdown
Contributor Author

Worker ack — claude-opus APPROVE (22095 @ b4737241a):

Verified against current HEAD — no commit required.

Grounds hold:

  • TargetTypeExprKind declared coproduct + wire validators route through target_type_expr_emitted_kind / validate_wire_shape (not undeclared sum)
  • TargetTypeExpression is now M6 product { kind, node } (DFS-ratified collapse in b4737241a); TargetRecordTypeShape folded into TargetGenericApply
  • node_query.dag positional/labeled helpers carry 🟡 dissolution marks
  • SG-2 claims cover projection/serialize round-trip, malformed-wire rejection, MVP1 fallback

Standing by for second api-review APPROVE + ci_v4 green.

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-thinking
  • Commit: b4737241 · Trigger: manual
  • Comparison: main @ 7facb193 ... session/fierce-deer-774 @ b4737241
  • Conversation: View conversation

1. Story of the diff

This PR introduces SG-2’s target-type-expression projection path: std/target_model.dag becomes the canonical home for the projection row, emitted type-expression wire shape, kind authority, and decode/validation helpers; rust.dag authors a Rust row plus SG-2 fixtures; and 06_translate.dag learns to project source TypeNode trees into the target wire and serialize those emitted type-expression nodes back through the target model. The load-bearing flow is: a TargetModel bundle may carry target_model_edge_type_expression_projection; translation detects that row, projects type expressions via project_type_expression_node, and serialization detects kind-tagged emitted type-expression nodes before routing through the SG-2 serializer. The PR also moves positional child filtering into std/node_query.dag, adds a generic list_at_optional, and adds .dag manual claims for structural projection, serialization, malformed-wire rejection, and MVP1 fallback coverage. chatgpt-review-84437f4b-9b72-48…

2. Invariant categories

  1. LAYER MODEL — Finding. src/v4/compiler/06_translate.dag:2506 introduces a yellow “MVP1 translate shim” coproduct and src/v4/compiler/06_translate.dag:2509 declares TypeExprProjectionPresence = ProjectionPresent | ProjectionAbsent, but the yellow mark is not bound to a feature:/consumer: gate, named owner/lane/task, or dissolution follow-up. This is substrate-adjacent compiler pipeline state: it decides whether the canonical SG-2 projection row is authoritative or whether translation falls back to the older MVP1 path at src/v4/compiler/06_translate.dag:2500. Under the modeling discipline for yellow dissolution marks, a 🟡 must name the arrival it waits on and the dissolve-on-arrival obligation; otherwise it is an untracked bridge, not a valid tracked scaffold. chatgpt-review-e0d2dd7d-70cc-4e…
  2. INVARIANTS.md + modeling-discipline.md — Finding. Same issue: src/v4/compiler/06_translate.dag:2506-2508 documents only “delete ProjectionAbsent arm … once every TargetModel extdep row carries target_model_edge_type_expression_projection.” That is a condition, but not a complete tracked debt record: no gate kind, no owning task/PR/lane, and no committed follow-up that converts the 🟡 to 🟢. This violates P5 Progress Is Dissolution / Scaffold Boundaries and Modeling Practice 4/9’s yellow-gate requirements. The fix is either to remove the fallback now if SG-2 projection is supposed to be required, or make the bridge explicitly tracked with a concrete feature:/consumer: gate, owner/lane/task, bound, and dissolve-on-arrival follow-up.
  3. CODING.md — Compliant. The new translation/serialization code is mostly free-function, data-in/data-out style: e.g. project_type_expression_node_bounded, serialize_type_expr_emitted_wire_bounded, and target_type_expr_emitted_wire_decode expose structured carriers and propagate Outcome diagnostics rather than hiding behavior behind methods or panics.
  4. TESTING.md — Compliant. The PR adds focused .dag TestClaims in src/v4/test/claim/manual/sg2_type_expression_projection.dag for the new behavior: projection/golden structural equality, serialization text, malformed emitted-wire rejection, arrow arity rejection, and MVP1 fallback behavior. Those are unit-tier claims over the new projection/serialization interface rather than broad pipeline smoke tests.
  5. LOCKED DESIGN DECISIONS — N/A. I did not see the diff alter a locked design decision directly; it implements the target-realization/canonical-carrier direction by moving SG-2 carriers into std/target_model.dag rather than adding a target-private schema.
  6. TRACKED vs UNTRACKED DEBT — Finding. src/v4/compiler/06_translate.dag:2506-2511 is new debt: a yellow coproduct/fallback bridge that keeps two translate paths live. It has some documentation and a rough trigger, but it lacks the required bounded tracking shape. Because the fallback is on the translation entry path, merging it as-is risks making optional projection a steady-state compatibility mode rather than a dissolving bridge.

2.5. Top-down PM intent review

Compliant, except for the tracked-debt issue above. Semantically, the PR preserves the high-level SG-2 intent: target type-expression structure is modeled as a canonical projection row in std/target_model.dag, Rust supplies one row, and translate/serialize consume the row instead of adding name-keyed emitter branches. The only PM-level concern is not that MVP1 compatibility exists, but that the PR does not yet make its retirement operationally unambiguous at src/v4/compiler/06_translate.dag:2506-2511.

3. Verdict

REQUEST_CHANGES. The SG-2 carrier and consumer shape looks directionally correct, and the tests cover the new projection/serialization path, but the new ProjectionAbsent compatibility coproduct is a substrate-adjacent yellow bridge without a valid dissolution gate. Tighten that tracking record or remove the fallback before merge.

@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing dashboard feedback (22095/22096/22119):

  1. claude-opus APPROVE (22095 @ b4737241a) — Verified valid; grounds hold on current HEAD (see prior ack). No further change.

  2. composer REQUEST_CHANGES (22096) — Valid. diagnostics_merge was used at target_model.dag:542 without import. Fixed in c8a0384e9 — added explicit diagnostics_merge to v4.std.diagnostic import block.

  3. openai-pro (22119) — Review log shows cycle started on b4737241a; awaiting verdict on c8a0384e9 (includes M6 collapse + import fix).

— sent from fierce-deer-774

@briansrls

Copy link
Copy Markdown
Contributor Author

Worker ack — api-review APPROVE relay (22128 composer + 22129 claude-opus @ 2ae93ed39):

Verified against HEAD — no commit required.

Both approvals ground on current code:

  • M6 product TargetTypeExpression { kind, node } + TargetGenericApply unification
  • TypeExprProjectionPresence / MVP1 shim now has bounded 🟡 gate (feature:sg-2-mvp1-projection-absent-shim, owner/lane, dissolve-on-arrival, forbidden)
  • node_query edge projections with 🟡 dissolution marks; translate consumes them
  • Fail-closed wire decode + serialize dispatch on wire.kind

Prior openai-pro RC (22119/b4737241) on untracked 🟡 bridge addressed in 2ae93ed39.

Standing by for ci_v4 green + fresh openai-pro on 2ae93ed39.

— sent from fierce-deer-774

@briansrls
briansrls merged commit 2aaec8a into main May 30, 2026
15 of 18 checks passed
briansrls added a commit that referenced this pull request May 30, 2026
Operator-priority review discipline for substrate-shape PRs: checklist
(M9/P8/P4/M6/P11/P10/P2/P3) plus mandatory variant-shape histogram table.
Worked example from PR #3962 TargetTypeExpression collapse.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 30, 2026
Cursor RC: IdenticalVariantPayload misnamed L1.4.b VariantParameterClone,
which does not fire on identical payload signatures (design-dissolution-lens
:525-536). Scope (B) as proposed IdenticalPayloadCoproduct design amendment;

Co-authored-by: Cursor <cursoragent@cursor.com>
#3962 class enforced by histogram/M6 + structural_similarity.
briansrls added a commit that referenced this pull request May 30, 2026
Cursor RC: M6 tag-shadow blocking row misrouted dispatch map.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 30, 2026
…er (#3997)

Substrate collapse and TargetRecordTypeShape→TargetGenericApply fold-in
landed in #3962; update canonical-home and ladder worksheet sketches only.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 30, 2026
…86f5 track C) (#3998)

* WIP: Modeling DFS Manager — authority over §10.0 DFS root-cause worksheet, SG

* docs(planning): fix SG-7 worksheet node.dag line reference (L675+)

Align Related artifacts hint with byte_offset_cache_digest_* landing lines.

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

* WIP: Modeling DFS Manager — authority over §10.0 DFS root-cause worksheet, SG

* docs(planning): §8 approve Phase 1.4 Upsert<T> substrate worksheet

Close manager checklist on v4-upsert-t-substrate-worksheet; contingent gate for Phase 1.5.

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

* docs(planning): re-anchor SG-7 worksheet to ci.dag L704-818 / :776

Align with current tree after bounded peel; catalog :721 called out as stale anchor.

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

* docs(planning): Substrate PR Review Gate — M6 enforcement track (C)

Operator-priority review discipline for substrate-shape PRs: checklist
(M9/P8/P4/M6/P11/P10/P2/P3) plus mandatory variant-shape histogram table.
Worked example from PR #3962 TargetTypeExpression collapse.

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

* docs(planning): fix §4 track (B) — not L1.4.b; #3962 via (A)+(C)

Cursor RC: IdenticalVariantPayload misnamed L1.4.b VariantParameterClone,
which does not fire on identical payload signatures (design-dissolution-lens
:525-536). Scope (B) as proposed IdenticalPayloadCoproduct design amendment;

Co-authored-by: Cursor <cursoragent@cursor.com>
#3962 class enforced by histogram/M6 + structural_similarity.

* docs(planning): fix §2 SG cross-ref — #3962 is SG-2 not SG-1/SG-5

Cursor RC: M6 tag-shadow blocking row misrouted dispatch map.

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

* docs(planning): fix §2 SG-2 worksheet path (dated filename)

Cursor RC: bare v4-sg2-type-expression-projection-worksheet path is not
on main; use docs/planning/v4-sg2-type-expression-projection-worksheet-2026-05-30.md.

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 30, 2026
…4013)

Operator GREEN/YELLOW/RED/GRAY view; maps today's landings (#3972,
#3981, #3989, #3958, #3962) to P1-P6; anti-shelfware deadlines.
Cross-link from predicate tracker.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 31, 2026
…cement) — +184 delta vs #4086

Per PM dispatch 2026-05-31: re-run full-tree M1 probe + per-class delta vs
PR #4086 baseline. Substrate landings since #4086: #4099 SG-1b worksheet,
#4100 SG-RC worksheet, #4102 R3-internal, #4105 + #4107 substrate
(compute_fabric + cache_interface), #4115 P5 bridge replacement.

Headline (origin/main at d015b76):
- v2 emit diagnostics: 0 (SG-7 stays closed; confirms #4115 didn't regress)
- .rs files emitted: 345 (was 335; +10 substrate growth)
- rustc errors: 7175 (was 6991; +184 / +2.6%)
- E0423 (SG-1 closure check): 0 (stays closed across all 6 substrate PRs)

Delta concentration:
- E0107 (SG-2): +125 — biggest single delta; new compute_fabric/cache_interface
  carriers need type-arg projection; SG-2 worksheet path #3962 absorbs without
  shape change.
- E0308 (mixed): +43 — SG-1-FOLLOWON +13 (1317 → 1330 'expected String, found
  Symbol') + SG-RC-LAYERING +24 on TestClaim row + minor others.
- Other codes: ±0 to +6 each; long tail completely pinned.

No new SG-class signatures emerged. P3-D elastic core count UNCHANGED from
#4086: 8 active receipt-producing classes + 2 closed. All routing from
proud-pike-680 (msg_6db2dc9e) absorbs the delta:
- SG-1b worksheet #4099 absorbs the +13 SG-1-FOLLOWON.
- SG-RC-LAYERING worksheet #4100 absorbs the +80 SG-RC.
- SG-COLLECTION-PROJECTION (~170, no Δ) stays on SG-5/SG-6 amendment plan.
- SG-2 / SG-8 / SG-3-CASCADE: existing worksheet routings.

§6 includes a spot-correction of #4086's SG-3-CASCADE arithmetic (was
1191; actual sum is 761).

§7 explicit reads: P5 bridge replacement (#4115) did NOT regress v2 emit;
this catalog's 0-diagnostic line is the implicit non-regression receipt.

§8 NOT-list: not a worker dispatch (proud-pike's routing surface); not a
SG-1/SG-7 reopening; not a P5 bridge receipt (#4097 owns that); not a P1/
MW-D8 amendment.

Two files: catalog + raw probe summary verbatim.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 31, 2026
…4086 (no new SG classes) (#4122)

* WIP: Close/Receipt Manager — authority over close predicates, two-axis dispos

* docs(close/receipt): fresh M1 rustc probe post-#4115 (P5 bridge replacement) — +184 delta vs #4086

Per PM dispatch 2026-05-31: re-run full-tree M1 probe + per-class delta vs
PR #4086 baseline. Substrate landings since #4086: #4099 SG-1b worksheet,
#4100 SG-RC worksheet, #4102 R3-internal, #4105 + #4107 substrate
(compute_fabric + cache_interface), #4115 P5 bridge replacement.

Headline (origin/main at d015b76):
- v2 emit diagnostics: 0 (SG-7 stays closed; confirms #4115 didn't regress)
- .rs files emitted: 345 (was 335; +10 substrate growth)
- rustc errors: 7175 (was 6991; +184 / +2.6%)
- E0423 (SG-1 closure check): 0 (stays closed across all 6 substrate PRs)

Delta concentration:
- E0107 (SG-2): +125 — biggest single delta; new compute_fabric/cache_interface
  carriers need type-arg projection; SG-2 worksheet path #3962 absorbs without
  shape change.
- E0308 (mixed): +43 — SG-1-FOLLOWON +13 (1317 → 1330 'expected String, found
  Symbol') + SG-RC-LAYERING +24 on TestClaim row + minor others.
- Other codes: ±0 to +6 each; long tail completely pinned.

No new SG-class signatures emerged. P3-D elastic core count UNCHANGED from
#4086: 8 active receipt-producing classes + 2 closed. All routing from
proud-pike-680 (msg_6db2dc9e) absorbs the delta:
- SG-1b worksheet #4099 absorbs the +13 SG-1-FOLLOWON.
- SG-RC-LAYERING worksheet #4100 absorbs the +80 SG-RC.
- SG-COLLECTION-PROJECTION (~170, no Δ) stays on SG-5/SG-6 amendment plan.
- SG-2 / SG-8 / SG-3-CASCADE: existing worksheet routings.

§6 includes a spot-correction of #4086's SG-3-CASCADE arithmetic (was
1191; actual sum is 761).

§7 explicit reads: P5 bridge replacement (#4115) did NOT regress v2 emit;
this catalog's 0-diagnostic line is the implicit non-regression receipt.

§8 NOT-list: not a worker dispatch (proud-pike's routing surface); not a
SG-1/SG-7 reopening; not a P5 bridge receipt (#4097 owns that); not a P1/
MW-D8 amendment.

Two files: catalog + raw probe summary verbatim.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(close/receipt): #4122 — fix §6 arithmetic per openai-pro (long-tail 58 → 115; SG-3-CASCADE includes E0308 mop-up)

openai-pro found that §6 published a contradictory long-tail count:
§2 already lists E0391=29, E0599=28, other=58 separately, but §6's
'Long tail (E0391 / E0599 / + 12 other codes)' said 58 — should be
29+28+58 = 115. Separately, SG-3-CASCADE row totaled only
E0277+E0573+E0560+E0369+E0121 (765), omitting the E0308 mop-up that
the cascade definition is supposed to soak up by construction.

Fixes:
- Long tail row: 58 → 115 (E0391 + E0599 + other 12 codes, sum verified).
- SG-3-CASCADE row: 765 → ~1,390 (adds unclassified-E0308 mop-up
  ~625 = 2905 total E0308 minus SG-1-FOLLOWON 1330 minus SG-RC-LAYERING
  ~780 minus SG-COLLECTION-PROJECTION ~170).
- Added an explicit arithmetic-reconciliation sub-table showing each
  bucket × code coverage × count, summing to ~7,175 ± 1 rounding band.
- Footnote on the probe-summary top-25 histogram summing to 7,174 vs §1's
  7,175 — single error in a code beyond top-25 (probe script truncates
  display at top-25; rustc log carries full population).

Catalog now publishes a single self-consistent residual count usable as
the live ratchet meter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: Close/Receipt Manager — authority over close predicates, two-axis dispos

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 31, 2026
Add §5–§7 to the SG-2 worksheet, expand v4_std_target_realization_dag_smoke_test
with three parse/tokenize smokes for TargetTypeExpressionProjection, and pair
INVARIANTS_OPS / sg0 census / sg0-pr-body-append.4124.txt (+0 SG-0 paths).

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 31, 2026
…ksheet (per #4086) (#4126)

* docs(receipt): SG-3-CASCADE cascade-only determination — no §10.0 worksheet (per #4086)

SG-3-CASCADE (trait/field/binary mop-up: E0277/E0573/E0560/E0369/E0121 +
residual-E0308) carries no independent missing modeled fact. Each band is the
rustc-visible consequence of a fact already owned by a primary class
(SG-1-FOLLOWON #4099, SG-2 #3962, SG-RC-LAYERING #4100, SG-8, SG-COLLECTION-
PROJECTION). A §10.0 worksheet's DFS-path / canonical-home fields would be empty
or duplicate a primary's — so no worksheet is warranted; authoring one would
invent substrate work that does not exist.

- New: docs/audit/v4-sg3-cascade-only-receipt-2026-05-31.md
  §0 determination, §2 per-band traceability (each → owning primary/worksheet),
  §4 falsifiable monotonic-dissolution criterion for the next post-primary probe.
- Resolves predicate-dependency-graph §3.3 ambiguity: SG-3-CASCADE row was
  "extend existing worksheet" (unnamed); now "retired (no worksheet)" — bands
  fan across five primaries, no single host to extend.

Docs-only; no code/substrate/.dag touched. Grounded in the committed #4122 live
ratchet meter (SG-3 bands pinned, zero-Δ vs #4086); no re-probe (would regenerate
identical numbers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: SG-3-CASCADE §10.0 worksheet or cascade-only receipt — trait/field/binar

* docs(receipt): fix §1 measurement-basis wording — E0560 +4 is primary-driven, not "zero Δ" (openai-pro #4126)

§1 claimed the SG-3 named bands are "pinned (zero Δ)" and "the only motion is
residual-E0308," contradicting the adjacent table's E0560 +4 / named-subtotal +4.
Corrected: 4 of 5 named bands are zero-Δ; E0560 ticked +4, and that tick is
itself primary-driven (new SG-2 field-projection sites from #4105/#4107
substrate, per §2) — not independent SG-3 growth, which strengthens the
cascade-only thesis rather than weakening it. The −46 total is net of the +4
E0560 tick. No count changed; wording made internally faithful.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 31, 2026
…4126 (#4130)

* docs(receipt): SG-3-CASCADE cascade-only determination — no §10.0 worksheet (per #4086)

SG-3-CASCADE (trait/field/binary mop-up: E0277/E0573/E0560/E0369/E0121 +
residual-E0308) carries no independent missing modeled fact. Each band is the
rustc-visible consequence of a fact already owned by a primary class
(SG-1-FOLLOWON #4099, SG-2 #3962, SG-RC-LAYERING #4100, SG-8, SG-COLLECTION-
PROJECTION). A §10.0 worksheet's DFS-path / canonical-home fields would be empty
or duplicate a primary's — so no worksheet is warranted; authoring one would
invent substrate work that does not exist.

- New: docs/audit/v4-sg3-cascade-only-receipt-2026-05-31.md
  §0 determination, §2 per-band traceability (each → owning primary/worksheet),
  §4 falsifiable monotonic-dissolution criterion for the next post-primary probe.
- Resolves predicate-dependency-graph §3.3 ambiguity: SG-3-CASCADE row was
  "extend existing worksheet" (unnamed); now "retired (no worksheet)" — bands
  fan across five primaries, no single host to extend.

Docs-only; no code/substrate/.dag touched. Grounded in the committed #4122 live
ratchet meter (SG-3 bands pinned, zero-Δ vs #4086); no re-probe (would regenerate
identical numbers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: SG-3-CASCADE §10.0 worksheet or cascade-only receipt — trait/field/binar

* docs(receipt): fix §1 measurement-basis wording — E0560 +4 is primary-driven, not "zero Δ" (openai-pro #4126)

§1 claimed the SG-3 named bands are "pinned (zero Δ)" and "the only motion is
residual-E0308," contradicting the adjacent table's E0560 +4 / named-subtotal +4.
Corrected: 4 of 5 named bands are zero-Δ; E0560 ticked +4, and that tick is
itself primary-driven (new SG-2 field-projection sites from #4105/#4107
substrate, per §2) — not independent SG-3 growth, which strengthens the
cascade-only thesis rather than weakening it. The −46 total is net of the +4
E0560 tick. No count changed; wording made internally faithful.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(planning): purge SG-3 single-authority conflict — retire it across all dispatch/count surfaces (codex + inline RC on #4126)

#4126 retired SG-3-CASCADE as cascade-only but only updated the §3.3 row +
state legend, leaving SG-3 still represented as dispatchable elsewhere in the
same planning artifact — two authorities for "is SG-3 dispatchable" (INVARIANTS
P2 single-authority). Resolved across all surfaces:

- §Path C (line 98): dropped SG-3 from "Workers extend ..." dispatch list;
  added explicit "SG-3 is NOT a dispatch target — retired cascade-only" note.
- Count surfaces (§P3 row line 11, §2 #4086 entry line 21, §3.3 header line 44,
  §3.3 footnote line 60): "8 active receipt-producing classes routed" →
  "8 receipt-producing classes — 7 dispatchable + SG-3-CASCADE cascade-residual."
  Keeps the #4086-catalog reconciliation (still 8 receipt-producing) while
  removing the dispatchability contradiction.

Follow-up to merged #4126; receipt unchanged. Docs-only — no code/substrate/.dag.

Closes #4086
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(planning): "7 dispatchable" → "7 active across routing states" — precise count (openai-pro RC on #4130)

openai-pro flagged that "7 dispatchable" introduced a new dispatch-count
contradiction: of the 7 non-SG-3 classes, several are not worker-dispatchable
under the table's own legend (SG-1b=worksheet-needed, SG-RC-LAYERING=authoring,
SG-COLLECTION-PROJECTION=route-pending). Reworded all four count surfaces
(§P3 row, §2 #4086 entry, §3.3 header, §3.3 footnote) to "7 active across
routing states + SG-3-CASCADE retired cascade-residual" — the only binary
fact the count asserts is retired-vs-active, which matches the per-row state
column exactly. No claim that all 7 are dispatchable.

Docs-only — no code/substrate/.dag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 31, 2026
…) (#4124)

* WIP: SG-2 implementation per sg2-type-expression worksheet on main — TargetTy

* SG-2: worksheet §6 closure + P5 smoke receipts (substrate on main #3962)

Add §5–§7 to the SG-2 worksheet, expand v4_std_target_realization_dag_smoke_test
with three parse/tokenize smokes for TargetTypeExpressionProjection, and pair
INVARIANTS_OPS / sg0 census / sg0-pr-body-append.4124.txt (+0 SG-0 paths).

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

* fix(SG-2): restore v4_leaf_model_python_r2_r3_external census entry

Merge tip accidentally dropped EXPECTED_HAND_AUTHORED_TEST line for the
#4117 boundary test while the file, integration.rs wiring, and INVARIANTS_OPS
row remained live. Restores Net +0 for PR #4124.

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls deleted the session/fierce-deer-774 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