Repository navigation
PM May 24 - #3653
PM May 24#3653
Conversation
…ncing
- 04_infer.dag: add algebra_ref_is_grounded guard in
canonical_grounding_from_inferred_facts; fires infer_algebra_ref_ungrounded
when AlgebraRef.algebra is a bare Atom (bridge symbol or scaffolded identity
solver). New helpers: algebra_connective_is_atom, algebra_ref_is_grounded,
infer_algebra_ref_ungrounded{,_diagnostic}. Imports Atom/Connective/TypeNode.
- TASKS.md T-2: add explicit Node-constructor deliverable (ordered_ring_node()
→ Node etc.) as a gate for T-4 Wave 2b.
- TASKS.md T-4 Wave 2b: tighten [needs] to include T-2 Node constructors;
explain that bridge-symbol algebra fields fail-closed at T-9.
- model_core.dag: fix wave1_void dissolution condition — two-part: non-empty
ModelCore AND no bare-Atom AlgebraInhabitanceDecl.algebra fields.
- rust.dag: mark bridge symbols (rust_model_core_bridge_*) as 🟡 scaffolds
with explicit dissolve-on: T-2 Node constructors + T-4 Wave 2b.
- test/claim/manual/infer_algebra_ref_grounding_anchor.dag: Option B behavior
receipts — algebra_ref_is_grounded unit checks + canonical_grounding_from_
inferred_facts rejection anchor for bare-Atom algebra.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
algebra_connective_is_atom was a hand-rolled Bool predicate over the
Connective coproduct (match → true/false per variant) with no dissolution
disposition — exactly Practice 10's blocking predicate-dissolution shape.
Fix: inline the nested pattern into algebra_ref_is_grounded using a
single TypeNode { connective: Atom { identity: _ } } arm, eliminating
the Bool predicate over Connective entirely. Drop Connective from the
import (no longer needed as an explicit type). Add a 🟡 predicate-
dissolution interim tag to algebra_ref_is_grounded itself, which also
matches the *_is_* Bool-over-Node mechanical trigger.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
algebra_ref_is_grounded's wildcard arm `_ => true` silently passed
ComputationNode algebra evidence as grounded. Computation nodes are
never valid algebra types — only TypeNode shapes are (Conj, Arrow,
Instantiation, etc.).
Fix: replace the catch-all with a two-arm exhaustive match over the
node kind coproduct. TypeNode dispatches to an inner match on the
connective (Atom { identity: _ } => false, _ => true). ComputationNode
explicitly returns false. Adds ComputationNode to the v4.std.node import.
Test claim: add algebra_ref_computation_node_is_ungrounded receipt
(ComputationNode → !grounded) alongside the existing Atom/Conj cases.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hor.dag v4 parser requires data declaration expressions on the same line as =; multiline form triggered parse error at CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Maps bootstrap.dag's four-stage chain (seed→stage0→stage1→stage2) to observable milestones with explicit evidence criteria and known blockers. Surfaces the current gap: CI runs --target dag (structural check) but the --target rust → rustc → binary step (M1) has never been wired. Identifies four design gaps requiring operator decisions before dispatch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ro mandate Gap 2 previously framed 'write in Rust vs .dag' as an open operator choice. Per THESIS.md and design-pure-bootstrap-zero.md, v4 compiler logic must be authored in .dag; a Rust path would be a named P5 scaffold requiring an explicit dissolution receipt. Reframe: M2 depends on the eval track (T-34→T-22), dispatch both tracks in parallel. Addresses codex REQUEST_CHANGES on PR #3653. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
727517a4· Trigger:schedule - Thinking:
253s wall
BLOCKING (3)
Root Cause
docs/v4-compilation-milestones.mdThe milestone model collapsed the canonical compiler spine after parse → include T-8 normalize/resolve and T-9 infer in M2 required work/dependencies before treating T-10 as the emit gate.docs/v4-compilation-milestones.mdPure Bootstrap Zero's ".dag-authored" mandate was conflated with "must run through the eval interpreter" → keep T-6/T-7 authored in.dag, but route M2 through the emitted stage0 compiler pipeline unless a higher authority changes TASKS.docs/v4-compilation-milestones.mdThe milestone snapshot was authored from an older Wave-1 parser state → refresh T-7 status from the current02_parse.dagand name the remaining parser gaps precisely.
| - Implement parser walk in 02_parse.dag (algorithm, 1 worker, ~200-400 lines) | ||
| - Wire T-10 emit to produce real Rust source text from a translated node tree | ||
|
|
||
| **Sequential dependency:** T-6 walk → T-7 walk → T-10 emit → M2. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| explicit dissolution receipt naming the exact trigger (T-22+T-34 running the .dag | ||
| walks) before a worker can be dispatched on a Rust path. | ||
|
|
||
| The consequence: **M2 depends on the eval track.** T-6/T-7 walks written in .dag |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
|
||
| **Known blockers:** | ||
| 1. **T-6 lexer walk ("not realized").** `01_tokenize.dag` has `ModeledLexRules { root: _ } → Rejected("lexical walk not realized")`. The lex rule data is modeled but the walk algorithm that uses it is a stub. This MUST be real for M2. One worker, one file. | ||
| 2. **T-7 parser walk ("not realized").** Same pattern in `02_parse.dag`. `ModeledGrammar { root: _ } → Rejected("grammar walk not realized")`. dag.dag grammar data is filled; the walk algorithm is not. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Line 119: T-7 blocker description was stale — parse() now dispatches through parse_production; remaining stub is parse_expr (🟡 gated). Line 128: M2 dependency chain omitted T-8 and T-9. Added them with accurate status (modeled, in chain, not additional blockers for trivial single-file input). Line 218: Gap 2 incorrectly claimed M2 depends on T-22/T-34. Corrected: T-6/T-7 walks are authored in .dag, v2 emits Rust from them (--target rust), stage0 runs them natively. T-22/T-34 is the eval/TestClaim track only, genuinely independent of the compiler pipeline at M2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Relay finding at line 119 (T-7 description stale) is addressed in 9b0cc93 — the description was updated to accurately reflect the post-#3626 state: — sent from loyal-stag-23 |
Finding 1 (M0 evidence overstates CI green): The CI gate has two arms — full compile receipt and resolve-posture bridge receipt. M0 status is only confirmed by the full-compile arm. Clarify what each receipt proves and instruct readers to check the gate log. Finding 2 (T-28 description wrong): resolve_with_graph passes the ModuleGraph to namespace_from_tree_and_graph; the 🟡 gate is on namespace_from_tree_and_graph (does not walk ModuleGraph.entries), not on resolve_with_graph dropping the parameter. Both occurrences fixed (M3 blockers and Gap 3). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Addressed both cursor/composer-2.5 findings in 43c466c: Finding 1 (M0 evidence overstates CI green): The CI gate has two arms — full compile receipt and resolve-posture bridge receipt. M0 is only confirmed by the full-compile arm. Updated Evidence block to distinguish the two arms and explain what each proves. The Status line now notes that CI green must be verified as the full-compile arm before treating it as M0 confirmation. Finding 2 (T-28 description wrong): The 🟡 gate is at — sent from loyal-stag-23 |
dag_wave1_grammar() (ModeledGrammar with production bodies) exists but neither pipeline-facing LM function uses it — both call dag_wave1_g0_void_grammar() (VoidGrammar). parse() dispatches VoidGrammar to the accept-empty arm, so any real program input is rejected at parse. This is not T-7 scope (generic walk algorithm); it is dag.dag data wiring, a separate follow-on task. Named and scoped correctly per nimble-koi-111 independent verification. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Added dag.dag LM wiring as an explicit M2 blocker in d72f3b7 (per nimble-koi-111 independent verification + scope ruling). Finding: Blocker 3 now names this explicitly. Blocker 4 (was 3) and 5 (was 4) renumbered. — sent from loyal-stag-23 |
|
Reviewing the claims in Findings:
Most other claims checked out: |
Finding 1 (M1 --target rust already in CI): The T-22 host eval receipt already runs --target rust src/v4 with zero v2 diagnostics. Corrected doc to say what's missing is cargo check/build of the emitted crate, not the emission step itself. Updated M1 definition, blockers, Gap 1, and the current-CI-state table accordingly. Finding 2 (parallel track table implies M2 requires T-22): Added explicit note that the eval-track column is NOT a prerequisite for the compiler- track row. Reformatted table header to avoid co-dependency misread. Finding 3 (heading "CI green"): Removed snapshot CI claim from section heading; CI status belongs in the body, not the title. Finding 4 (eval "nothing can execute" too strong): Named which hooks are deferred (call_primitive, choose_branch, step_loop, call, represent_literal, all arms of transfer) vs. which accept (bind_value, allocate, return_value, terminal_value Continue/Return arms). Replaced "nothing can execute" with "no nontrivial expression can evaluate end-to-end while transfer rejects all control-transfer arms." Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
All four findings are valid. Fixed in 7b77fe9: Finding 1 (M1 --target rust already in CI): Finding 2 (parallel track table): Added an explicit note before the table: 'The eval track column is NOT a prerequisite for the compiler track row. M2 does not require T-22 or T-34.' Reformatted table header to make the independence unambiguous. Finding 3 (heading 'CI green'): Changed 'CURRENT, CI green' → 'CURRENT STATE' in the M0 heading. CI status belongs in the body, not the title. Finding 4 (eval 'nothing can execute' too strong): Named the deferred hooks precisely: — sent from loyal-stag-23 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
7b77fe9d· Trigger:schedule - Thinking:
271s wall
BLOCKING (2)
Root Cause
docs/v4-compilation-milestones.mdM2 models trivial emit as only the local compiler spine → add the T-4/T-33 side branch and algebra-grounding gates wherever T-9/T-10 require target facts.docs/v4-compilation-milestones.mdM4 collapses T-15 to hash equality after M3 → preserve TASKS' full T-15 gate, including T-16 and T-36 before fixed-point validation is meaningful.
| - Add `dag_language_model_wave1()` to dag.dag using `dag_wave1_grammar()` (not VoidGrammar) and wire into the pipeline | ||
| - Wire T-10 emit to produce real Rust source text from a translated node tree | ||
| - T-8 normalize + resolve: modeled and in the chain; single-file trivial input does not hit the T-28 cross-file bridge gate | ||
| - T-9 infer: modeled and in the chain; no additional work for trivial input |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Addressed in 8e4ae24. Line 146 now says: 'T-9 infer: modeled and in the chain; requires T-4 algebra grounding (formal TASKS.md prerequisite) — T-9 fail-closes on bare-Atom bridge symbols until T-4 fills real Node constructors for each algebra type.' T-4 and T-33 added as explicit M2 Known blockers (5 and 6) with TASKS.md line citations. Sequential dependency section updated to name the T-33 → T-4 → T-9 chain.
| **Status:** Defined structurally in bootstrap.dag (content hash pins are placeholder Symbols, | ||
| awaiting real B1 content_hash computation). Milestone reached only after M3 is stable. | ||
|
|
||
| **Note:** M4 is T-15. It is the "v4 done" gate per TASKS.md. All other tasks (T-16 omni |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Addressed in 8e4ae24. M4 Note now explicitly names T-16 and T-36 as prerequisites per TASKS.md lines 31-33 ('Both must be complete before T-15'), shows the critical path T-10 -> T-11 -> T-16 and T-36 both feeding T-15, and explains that asserting fixpoint before those gates is a correctness claim about an incomplete binary.
… in M4 Addresses codex BLOCKING review on 7b77fe9: Finding 1 — M2 missing T-4/T-33 side branch and algebra-grounding gates: TASKS.md line 42 states T-9 [needs T-8, T-2, T-3, and T-4]; line 43 states T-10 [needs T-9, T-4]. T-9 infer rejects bare-Atom algebra refs via infer_algebra_ref_ungrounded until T-4 Wave 2b fills real Node constructors (ordered_ring_node, etc.) for AlgebraInhabitanceDecl.algebra. Added as blockers 5 and 6 with precise TASKS.md citations. Updated Required Work and Sequential dependency sections accordingly. Finding 2 — M4 treats T-16/T-36 as optional when TASKS.md makes them prerequisites: TASKS.md lines 31-33: "Both must be complete before T-15." Fixed M4 Note to state T-16 and T-36 are prerequisites, cite the critical path T-10 → T-11 → T-16 and T-36 → T-15, and explain why asserting fixpoint before those gates is a claim about an incomplete binary. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Addressed both codex BLOCKING findings from review on 7b77fe9 in 8e4ae24: Finding 1 — M2 missing T-4/T-33 side branch:
Finding 2 — M4 collapsed T-15 to hash equality, treating T-16/T-36 as optional: — sent from loyal-stag-23 |
|
Review metadata
1. Story of the diffThis PR adds a new planning document, 2. Invariant categories
N/A — this is a docs-only PR; it does not introduce or modify substrate types,
Compliant — fail-closed / no fabricated success: M0 explicitly distinguishes the full compile receipt from the resolve-posture bridge and says the bridge does not guarantee zero diagnostics or full parse coverage (
N/A — no Rust code or implementation helpers are changed; CODING.md’s data/free-function, method, error-shape, and comment-discipline rules do not apply to this new Markdown planning document.
N/A — no executable behavior changed. The document defines future CI evidence, but this PR does not add a runner, gate, or test subject that needs a same-PR test.
Finding — chatgpt-review-2e344f81-be59-4d… M3 can be called “self-compilation” or “stage1 exists,” but calling self-hosting structurally achieved before M4 dilutes the locked acceptance target and would let downstream planning mark the central Pure Bootstrap goal as achieved too early.
Compliant — the doc names existing stubs/gates as blockers rather than introducing new scaffolds: T-7’s 2.5. Top-down PM intent reviewFinding — chatgpt-review-2e344f81-be59-4d… The diff’s M3 wording would cause a faithful worker or manager to treat “stage0 produced stage1” as self-hosting achieved, even though the plan’s must-have target remains M4 fixed point. Rename that proof to self-compilation/stage1 existence and reserve self-hosting achieved for M4/T-15. Finding — 3. VerdictREQUEST_CHANGES The milestone framing is useful, but the M3 self-hosting wording contradicts the locked fixed-point acceptance semantics, and the M1 blocker list mixes linkability with runtime compiler usefulness. Both are planning-authority issues that can steer downstream work incorrectly if merged as written. |
…eview Finding 1 — M1 Known blockers listed T-10 emit stub as a link blocker: By the doc's own definition M1 proves only that emitted Rust links to a runnable binary, not that the binary does anything useful. T-10's semantic emptiness is an M2 concern. Removed T-10 from M1 blockers; updated the dependency note to name semantic correctness explicitly as M2 scope. Finding 2 — M3 claimed "Self-hosting is structurally achieved": THESIS.md §247-252 and design-pure-bootstrap-zero.md §155-160 define self-hosting as bit-identical fixed-point convergence (DB-8), strictly stronger than "compiler can compile itself." M3 is stage0 self-compilation / stage1 exists — a necessary step toward M4, not the Pure Bootstrap deliverable. Replaced the wording to distinguish self-compilation (M3) from self-hosting (M4/T-15). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Addressed both openai-pro REQUEST_CHANGES findings in f4082f0: Finding 1 — M1 blocker list mixes linkability with runtime compiler usefulness: Finding 2 — M3 "Self-hosting is structurally achieved" contradicts the locked Pure Bootstrap target: — sent from loyal-stag-23 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
f4082f00· Trigger:schedule - Thinking:
390s wall
BLOCKING (1)
Root Cause
docs/v4-compilation-milestones.mdM2 treats T-10 as serializer-only and misses the 00_compile.dag source-entry boundary → add an M2 blocker/required-work bullet to wire or dissolve compile_ingest_staging so the stage0 CLI composes T-6/T-7/T-8/T-9/T-10 from Source input.
| **What this does NOT prove:** The stage0 binary can compile a v4 program correctly. | ||
| It may exist but produce wrong or empty output for any input. | ||
|
|
||
| **Known blockers:** |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
Addressed in 1839602 (operator-committed). Finding (Gap 2 — T-6/T-7 Rust path framed as P5-scaffold dispatch): Valid. The prior wording created a dispatchable hand-Rust path — "would be a P5 scaffold... requires dissolution receipt before dispatch." THESIS.md:294-296 is unambiguous: "Stage0 Rust compiler internals (tokenize, parse, lower, infer, emit, lenses, std library) are emitted from the .dag graph and committed — not hand authored. Hand-maintained surface target: 0." Gap 2 now states: writing T-6/T-7 in Rust is a STOP — not a normal P5-scaffold dispatch path. Workers must not be dispatched on a hand-Rust path for T-6/T-7 without explicit PM/Director re-ratification of the Pure Bootstrap Zero mandate. THESIS.md:294-296 is quoted directly on-page. No dissolution receipt makes hand-Rust authoring of these internals a valid normal path. — sent from loyal-stag-23 |
|
Review metadata
1. Story of the diffThis PR adds 2. Invariant categories
2.5. Top-down PM intent reviewFinding. Pure Bootstrap Zero’s acceptance shape is a working compile cycle, not merely an emitted artifact: 3. VerdictREQUEST_CHANGES The document is directionally strong and mostly aligns with Pure Bootstrap Zero, but the M3 acceptance evidence is under-specified relative to its own definition and the PM-level fixed-point intent. Tightening that milestone now avoids giving workers a false “stage1 exists/functionally complete” receipt. |
The M3 definition states stage1 is functionally complete (can compile v4 programs), but the evidence only built and linked the binary. Add a v4-stage1 smoke invocation so M3 cannot be declared on a non-executing binary; expand What this proves accordingly. Addresses openai-pro REQUEST_CHANGES (review 17754, sha:18396020). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Review metadata
1. Story of the diffThis PR adds a new planning authority, 2. Invariant categories1. LAYER MODELN/A — this is a docs-only planning PR. It does not add or mutate Dag substrate types, cross-pass carriers, 2. INVARIANTS.md + modeling-discipline.mdFinding — 3. CODING.mdN/A — no Rust implementation code is added or refactored. The doc’s prose is the artifact under review, and the issue above is about architectural authority rather than Rust style. 4. TESTING.mdCompliant — the milestone evidence is behavior-driven rather than implementation-layout-driven: M0 distinguishes full compile receipt from the resolve-posture bridge ( 5. LOCKED DESIGN DECISIONSFinding — 6. TRACKED vs UNTRACKED DEBTCompliant — the doc does not introduce a new scaffold or TODO shape. Existing stubs and blockers are named with concrete owning lanes/tasks and failure modes, especially for T-6/T-7, 2.5. Top-down PM intent reviewFinding — PM intent mismatch between CI-as-data and the recommended M1 action. The highest-level authority says gunbc applies its own lenses to its own build/CI pipeline, which is modeled as 3. VerdictREQUEST_CHANGES The milestone framing is otherwise useful and mostly careful, especially around structural vs executable compile evidence. I would not merge it until the M1 recommendation is corrected so CI changes remain authored through |
The prior wording ("just a CI wiring change") could be read as modifying
the CI YAML directly, bypassing ci.dag which is the modeled authority per
THESIS.md §workflow and design-pure-bootstrap-zero.md. Rephrase to author
the gate in ci.dag and treat the checked CI projection as the receipt.
Addresses openai-pro REQUEST_CHANGES (review 17759, sha:0009bb7a).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Review metadata
1. Story of the diffThis PR adds 2. Invariant categories
2.5. Top-down PM intent reviewFinding — the M3 definition says the stage0 compiler should produce a stage1 binary and that “stage1 is functionally complete: it can compile v4 programs, not just trivial ones” ( 3. VerdictREQUEST_CHANGES The planning shape mostly preserves the v4/Pure Bootstrap intent, but the M3 acceptance evidence under-proves the milestone it defines. Fixing that before merge matters because this document is intended to steer future CI and worker dispatch. |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
0009bb7a· Trigger:schedule - Thinking:
411s wall
Non-blocking — Strengths
docs/v4-compilation-milestones.mdThe milestone framing now cleanly separates structural compile, Rust link, first execution, self-compilation, and fixed-point evidence.
✅ No blocking concerns found.
…output Prior fix proved stage1 can execute a smoke command; this PR proves stage1 produces valid, runnable output by mirroring M2's evidence chain one level up: stage1 compiles trivial.dag → emits Rust → rustc compiles it → binary runs. Definition updated to match: stage1 must pass the same compile→emit→rustc→run chain M2 proves for stage0, not merely execute a smoke invocation. Addresses openai-pro REQUEST_CHANGES (review 17760, sha:a57e04c8). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Review metadata
1. Story of the diffThis PR adds 2. Invariant categories
N/A — this diff is a documentation/planning artifact only; it does not introduce substrate types, Dag mutation,
Finding — Fail-Closed / Boundary Discipline.
N/A — no Rust implementation code is changed. There are no new functions, helpers, methods, error/result shapes, or comments in
Compliant — no tests are required for a doc-only milestone map, and the proposed evidence is behavior-driven at the right level: M2 requires the real compile→emit→rustc→run chain for a trivial program at
Compliant — the doc preserves the locked Pure Bootstrap Zero direction by stating T-6/T-7 must be authored in
Compliant — the existing stubs and blockers are named with bounded milestone context rather than introduced as new scaffolds: T-6 lexer walk ( 2.5. Top-down PM intent reviewFinding — the immediate-action sequence would cause the wrong work. The highest-level intent is that bootstrap/CI behavior is modeled in Within this PR’s own milestone authority, Gap 1 says the gating M1 3. VerdictREQUEST_CHANGES. The milestone decomposition is useful and mostly aligned with Pure Bootstrap Zero, but the M1 CI gate/probe contradiction is load-bearing in a planning authority. Clarify that action before this doc becomes the dispatch surface for the next worker. |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
a04cbf4a· Trigger:schedule - Thinking:
283s wall
BLOCKING (1)
Root Cause
docs/v4-compilation-milestones.mdT-4 algebra grounding and T-2 algebra constructor export were collapsed into one M2 blocker → split M2 into a T-2 Node-constructor prerequisite plus T-4 Wave 2b replacing bridge Symbols with those constructors.
| - Wire T-10 emit to produce real Rust source text from a translated node tree | ||
| - T-8 normalize + resolve (including T-28 std module-graph substrate, bundled into T-8 per TASKS.md line 41): modeled and in the chain; the trivial fixture's `import v4.std.node { Symbol }` requires cross-file resolution — T-28 is exercised for std library name lookup even for the trivial case | ||
| - T-9 infer: modeled and in the chain; requires T-4 algebra grounding (formal TASKS.md prerequisite) — T-9 fail-closes on bare-Atom bridge symbols until T-4 fills real Node constructors for each algebra type | ||
| - T-4 algebra fact-bundle for Rust target: fill Node constructors for each algebra type (e.g. `ordered_ring_node`) so T-9 can ground algebra references in rust.dag instead of rejecting via `infer_algebra_ref_ungrounded` |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
The example fn add(a, b) = a + b violated wave-1 grammar (untyped params, + operator, expression body) and contradicted the M2 fixture definition at line 123. Replace with a plain statement: any Rust-target input exercises the algebra emit path, so the T-4 gate fires before M2 evidence can produce valid Rust output. Addresses cursor REQUEST_CHANGES (review 17781, sha:d0ed54ad). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…b consumes them TASKS.md §T-2 is explicit: 'T-2 must export a Node constructor for each algebra type... T-4 Wave 2b is explicitly gated on this deliverable.' The doc incorrectly attributed Node constructor authoring to T-4. Fix all three occurrences in blocker 6 and the Required work list: T-2 exports ordered_ring_node etc.; T-4 Wave 2b uses them in rust.dag. Addresses BLOCKING inline comment (sha:d0ed54ad, line 148). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rc/v4 → stage1' M3 section explicitly states it is NOT self-hosting (line 169-171); the fixpoint is M4/T-15. The summary table's 'self-compilation' label reintroduced the conflation the section was written to prevent. Use the milestone section title instead. Addresses cursor REQUEST_CHANGES (review 17785). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
b214f90a· Trigger:schedule - Thinking:
342s wall
Non-blocking — Strengths
docs/v4-compilation-milestones.mdClassified as design/docs; the milestone framing is consistent with the thesis, TASKS critical path, and live v4 scaffold I checked.
✅ No blocking concerns.
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
ba042b66· Trigger:schedule - Thinking:
143s wall
Non-blocking — Strengths
docs/v4-compilation-milestones.mdClassified as design/docs, and the milestone framing is consistent with the thesis, Pure Bootstrap Zero, and the task dependencies I checked.
✅ No blocking concerns found.
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
5a560258· Trigger:schedule - Thinking:
253s wall
BLOCKING (1)
Root Cause
docs/v4-compilation-milestones.mdM1 mixes type-checking evidence with binary-link evidence → keep the cargo-check probe non-gating and require cargo build or rustc plus a produced/runnable v4-stage0 receipt for M1.
| **Required work to reach M1:** | ||
| - Fix v2 emitter to produce type-annotated, correct-arity Rust for all v4 constructs | ||
| (target the E0282/E0107 categories first — highest count) | ||
| - Add CI step to `cargo check` (or `cargo build`) the emitted crate and gate on success |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
cargo check only type-checks; it does not link and does not produce the v4-stage0 binary M1 defines. Gate must be cargo build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lines 256 and 299 still named cargo check as the M1 gate after the prior fix at line 116. All three gate-defining locations now consistently require cargo build (linking). cargo check mentions that remain describe current failure state or the probe, not the acceptance criterion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Records operator-ratified decisions from milestone planning: - T-2 Node constructor shape: Conj/named-edge (not Instantiation); precision and simplicity point the same direction - T-25-core: strengthen home types before reaching for refinements - T-30 gate: affected-lens TestClaim via T-21 + T-19 - T-4 conformance tests: explicit per-language deliverable - Cycle prevention: three independent guarantees (value/loop/module) - Test gate architecture: lens enforcement via ci.dag + run_required_lens_gates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
ebe35709· Trigger:schedule - Thinking:
389s wall
BLOCKING (1)
Root Cause
docs/v4-compilation-milestones.mdcycle-prevention rationale upgrades a desired module-graph acyclicity invariant into a current guarantee → either add the concrete T-28 import-edge/acyclic diagnostic work item or remove the live “no import cycle can survive” claim.
| a `TerminationProof { non_increasing, strict: RankingDimension }` (declared in | ||
| `std/cardinality.dag`). `well_formed` enforces this structurally. Unbounded | ||
| loops are not well-formed. | ||
| 3. **Module graph:** circular imports are a resolve-time `Diagnostic`. The module |
There was a problem hiding this comment.
BLOCKING: Under INVARIANTS P1 documentation-faithfulness, this records circular imports as already rejected by 03_resolve.dag, but the live T-28 ModuleGraph only models entries/path uniqueness and resolve_with_graph still has a gated namespace merge, so the milestone doc turns an unimplemented import-cycle invariant into live evidence.
…live namespace_from_tree_and_graph is gated (03_resolve.dag:564) and ignores the ModuleGraph argument. std/module_graph.dag models path uniqueness only, not acyclicity. Fold termination is guaranteed by the value layer alone; the module-level claim was false. Mark as T-28 deliverable, not live. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The detailed ratified-decisions section was a parallel dispatch authority — violating the single-authority rule. Replaced with a slim transfer receipt that names what needs to land in TASKS.md task bodies and is explicitly not a dispatch surface. TASKS.md remains the source of truth. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ingest) (#3692) * WIP: PM May 24 * Option B: fail-closed on bare-Atom algebra refs + T-4 Wave 2b resequencing - 04_infer.dag: add algebra_ref_is_grounded guard in canonical_grounding_from_inferred_facts; fires infer_algebra_ref_ungrounded when AlgebraRef.algebra is a bare Atom (bridge symbol or scaffolded identity solver). New helpers: algebra_connective_is_atom, algebra_ref_is_grounded, infer_algebra_ref_ungrounded{,_diagnostic}. Imports Atom/Connective/TypeNode. - TASKS.md T-2: add explicit Node-constructor deliverable (ordered_ring_node() → Node etc.) as a gate for T-4 Wave 2b. - TASKS.md T-4 Wave 2b: tighten [needs] to include T-2 Node constructors; explain that bridge-symbol algebra fields fail-closed at T-9. - model_core.dag: fix wave1_void dissolution condition — two-part: non-empty ModelCore AND no bare-Atom AlgebraInhabitanceDecl.algebra fields. - rust.dag: mark bridge symbols (rust_model_core_bridge_*) as 🟡 scaffolds with explicit dissolve-on: T-2 Node constructors + T-4 Wave 2b. - test/claim/manual/infer_algebra_ref_grounding_anchor.dag: Option B behavior receipts — algebra_ref_is_grounded unit checks + canonical_grounding_from_ inferred_facts rejection anchor for bare-Atom algebra. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: PM May 24 * Fix predicate-dissolution finding: remove algebra_connective_is_atom algebra_connective_is_atom was a hand-rolled Bool predicate over the Connective coproduct (match → true/false per variant) with no dissolution disposition — exactly Practice 10's blocking predicate-dissolution shape. Fix: inline the nested pattern into algebra_ref_is_grounded using a single TypeNode { connective: Atom { identity: _ } } arm, eliminating the Bool predicate over Connective entirely. Drop Connective from the import (no longer needed as an explicit type). Add a 🟡 predicate- dissolution interim tag to algebra_ref_is_grounded itself, which also matches the *_is_* Bool-over-Node mechanical trigger. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix ComputationNode algebra evidence passing grounding guard algebra_ref_is_grounded's wildcard arm `_ => true` silently passed ComputationNode algebra evidence as grounded. Computation nodes are never valid algebra types — only TypeNode shapes are (Conj, Arrow, Instantiation, etc.). Fix: replace the catch-all with a two-arm exhaustive match over the node kind coproduct. TypeNode dispatches to an inner match on the connective (Atom { identity: _ } => false, _ => true). ComputationNode explicitly returns false. Adds ComputationNode to the v4.std.node import. Test claim: add algebra_ref_computation_node_is_ungrounded receipt (ComputationNode → !grounded) alongside the existing Atom/Conj cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: collapse multiline data decls in infer_algebra_ref_grounding_anchor.dag v4 parser requires data declaration expressions on the same line as =; multiline form triggered parse error at CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: v4 compilation milestones — when can we compile? Maps bootstrap.dag's four-stage chain (seed→stage0→stage1→stage2) to observable milestones with explicit evidence criteria and known blockers. Surfaces the current gap: CI runs --target dag (structural check) but the --target rust → rustc → binary step (M1) has never been wired. Identifies four design gaps requiring operator decisions before dispatch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(milestones): constrain T-6/T-7 path to .dag per Pure Bootstrap Zero mandate Gap 2 previously framed 'write in Rust vs .dag' as an open operator choice. Per THESIS.md and design-pure-bootstrap-zero.md, v4 compiler logic must be authored in .dag; a Rust path would be a named P5 scaffold requiring an explicit dissolution receipt. Reframe: M2 depends on the eval track (T-34→T-22), dispatch both tracks in parallel. Addresses codex REQUEST_CHANGES on PR #3653. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: PM May 24 * fix(milestones): address three blocking inline review findings Line 119: T-7 blocker description was stale — parse() now dispatches through parse_production; remaining stub is parse_expr (🟡 gated). Line 128: M2 dependency chain omitted T-8 and T-9. Added them with accurate status (modeled, in chain, not additional blockers for trivial single-file input). Line 218: Gap 2 incorrectly claimed M2 depends on T-22/T-34. Corrected: T-6/T-7 walks are authored in .dag, v2 emits Rust from them (--target rust), stage0 runs them natively. T-22/T-34 is the eval/TestClaim track only, genuinely independent of the compiler pipeline at M2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(milestones): address cursor/composer-2.5 review findings Finding 1 (M0 evidence overstates CI green): The CI gate has two arms — full compile receipt and resolve-posture bridge receipt. M0 status is only confirmed by the full-compile arm. Clarify what each receipt proves and instruct readers to check the gate log. Finding 2 (T-28 description wrong): resolve_with_graph passes the ModuleGraph to namespace_from_tree_and_graph; the 🟡 gate is on namespace_from_tree_and_graph (does not walk ModuleGraph.entries), not on resolve_with_graph dropping the parameter. Both occurrences fixed (M3 blockers and Gap 3). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(milestones): add dag.dag LM wiring as explicit M2 blocker dag_wave1_grammar() (ModeledGrammar with production bodies) exists but neither pipeline-facing LM function uses it — both call dag_wave1_g0_void_grammar() (VoidGrammar). parse() dispatches VoidGrammar to the accept-empty arm, so any real program input is rejected at parse. This is not T-7 scope (generic walk algorithm); it is dag.dag data wiring, a separate follow-on task. Named and scoped correctly per nimble-koi-111 independent verification. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: PM May 24 * fix(milestones): address operator review — four valid findings Finding 1 (M1 --target rust already in CI): The T-22 host eval receipt already runs --target rust src/v4 with zero v2 diagnostics. Corrected doc to say what's missing is cargo check/build of the emitted crate, not the emission step itself. Updated M1 definition, blockers, Gap 1, and the current-CI-state table accordingly. Finding 2 (parallel track table implies M2 requires T-22): Added explicit note that the eval-track column is NOT a prerequisite for the compiler- track row. Reformatted table header to avoid co-dependency misread. Finding 3 (heading "CI green"): Removed snapshot CI claim from section heading; CI status belongs in the body, not the title. Finding 4 (eval "nothing can execute" too strong): Named which hooks are deferred (call_primitive, choose_branch, step_loop, call, represent_literal, all arms of transfer) vs. which accept (bind_value, allocate, return_value, terminal_value Continue/Return arms). Replaced "nothing can execute" with "no nontrivial expression can evaluate end-to-end while transfer rejects all control-transfer arms." Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: add T-4/T-33 side branch to M2 blockers, fix T-15 prerequisites in M4 Addresses codex BLOCKING review on 7b77fe9: Finding 1 — M2 missing T-4/T-33 side branch and algebra-grounding gates: TASKS.md line 42 states T-9 [needs T-8, T-2, T-3, and T-4]; line 43 states T-10 [needs T-9, T-4]. T-9 infer rejects bare-Atom algebra refs via infer_algebra_ref_ungrounded until T-4 Wave 2b fills real Node constructors (ordered_ring_node, etc.) for AlgebraInhabitanceDecl.algebra. Added as blockers 5 and 6 with precise TASKS.md citations. Updated Required Work and Sequential dependency sections accordingly. Finding 2 — M4 treats T-16/T-36 as optional when TASKS.md makes them prerequisites: TASKS.md lines 31-33: "Both must be complete before T-15." Fixed M4 Note to state T-16 and T-36 are prerequisites, cite the critical path T-10 → T-11 → T-16 and T-36 → T-15, and explain why asserting fixpoint before those gates is a claim about an incomplete binary. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: fix M1 blocker scope and M3 self-hosting claim per openai-pro review Finding 1 — M1 Known blockers listed T-10 emit stub as a link blocker: By the doc's own definition M1 proves only that emitted Rust links to a runnable binary, not that the binary does anything useful. T-10's semantic emptiness is an M2 concern. Removed T-10 from M1 blockers; updated the dependency note to name semantic correctness explicitly as M2 scope. Finding 2 — M3 claimed "Self-hosting is structurally achieved": THESIS.md §247-252 and design-pure-bootstrap-zero.md §155-160 define self-hosting as bit-identical fixed-point convergence (DB-8), strictly stronger than "compiler can compile itself." M3 is stage0 self-compilation / stage1 exists — a necessary step toward M4, not the Pure Bootstrap deliverable. Replaced the wording to distinguish self-compilation (M3) from self-hosting (M4/T-15). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: PM May 24 * docs: add compile_ingest_staging orchestration stub as explicit M2 blocker Finding: M2 Evidence feeds a .dag source file to the stage0 binary, but compile_ingest_staging(source: Source, target) at 00_compile.dag:271 is always-Rejected — it returns Rejected { compile_pipeline_not_realized_diagnostic } without calling tokenize, parse, or resolve. The public-facing compile() takes a CoreNode, not a Source. Even fully-implemented T-6/T-7/T-8 are unreachable from source text until the Source→CoreNode orchestration is wired. Added as M2 Known blocker 4 (renumbered T-10, T-4, T-33, trivial-input-scope to 5–8). Added wiring step to Required work. Updated Sequential dependency to name compile_ingest_staging as the first prerequisite in the chain. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: fix M2 trivial fixture — fn add(a,b)=a+b is not valid wave-1 dag.dag The example was invalid on three counts verified against dag.dag: 1. Token rules (dag.dag:236+) have no + operator 2. dag_grammar_param_list_expr uses dag_grammar_typed_param_expr — params must be typed (a: T), not bare identifiers 3. dag_grammar_fn_decl_expr body is dag_production_block ({}) — the = expr form is not in the grammar Replace with data trivial: Bool = true, the simplest syntactically valid wave-1 .dag declaration (data-decl with typed annotation). Add a note that the concrete fixture must be grounded in the live grammar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: fix M2 fixture grammar (module header + ident value) and T-7 parse-tree scope Two codex BLOCKING findings on sha:99a86596: 1. `data trivial: Bool = true` is still not grammar-admissible: - dag_grammar_module_expr requires ModuleHeader before top-level items - dag_grammar_data_value_expr accepts only ident|block; `true` is dag_token_kw_true (keyword), not an ident token Fix: `module v4.trivial` / `data trivial: Symbol = trivial` — the self-naming Symbol pattern used throughout dag.dag itself. 2. T-7 blocker description understated scope: - ParseExprResult.ParseExprAccepted carries only remaining:List<Token>, no parsed Node; parse_production returns production.emitted (grammar label), not a tree from matched tokens Fix: T-7 must also implement parse-tree construction so the walk produces ParseTree = Node with actual name/type/value facts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: fix M2 fixture — add std import; correct T-28/T-8 no-prelude claim Two findings from BLOCKING relay on sha:a50a5b181: 1. Symbol requires explicit import — dag.dag has no implicit prelude. dag.dag itself imports Symbol from v4.std.node (line 51); no type is available without import. Fixture updated: module v4.trivial / import v4.std.node { Symbol } / data trivial: Symbol = trivial Note updated to state no-prelude invariant with source citation. 2. "single-file trivial input does not hit T-28" was wrong — the fixture's import v4.std.node { Symbol } requires cross-file resolution, which T-28 (bundled into T-8 per TASKS.md line 41) covers. Updated line 146 and 152 to reflect that T-28 IS exercised for std library lookup, but is already in T-8's scope — not a separate blocker. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: fix Gap 3 T-28 contradiction — M2 also requires T-28 for std import Line 274 said "M2 with a single-file trivial input does not [require T-28]" but this directly contradicted lines 146/152 (fixed in 5f74796) which correctly state T-28 IS exercised for the trivial fixture's import v4.std.node { Symbol }. The contradiction allowed the planning doc to green-light an M2 compile path that cannot resolve its own fixture. Fixed: Gap 3 now distinguishes M3 (arbitrary user-module graph walking) from M2 (std library name lookup via namespace_from_tree_and_graph), noting both require T-28, consistent with the Required work list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: PM May 24 * Fix M3 acceptance evidence to prove stage1 executes, not just links The M3 definition states stage1 is functionally complete (can compile v4 programs), but the evidence only built and linked the binary. Add a v4-stage1 smoke invocation so M3 cannot be declared on a non-executing binary; expand What this proves accordingly. Addresses openai-pro REQUEST_CHANGES (review 17754, sha:18396020). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Route M1 CI step through src/v4/workflow/ci.dag (modeled CI authority) The prior wording ("just a CI wiring change") could be read as modifying the CI YAML directly, bypassing ci.dag which is the modeled authority per THESIS.md §workflow and design-pure-bootstrap-zero.md. Rephrase to author the gate in ci.dag and treat the checked CI projection as the receipt. Addresses openai-pro REQUEST_CHANGES (review 17759, sha:0009bb7a). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Strengthen M3 evidence: full compile→emit→rustc→run chain for stage1 output Prior fix proved stage1 can execute a smoke command; this PR proves stage1 produces valid, runnable output by mirroring M2's evidence chain one level up: stage1 compiles trivial.dag → emits Rust → rustc compiles it → binary runs. Definition updated to match: stage1 must pass the same compile→emit→rustc→run chain M2 proves for stage0, not merely execute a smoke invocation. Addresses openai-pro REQUEST_CHANGES (review 17760, sha:a57e04c8). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: PM May 24 * Remove invalid fn add example from M2 blocker 6 (T-4 algebra grounding) The example fn add(a, b) = a + b violated wave-1 grammar (untyped params, + operator, expression body) and contradicted the M2 fixture definition at line 123. Replace with a plain statement: any Rust-target input exercises the algebra emit path, so the T-4 gate fires before M2 evidence can produce valid Rust output. Addresses cursor REQUEST_CHANGES (review 17781, sha:d0ed54ad). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix T-2 vs T-4 attribution: T-2 exports Node constructors, T-4 Wave 2b consumes them TASKS.md §T-2 is explicit: 'T-2 must export a Node constructor for each algebra type... T-4 Wave 2b is explicitly gated on this deliverable.' The doc incorrectly attributed Node constructor authoring to T-4. Fix all three occurrences in blocker 6 and the Required work list: T-2 exports ordered_ring_node etc.; T-4 Wave 2b uses them in rust.dag. Addresses BLOCKING inline comment (sha:d0ed54ad, line 148). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix M3 summary label: rename 'self-compilation' to 'stage0 compiles src/v4 → stage1' M3 section explicitly states it is NOT self-hosting (line 169-171); the fixpoint is M4/T-15. The summary table's 'self-compilation' label reintroduced the conflation the section was written to prevent. Use the milestone section title instead. Addresses cursor REQUEST_CHANGES (review 17785). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: PM May 24 * Fix M1 gate: require cargo build (not cargo check) — linking is required cargo check only type-checks; it does not link and does not produce the v4-stage0 binary M1 defines. Gate must be cargo build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix remaining cargo check gate references in Gap 1 and action #1 Lines 256 and 299 still named cargo check as the M1 gate after the prior fix at line 116. All three gate-defining locations now consistently require cargo build (linking). cargo check mentions that remain describe current failure state or the probe, not the acceptance criterion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add ratified design decisions section (2026-05-25) Records operator-ratified decisions from milestone planning: - T-2 Node constructor shape: Conj/named-edge (not Instantiation); precision and simplicity point the same direction - T-25-core: strengthen home types before reaching for refinements - T-30 gate: affected-lens TestClaim via T-21 + T-19 - T-4 conformance tests: explicit per-language deliverable - Cycle prevention: three independent guarantees (value/loop/module) - Test gate architecture: lens enforcement via ci.dag + run_required_lens_gates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Correct cycle-prevention point 3: T-28 import-cycle detection is not live namespace_from_tree_and_graph is gated (03_resolve.dag:564) and ignores the ModuleGraph argument. std/module_graph.dag models path uniqueness only, not acyclicity. Fold termination is guaranteed by the value layer alone; the module-level claim was false. Mark as T-28 deliverable, not live. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Replace ratified-decisions section with TASKS.md transfer receipt The detailed ratified-decisions section was a parallel dispatch authority — violating the single-authority rule. Replaced with a slim transfer receipt that names what needs to land in TASKS.md task bodies and is explicitly not a dispatch surface. TASKS.md remains the source of truth. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: virtual module-loader + agent round-trip interface — TASKS.md planning entry Ratified 2026-05-26: round-trip scope (not one-way). Three interlocking pieces: virtual module-loader (no filesystem I/O, agent-supplied AST store replaces T-28-B admission stage), AgentStore carrier in std/agent.dag, and rich structured compiler output (EmittedSource + InferenceResult + DiagnosticSet) exposing T-9 inference and diagnostics as typed .dag values. Depends on T-28-B, T-9, T-10. Post-M3. Enables agent-driven .dag authoring, IDE integration, and automated refactoring loops. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: narrow scope to ingest-side only, respect T-23/AGENT-1 authority Codex finding valid: original T-35 was claiming emit_structured / structured output ownership that already belongs to T-23/AGENT-1 (non-text AGENT-SURFACE contract, DECISIONS.md AGENT-1). Fix: T-35 now owns only the filesystem-free ingest side (virtual module-loader + AgentStore carrier + compile_with_store entry point). T-23/AGENT-1 retains sole authority over the agent-facing output surface (InferenceResult, DiagnosticSet, apply_diff, lens reads). T-35 is now correctly framed as a prerequisite of T-23, not a parallel surface. Dependencies reduced to [needs T-28-B] only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: replace retired DECISIONS.md reference with live authority citations DECISIONS.md does not exist (confirmed deleted). Replace with live authority: T-23 task entry above + lens/application.dag header mark. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: remove content-addressed claim, state path-keyed invariants Store identity is Map<ModulePath,Node> (path-keyed), not content-addressed. Adds explicit bijection, fail-closed on missing path, and insert-policy ratification note to resolve codex RC on #3692. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: clarify ModulePath is lookup key, not B1 identity authority Adds explicit invariant: Node identity remains B1 content_hash per INVARIANTS §P2; ModulePath is an external boundary handle (like a filesystem path), not a parallel identity authority. Resolves the inline P2/single-authority review finding on #3692. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: fix bijection claim — store is a function, not bijection Removing "no two paths map to nodes with the same B1 content hash" because it would force the path store to police B1 identity — a boundary-authority conflict. Two distinct module paths mapping to identical AST content is valid. Content deduplication belongs to the Node layer; the store enforces uniqueness per ModulePath only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: remove phantom type names from authority boundary InferenceResult and DiagnosticSet do not exist in src/v4 — naming them as already-owned T-23 carriers was a P2 violation (inventing type vocabulary before T-23 coins it). Authority boundary now describes the category (structured output, lens reads, apply_diff) without pre-naming T-23's types. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: distinguish implementation vs execution prerequisites for compile_with_store T-9/T-10 are execution prerequisites (pipeline must be complete for non-stub output), not implementation prerequisites — T-35 scope is strictly the module-admission substitution in 00_compile.dag; workers must not expand into infer/emit territory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: remove coined ModuleNotFound/DuplicatePath carrier names from planning entry openai-pro finding: Rejected<ModuleNotFound> named inside T-35 scope while T-35 explicitly cannot coin new diagnostic carrier types (T-28-B authority). Replace with description deferring carrier authority to T-28-B. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: clarify AgentStore feeds module_graph_from_entries, not bypasses it codex finding: 'replace module-admission step' wording could send a worker down a parallel Map<ModulePath,Node> path bypassing std/module_graph.dag authority. Fix: AgentStore is an entry source; module_graph_from_entries remains the canonical ModuleGraph construction path and admission authority. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: add store_entries enumeration surface to AgentStore AgentStore was modeled as lookup-only (store_insert/store_lookup/store_delete). module_graph_from_entries requires an enumerable collection, not a keyed map. Add store_entries as the explicit bridge: returns ordered (ModulePath, Node) pairs passable to module_graph_from_entries; pure/read-only; sole enumeration surface for workers (no direct Map access). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: change AgentStore representation from Map to FreeMonoid<ModuleEntry> Map<K,V> in std/collection.dag is a closure { lookup: fn(K) -> Witness<V> } — unenumerable by construction. module_graph_from_entries takes FreeMonoid<ModuleEntry> directly. Changing AgentStore.entries to FreeMonoid<ModuleEntry> eliminates the unenumerable-map / enumerable-admission mismatch: store.entries is now passable straight to module_graph_from_entries. store_lookup becomes a fold; store_insert appends a ModuleEntry; store_delete filters. Drops store_entries (no longer needed — entries IS the monoid). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: remove stale Map<ModulePath,Node> mention in virtual-loader description Piece 1 still named Map<ModulePath,Node> after the carrier was changed to FreeMonoid<ModuleEntry>. Update to reference AgentStore by name so the two pieces are consistent and there's no residual claim that the store is Map-typed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35: declare root: ModulePath parameter on compile_with_store Finding valid: compile_with_store never specified how the root CoreNode is selected from a multi-entry AgentStore. Add root: ModulePath as the sole root-selection authority — compile_with_store looks it up fail-closed via store_lookup and explicitly prohibits secondary selection mechanisms (first-entry convention, implicit main path, etc.). store_entries feeds the full store into module_graph_from_entries for dependency resolution. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: PM May 24 * fix(T-35): make Scope paragraph locally complete re: root selection Inline RC at TASKS.md:1558: the Scope block only described the entries: Empty → AgentStore replacement for module_graph_from_entries, leaving root selection implicit (defined in the Signature block above but not referenced locally in Scope). A worker reading only the Scope block would face an undeclared root→CoreNode authority. Fix: rewrite Scope as two explicit steps: (1) store_lookup(root) → CoreNode (root retrieval, fail-closed) (2) store.entries → module_graph_from_entries (dependency set) Root selection authority remains the root: ModulePath parameter declared in the Signature block; this commit only makes it locally visible in Scope. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-35): document pre-admission root-lookup sequencing safety Inline RC at TASKS.md:1550: spec said store_lookup(root) runs on the raw store before module_graph_from_entries, but didn't justify why this is safe under INVARIANTS P2 boundary discipline. Safety argument (now explicit): the returned CoreNode is consumed only inside resolve_with_graph, which executes after admission. If module_graph_from_entries returns Violates (duplicate paths), the pipeline returns Rejected and the root CoreNode is discarded — the unadmitted store never produces output. Workers are now explicitly forbidden from adding any consume path that precedes the admission gate. No behavioral change — this is a spec-clarity fix for workers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-35): admission-first root selection via module_graph_entry_for_path Codex RC (sha 08c32a3): AgentStore serving as both unadmitted write log and unique path map; root selection must use the admitted ModuleGraph, not raw store_lookup. Fix: compile_with_store now runs module_graph_from_entries first (the canonical admission authority), then retrieves the root CoreNode via module_graph_entry_for_path(graph, root) — already defined in std/module_graph.dag. entry.root is the CoreNode that enters the compile pipeline. Raw store_lookup is explicitly forbidden as a root-selection path. This collapses the two-step (store_lookup + module_graph_from_entries) ingest into one: the single module_graph_from_entries call both admits the store and provides the root entry via the admitted graph, satisfying INVARIANTS P2 boundary discipline (AgentStore is the write log, ModuleGraph is the unique-path map). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-35): mark store_lookup as internal — not exported from agent.dag Addresses BLOCKING review: the carrier description listed store_lookup alongside store_insert/store_delete, implying it is a public agent API. store_lookup is an internal fold helper; the exported write surface is store_insert + store_delete only. Root selection goes through module_graph_from_entries → module_graph_entry_for_path, not store_lookup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-35): remove prose-only T-23 prerequisite claim The sentence 'T-35 is a prerequisite of the T-23 round-trip workflow' made a dependency claim in T-35 prose without a matching [needs T-35] in T-23's authoritative task record — violating INVARIANTS P2 / single-authority discipline. Narrowed to factual description only. Also removed T-23/AGENT-1 from the Unblocks line for the same reason; the informational content (T-35 and T-23 are complementary, non-overlapping) is already stated in the preceding paragraph. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-35): route compile_with_store through validate_then_compile — Outcome<Validated<CompileOutput>> Addresses openai-pro RC: compile_with_store returning Outcome<TargetSource> created a second compile-output authority parallel to validate_then_compile, bypassing required lens gates. Fix: compile_with_store routes through validate_then_compile (the sole public compile terminal in 00_compile.dag) with an empty caller-lenses list — always_required_lenses() (fact-density) run on agent-supplied code. Output type is Outcome<Validated<CompileOutput>>, same carrier as validate_then_compile. Single-terminal authority preserved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-35): correct factual error + clarify ModulePath identity compile_ingest_staging on main is a stub returning Rejected — there is no module_graph_from_entries call for workers to find there. compile_with_store introduces that call as a new addition. Also clarify that ModulePath is the declared module namespace identity (from the `module` declaration), not a filesystem path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-35): restore accurate scope paragraph — compile_ingest_staging has module_graph_from_entries The prior "fix" (0bf69b1) incorrectly stated compile_ingest_staging is a stub with no module_graph_from_entries call. The code at 00_compile.dag:350 has module_graph_from_entries(entries: Empty) in the live pipeline. The original phrasing ("store.entries replaces the entries: Empty argument, currently in compile_ingest_staging") was accurate. Restoring it. ModulePath namespace-identity clarification from 0bf69b1 is kept — it was a valid improvement unrelated to this error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(T-QN-1, T-35): QualifiedName infrastructure + T-35 spec update Add T-QN-1 as a new prerequisite task: introduces QualifiedName = FreeMonoid<Symbol> + qualified_name_from_node projection, replacing ModulePath/ModulePathSegment. Operator-ratified 2026-05-27. Update T-35 to use FreeMonoid<Node> (AgentStore) + QualifiedName for the root parameter; bridge through module_graph_from_entries via qualified_name_from_node with a dissolve-on-Change-2 gate comment. T-35 [needs T-28-B, T-QN-1]; dispatch also gated on operator code examples. Add naming invariant to INVARIANTS.md §P1: model names must reflect what they are — nicknaming is a modeling violation. Enforcement via lens (T-QN-1). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-35): make target→mode mapping explicit in compile_with_store brief compile_with_store takes target: TargetModel; validate_then_compile takes mode: CompileMode. The mapping is TranslateTo { target: target }. Stated explicitly so workers don't have to infer it. Addresses claude review 18362 non-blocking planning gap. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(T-QN-1): explicit module-header grammar authority in dependencies T-QN-1 said 'Dependencies: none' but qualified_name_from_node reads the dag_surface_module_header / dag_production_qualified_name parse-tree surface from extdeps/languages/dag.dag. That surface already exists; no new prerequisite task is needed. But workers must be told to read dag.dag for the Node child layout before implementing qualified_name_from_node. Addresses codex review finding (sha:3f189af0). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35 spec: declare AgentStore stage-state contract (post-normalize Node) Addresses codex BLOCKING on a7047ed: store entries were described as "pre-parsed .dag AST nodes" with no explicit stage boundary, making it ambiguous whether compile_with_store needed to re-normalize or not. Now explicit: store carries post-normalize Nodes (same stage as the existing module_graph_from_entries call in compile_ingest_staging). compile_with_store does NOT re-normalize — that is the agent's responsibility before store_insert. After admission the root Node is resolved via resolve_with_graph; the resulting CoreNode enters validate_then_compile. Stage contract: store-in = post-normalize Node; compile-in = post-resolve CoreNode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35 spec: make resolve_with_graph explicit in compile_with_store files brief Addresses inline BLOCKING on a7047ed (TASKS.md:1638): the files section said entry.root IS the CoreNode entering validate_then_compile, but ModuleEntry.root is post-normalize (not post-resolve). resolve_with_graph was stated in the scope paragraph but missing from the step-by-step implementation brief, leaving workers able to route entry.root directly into validate_then_compile and silently skip name resolution. Now explicit in the files section: entry.root is the post-normalize Node; resolve_with_graph(tree: entry.root, lm: dag_language_model_wave1(), graph: graph) produces the CoreNode (post-resolve) that enters validate_then_compile. Workers must not skip resolve_with_graph. The complete pipeline is normalize → graph-admission → resolve → compile, matching compile_ingest_staging exactly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * T-35 spec: rename AgentStore → ModuleBatch, agent.dag → module_batch.dag (P1) AgentStore was a P1 naming violation: the name encodes the caller ("agent") rather than the structural identity of the type. What it actually is: a pre-validated batch of post-normalize module Nodes — distinct from ModuleGraph (post-admission, path-unique) in the same way a list is distinct from a set. Rename: - AgentStore → ModuleBatch - std/agent.dag → std/module_batch.dag - store_insert → batch_insert - store_delete → batch_delete - store_lookup → batch_lookup (internal) - compile_with_store → compile_with_batch - store: AgentStore param → batch: ModuleBatch - stage contract "store-in" → "batch-in" Prose updated throughout: "agent-supplied" → "caller-supplied", "Agents write to the store" → "Callers build the batch", etc. References to T-23's agent output surface are unchanged (correct use of "agent" there — T-23 owns AGENT-SURFACE, T-35 owns the ingest batch carrier). TASKS.md-only change; no .dag code exists yet. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-opened by session-dashboard for session
loyal-stag-23.Pushing to
docs/v4-compilation-milestonesadvances this PR.Worker attestation
Before flipping this PR to ready for review, confirm each item:
npm test,cargo test) and the result.Closes #Ndirective.Summary
TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.
Test plan