Skip to content

v4 Phase-1 execution — re-sequence the T-## program around the D2-reversal dependency edge - #3224

Merged
briansrls merged 45 commits into
mainfrom
still-hawk-102/phase1-execution
May 17, 2026
Merged

briansrls merged 45 commits into
mainfrom
still-hawk-102/phase1-execution

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

Operator-ratified Phase-1 execution of the D2-reversal + fact-bundle reseed (the Phase-1 PR that #3223 scopes as "the immediate next PR once this plan ratifies"). DECISIONS.md + TASKS.md editing only — no substrate .dag changes.

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)

  • A — 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 (deps met) and prioritized (on the critical path) are now stated as independent properties. All task annotations preserved verbatim.
  • D — 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.
  • E — T-4 authoring contract rewritten: the reversed-D2 alias model (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.)
  • F — T-9 rescoped down: "algebra-homomorphism search algorithm" → the mechanical coercion fold (zip-fold + content-hash, not search/research). Adds the coercion quality tag (Identity/Exact/Lossy/FailClosed) and the composition lattice; declares type AlgebraRef = Symbol (Theme-A audit Codex/graph viz test helpers #2).
  • B — T-27 DROPPED: versioning / spec-drift ruled orthogonal to v4; tombstoned.
  • C — T-25/26/28/29 ratified, zero rule-outs: T-25 decomposed into core (refinement = base type + fail-closed validation obligation, near T-3) + prover tail (after T-9); T-26 scheduled; T-28 scheduled, bundled into T-8; T-29 scheduled (low-dep leaf, prerequisite of T-4's cpp slice).

DECISIONS.md (section G)

  • 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. 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

  • Stacked on #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 #3223 merges.
  • The locked U1/T-9 decision rows were NOT rewritten — they already mandate the no-engine decidable form; the new "coincide" definition cross-references them. Surfaced here for conscious confirmation.
  • modeling-discipline.md is 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

  • Doc-only diff — no substrate .dag or Rust changes; INVARIANTS.md P5 does not fire.
  • Verify the critical-path chain and T-4's re-gated dependency set read consistently against the task definitions.
  • Confirm no dangling references to the removed phase buckets.

🤖 Generated with Claude Code

briansrls and others added 29 commits May 17, 2026 02:39
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>
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>
@briansrls

Copy link
Copy Markdown
Contributor Author

codex 13406 (APPROVE_WITH_COMMENTS, T-16 SQL DDL) — addressed at HEAD 0b76aee38

Valid finding. The Phase-1 brief's "zero planning-level deferrals" ruling was scoped to the new PROPOSED tasks T-25…T-29; #4 — T-16 SQL DDL is a Scope/clarification row that the brief did not cover, so leaving its (a)/(b) fork open while the section claimed the class closed was an over-claim.

Fix (0b76aee38):

  • The Theme-A intro and Net now scope the 2026-05-17 ratification to T-25…T-29 explicitly, and name #4 — T-16 SQL DDL as the one fork still OPEN, awaiting an operator disposition — named and tracked, not silently deferred.
  • The #4 entry itself says so directly, and adds the THESIS context: SQL schemas are Shape-B (THESIS.md:217), so fork (b) — a Shape-B string DDL artifact — is the THESIS-consistent default; fork (a) would make typed SQL a modeled extdeps format. The operator owns that scope call; I have not improvised it.

I have separately flagged the open #4 fork to loyal-wren-802 (who carries the operator's Phase-structure ratification) for a disposition under the same zero-deferrals principle.

— 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>
@briansrls

Copy link
Copy Markdown
Contributor Author

codex @672cdc4a (1 BLOCKING) — fixed at HEAD dadcffa01.

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 T-25/T-26/T-28/T-29/T-30. The close gate would have closed v4-done without them. (The bullet's own parenthetical claimed "drift-proof phrasing" while in fact being a stale enumeration — exactly the failure it warned against.)

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

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: dadcffa0 · Trigger: manual
  • Comparison: still-hawk-102/d2-reversal-reseed-plan @ dc44d2c3 ... still-hawk-102/phase1-execution @ dadcffa0
  • Conversation: View conversation

1. Story of the diff

This 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 [needs] edges rather than replacing them. The load-bearing move is that T-4 is no longer an early extdeps leaf: fact-bundle modeling now waits on T-3’s shared-fact vocabulary plus P1-KEYSTONE, T-30, T-29, and T-25-core before it can feed T-9. src/v4/DECISIONS.md also defines “coincide” as canonical Node equality, which gives the T-9 coercion fold and T-4 fact-bundle deduplication a single mechanical meaning instead of a semantic-equivalence judgment. src/v4/TASKS.md then resolves the Theme-A planning forks by scheduling T-25/T-26/T-28/T-29/T-30, dropping T-27, and adding SQL as a checked T-4.6 format rather than allowing a string-templated DDL path.

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

  1. LAYER MODEL (substrate vs implementation). Compliant — this is planning/docs, not Dag mutation, and the substrate-facing plan keeps shared facts in T-3 rather than minting them per-language: T-3 owns signedness, representation, numeric stack, and related carriers, with per-language T-4 slices blocked until that vocabulary exists (src/v4/TASKS.md:242-253).
  2. INVARIANTS.md + modeling-discipline.md. Compliant — P1/P2/P3 are handled explicitly: T-4 fact-bundles spec-read facts instead of bare aliases (src/v4/TASKS.md:280-283), T-30 fails closed on hollow aliases before T-4 starts (src/v4/TASKS.md:952-970), and the execution-graph grouping is declared a derived scheduling view over the authoritative [needs] contracts, not a second dependency authority (src/v4/TASKS.md:107-112).
  3. CODING.md. N/A — no Rust implementation, helper placement, method/data-shape, or error/result API changed.
  4. TESTING.md. Compliant — no runnable behavior changed, so no new tests are required; the plan keeps testing structural by scheduling testgen early (src/v4/TASKS.md:680-683) and leaving T-15’s close gate tied to the TestClaim suite (src/v4/TASKS.md:507-510).
  5. LOCKED DESIGN DECISIONS. Compliant — the new “coincide” decision narrows deduplication to proven canonical Node equality and explicitly rejects bare-alias identity (src/v4/DECISIONS.md:346-371), which is aligned with the D2 reversal rather than silently changing it.
  6. TRACKED vs UNTRACKED DEBT. Compliant — the PR converts previously proposed/missed Theme-A forks into scheduled work, a dropped out-of-v4 tombstone, or a resolved SQL disposition, and then updates the net statement to say no Theme-A fork remains open (src/v4/TASKS.md:840-848, src/v4/TASKS.md:1015-1019). T-30’s convention-tier interim floor is bounded by the hard T-30 → T-4 dependency (src/v4/TASKS.md:961-970).

2.5. Top-down PM intent review

Finding (NON-BLOCKING) — PM intent / worker-executable scope. The new execution graph makes T-11 “emit per-target specialization” for all 5 Shape A targets (src/v4/TASKS.md:42), and T-16 depends on T-11 while explicitly requiring a Rust+C++ backend plus React/TS frontend (src/v4/TASKS.md:43-45). But the T-11 task detail still says the per-target tables populate emit behavior only “across rust/python/go” (src/v4/TASKS.md:413). A worker following the task definition could faithfully under-scope T-11 and omit C++/TypeScript specialization even though the new critical-path contract requires all five. Update that T-11 detail sentence to match the five Shape-A target set.

3. Verdict

APPROVE_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>
@briansrls

Copy link
Copy Markdown
Contributor Author

openai-pro 13437 (APPROVE_WITH_COMMENTS) — the T-11 scope nit is fixed at HEAD 23da0e9e6.

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 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: 23da0e9e · Trigger: schedule
  • Thinking: 241s wall

Non-blocking — Strengths

  • src/v4/TASKS.md The 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.md The new coincidence definition is mechanical and grounded in canonical Node equality rather than free-form semantic equivalence.

✅ No blocking concerns found.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 23da0e9e · Trigger: manual
  • Comparison: still-hawk-102/d2-reversal-reseed-plan @ dc44d2c3 ... still-hawk-102/phase1-execution @ 23da0e9e
  • Conversation: View conversation

1. Story of the diff

This PR turns src/v4/TASKS.md from coarse “Phase 1/2/3/4” buckets into an explicit scheduling model: a critical path, a D2-reversal side branch into T-4, and parallel-fill work that should run as soon as dependencies clear. The load-bearing change is that language modeling is no longer a low-dependency alias exercise: T-4 now waits on T-3’s shared fact vocabulary, P1-KEYSTONE, T-30’s hollow-alias gate, T-25-core refinements, and T-29’s C++ ABI model before it can feed T-9. src/v4/DECISIONS.md also defines “coincide” once as canonical Node grounding equality, which gives the fact-bundle plan a concrete deduplication criterion instead of letting workers treat “same meaning” as judgment. The Theme-A section then ratifies or tombstones the previously proposed gaps: T-25/T-26/T-28/T-29/T-30 are scheduled or placed, T-27 is dropped, and SQL DDL is routed through T-4.6 as a checked Shape-B format.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — this diff is planning/design documentation only; it does not add or mutate Dag-resident substrate types, dag.rs, pass code, or emitted implementation code. It does schedule substrate work, but no substrate shape lands in this PR.

  1. INVARIANTS.md + modeling-discipline.md.

Finding — BLOCKING, P2 Boundary Discipline / single-authority dependency facts. The diff says the per-task dependency brackets are authoritative: src/v4/TASKS.md:112 — “[needs] contracts are the authoritative dependency record”. But the new critical path contains T-10 → T-11 at src/v4/TASKS.md:25, while the task line for T-11 has no authoritative bracketed dependency: src/v4/TASKS.md:42 — “T-11 emit per-target specialization (extends T-10 across all 5 Shape A targets)”. The detail prose also makes T-10 the orchestrator and T-11 the tables that populate it, src/v4/TASKS.md:413, so the edge exists, but only as ordering/prose rather than the declared [needs T-10] fact. That leaves workers with two sources of truth for scheduling. The local fix is to make the T-11 line carry the explicit dependency, e.g. [needs T-10]. This is exactly the P2 concern that every fact lives in one authoritative place. chatgpt-review-0c792123-cbd8-43…

  1. CODING.md.

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…

  1. TESTING.md.

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 TestClaim suite, which is consistent with the 0-residual .dag-native testing direction. chatgpt-review-8ba00742-7684-44…

  1. LOCKED DESIGN DECISIONS.

Compliant — the diff is explicit when it supersedes or reconciles prior decisions: src/v4/DECISIONS.md:346-373 defines “coincide” as canonical Node structural equality and says it reconciles existing U1/T-9 no-engine rows; src/v4/TASKS.md:275-277 marks the D2 alias bullet as superseded by the fact-bundle reseed rather than silently drifting the old contract. This matches the locked-direction posture that target growth is spec/data authored, not new compiler paths. chatgpt-review-da7f5058-efc5-47…

  1. TRACKED vs UNTRACKED DEBT.

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 Node -> Outcome hollow-alias checker that fails closed at src/v4/TASKS.md:954-976. T-25 is decomposed into T-25-core and T-25-tail with placement and consumer edges at src/v4/TASKS.md:414-431. The dangling NonEmptyList header issue is explicitly routed to the T-4.5 owner instead of being hidden inside T-25 at src/v4/TASKS.md:432-447. That is tracked bridge/debt shape, not untracked scaffolding.

2.5. Top-down PM intent review

Finding — BLOCKING, planning artifact can under-spec T-16. The PR resolves Theme-A #4 by saying SQL DDL is in scope for T-16: src/v4/TASKS.md:982-984 — “T-16 emits the DDL through that grounded format model” and keeps it “inside T-16’s gate #28”. But the new high-level critical-path T-16 contract only says src/v4/TASKS.md:43-44 — “ONE .dag → Rust+C++ backend” plus “React/TS frontend + OpenAPI wire contract”; it omits the SQL DDL artifact that the same diff says is now resolved and scheduled. Since this execution graph is the worker-facing top-level plan, a worker following it faithfully could deliver the flagship demo without SQL DDL even though fork (a) was chosen. This is also PM-relevant because the thesis distinguishes Shape A language targets from Shape B artifacts such as SQL schemas and OpenAPI specs; the artifact needs to stay visible in the demo contract even though it is not a compiler render target. chatgpt-review-da7f5058-efc5-47…

3. Verdict

REQUEST_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 [needs T-10] authority gap is fixed and the critical-path T-16 line includes the newly resolved SQL DDL artifact, because both are worker-facing planning mismatches in the core purpose of this PR.

…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>
@briansrls

Copy link
Copy Markdown
Contributor Author

openai-pro (REQUEST_CHANGES) — both findings fixed at HEAD b1e8bb259.

Both were worker-facing planning mismatches; both are now consistent.

Finding 1 — T-11 lacked an authoritative [needs] bracket. The doc declares [needs] contracts the authoritative dependency record, but the T-11 critical-path line carried the T-10 → T-11 edge only in prose/ordering. Fixed: the T-11 line now reads … (extends T-10 across all 5 Shape A targets) [needs T-10] — one source of truth.

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 sql.dag format model), and the T-16 task definition lists it — but the top-level critical-path T-16 line did not, so a worker following the graph could ship the demo without it. Fixed: the T-16 graph line now lists "SQL DDL schema (Shape-B, via T-4.6 sql.dag — Theme-A #4)" alongside the Rust+C++ backend / React+TS frontend / OpenAPI contract.

The execution graph and the task definitions now agree on both.

— sent from still-hawk-102

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: b1e8bb25 · Trigger: manual
  • Comparison: still-hawk-102/d2-reversal-reseed-plan @ dc44d2c3 ... still-hawk-102/phase1-execution @ b1e8bb25
  • Conversation: View conversation

1. Story of the diff

This PR is a planning/authority re-sequencing for v4 Phase 1, not an implementation change. It adds a precise D2-reversal concept, “coincide,” in src/v4/DECISIONS.md:344-373: two independently sourced target facts may be deduped only when their canonical Node groundings are structurally equal under B1-CANON/content-hash rules, so “aliasing by name” is no longer treated as equivalence. That decision is then wired through src/v4/TASKS.md by replacing phase buckets with a critical path (T-1 → … → T-11 → T-16 → T-15) at src/v4/TASKS.md:25, making the T-4 language fact-bundle lane a side-branch dependency feeding T-9 (src/v4/TASKS.md:64-78), and making per-task [needs] the authority over scheduling buckets (src/v4/TASKS.md:110-113).

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 (src/v4/TASKS.md:81-105, src/v4/TASKS.md:953-977). Downstream, T-9 becomes the mechanical coercion-fold over those grounded facts with explicit Outcome::Produced quality tags and Outcome::Rejected failure (src/v4/TASKS.md:382-384), T-11 is clarified as all five Shape-A targets with no string templates (src/v4/TASKS.md:414-417), T-16 includes SQL DDL as a checked Shape-B format artifact rather than a raw printout (src/v4/TASKS.md:514-527, src/v4/TASKS.md:980-991), and T-15 closes over “the whole plan minus T-15” rather than a stale hand-enumeration (src/v4/TASKS.md:501-507).

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation). — Compliant.

The diff touches substrate planning, not substrate implementation: it introduces no Dag mutation path, new runtime type, or emitted code. Where it schedules substrate-facing work, it names the authority and dependency chain rather than inventing an implicit layer: T-3 owns the shared fact vocabulary (src/v4/TASKS.md:240-262), T-4 is blocked on that vocabulary plus the D2 reversal prerequisites (src/v4/TASKS.md:273-280), and T-30 is a hard structural gate before T-4 can feed T-9 (src/v4/TASKS.md:89-94, src/v4/TASKS.md:953-977). That is aligned with the active v4 thesis framing, where v4 is the operational instantiation of the substrate program. chatgpt-review-7d4c8371-7bba-41…

  1. INVARIANTS.md + modeling-discipline.md. — Compliant.

The diff directly addresses P1 Modeling Faithfulness and P3 Fail-Closed: coincide is defined as mechanical equality of canonical Node groundings, not a semantic guess (src/v4/DECISIONS.md:346-369), and T-9’s empty/failing fold becomes a diagnostic/rejected outcome instead of fabricated coercion success (src/v4/TASKS.md:382-384). It also follows P2 Boundary Discipline / single authority by declaring that per-task [needs] contracts are authoritative and scheduling buckets are only derived views (src/v4/TASKS.md:110-113). These match the invariant principles that constructs must ground in declared sources, facts must live in one authoritative place, and failures must not fabricate plausible output. chatgpt-review-e5fc125c-9ad9-45…

  1. CODING.md. — N/A.

N/A — this is a Markdown planning/design diff, not Rust implementation under src/v3/compiler/src/; the CODING.md function-shape and data/free-function rules are therefore not exercised. chatgpt-review-0b06b860-60e7-47…

  1. TESTING.md. — Compliant.

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 (src/v4/TASKS.md:684-685), which is consistent with TESTING.md’s behavior-driven, structurally declared test posture. chatgpt-review-3a350f52-ea8b-4f…

  1. LOCKED DESIGN DECISIONS. — Compliant.

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 (src/v4/DECISIONS.md:344-373), T-11 forbids string templating for Shape-A targets (src/v4/TASKS.md:414-417), T-27 is explicitly dropped under the operator ruling (src/v4/TASKS.md:914-923), and SQL DDL is resolved as a checked extdeps format with no string-templated printout (src/v4/TASKS.md:980-991). I did not find a diff-cited mismatch with the uploaded thesis/design authorities.

  1. TRACKED vs UNTRACKED DEBT. — Compliant.

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 (src/v4/TASKS.md:81-88); T-30 names the checker, the hollow-alias failure mode, and the condition for T-4 entry (src/v4/TASKS.md:953-977); T-25 is split into T-25-core hard prerequisites and T-25-tail post-T-9 completion work (src/v4/TASKS.md:863-886); and the remaining file_system.dag dangling-Consumes issue is separately bounded to the T-4.5/PR #3209 line rather than being falsely claimed as closed (src/v4/TASKS.md:890-895). This satisfies the P5 requirement that scaffolds have explicit dissolution paths. chatgpt-review-e5fc125c-9ad9-45…

2.5. Top-down PM intent review

Compliant. The highest-level intent is preserved: the thesis says .dag is dependency modeling software and parallelism follows from the declared graph, while sequential execution requires a data dependency; this PR makes that operational by replacing loose phase buckets with a critical path plus derived parallel-fill schedule, and by making [needs] the authoritative dependency source (src/v4/TASKS.md:9-20, src/v4/TASKS.md:25, src/v4/TASKS.md:110-113). chatgpt-review-7d4c8371-7bba-41…

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 sql.dag as a checked format/model with “no raw String printout” rather than adding a hand-written compiler render path (src/v4/TASKS.md:414-417, src/v4/TASKS.md:514-527, src/v4/TASKS.md:980-991). chatgpt-review-7d4c8371-7bba-41…

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 (src/v4/TASKS.md:501-507), which is the right PM-level posture for a dependency re-sequencing PR. The thesis’s cost-of-change target remains that stage0 hand-maintained surfaces shrink toward zero, not that this planning PR lands implementation code. chatgpt-review-7d4c8371-7bba-41…

3. Verdict

APPROVE. 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 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: b1e8bb25 · Trigger: schedule
  • Thinking: 151s wall

Non-blocking — Strengths

  • src/v4/TASKS.md The 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.md The coincidence definition is mechanical and preserves the fact-bundle rule that deduplication requires proven canonical Node equality.

✅ Docs-only PR; no blocking concerns found.

@briansrls
briansrls changed the base branch from still-hawk-102/d2-reversal-reseed-plan to main May 17, 2026 15:29
…-execution

# Conflicts:
#	docs/modeling/grounding-worked-examples.md
#	src/v4/DECISIONS.md

@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: 3118da26 · Trigger: schedule
  • Thinking: 236s wall

BLOCKING (1)

Root Cause

  • src/v4/TASKS.md Theme-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.md The critical-path plus side-branch graph makes T-4's D2-reversal dependency edge explicit and keeps watch items distinct from true slack.

⚠️ One planning authority issue should be fixed before this lands.

Comment thread src/v4/TASKS.md
— 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

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: 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.

@briansrls
briansrls merged commit 92cb264 into main May 17, 2026
7 checks passed
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: the blocking finding at src/v4/TASKS.md:989 (SQL DDL creates a second generated-SQL authority) — the finding is valid. dsl/extdeps/sql/migration.dag exists as a v3 SQL authority (migration-script shape + ordering: SqlMigrationOperationKind, SqlMigrationStep/Script/EmissionTarget), alongside dsl/extdeps/transports/sql.dag (transport config). Scheduling extdeps/formats/sql.dag as a freshly-authored model would stand a second authority beside it — INVARIANTS P2 / extdeps fidelity, as flagged.

#3224 is already merged, so this is addressed by forward-fix PR #3230: the #4 — T-16 SQL DDL disposition now schedules extdeps/formats/sql.dag explicitly as a port of the existing dsl/extdeps/sql/migration.dag contract — every SQL fact the v3 file already models is carried forward (reconciled into the v4 checked-Shape-B-format shape), net-new modeling is only what v3 did not cover, and the v3 file is retired into the v4 one so no dual representation is left standing.

— sent from still-hawk-102

briansrls added a commit that referenced this pull request May 17, 2026
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>
briansrls added a commit that referenced this pull request May 17, 2026
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>
briansrls added a commit that referenced this pull request May 17, 2026
* 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>
briansrls added a commit that referenced this pull request May 17, 2026
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>
briansrls added a commit that referenced this pull request May 19, 2026
… + 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>
briansrls added a commit that referenced this pull request May 19, 2026
* 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>
@briansrls
briansrls deleted the still-hawk-102/phase1-execution branch June 1, 2026 18:43
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