Repository navigation
Wave-4-D T-4 rust.dag — LanguageModel inhabitants (i32/i64/i128 + others) + grammar productions; unblocks T-10 MVP-1 actual translation (drops the 🟡 mvp1-source-registry scaffold neat-ferret-610 placed) - #3476
Conversation
- Drop unused parse/tokenize imports; align header Consumes with actual imports. - Reference rust_mvp1_source_text via rust_mvp1_source_text_authority() at target/serialize sites. - Fold i32/+ tokens into fn_item grammar root (remove orphan productions). - Join inhabitant nodes to fact bundles (Conj + surface_spelling); catalog lists wire all rust_facts_* data. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed the APPROVE_WITH_COMMENTS exploratory items in
Re-verified: — sent from wise-deer-728 |
|
Review metadata
1. Story of the diffThis PR turns The load-bearing risk is that this new Rust target authority is not just reference data; it is substrate-facing language-model data intended to unblock actual translation. That means the inhabitants, grammar, and source/emitted edges need to be structurally faithful enough for downstream coercion/translation consumers, not placeholder-shaped. 2. Invariant categories1. LAYER MODEL — Finding
This is substrate/target-model data, not implementation-only code. The PR’s own fixture consumes 2. INVARIANTS.md + modeling-discipline.md — Finding
That breaks the grammar-as-bidirectional-data contract: the production data is supposed to be the concrete-syntax ↔ 3. CODING.md — CompliantThe changed 4. TESTING.md — Finding
For a substrate-facing language spec that downstream translation depends on, TESTING.md’s hermetic/behavior-driven discipline calls for a focused check that the Rust model resolves and that the MVP source is accepted by the modeled lex/grammar surface. The missing import is the mechanical symptom; the grammar/source mismatch above is the semantic symptom. 5. LOCKED DESIGN DECISIONS — N/ANo locked design document is directly edited. The relevant locked/high-level direction is the target-modeling / derived-homomorphism intent, which is covered in the PM intent review below. 6. TRACKED vs UNTRACKED DEBT — Finding
The existing bool grounding scaffold is properly tagged at 2.5. Top-down PM intent review — FindingThe highest-level intent here is to make the Rust target model a real input to derived translation: THESIS says target-side primitive types must be structurally modeled from the language reference, with algebra inhabitance declared structurally, and Shape A language emission should come from the language spec rather than a compiler-side adapter ( The diff dilutes that intent in two places. First, the new Rust inhabitants route their facts edge to 3. VerdictREQUEST_CHANGES The PR is directionally right by moving the fixture to the Rust language authority, but the new authority drops primitive facts at the inhabitant boundary, installs grammar data that cannot describe its own MVP source, and lacks a basic resolve/behavior receipt. Those are substrate-facing issues, so they should be fixed before merge rather than carried as implicit scaffolding. |
- Drop unused parse/tokenize imports; align header Consumes with actual imports. - Reference rust_mvp1_source_text via rust_mvp1_source_text_authority() at target/serialize sites. - Fold i32/+ tokens into fn_item grammar root (remove orphan productions). - Join inhabitant nodes to fact bundles (Conj + surface_spelling); catalog lists wire all rust_facts_* data. Co-authored-by: Cursor <cursoragent@cursor.com>
b96004d to
e8a3581
Compare
|
Addressed the operator-direct + claude-opus review findings on HEAD Finding 1 (facts collapse to Finding 2 (inert Finding 3 (grammar stub vs MVP source) — acknowledged + renamed. Production is Also: — sent from wise-deer-728 |
|
claude-opus APPROVE (review 15678) — acknowledged; no blocking findings. Addressed the exploratory observations in
— sent from wise-deer-728 |
|
Review 15690 (non-blocking) — addressed on
— sent from wise-deer-728 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
0a48c5c2· Trigger:schedule - Thinking:
336s wall
BLOCKING (1)
Root Cause
src/v4/extdeps/languages/rust.dagThe Rust primitive catalog crosses the spec/library boundary → keep the T-4 fact catalogs limited to Rust Reference primitives and model std::string::String later as a library/program Node.
| data rust_facts_unit: RustNonIntegerPrimitiveFacts = RustNonIntegerPrimitiveFacts { | ||
| surface_spelling: rust_surface_spelling_unit, | ||
| scalar_classifier: UnitScalar, | ||
| std_projection: rust_std_projection_unit, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Verified — valid. Rust Reference primitive types are bool, char, str (unsized), integer/float widths, (), and ! — not std::string::String (library type per TASKS.md L-2 / T-4 spec fidelity).
Fixed in e86f1bd: removed StringScalar, rust_facts_string, inhabitant/field symbols, and catalog entry. Kept str (StrScalar + rust_str_unsized). rust_mvp1_source_text: String remains as v4.std.text literal authority for MVP scaffold only — not a modeled std::string::String primitive.
— sent from wise-deer-728
|
codex REQUEST_CHANGES (review 15702) — addressed on P2 / Practice 5 (parallel symbol authority): Removed hand-curated P2 / Practice 3 (serialize_source / grammar vs MVP text):
Literal
— sent from wise-deer-728 |
|
claude-opus APPROVE_WITH_COMMENTS (review 15716) — addressed on Parallel token sequences: Valid — the "sole authority" claim was aspirational. CODING ordering: Moved
— sent from wise-deer-728 |
|
Operator 3-blocker review — addressed on
— sent from wise-deer-728 |
|
claude-opus APPROVE (review 15729) — non-blocking
Discipline check items in review: already addressed on prior commits (target_model single authority, ModelCore, fixture migration, no String primitive). — sent from wise-deer-728 |
|
codex review 15740 (grammar fold / extra Finding was valid: Fix: seed the fold with the list’s first token (
|
|
composer review 15749 (APPROVE_WITH_COMMENTS) — addressed Verdict: No blocking findings; exploratory item 1 was valid and fixed in the latest push.
|
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
2a9cc078· Trigger:schedule - Thinking:
402s wall
BLOCKING (3)
Root Cause
src/v4/extdeps/languages/rust.dagRust primitive identity is modeled as an unconstrained product with duplicated classifier facts → make each primitive a closed entry or derive classifier/projection facts from one authoritative primitive row.src/v4/std/model_core.dagModelCore was shared without hoisting the lex/grammar/language_identity/canonical_symbols carrier → add one shared LanguageModel type or make the model-is-Node decision explicit before Rust owns a private schema.src/v4/extdeps/languages/rust.dagMVP list derivation hand-rolls FreeMonoid append locally → use a canonical order-preserving append/snoc primitive or derive the target edges directly from the single token-sequence authority.
| | UnitScalar | ||
| | NeverScalar | ||
|
|
||
| type RustIntegerPrimitiveFacts { |
There was a problem hiding this comment.
BLOCKING: RustIntegerPrimitiveFacts makes signedness, width, std_projection, and scalar_classifier independent fields, so P2 illegal-states-unrepresentable is violated because contradictory Rust primitive bundles can be constructed.
| = MustPanicOnOverflow | ||
| | MayPanicOrTwoComplementWrap | ||
|
|
||
| type RustLanguageModel { |
There was a problem hiding this comment.
BLOCKING: RustLanguageModel declares the generic LanguageModel schema inside the Rust extdeps file, creating a second per-language carrier shape instead of the shared T-4/TASKS #9 authority required by INVARIANTS P2.
|
|
||
| fn rust_list_append_edge(edges: List<Edge>, token_class: Symbol) -> List<Edge> { | ||
| free_monoid_fold( | ||
| xs: edges, |
There was a problem hiding this comment.
BLOCKING: rust_list_snoc_item is used to derive MVP token edges and primitive bundle lists, but with free_monoid_fold left-fold semantics it reverses accumulated prefixes for longer lists, breaking the grammar/serialize_source order required by P1 modeling faithfulness.
…§11 subsumption model (operator-direct emit_rust.dag analysis) Operator delivered substantive algebraic analysis of emit_rust.dag's dissolution coverage gaps. This PR lands the three architectural moves they identified: [A] Three new producer stages (§10.1 + §10.2) — the algebraic move 'broader rules prevent repeats': - v4.lens.decision_tree_shape — normalizes closed-vocab branch dispatch REGARDLESS of source spelling (match / if-else chain / string-eq chain). Replaces match-only detection with shape-detection-regardless- of-syntax. Carries KeyVocabulary (resolved ConstructorId set, authoritative not by-spelling), per-branch BodyShape (α-renamed expression tree, same algebra as L1.12.b's body normalization), missing-key behavior, and source-form fact-of-finding. - v4.lens.generated_forest_shape — the META scope of L1.13's skeleton- collapse: catches fns that walk a closed coproduct's variant-set AND emit a per-variant target artifact (text or AST). Reuses SkeletonGroup + NormalizedArmBody from match_arm_skeleton at the emission scope (Practice 11 — same mechanism, two scopes). - v4.lens.target_syntax_string_shape — classifies string-construction graphs as DataString vs TargetGrammarTokenSequence vs Unknown. Gated on a per-target TargetGrammarTokenSet substrate carrier; rust.dag's LanguageModel (PR #3476) is the canonical first instance. Targets without a TargetGrammarTokenSet → Unknown → lens fails closed (no false positives). §10.3 dissolution stage's consumes: list updated for all three. [B] Six sub-signature lens bindings — all bound under existing L1.x parents (no new top-level IDs per the standing 2026-05-19 directive); each shares the parent's coverage_defect_* acceptance key with a new diagnostic-payload Trigger discriminator (same pattern as L1.12.b under L1.12): - L1.4.c PolicyTableAsFunctions — function whose body IS a typed table over closed vocabulary. Consumes decision_tree_shape. Seed kill: rust_string_policy_for_naming vs rust_internal_policy_for_naming. Subsumes the prior 'L1.13.b match-as-typed-table' reservation (L1.13's TotalMap dependency text retired to L1.4.c). - L1.5.b GeneratedForestCollapse — meta-walk emitting per-variant target artifacts that collapse to K skeletons. Consumes generated_forest_shape. Seed kill: emit_enum_shared_accessors. - L1.10.c NameDiscriminantBypass — spelled-name dispatch where resolved identity is available. Consumes decision_tree_shape with source_form = StringEqChain. Seed kill: variant_encoding_is_string_variant shape predicates. - L1.10.d TargetSyntaxByConcat — grammar-token concat that should be a TargetSurfaceNode. Consumes target_syntax_string_shape. Seed kills: emit_rust_block_stmts / emit_typed_record_lit / emit_rest_url_line / emit_rest_body_line; whole emit_rust.dag is a pile-up of L1.10.d findings. - L1.11.b PlausibleScalarFallback — missing-arm fabricates scalar literal used as target authority. Consumes decision_tree_shape + target_syntax_string_shape. Seed kills: emit_rest_auth_line's None=>'Authorization' / None=>'x-api-key' defaults; service base URL 'http://localhost' fallback. - L1.13.b DecisionTreeCollapse — generalizes parent L1.13's skeleton-collapse beyond match expressions to any closed-vocab decision tree. Same classification (PureTemplate / Outlier / etc.) regardless of source-form. Consumes decision_tree_shape. §5.0 / §5.1 cross-reference rows added/extended for all six. [C] §11 Subsumption model — new section addressing the operator's side-thought: 'what if the dag has multiple lens violations simultaneously — diagnosis should find the minimal pattern immediately, not surface one-at-a-time creating a fix → reveal → fix → reveal cycle.' Introduces DissolutionSubsumption substrate carrier with two verification kinds (MechanicalReverification via TestClaim re-run / ProducerStageDerivation via consumes: graph). Diagnostic surface ordering: roots first (Apply X — closes 47 other findings), leaves on root-rejection, subsumed-leaf preview. Worked example: the rust.dag LanguageModel subsumption-root for emit_rust.dag's 100+ findings under L1.5.b / L1.10.c / L1.10.d / L1.13.b / L1.4.c / L1.11.b. Renumbered prior §11 'Open — audit of current coverage' to §12. All sub-signatures share the producer-stage architecture under Facts Flow Forward / P2: one shared producer (decision_tree_shape / generated_forest_shape / target_syntax_string_shape) consumed by multiple downstream lenses. No new producer stages are minted per lens — same discipline that made L1.12.b + L1.4.b co-define cleanly. Enforcement gates uniformly require: (i) producer stage lands with the documented schema, (ii) parent diagnostic payload extends with the appropriate Trigger discriminator, (iii) for sub-signatures needing substrate carriers (TargetGrammarTokenSet, TotalMap), at least one canonical first instance lands as migration target. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
codex review 15758 (APPROVE_WITH_COMMENTS) — addressed in latest push Finding valid: Fix: Both markers now carry No modeling change to carriers; compile still 0 diagnostics. |
|
Blocking review batch (codex @ 2a9cc07) + inline threads — verified on latest push 1. Primitive fact product / duplicate classifier (line 91) — fixed
2.
|
|
composer review 15769 (APPROVE) — verified on No blocking findings; rubric alignment matches the diff (fact catalogs → Exploratory observations — accepted as forward work, no change in this PR:
— sent from wise-deer-728 |
- Drop unused parse/tokenize imports; align header Consumes with actual imports. - Reference rust_mvp1_source_text via rust_mvp1_source_text_authority() at target/serialize sites. - Fold i32/+ tokens into fn_item grammar root (remove orphan productions). - Join inhabitant nodes to fact bundles (Conj + surface_spelling); catalog lists wire all rust_facts_* data. Co-authored-by: Cursor <cursoragent@cursor.com>
80a34c5 to
8f8c003
Compare
- Drop unused parse/tokenize imports; align header Consumes with actual imports. - Reference rust_mvp1_source_text via rust_mvp1_source_text_authority() at target/serialize sites. - Fold i32/+ tokens into fn_item grammar root (remove orphan productions). - Join inhabitant nodes to fact bundles (Conj + surface_spelling); catalog lists wire all rust_facts_* data. Co-authored-by: Cursor <cursoragent@cursor.com>
Per APPROVE review observations: per-field 🟡 on pre-ModelCore catalogs, `rust_mvp1_source_token_classes` as 1:1 authority for positional tok edges, and canonical_symbols documented as wave-1 smoke set not catalog-derived. Co-authored-by: Cursor <cursoragent@cursor.com>
T-4 extdeps models Rust Reference primitives only. Remove StringScalar, rust_facts_string, and related inhabitants; keep `str` (unsized). MVP source uses v4.std.text String for literal authority, not std::string::String. Co-authored-by: Cursor <cursoragent@cursor.com>
Derive canonical_symbols from catalog surface spellings and wave-1 lex/grammar/MVP symbols (P2/Practice 5). Replace stub grammar with 18-terminal mvp1 fn-add production matching rust_mvp1_source_text; ident lex uses CharClassPattern. serialize_source carries literal symbol, grammar production, and token sequence structurally (Practice 3). Co-authored-by: Cursor <cursoragent@cursor.com>
fold serialize_source edges and grammar Sequence from rust_mvp1_source_token_classes via free_monoid_fold; reorder inhabitant helpers before i8/i16 nodes. rust_mvp1_source_text remains literal anchor. Co-authored-by: Cursor <cursoragent@cursor.com>
Add std/target_model.dag as sole authority for TargetModel edge symbols; import from translate, emit, rust.dag (drop parallel declarations). Wire RustLanguageModel.core from T-33 model_core PrimitiveFactBundle list. Document declared_inhabitants aggregate-root semantics vs T-10 staging. Co-authored-by: Cursor <cursoragent@cursor.com>
Extract rust_mvp1_positional_edges_from_token_classes() as the sole Edge-list derivation from rust_mvp1_source_token_classes; serialize children append prefix via rust_list_append. Drop redundant catalog anchor lets now that core carries primitives. Co-authored-by: Cursor <cursoragent@cursor.com>
Derive ModelCore.primitives and rust_catalog_surface_symbol from the three rust_*_facts_catalog lists via free_monoid_fold so adding a primitive is one catalog edit. Align Status line with catalog + wave-1 symbol authority. Co-authored-by: Cursor <cursoragent@cursor.com>
Practice 4 requires named scaffold lane and checkable exit; tie both 🟡 markers to T-33 (#3474) per TASKS.md § T-33. Co-authored-by: Cursor <cursoragent@cursor.com>
Integer/float facts drop redundant scalar_classifier; facts_node projects IntScalar/FloatScalar from signedness+width. Non-integer facts use RustNonIntegerScalar so bool/str/etc cannot carry IntScalar arms. Co-authored-by: Cursor <cursoragent@cursor.com>
8f8c003 to
9dd5002
Compare
|
claude-opus review 15787 (APPROVE) — verified on No blocking findings; rubric items match current tree (post-T-33 rebase: Exploratory observations:
— sent from wise-deer-728 |
…§11 subsumption model (operator-direct emit_rust.dag analysis) (#3489) * WIP: PM * design: producer-shape factoring + six sub-signature lens bindings + §11 subsumption model (operator-direct emit_rust.dag analysis) Operator delivered substantive algebraic analysis of emit_rust.dag's dissolution coverage gaps. This PR lands the three architectural moves they identified: [A] Three new producer stages (§10.1 + §10.2) — the algebraic move 'broader rules prevent repeats': - v4.lens.decision_tree_shape — normalizes closed-vocab branch dispatch REGARDLESS of source spelling (match / if-else chain / string-eq chain). Replaces match-only detection with shape-detection-regardless- of-syntax. Carries KeyVocabulary (resolved ConstructorId set, authoritative not by-spelling), per-branch BodyShape (α-renamed expression tree, same algebra as L1.12.b's body normalization), missing-key behavior, and source-form fact-of-finding. - v4.lens.generated_forest_shape — the META scope of L1.13's skeleton- collapse: catches fns that walk a closed coproduct's variant-set AND emit a per-variant target artifact (text or AST). Reuses SkeletonGroup + NormalizedArmBody from match_arm_skeleton at the emission scope (Practice 11 — same mechanism, two scopes). - v4.lens.target_syntax_string_shape — classifies string-construction graphs as DataString vs TargetGrammarTokenSequence vs Unknown. Gated on a per-target TargetGrammarTokenSet substrate carrier; rust.dag's LanguageModel (PR #3476) is the canonical first instance. Targets without a TargetGrammarTokenSet → Unknown → lens fails closed (no false positives). §10.3 dissolution stage's consumes: list updated for all three. [B] Six sub-signature lens bindings — all bound under existing L1.x parents (no new top-level IDs per the standing 2026-05-19 directive); each shares the parent's coverage_defect_* acceptance key with a new diagnostic-payload Trigger discriminator (same pattern as L1.12.b under L1.12): - L1.4.c PolicyTableAsFunctions — function whose body IS a typed table over closed vocabulary. Consumes decision_tree_shape. Seed kill: rust_string_policy_for_naming vs rust_internal_policy_for_naming. Subsumes the prior 'L1.13.b match-as-typed-table' reservation (L1.13's TotalMap dependency text retired to L1.4.c). - L1.5.b GeneratedForestCollapse — meta-walk emitting per-variant target artifacts that collapse to K skeletons. Consumes generated_forest_shape. Seed kill: emit_enum_shared_accessors. - L1.10.c NameDiscriminantBypass — spelled-name dispatch where resolved identity is available. Consumes decision_tree_shape with source_form = StringEqChain. Seed kill: variant_encoding_is_string_variant shape predicates. - L1.10.d TargetSyntaxByConcat — grammar-token concat that should be a TargetSurfaceNode. Consumes target_syntax_string_shape. Seed kills: emit_rust_block_stmts / emit_typed_record_lit / emit_rest_url_line / emit_rest_body_line; whole emit_rust.dag is a pile-up of L1.10.d findings. - L1.11.b PlausibleScalarFallback — missing-arm fabricates scalar literal used as target authority. Consumes decision_tree_shape + target_syntax_string_shape. Seed kills: emit_rest_auth_line's None=>'Authorization' / None=>'x-api-key' defaults; service base URL 'http://localhost' fallback. - L1.13.b DecisionTreeCollapse — generalizes parent L1.13's skeleton-collapse beyond match expressions to any closed-vocab decision tree. Same classification (PureTemplate / Outlier / etc.) regardless of source-form. Consumes decision_tree_shape. §5.0 / §5.1 cross-reference rows added/extended for all six. [C] §11 Subsumption model — new section addressing the operator's side-thought: 'what if the dag has multiple lens violations simultaneously — diagnosis should find the minimal pattern immediately, not surface one-at-a-time creating a fix → reveal → fix → reveal cycle.' Introduces DissolutionSubsumption substrate carrier with two verification kinds (MechanicalReverification via TestClaim re-run / ProducerStageDerivation via consumes: graph). Diagnostic surface ordering: roots first (Apply X — closes 47 other findings), leaves on root-rejection, subsumed-leaf preview. Worked example: the rust.dag LanguageModel subsumption-root for emit_rust.dag's 100+ findings under L1.5.b / L1.10.c / L1.10.d / L1.13.b / L1.4.c / L1.11.b. Renumbered prior §11 'Open — audit of current coverage' to §12. All sub-signatures share the producer-stage architecture under Facts Flow Forward / P2: one shared producer (decision_tree_shape / generated_forest_shape / target_syntax_string_shape) consumed by multiple downstream lenses. No new producer stages are minted per lens — same discipline that made L1.12.b + L1.4.b co-define cleanly. Enforcement gates uniformly require: (i) producer stage lands with the documented schema, (ii) parent diagnostic payload extends with the appropriate Trigger discriminator, (iii) for sub-signatures needing substrate carriers (TargetGrammarTokenSet, TotalMap), at least one canonical first instance lands as migration target. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * design: PR #3489 operator-review tightening pass (7 items + L1.4.c→L1.13.c relocation) Operator delivered substantive review with 7 specific tightenings. All addressed in this commit: [1] L1.13.c TotalMap too concrete for payload-bearing variants (rust_serde policy's StripPrefixAndSnakeCase { prefix } etc. would imply infinite table). Two clean shapes now distinguished: - Pattern A: TotalMap<K, V> — for finite payload-free keys + fully materialized values - Pattern B: TotalPolicy<K, Context, RowTemplate> — for payload- bearing key vocabularies; row templates reference payload fields by name and materialize per-call by substituting runtime payload into the template's holes Auto-fix infers the pattern from KeyVocabulary's payload-bearing-ness. [2] decision_tree_shape needs 04_infer + typed-subject rule. StringEqChain now produces KeyVocabulary ONLY when the compared subject has a UNIQUE resolved closed carrier per 04_infer. Ambiguous or open cases get a new OpenOrAmbiguousNameDispatch source_form variant; lens consumers (L1.10.c) do NOT auto-fire on it (open- vocabulary escape preserved). Producer consumes: list extended. [3] target_syntax_string_shape classification inconsistency fixed. 'Absence of TargetGrammarTokenSet → DataString' was wrong (absence of substrate is not evidence of data). Now: no TargetGrammarTokenSet for any target the string might reach → Unknown. Spelled out the four- case closed predicate (1-no-substrate / 2-no-grammar-token-evidence- in-data-sink / 3-grammar-token-evidence-in-target-sink / 4-other). NO numeric token-density threshold — entirely closed structural test (addresses tightening #6). [4] L1.11.b needs broader use-site producer than target_syntax_string_shape. New producer added: v4.lens.scalar_authority_use_shape produces Map<ScalarRhsId, ScalarAuthorityUseShape> with closed ScalarUseRole coproduct: TargetSyntaxUse / IdentifierUse / UrlUse / HeaderNameUse / FilePathUse / ResourceCoordinateUse / DataStringUse / UnknownUse. Gated on scalar_authority_use_registry substrate carrier (per- consumer ScalarUseRole declarations). L1.11.b consumes this producer NOT target_syntax_string_shape (different classification axes: production-site vs use-site role). [5] Generated-forest asymmetric coverage Escape now requires substrate- derived subset witness (VariantCoverage row citing structural predicate). Local unregistered filters like 'children |> filter(child => child.children |> count > 0)' do NOT pass — those are L1.5.b / L1.10.c / L1.13.b territory depending on the filter's shape. The escape requires structural authority. [6] TargetSyntaxByConcat threshold language replaced with closed structural predicate (addressed in #3 via the four-case predicate in producer-stage spec; L1.10.d's Signature text also updated to reference the closed predicate explicitly, not 'classification threshold'). [7] L1.4.c taxonomy move: L1.4.c (Policy-table-as-functions) relocated to L1.13.c (Table decision-tree) under the Skeleton-collapse family. Operator: 'function body is a typed table is not really a carrier clone; closer to decision-table dissolution.' Mechanism is decision_tree_shape (same as L1.13.b), not type-declaration-shape (L1.4/L1.4.b's). L1.4.c original site replaced with a 'Moved' notice; L1.13.c added under L1.13.b with the payload-aware TotalPolicy refinement from item #1 baked in. Tables + cross-refs updated in lockstep: - §5.0 L1.4 row (L1.4.c removed); L1.13 row (L1.13.c added) - §5.1 L1.4.c row removed; L1.13.c row added; L1.13.b discriminator extended to include TableDecisionTree variant - §10.1: L1.4.c→L1.13.c across producer-row consumers - §10.2: producer-shape spec edits per items 2/3/6; new scalar_authority_use_shape producer added; stage count 'Eight'→'Nine' - §10.3: dissolution consumes list extended with scalar_authority_use_shape - §10.2 closing paragraph: cross-stage routing updated to reflect the relocations + new producer - §11 subsumption worked example: L1.4.c→L1.13.c references updated All seven tightenings preserve the producer-stage architecture under Facts Flow Forward / P2 — no producer-stage duplication; consumers cleanly partitioned per classification axis. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * design: PR #3489 — reconcile residual 'future L1.13.b match-as-typed-table' prose (cursor APPROVE_WITH_COMMENTS doc-hygiene) cursor APPROVE_WITH_COMMENTS flagged INVARIANTS P2 (single authority) issue: I rebound L1.13.b to DecisionTreeCollapse and moved the F16 match-as-typed-table case to L1.13.c, but several pre-existing prose passages from origin/main still described L1.13.b as the 'future per-arm-name / match-as-typed-table sub-signature.' Two incompatible authorities for the same sub-signature ID in one design doc. Reconciled four residual references: 1. L1.13's borderline-case discussion (:2227-2233 originally) — the prose listed 'L1.13.b (future)' OR 'separate match-as-typed-table lens' as the two possible bindings for the manual_test_claim_for_manual_anchor pattern. Both pointers now unified under L1.13.c. Added a historical-traceability note explaining the original two-option phrasing for readers who hit the prior text. 2. L1.13's Kills section (:2103) — 'proposed L1.13.b that detects arm-name-parameterizes-reference pattern' → 'L1.13.c Table decision-tree' with the same historical note inline. 3. v4.lens.match_arm_skeleton producer comment (:2789-2794) — 'L1.13 auto-fix and any future L1.13.b sub-signature' + 'reusable by: L1.13, future L1.13.b (per-arm-name-parameterized-reference sub-signature), future match-as-typed-table lens' → 'L1.13 auto- fix needs (and the L1.13.c table-decision-tree sub-signature reuses it for per-arm-RHS-referencing-typed-data cases)' + 'reusable by: L1.13 (base, MatchExpr-scoped), L1.13.c (table decision-tree)'. 4. v4.lens.decision_tree_shape producer comment (:2881-2882) — 'reusable by: L1.13, L1.13.b, L1.13.c, L1.10.c, future match-as-typed-table sub-signature' → cleanly enumerated by binding without the residual 'future match-as-typed-table' pointer (which is now L1.13.c). After reconcile, the only remaining 'future L1.13.b' mentions in the doc are inside the explicit historical-traceability notes (intentional — they explain the binding history for readers who encounter the prior text). Net effect: L1.13.b now consistently binds to DecisionTreeCollapse throughout; L1.13.c consistently binds to TableDecisionTree throughout; the match-as-typed-table case has one single authoritative pointer (L1.13.c) across the whole doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * design: §5.1 — reframe acceptance-key table as substrate registry pointer, not authority (codex APPROVE_WITH_COMMENTS Practice 9 / P2 reconcile) codex APPROVE_WITH_COMMENTS on PR #3489 flagged §5.1 as a Practice 9 / INVARIANTS P2 violation: the section opened with 'Downstream consumers MUST use the canonical key names enumerated here. The lens suite is the single authority...' That framing makes the design doc authoritative for coverage_defect_* keys when the actual substrate authority is src/v4/lens/coverage.dag's declared rows. Classic parallel-authority / maintained-ledger-doc anti-pattern (operator- direct standing 2026-05-19 retired this class). Fix: - §5.1 header retitled 'L1.x acceptance-key names — substrate registry pointer.' - Opening prose rewritten: explicit 'Authority pointer (not authority itself)' framing — src/v4/lens/coverage.dag is the authoritative registry; this doc describes but does NOT own. If table and substrate disagree, substrate wins. - Added explicit cite of the no-prose-ledger discipline (Practice 9 / INVARIANTS P2 / operator-direct standing 2026-05-19). - Reframed table purpose as 'reading scaffold for readers walking the lens family' — claims about substrate state at this revision, not definitional rules. - 'Downstream-consumer guidance' clarified: code reads keys from src/v4/lens/coverage.dag directly, NOT from this table. Substrate- driven projection, not doc-rebase-driven. - 'Migration notes' closing line rewritten: future taxonomy changes update the substrate first; this table follows. Net effect: doc describes the registry; substrate IS the registry. No change to row content (the keys are the same and they're what src/v4/lens/coverage.dag already declares); just the authority framing reconciled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * WIP: PM * design: PR #3489 — codex BLOCKING #2 + #3 reconcile (L1.11.b gate text + §11.4 TotalPolicy refinement) codex BLOCKING wrap on PR #3489 sha 6c3df18 raised three findings; finding #1 (substrate row landing for coverage_defect_skeleton_collapse) was addressed in auto-snapshot WIP commit b5c6996 (added SkeletonCollapse variant + data row to src/v4/lens/coverage.dag + updated the integration test ratchet's EXPECTED_ACCEPTANCE_ROWS). This commit addresses findings #2 + #3: [#2] L1.11.b enforcement-gate text still referenced target_syntax_string_shape as the prerequisite producer after I'd split the use-site classification out to scalar_authority_use_shape. Fix: Enforcement gate text rewritten to require BOTH - (a) v4.lens.decision_tree_shape lands (for None-arm scalar-RHS detection) - (b) v4.lens.scalar_authority_use_shape lands (for use-site authority- role classification) plus per-ScalarUseRole-variant gating via scalar_authority_use_registry. Explicit statement: target_syntax_string_shape is NOT a prerequisite — it classifies the production-site (L1.10.d's axis); L1.11.b consumes the orthogonal use-site-role axis. Only referenced for the TargetSyntaxUse cross-reference variant. [#3] §11.4 subsumption worked example R-root-B still described the root fix as TotalMap-only after the payload-aware TotalPolicy refinement landed in earlier commit. Fix: R-root-B prose rewritten to distinguish TotalMap (finite payload- free) from TotalPolicy<K, Context, RowTemplate> (payload-bearing policies, per the L1.13.c payload-aware refinement). The serde-policy case specifically called out as TotalPolicy (because VariantNaming has payload-bearing constructors like StripPrefixAndSnakeCase { prefix }); auth-defaults case may be TotalMap or TotalPolicy depending on auth-source vocabulary. All three codex BLOCKING findings now reconciled across substrate + design doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
80a34c59· Trigger:schedule - Thinking:
315s wall
BLOCKING (2)
Root Cause
src/v4/extdeps/languages/rust.dagRust scalar catalog is absorbing MVP-relevant surface forms instead of following the Reference primitive-vs-tuple boundary → remove UnitScalar from the scalar primitive catalog and model () through tuple/sequence structure or a tracked tuple-substrate gate.src/v4/extdeps/languages/rust.dagThe grammar projection hand-rolls ordered list-to-sequence construction without a canonical order-preserving primitive → derive the production left-to-right from the token-list authority or store the production as the ordered list until the bidirectional grammar fold lands.
| representation: rust_str_unsized | ||
| } | ||
|
|
||
| data rust_facts_unit: RustNonIntegerPrimitiveFacts = RustNonIntegerPrimitiveFacts { |
There was a problem hiding this comment.
BLOCKING: P1/extdeps fidelity: rust_facts_unit models () as a Rust scalar primitive, but the Rust Reference classifies unit as the zero-field tuple type rather than a primitive scalar.
| if token_class == rust_token_kw_fn { | ||
| acc | ||
| } else { | ||
| Sequence { |
There was a problem hiding this comment.
BLOCKING: P1 modeling faithfulness: putting each new terminal on the left of Sequence reverses rust_mvp1_source_token_classes under free_monoid_fold, so the grammar no longer describes the claimed source/token order.
Summary
Fills
src/v4/extdeps/languages/rust.dagwith the T-4 LanguageModel slice: Practice-8 primitive fact-bundles (integer, float, and non-integer families), declared inhabitant nodes, bidirectional grammar-as-data (lex rules +GrammarProductionrows), and an MVP-1TargetModelbundle (selection_policy,declared_inhabitants,serialize_emitted,serialize_source). This is the substrate authority T-10 translate/emit should consume instead of a separate mvp1-source-registry scaffold.coercion_fold_int_rust_fixture.dagnow importsrust_inhabitant_i32_nodefromrust.dag.Test plan
cargo run --bin v2-compiler -- compile --source-root src/v4 --output-dir /tmp/v4-out— 103 files, 0 diagnosticspython3 scripts/strict_deprose_dag.py --check— OK