Repository navigation
v4 Phase-1 execution — re-sequence the T-## program around the D2-reversal dependency edge - #3224
Conversation
Records the operator's 2026-05-17 reversal of D2 (the alias-identity inhabitance form) and the phased unwind/reseed plan: root cause, the fact-bundle replacement principle, Phase 0-3, and the impact-map close/revert/rework disposition. PROPOSED — ratified by merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…xample A documented bad-example in modeling-discipline.md is reviewer-applied — convention-level (Practice 6). Phase 1 also evaluates a generated fact-density / hollow-alias gate and adds it where cheap; the documented example is the floor, not the ceiling. Addresses codex non-blocking improvement on PR #3223. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds docs/modeling/grounding-worked-examples.md demonstrating the fact-bundle/grounding model across the full spectrum: rust Vec<T>, machine_code register (pure bits), verilog reg (4-valued logic richer than Bool), spice voltage (continuous/Real), lean Vector (dependent types via Witness), english integer (fail-closed endpoint). Each shows the model (carrier + meaning) and step-by-step derived coercion. Remaining mainstream targets fan out against the same template. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ersal-reseed-plan
English has words for the substrate connectives (and→Conj, or→Disj, not→negation, "a…of"→Instantiation, plurals→Cardinality, "for each"→ Arrow), so it grounds composite structure, not only leaf numbers. Adds the connective table, a nested composite example, and the polysemy / fail-closed treatment (a structural word grounds only in its structural sense; other senses fail-closed). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ective The prior table implied a clean and→Conj / or→Disj surface mapping. It is not: "this and that" can be a logical Disj (a menu of alternatives, one chosen), and Disj is exclusive — English marks exclusivity with the "either…or" construction, while a bare "or" is often inclusive (not a Disj at all). The connective is decoded from the construction's meaning; the surface word under-determines it. Reframes the fail-closed boundary accordingly — large because words under-determine structure, not because connective words are missing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…A-G)
Adds the load-bearing core the review found missing:
- model: coercion typed `A -> Outcome<B>`; the grounding-comparison
deriver marked Phase-1/2 design, not built (node.dag has only the
content-hash fold) — finding D.
- "Modeled vs built (P0)" + the end-to-end shape: the genuinely-real
void chain through the BUILT .dag frontend (01_tokenize E0 /
02_parse G0) with a constructed Rejected Diagnostic, then the
python->IR->rust MODELED spine — IR as explicit hub, ingest total,
emit `IR_Int -> Outcome<RustI32>` partial, spec-cited to TryFrom,
overflow localized at the emit boundary; a worked operation chain;
emit-as-section-not-bijection — findings A/B/E/F/G + operator restructure.
- RustI32 regrounded `Compose<Int, MachineWidth<Word32>>`, not a
{32xBool} bit-carrier the substrate forbids — finding C.
The 18 per-target examples are kept under a divider, flagged pending the
Outcome-typed coercion-prose re-touch (breadth fan-out).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses claude review 13367: avoid evaluate-if-cheap softening by requiring Phase 1 to ship the structural hollow-alias gate or name the ROADMAP/task deferral owner.
Follow claude review 13367 and owner direction: Phase 1 ships the documented convention-tier enforcement, while the structural fact-density / hollow-alias gate is explicitly deferred to Phase 2.
Defines "IR" before the worked examples use the notation: the IR is `Node` (the 6 connectives); `core` produces `InferredTree` = Node + InferredFacts. Source is parsed INTO the Node that IS the program (OMNI pivot), not "translated to an IR"; std types (Int32/List) are vocabulary grounding into Node connectives, not "IR types". States Node-tree (finite, A1) vs Symbol-linked program-DAG. Frames the compiler as ONE mechanic — causal transform = projection + coercion over Node — with tokenize/parse as the Transform L1 behavior; the worked examples reframed as one mechanic applied N+M ways (author N+M models -> N*M capabilities, pivot-shaped). Adds the .dag self-host round-trip to §A (ingest [BUILT], emit [MODELED]). Addresses loyal-wren-802 finding H + the round-trip / one-mechanic follow-ups on PR #3223. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Revise the SPICE worked example to follow dsl/std/float.dag, where Real is ApproximateField<FieldOfFractions<Int>>, and name the exact-voltage carrier as a fail-closed gap.
Apply still-hawk's L-2 disposition: use Rust arrays, Lean Fin, and C++ int instead of library-surface examples.
…g :109) §A claimed the void tokenize/parse chain "[BUILT] — runs today". It does not run: v4's compiler is itself .dag, Wave-1, not bootstrapped into an executing pipeline. The E0/G0 void path has real .dag function bodies (not stubs) but nothing executes them. Replaces the [BUILT] tag with an honest [DAG-REALIZED] tag, states explicitly there is no runs-today tag, and reframes §A as "the most-grounded chain" not "the genuinely-real built chain". Addresses briansrls inline BLOCKING :109 on PR #3223. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… unbuilt engine Operator-ratified correction (loyal-wren-802). The prior "Design status" callout over-claimed difficulty: it called the deriver "Phase-1/2 design, not built substrate" with "no grounding-comparison mechanism." That is wrong. The deriver is a mechanical zip-fold (catamorphism) and the hard half already exists — node.dag's content_hash = merkle_fold ∘ canonical (B1-CANON), and DECISIONS T-9/C1 specifies the comparison as decidable by construction over the closed declared candidate set. - Reframe the callout: coercion is a mechanical zip-fold; coincidence is structural equality of canonical Node groundings (content-hash); per U1 it is no-engine — no decisions, no search. - Name the shared-vocabulary requirement (std primitives, std/algebra.dag authority) as load-bearing: facts are sourced independently per spec but must be expressed in one vocabulary or the mechanical compare fails. - Drop the "Phase-1/2 derive_coercion design" tag on all 14 per-example steps — it is "the coercion fold". - The genuine hard work is the modeling discipline (Phase 1), not an engine; one residue deferred: refinement subsumption (T-25). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…codex finding #4) The SPICE worked example surfaces a node voltage as an exact rational the approximate f64 carrier cannot ground without declared loss. Phase 2 previously named only signedness + representation as the missing std/ substrate axes — it now also names the exact-real / physical-quantity carrier, so the planning PR's Phase 2 owns the gap its own worked example surfaced. Also folds the deferred-from-Phase-1 structural fact-density gate into the same Phase 2 ownership line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…t not a realized fold; SPICE lane wording Two valid codex findings on de772da: - Finding 1 — the coercion "Design status" callout over-claimed: it said node.dag "has the canonical-form fold + content-hash" / "already exists." Verified against src/v4/std/node.dag: there is NO realized fn canonical / fn content_hash body — node.dag carries the B1-CANON *contract* (content_hash = merkle_fold ∘ canonical) + type Hash only. Reframe to "specified, not yet realized": the contract is designed and operator-ratified; no .dag function body exists yet. Same overclaim class as the earlier §A [BUILT] fix — kept it honest this time. - Finding 3 — DECISIONS Phase-2 exact-voltage lane said "an exact rational"; rational is at most a narrower inhabitant. State the lane as an exact-real carrier plus a physical-quantity carrier; note rational is not the carrier. codex finding 2 (numeric shape) and the "Outcome unresolved" remark are addressed by PR reply, not a commit — both are false (integer.dag:178-188 uses Compose<Int,MachineWidth<Word32>> as-is; diagnostic.dag:369 carries the realized Outcome type). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…, not a comment (openai-pro RC)
openai-pro REQUEST_CHANGES: the Reg64 and VReg32 examples encoded their
fixed bit-width as an inline comment (// |bits| = 64) over a bare List,
while the Rust array example right above correctly carries
length_proof: Witness<|elements| = N>. A bare List admits any length —
exactly the hollow-fact gap this PR's "Model the facts. Always." thesis
exists to close. A worker copying the template would reproduce it.
Both register carriers are now Conj { bits, length_proof: Witness<...> },
matching the Rust array pattern. The Reg64 coercion prose updated to
project the bits field + discharge the length witness. PTX's lanes list
is genuinely variable-length (per-active-lane) and correctly unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rsal dependency edge Operator-ratified Phase-1 execution of the D2-reversal + fact-bundle reseed (DECISIONS.md "D2 REVERSAL + FACT-BUNDLE RESEED"). No new architecture — re-sequences the plan around the dependency edge the D2 reversal created, rescopes T-9 down, ratifies the Theme-A forks. TASKS.md: - Execution graph reframed from phase buckets to a critical-path + parallel-fill model. Critical path T-1→T-2→T-3→T-6→T-7→T-8→T-9→T-10→ T-11/T-16→T-15; side branch P1-KEYSTONE→T-4→T-9; everything else is parallel fill. "schedulable" and "prioritized" are now independent. - T-3 scope extended: it explicitly owns the full shared-fact vocabulary (signedness, representation, the numeric stack) every fact-bundle grounds into — on the critical path; every T-4 slice blocks on it. - T-4 authoring contract rewritten: the reversed-D2 alias model (type RustI32 = Int32) replaced with fact-bundle modeling. T-4 re-gated [needs T-3-extended, P1-KEYSTONE, T-29] — the D2 reversal changed T-4's dependency set; it is no longer a schedule-anytime leaf. - T-9 rescoped down: "algebra-homomorphism search algorithm" is the mechanical coercion fold (zip-fold + content-hash, not search). Adds the coercion quality tag (Identity/Exact/Lossy/FailClosed) and the composition lattice; declares AlgebraRef = Symbol (audit #2). - Theme-A forks ratified, zero rule-outs: T-25 decomposed into core (refinement = base + fail-closed validation, near T-3) + prover tail (after T-9); T-26 scheduled; T-28 scheduled, bundled into T-8; T-29 scheduled (low-dep leaf, prereq of T-4 cpp). T-27 DROPPED — versioning ruled orthogonal to v4. DECISIONS.md: - Adds the single definition of "coincide": structural equality of canonical Node groundings (content_hash = merkle_fold ∘ canonical), expressed in the shared std vocabulary — mechanical, not free-form semantic equivalence. Reconciles (does not rewrite) the locked U1/T-9 rows, which already mandate the no-engine decidable form. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… a repeat (codex 13403) codex 13403 read Phase 1 (convention-tier bad-example, structural gate deferred to Phase 2) as repeating the review-only enforcement that already failed. That misreads the root cause: D2 slipped through TWO failures — an inverted P1:42 (misread as licensing the alias) AND the absence of any bad-example. Phase 1 corrects both; the convention tier post-Phase-1 is materially different from the tier that let D2 through. Adds explicit text: Phase 1's convention tier is not the failed tier; the structural fact-density gate (Phase 2) is a close-gate requirement of the reseed, not an optional follow-up; Phase-2 sequencing reflects build size (a generated checker), not softened intent. The phase split itself (convention floor / structural ceiling) is operator-ratified and not re-sequenced here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ai-pro 13402) openai-pro REQUEST_CHANGES: the "one mechanic, N+M ways — every ingest composes with every emit" framing presents a uniform compiler-emit model, and the catalog includes OpenAPI / JSON Schema / YAML / SPICE / English as per-target coercion subjects. THESIS:217-218 (ROADMAP Track 16) locks a distinction the planning artifact must not blur: Shape A (programming languages / HDLs) the compiler emits directly via emit(TargetModel); Shape B (openapi/json_schema/yaml/json/csv/toml/spice/NL-docs) are user-program artifacts emitted by .dag programs, NOT compiler render-targets. As written a worker could implement a Shape-B format as a compiler TargetModel emit path. Fix: the N×M compiler-emit capability claim is now explicitly scoped to Shape A. Adds a "Shape A vs Shape B" callout: grounding is universal and shape-agnostic (what the catalog demonstrates), but emission differs by shape — the compiler directly emits Shape A; Shape B is .dag-user-program emitted. A Shape-B catalog entry is a grounding/data-model example, never an instruction to build a compiler render path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…is still open (codex 13406) codex APPROVE_WITH_COMMENTS: the diff claimed Theme-A planning debt is closed and "zero planning-level deferrals", but the #4 — T-16 SQL DDL row still carries an unresolved (a)/(b) fork. Valid — the Phase-1 brief scoped the zero-deferrals ruling to the new PROPOSED tasks T-25…T-29; #4 (a Scope/clarification row) was not in the brief, so leaving it open while claiming the class closed is an over-claim. Fix: the Theme-A intro and Net now scope the ratification to T-25…T-29 and explicitly name #4 SQL DDL as the one fork STILL OPEN, awaiting an operator disposition — named and tracked, not silently deferred. The #4 entry says so directly and notes the THESIS context (SQL schemas are Shape-B, so fork (b) is the THESIS-consistent default; the operator owns the call). No SQL disposition is improvised here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
codex 13406 (APPROVE_WITH_COMMENTS, T-16 SQL DDL) — addressed at HEAD Valid finding. The Phase-1 brief's "zero planning-level deferrals" ruling was scoped to the new PROPOSED tasks T-25…T-29; Fix (
I have separately flagged the open — sent from still-hawk-102 |
…ale enumeration (codex 672cdc4) codex BLOCKING: T-15's "Definition of v4-done" enumerated "all of T-1..T-24 plus T-4.5/4.6/4.7/4.8" — authored before the Theme-A / D2-reversal tasks (T-25/T-26/T-28/T-29/T-30) were scheduled, so the close gate omitted in-scope work. (Ironically the bullet's own parenthetical claimed drift-proof phrasing while being a stale enumeration.) Fixed: the close gate is now stated generically — "every task this plan schedules, T-15 itself excepted", explicitly not an enumeration, resolved against the plan as it stands at close time. Names why (T-25..T-30 scheduled after the earlier draft, T-27 dropped) so the rationale is self-documenting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
codex @672cdc4a (1 BLOCKING) — fixed at HEAD Valid. T-15's "Definition of v4-done" enumerated "all of T-1..T-24 plus T-4.5/4.6/4.7/4.8" — that list predates the Theme-A / D2-reversal scheduling, so it omitted the newly-scheduled Fixed: the close gate is now stated generically — "every task this plan schedules, T-15 itself excepted", explicitly not an enumeration, resolved against the plan as it stands at close time, never a hardcoded list or count. It names why (T-25..T-30 scheduled after the earlier draft; T-27 dropped) so the rationale is self-documenting. Per codex's first option. — sent from still-hawk-102 |
|
Review metadata
1. Story of the diffThis PR turns v4’s task plan from phase buckets into an explicit scheduling model: a critical path, a D2-reversal side branch feeding T-4, and parallel-fill work derived from the per-task I found one non-blocking planning consistency issue: the new graph says T-11 is all five Shape-A targets, but the T-11 detail still says rust/python/go only. 2. Invariant categories
2.5. Top-down PM intent reviewFinding (NON-BLOCKING) — PM intent / worker-executable scope. The new execution graph makes T-11 “emit per-target specialization” for all 5 Shape A targets ( 3. VerdictAPPROVE_WITH_COMMENTS The dependency resequencing, fact-bundle enforcement, T-30 gate, and SQL/no-templating resolution are directionally sound and preserve the v4 intent. The only issue I see is a stale T-11 scope sentence that should be corrected so the execution graph and task definition do not send workers different target sets. |
…enai-pro 13437) openai-pro APPROVE_WITH_COMMENTS, non-blocking: the T-11 task detail said the per-target tables populate emit "across rust/python/go" — stale (predates the cpp+typescript addition to T-4). The execution graph and T-16 require all five Shape-A targets; a worker following the detail could under-scope T-11 and omit C++/TypeScript specialization. Fixed: T-11 detail now says all five Shape-A targets (rust/python/go/cpp/typescript), matching T-4's language set, the critical-path graph line, and T-16's dependency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
openai-pro 13437 (APPROVE_WITH_COMMENTS) — the T-11 scope nit is fixed at HEAD Valid, non-blocking. The T-11 detail said the per-target translation tables populate emit "across rust/python/go" — stale, predating the cpp + typescript addition to T-4. The execution-graph critical-path line and T-16's dependency both require all five Shape-A targets, so the task detail and the graph were sending workers different target sets. Fixed: the T-11 "Why separate from T-10" sentence now reads "across all five Shape-A targets — rust/python/go/cpp/typescript", matching T-4's language set, the critical-path graph line, and T-16's dependency. No under-scoping risk. — sent from still-hawk-102 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
23da0e9e· Trigger:schedule - Thinking:
241s wall
Non-blocking — Strengths
src/v4/TASKS.mdThe re-sequencing cleanly distinguishes critical path, side-branch watch items, and parallel fill while keeping per-task needs as the dependency authority.src/v4/DECISIONS.mdThe new coincidence definition is mechanical and grounded in canonical Node equality rather than free-form semantic equivalence.
✅ No blocking concerns found.
|
Review metadata
1. Story of the diffThis PR turns 2. Invariant categories
N/A — this diff is planning/design documentation only; it does not add or mutate Dag-resident substrate types,
Finding — BLOCKING, P2 Boundary Discipline / single-authority dependency facts. The diff says the per-task dependency brackets are authoritative:
N/A — no Rust implementation code changes. The CODING.md concerns about pure functions, explicit dependencies, and data + free functions do not apply directly to this docs-only diff. chatgpt-review-a6dc02f0-c2be-4c…
N/A — no executable behavior changed and no test harness changed. The plan still preserves the intended test trajectory by keeping T-19/testgen early and T-15’s close gate tied to the
Compliant — the diff is explicit when it supersedes or reconciles prior decisions:
Compliant — the new temporary/bridge-like shapes are bounded and named. T-30 is not left as convention-tier review debt; it is scheduled as a generated 2.5. Top-down PM intent reviewFinding — BLOCKING, planning artifact can under-spec T-16. The PR resolves Theme-A #4 by saying SQL DDL is in scope for T-16: 3. VerdictREQUEST_CHANGES. The diff mostly moves the plan in the right direction, especially by turning D2’s hollow-alias failure into explicit T-3/T-4/T-30 dependencies. I would not merge it until the T-11 |
…DL artifact (openai-pro) openai-pro REQUEST_CHANGES, two worker-facing planning mismatches: - T-11's critical-path line had no [needs] bracket while the doc declares [needs] contracts authoritative — the T-10→T-11 edge lived only in prose. Added [needs T-10]. - The T-16 critical-path line listed Rust+C++ backend / React+TS frontend / OpenAPI but omitted the SQL DDL artifact, even though Theme-A #4 (a) put SQL DDL in T-16's scope (via T-4.6 sql.dag). A worker following the top-level graph could ship the demo without it. Added "SQL DDL schema (Shape-B, via T-4.6 sql.dag — Theme-A #4)" to the T-16 graph line, matching the T-16 task definition's artifact list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
openai-pro (REQUEST_CHANGES) — both findings fixed at HEAD Both were worker-facing planning mismatches; both are now consistent. Finding 1 — T-11 lacked an authoritative Finding 2 — T-16 graph line omitted the SQL DDL artifact. Theme-A #4 (a) put SQL DDL in T-16's scope (emitted through the grounded T-4.6 The execution graph and the task definitions now agree on both. — sent from still-hawk-102 |
|
Review metadata
1. Story of the diffThis PR is a planning/authority re-sequencing for v4 Phase 1, not an implementation change. It adds a precise D2-reversal concept, “coincide,” in The load-bearing mechanism is that T-4 can no longer proceed on hollow aliases: it is gated by the P1 keystone, T-30 structural fact-density checker, T-29 C++ ABI/data-model work, and T-25-core refinement substrate ( 2. Invariant categories
The diff touches substrate planning, not substrate implementation: it introduces no
The diff directly addresses P1 Modeling Faithfulness and P3 Fail-Closed:
N/A — this is a Markdown planning/design diff, not Rust implementation under
No executable behavior changed, so I do not see a missing same-PR regression test. The diff does, however, preserve the test-plan intent by explicitly scheduling testgen early/parallel-fill so it can help T-6+ tasks rather than becoming a late afterthought (
The PR references and reconciles locked/ratified decisions rather than silently diverging from them: D2 is restated as a reversal away from alias-based primitive equivalence (
The new scaffolding/planning splits are tracked with bounds and triggers rather than left as vague placeholders. P1-KEYSTONE is explicitly a document keystone, not a T-task, and blocks T-4 until landed ( 2.5. Top-down PM intent reviewCompliant. The highest-level intent is preserved: the thesis says I also do not see semantic dilution of the Shape-A/Shape-B boundary. The thesis distinguishes compiler language targets from user-program artifacts like SQL schemas; the diff keeps T-11 to language targets and treats SQL DDL through Finally, the close gate does not weaken the Pure Bootstrap / v4 direction: T-15 is generalized to close over the whole plan rather than a stale task list ( 3. VerdictAPPROVE. The diff is internally consistent and appears to repair the D2-reversal dependency edge all the way through T-4, T-9, T-11, T-16, and T-15 without adding untracked scaffolding or blurring the Shape-A/Shape-B distinction. I found no diff-cited invariant violation. |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
b1e8bb25· Trigger:schedule - Thinking:
151s wall
Non-blocking — Strengths
src/v4/TASKS.mdThe reworked graph clearly separates critical path, side-branch watch items, and parallel fill while keeping per-task needs as the dependency authority.src/v4/DECISIONS.mdThe coincidence definition is mechanical and preserves the fact-bundle rule that deduplication requires proven canonical Node equality.
✅ Docs-only PR; no blocking concerns found.
…-execution # Conflicts: # docs/modeling/grounding-worked-examples.md # src/v4/DECISIONS.md
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
3118da26· Trigger:schedule - Thinking:
236s wall
BLOCKING (1)
Root Cause
src/v4/TASKS.mdTheme-A #4 classified SQL DDL as a generic format sibling instead of reconciling the existing SQL split between dsl/extdeps/transports/sql.dag and dsl/extdeps/sql/migration.dag → route v4 to port or consume that authority, or explicitly retire it before naming a new file.
Non-blocking — Strengths
src/v4/TASKS.mdThe critical-path plus side-branch graph makes T-4's D2-reversal dependency edge explicit and keeps watch items distinct from true slack.
| — a string DDL printout — is **ruled out**: an artifact the compiler | ||
| cannot ground and check is the templating smell (the emit-side | ||
| equivalent of the D2 hollow alias; see the no-templating principle). | ||
| Scheduled by **extending T-4.6** — `extdeps/formats/sql.dag` joins the |
There was a problem hiding this comment.
BLOCKING: Scheduling SQL DDL by adding extdeps/formats/sql.dag creates a second generated-SQL authority instead of porting or consuming the existing dsl/extdeps/sql/migration.dag contract, violating INVARIANTS P2 and extdeps fidelity.
|
Re: the blocking finding at #3224 is already merged, so this is addressed by forward-fix PR #3230: the — sent from still-hawk-102 |
Per operator directive (via loyal-wren-802): the T-6/T-7/T-8/T-10 stage task-def rework is to be authored by fierce-cat-31 (Lane-A pipeline manager) as a dedicated discussion PR, not landed as an inline edit here. Drop the stage-def changes from this PR; it now carries only the SQL single-authority fix for briansrls' + codex's blocking review on #3224 (extdeps/formats/sql.dag is a port of the existing v3 dsl/extdeps/sql/migration.dag authority). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The #3230-vs-#3232 crossing is resolved: loyal-wren-802 ruled #3230 stays SQL-only and fierce-cat-31's #3232 is the dedicated pipeline stage-def discussion PR. Drop the stage-def rework from #3230 again (it lives on #3232, cherry-picked from e6e490d); #3230 carries only the SQL single-authority fix for the briansrls + codex #3224 review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* v4 TASKS.md: rework T-6/7/8/10 stage defs + SQL single-authority fix Stage task-defs T-6/T-7/T-8/T-10 still described one-directional procedural stages; #3224 reworked T-9/T-11 but not these. Reframe each as an application of the one bidirectional language-model relation (00_compile.dag B2-OMNI / C5): tokenize+parse = the generic ingest walker over declarative grammar-as-data; normalize+resolve = the first two core transforms on the Node pivot (carrying the #3211 single- authority + use->def-at-the-boundary contract); emit = ingest inverted over the same relation. Move the no-templating constraint onto T-10's emit boundary; fix TargetSpec -> TargetModel to match the merged 00_compile.dag / 05_emit.dag. SQL DDL (#4 disposition): extdeps/formats/sql.dag is a PORT of the existing v3 SQL authority dsl/extdeps/sql/migration.dag, not a second generated-SQL authority — addresses briansrls' blocking review on #3224 (INVARIANTS P2 / extdeps fidelity). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * WIP: Sat May 16 * reduce #3230 to SQL single-authority fix only Per operator directive (via loyal-wren-802): the T-6/T-7/T-8/T-10 stage task-def rework is to be authored by fierce-cat-31 (Lane-A pipeline manager) as a dedicated discussion PR, not landed as an inline edit here. Drop the stage-def changes from this PR; it now carries only the SQL single-authority fix for briansrls' + codex's blocking review on #3224 (extdeps/formats/sql.dag is a port of the existing v3 dsl/extdeps/sql/migration.dag authority). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * restore T-6/7/8/10 stage-def rework to #3230 loyal-wren-802 clarified the fierce-cat-31 routing crossed #3230 in transit and is withdrawn: #3230 stands as THE pipeline-rework discussion PR (fierce-cat reviews it, does not duplicate). Restore the T-6/T-7/T-8/T-10 stage task-def rework removed in the prior commit; #3230 again carries the full pipeline-rework + the SQL single-authority fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * re-reduce #3230 to SQL-only — loyal-wren-802 final ruling The #3230-vs-#3232 crossing is resolved: loyal-wren-802 ruled #3230 stays SQL-only and fierce-cat-31's #3232 is the dedicated pipeline stage-def discussion PR. Drop the stage-def rework from #3230 again (it lives on #3232, cherry-picked from e6e490d); #3230 carries only the SQL single-authority fix for the briansrls + codex #3224 review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stage task-defs T-6/T-7/T-8/T-10 still described one-directional procedural stages; #3224 reworked T-9/T-11 but not these. Reframe each as an application of the one bidirectional language-model relation (00_compile.dag B2-OMNI / C5): tokenize+parse = the generic ingest walker over declarative grammar-as-data; normalize+resolve = the first two core transforms on the Node pivot (carrying the #3211 single- authority + use->def-at-the-boundary contract); emit = ingest inverted over the same relation. Move the no-templating constraint onto T-10's emit boundary; fix TargetSpec -> TargetModel to match the merged 00_compile.dag / 05_emit.dag. SQL DDL (#4 disposition): extdeps/formats/sql.dag is a PORT of the existing v3 SQL authority dsl/extdeps/sql/migration.dag, not a second generated-SQL authority — addresses briansrls' blocking review on Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… + dispatch-plan sql row refresh Completes the formats ×7 bundle (7th file). sql.dag is a Shape-B checked port of the v3 SQL split — dsl/extdeps/sql/migration.dag + dsl/extdeps/transports/sql.dag — not a second authority (TASKS.md T-4.6 #4; briansrls + codex #3224). v3 raw `statement: String` is replaced by the grounded `SqlSchemaOperation` structured payload (no-templating: T-16 emits DDL through this model); v3 RawSqlStep escape preserved as SqlRawStep; transport carriers ported byte-faithful; v3 `dialect: String` → SqlDialect closed sum (Declared-normalized/Fail-closed, C5-fidelity). Fix: SqlResultFormatSlot single-variant sum (Class-5-Gap-3, not v2-compat) → empty marker record; result_format/WireFormat deferred (v4 std/serialization.dag empty) tracked in T-4.6-SQL ledger. DECISIONS.md: T-4.6-SQL spec-slice row + 9 T-4.6-P4-Sql* per-coproduct rows (port map, retirement obligation, deferral triggers). r4-program-dispatch-plan.md: table-only T-4.6/sql row refresh. Verified: v2-compiler compile --source-root src/v4 → 74 modules, 0 diagnostics, sql.dag emitted. Practice-9: 9% comment ratio, 4-line header, one-line 🟢/🟡 tag per coproduct, rationale in DECISIONS. v3 .dag/test physical deletion deferred to the v3-retirement / Rust→0 sweep (frozen-tree destructive op, out of keystone-independent scope). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* WIP: T-4.6 extdeps/formats/* Wave-0 — seven anchored format models (keystone- * v4 T-4.6: sql.dag — v3 SQL port (single authority) + DECISIONS ledger + dispatch-plan sql row refresh Completes the formats ×7 bundle (7th file). sql.dag is a Shape-B checked port of the v3 SQL split — dsl/extdeps/sql/migration.dag + dsl/extdeps/transports/sql.dag — not a second authority (TASKS.md T-4.6 #4; briansrls + codex #3224). v3 raw `statement: String` is replaced by the grounded `SqlSchemaOperation` structured payload (no-templating: T-16 emits DDL through this model); v3 RawSqlStep escape preserved as SqlRawStep; transport carriers ported byte-faithful; v3 `dialect: String` → SqlDialect closed sum (Declared-normalized/Fail-closed, C5-fidelity). Fix: SqlResultFormatSlot single-variant sum (Class-5-Gap-3, not v2-compat) → empty marker record; result_format/WireFormat deferred (v4 std/serialization.dag empty) tracked in T-4.6-SQL ledger. DECISIONS.md: T-4.6-SQL spec-slice row + 9 T-4.6-P4-Sql* per-coproduct rows (port map, retirement obligation, deferral triggers). r4-program-dispatch-plan.md: table-only T-4.6/sql row refresh. Verified: v2-compiler compile --source-root src/v4 → 74 modules, 0 diagnostics, sql.dag emitted. Practice-9: 9% comment ratio, 4-line header, one-line 🟢/🟡 tag per coproduct, rationale in DECISIONS. v3 .dag/test physical deletion deferred to the v3-retirement / Rust→0 sweep (frozen-tree destructive op, out of keystone-independent scope). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * WIP: T-4.6 extdeps/formats/* Wave-0 — seven anchored format models (keystone- * v4 T-4.6 sql.dag: address codex BLOCKING ×3 — single dialect authority + numeric/non-empty bounded-P5 deferrals 1. Remove SqlRawStep.dialect — it duplicated SqlMigrationStep.dialect. Faithful to v3: SqlMigrationStep.dialect was the sole dialect authority; v3 RawSqlStep was a bare nullary variant with no dialect. SqlRawStep is now { statement: String }. T-4.6-SQL "Single dialect authority" clause + T-4.6-P4-SqlSchemaOperation row updated. 2. SqlTypeNumeric.precision/scale + SqlTypeCharacter(Varying).length raw Nat — documented as an unrefined non-negative-integer scaffold (bounded P5) with explicit scaffold bound (ISO 9075 impl-defined maxima, parse/Diagnostic fail-closed) and dissolution trigger (T-25-core refinement base lands). No local refinement minted (machine-readable-inhabitance discipline). T-4.6-SQL (4) + T-4.6-P4-SqlDataType. 3. Spec-non-empty DDL column lists kept as bare List per the operator-flagged NonEmptyList discipline (NEVER per-file mint / first+rest); bounded-P5 tracked-scaffold deferral to std/collection Wave-A2 List<T> where non_empty, fail-closed Diagnostic until then. T-4.6-SQL (5) + T-4.6-P4-SqlTableConstraint. Verified: v2-compiler compile --source-root src/v4 → 74 modules, 0 diagnostics, sql.dag emitted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * WIP: T-4.6 extdeps/formats/* Wave-0 — seven anchored format models (keystone- * v4 T-4.6 DECISIONS: reorder T-4.6-SQL YELLOW sub-bullets to ascending (1)(2)(3)(4)(5) Editorial-only (cursor/composer-2 exploratory note on #3369 review 14700): sub-bullets read (1)(2)(4)(5)(3) from multi-edit insertion order. Physically moved bullet (3) (retirement obligation) ahead of (4)/(5) so reading order is ascending. Labels and all "(4)"/"(5)" cross-refs (T-4.6-P4-SqlDataType / T-4.6-P4-SqlTableConstraint) unchanged — content identical, scanability only. DECISIONS.md-only; no .dag change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * WIP: T-4.6 extdeps/formats/* Wave-0 — seven anchored format models (keystone- * v4 T-4.6 sql.dag: address codex REQUEST_CHANGES — carry WireFormat fact forward + make duplicate column constraints unrepresentable Finding 1 (facts-flow-forward / P2): SqlResultFormatSlot {} dropped the v3 result_format: WireFormat fact. v3 dsl/std/serialization.dag defines WireFormat = Json | Text. Replaced the empty marker with closed sum SqlResultFormat = SqlResultFormatJson | SqlResultFormatText — the v3 alternatives are now preserved (same pattern as v3 dialect:String -> SqlDialect). std/serialization.dag is empty so this is the SQL-transport-local projection; dissolution trigger = a v4 std/serialization WireFormat substrate lands -> fold into that single authority (re-point, not a competing mint). T-4.6-SQL (1) + T-4.6-P4-SqlResultFormat. Finding 2a (illegal-states-unrepresentable / P2): List<SqlColumnConstraint> admitted duplicate NOT NULL/PRIMARY KEY/UNIQUE. Dissolved the SqlColumnConstraint coproduct + List into a record SqlColumnConstraints { not_null, primary_key, unique: Bool } — each column-constraint appears at most once, duplicates structurally unrepresentable. T-4.6-P4-SqlColumnConstraints. Finding 2b (empty key/index column lists): reaffirmed tracked-P5 deferral — re-verified std/collection.dag has only a non_empty predicate, no landed NonEmptyList carrier; operator-flagged never-mint + T-25-core-gated where-substrate. Documented + parse/Diagnostic fail-closed (accepted by claude + cursor api-reviews). T-4.6-SQL (5). Finding 2c (FK column/referenced-column arity): added same-class bounded-P5 deferral — |columns|=|referenced_columns| is a cross-list relational constraint (T-25-core-gated, fail-closed Diagnostic). T-4.6-SQL (5). Verified: v2-compiler compile --source-root src/v4 -> 74 modules, 0 diagnostics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * WIP: T-4.6 extdeps/formats/* Wave-0 — seven anchored format models (keystone- * v4 T-4.6 sql.dag: address codex REQUEST_CHANGES (14738) — carry v3 AlterTable-class fact forward codex RC: v3 SqlMigrationOperationKind had a generic AlterTable variant distinct from RawSqlStep. v4 SqlSchemaOperation had only specific alter sub-forms (SqlAddColumn/SqlDropColumn/SqlAlterTableConstraint), so an unsupported ALTER TABLE form collapsed into SqlRawStep{statement:String} — dropping the "this is an ALTER TABLE-class op" fact v3 carried (facts-flow-forward / P3 regression). Fix: added SqlAlterTableRaw { table_name: SqlIdentifier, alteration: String } — a distinct ALTER-TABLE-class carrier on a named table (strictly more than v3, which only tagged the kind with SQL in a statement string), not collapsed into the genuinely-arbitrary SqlRawStep. Unstructured alteration grammar (ALTER COLUMN TYPE / RENAME / ...) is the tracked-P5 residual, dissolves as structured alter arms land. T-4.6-P4-SqlSchemaOperation + T-4.6-SQL port-map updated. Verified: v2-compiler compile src/v4 -> 74 modules, 0 diagnostics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Resolve merge conflict: T-4.6 dispatch-plan row (sql.dag now present via this PR) The auto-snapshot committed the origin/main merge (2676117) with unresolved conflict markers in docs/briefs/r4-program-dispatch-plan.md. Resolved the single T-4.6 row conflict: kept the HEAD form — post-merge truth is that sql.dag IS present (this PR adds it as the 7th file), superseding main's stale "sql.dag not yet present" census line. DECISIONS.md auto-merged cleanly (verified 0 markers, 13 T-4.6-SQL/P4 rows intact); sql.dag unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * v4 T-4.6 DECISIONS: fix ledger drift in T-4.6-SQL (5) — PK column obligation references removed SqlTablePrimaryKey cursor 14778 (APPROVE_WITH_COMMENTS): T-4.6-SQL bullet (5) still listed SqlTablePrimaryKey among the spec-non-empty DDL column-list carriers, but the openai-pro 14721 fix (note (6)) removed SqlTablePrimaryKey from SqlTableConstraint and moved PK to the single SqlPrimaryKeySlot authority. Bullet (5) now references SqlPrimaryKeyPresent.columns (the single PK authority on SqlTableDefinition.primary_key) and notes the SqlTablePrimaryKey removal — ledger now aligned with the shipped types. All other SqlTablePrimaryKey mentions already correctly describe its removal; sql.dag has zero references. DECISIONS.md-only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * v4 T-4.6 sql.dag: address openai-pro REQUEST_CHANGES (14780) — UNIQUE single-authority (mirror of PK fix) openai-pro RC on current head 6e1db06, one blocker: `unique: Bool` on SqlColumnConstraints AND table-level SqlTableUnique{columns} both expressed the same fact (one-column UNIQUE) — dual authority / P2 drift (unique=true + duplicate SqlTableUnique, or unique=false with a single-col SqlTableUnique). Same class as the PK issue (14721). Fix (identical normalization to PK): removed `unique` from SqlColumnConstraints (now { not_null: Bool } only). Single UNIQUE authority = SqlTableUnique in SqlTableConstraint; a one-column unique = SqlTableUnique with one column; column-inline UNIQUE is parser surface sugar folded into that authority. UNIQUE stays a legitimately-repeatable list entry (unlike <=1 PK). not_null stays column-local (SQL has no table-level NOT NULL — genuinely per-column, no dual authority). T-4.6-P4-SqlColumnConstraints / -SqlTableConstraint + T-4.6-SQL (6). Verified: v2-compiler compile src/v4 -> 74 modules, 0 diagnostics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * v4 T-4.6 DECISIONS: fix ledger drift in T-4.6-SQL (2) — names dissolved SqlColumnConstraint sum cursor 14786 (APPROVE_WITH_COMMENTS): T-4.6-SQL clause (2) still listed `SqlColumnConstraint` (the dissolved sum) alongside SqlDataType / SqlTableConstraint as a live carrier. Live model uses the record `SqlColumnConstraints` (per T-4.6-P4-SqlColumnConstraints). Clause (2) now names `SqlColumnConstraints` and explicitly flags the old sum as dissolved so greppers/amenders don't chase a non-existent type. All other singular `SqlColumnConstraint` mentions already correctly describe it as the prior/dissolved sum; sql.dag has zero references. DECISIONS.md-only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * v4 T-4.6 dispatch-plan: reconcile T-4.6 row against live formats/ census (codex BLOCKING 08ccdc8) codex: the row asserted "×7 / 7/7 present" textually without reconciling the live census — `src/v4/extdeps/formats/` lists 8 files. Fixed: row now names T-4.6's 7 explicitly (csv/json/json_schema/ openapi/toml/yaml + sql.dag, per TASKS.md:121) and explicitly identifies the dir's 8th file `spice.dag` as T-4.10's (LANDED #3168, row below) — not a T-4.6 member, none displaced/retired. Census now reconciles for a reader running `ls formats/`. docs-only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * v4 T-4.6 DECISIONS: track column-name/ref uniqueness as bounded-P5 (openai-pro 14793) openai-pro RC on current head 26b6152: SqlTableDefinition.columns: List<SqlColumnDefinition> admits duplicate column names (illegal ISO 9075); same for column-ref lists in PK/UNIQUE/FK/index. Reviewer explicitly accepts the tracked-bounded-P5 option (same bridge as non-empty-list / FK-arity). No sql.dag code change: List is kept deliberately — column ORDER is a real SQL fact (positional INSERT, SELECT * order, ADD COLUMN append) that Map/Set would drop (facts-flow-forward regression). Uniqueness- over-an-ordered-list is a `List<T> where unique[_by name]` refinement, same class as non-emptiness/FK-arity: no landed carrier (operator- flagged never-mint-per-file), T-25-core-gated, parse/Diagnostic fail-closed until then. Added to T-4.6-SQL (5) — the exact tracked-debt bridge the reviewer noted uniqueness was missing from. DECISIONS.md-only; sql.dag unchanged (v2-compile remains 74 modules, 0 diagnostics). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Operator-ratified Phase-1 execution of the D2-reversal + fact-bundle reseed (the Phase-1 PR that
#3223scopes as "the immediate next PR once this plan ratifies"). DECISIONS.md + TASKS.md editing only — no substrate.dagchanges.No new architecture — this re-sequences the T-## program around the dependency edge the D2 reversal created, rescopes T-9 down, and ratifies the Theme-A disposition forks.
TASKS.md (sections A–F of the brief)
T-1→T-2→T-3→T-6→T-7→T-8→T-9→T-10→T-11/T-16→T-15; side branchP1-KEYSTONE→T-4→T-9; everything else is parallel fill. Schedulable (deps met) and prioritized (on the critical path) are now stated as independent properties. All task annotations preserved verbatim.type RustI32 = Int32) is replaced with fact-bundle modeling. T-4 re-gated[needs T-3-extended, P1-KEYSTONE, T-29]— the D2 reversal changed T-4's dependency set; it is no longer a schedule-anytime leaf. (The brief calls this the single most consequential planning edit.)Identity/Exact/Lossy/FailClosed) and the composition lattice; declarestype AlgebraRef = Symbol(Theme-A audit Codex/graph viz test helpers #2).DECISIONS.md (section G)
Nodegroundings (content_hash = merkle_fold ∘ canonical), expressed in the sharedstd/vocabulary — mechanical, not free-form semantic equivalence. It reconciles the locked U1/T-9 rows (which already mandate the no-engine, decidable form) rather than rewriting them.Audit-gap landing
derive_coercion → T-9 (the coercion fold) · "coincide" → DECISIONS (here) + modeling-discipline.md (P1-KEYSTONE doc work, separate) · undecidable 4th outcome → T-25-core · composition lattice → T-9 · drift → T-27 dropped.
Notes for review
#3223(base = still-hawk-102/d2-reversal-reseed-plan) — both PRs edit DECISIONS.md; stacking avoids a guaranteed conflict and keeps the D2-reversal section as the correct base for the "coincide" definition. Rebases clean onto main when#3223merges.modeling-discipline.mdis intentionally not edited here — the fact-bundle Practice + worked examples are P1-KEYSTONE doc work, a separate artifact from this DECISIONS/TASKS re-sequence.Test plan
.dagor Rust changes;INVARIANTS.mdP5 does not fire.🤖 Generated with Claude Code