Repository navigation
docs(thesis): compiler–std/ consolidation end state + gap analysis - #642
Conversation
New thesis claim: in the mature v3 state, the only things that exist are
(1) std/ concepts and (2) a minimal set of pure .dag compiler APIs.
Compiler-specific taxonomies that duplicate user-facing concepts are
dual representations at the architectural layer, dissolved by
consolidation.
Three artifacts:
1. **NEW: docs/thesis/compiler-std-consolidation.md** — the end-state
doc. Contains:
- The claim and its load-bearing connection to P1 Modeling Faithfulness
(ungrounded internal taxonomies), P2 Boundary Discipline
(compiler/user boundary is self-imposed not semantic), and P5
Progress Is Dissolution (every duplicate is a bridge with an
implicit trigger).
- Positive definition of what stays compiler-specific: pipeline.dag
orchestration, regen.dag code-generation registry, lens bodies
under lenses/*.dag, substrate reflection accessors, and a minimal
stage0 shim (target ≤5 Rust files).
- Gap analysis inventorying current v3 state:
- tokenize.dag → std/tokenize.dag (6 types)
- runtime_mirrors.dag → std/syntax.dag (14 Surface* types)
- parse_tables.dag → debatable split (3 types)
- src/v3/std/* → dsl/std/* (whole tree, gated on v2 retirement)
- Alignment check against the 2026-04-22 wave: no lane introduces
new dual-representation debt; Algebra Quartet + Pipeline Authority
actively dissolve it.
- Ratchet definition: count of type declarations in
src/v3/compiler/*.dag outside pipeline/regen/lenses → 0.
- Discipline section with 4 rules for future briefs.
2. **THESIS.md**: new claim section "Compiler–std/ consolidation: no
dual representations at the compiler/user boundary", placed after
Self-Inspection (natural flow: substrate is its own subject AND
shares its ontology with user programs).
3. **ROADMAP.md**: top-of-file callout pointing at the new doc, plus a
new debt row "Compiler–std/ consolidation program — specific
migrations" listing the five tracked migrations (tokenize,
runtime_mirrors, parse_tables, src/v3/std/ → dsl/std/, Node → std/)
each as a standalone lane with migration-gate named where relevant.
This formalizes what was previously scattered across Pure Bootstrap,
file-preference-scaffold, and project_node_to_std as a coherent
end-state claim with a measurable ratchet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c923a5d000
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| #### From `src/v3/compiler/parse_tables.dag` → unclear | ||
|
|
||
| - `BinaryOpLevel`, `BinaryOpRow`, `TopLevelItemKwRow`, `TypeRhsBoundaryRow` (3 types) |
There was a problem hiding this comment.
Fix parse_tables type list to match current authority
The parse-tables inventory is currently inaccurate: it lists TypeRhsBoundaryRow and says “(3 types)”, but src/v3/compiler/parse_tables.dag defines four row/enum types and uses BracketRow instead of TypeRhsBoundaryRow. Because this section is used as migration planning input, the mismatch can cause the consolidation lane to track the wrong surface and leave real parser-table authority (BracketRow) out of scope.
Useful? React with 👍 / 👎.
| - [docs/design-pure-bootstrap.md](../design-pure-bootstrap.md) — the algorithmic-emission side of the bootstrap program | ||
| - [docs/v3-lens-capability-register.md](../v3-lens-capability-register.md) — analysis-side honesty register (parallel discipline, different axis) | ||
| - [INVARIANTS.md](../../INVARIANTS.md) §P1, §P2, §P5 — the invariants this claim extends | ||
| - [feedback_epistemic_stacking memory](../../../.claude/projects/-Users-briansrls-gunbc/memory/feedback_epistemic_stacking.md) — every concept grounds in primitives via ontological DAG |
There was a problem hiding this comment.
Replace non-repo related-doc link with a tracked reference
This related-doc entry points to a local .claude/projects/... path that is not part of the repository, so the link is dead for other contributors and for rendered docs. Keeping non-portable links in a thesis doc breaks traceability of the claimed grounding source and makes the reference unverifiable outside the author’s machine.
Useful? React with 👍 / 👎.
|
Review metadata
This is a docs-only PR: one new thesis sub-doc ( I verified the referenced files exist (pipeline.dag, regen.dag, tokenize.dag, runtime_mirrors.dag, parse_tables.dag, the FindingsNone blocking. Two minor cosmetics:
VerdictAPPROVE — docs-only, narrowly scoped, internally consistent with existing thesis claims and tracked-debt discipline. The two cosmetics above are not worth blocking on. Exploratory observations (optional)
|
|
Review metadata
Findings
Verdict |
…w not TypeRhsBoundaryRow Codex inline finding on #642 sha c923a5d: the parse_tables inventory was inaccurate. Verified against HEAD: src/v3/compiler/parse_tables.dag actually declares: - BinaryOpLevel - BinaryOpRow - TopLevelItemKwRow - BracketRow My PR wrote "TypeRhsBoundaryRow" (doesn't exist) and said "(3 types)" while listing four names. Both the thesis doc and the ROADMAP row inherited the wrong inventory, which would have let the consolidation lane miss `BracketRow` as real tracked parser-table authority. Fixes: - docs/thesis/compiler-std-consolidation.md:62 — replace the list and correct the count to 4 - ROADMAP.md:191 — add BracketRow to the per-type decision list Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex inline finding on #642: the Related docs section at line 147 linked to docs/../.claude/projects/... which is my local memory path, not part of the repository. Dead link for other contributors and for rendered docs. Fix: replace with docs/thesis/epistemic-stacking.md which is the in-repo long-form of the same grounding claim. That doc is already cited in the header at line 2, so this is the correct canonical in-repo pointer. Memory was a sibling source; the thesis doc carries the claim content. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…edent rule Codex finding on #642 sha c923a5d (finding #2): the parse_tables.dag row was documented but not bounded — "defer to the specific migration lane" is not a dissolution trigger under P5 tracked-bridge discipline. Fix: name an explicit trigger and owner. The decision about which parse_tables rows are "parser internal dispatch" (stays compiler-API) vs "language-level syntax facts" (moves to std/syntax.dag) is genuinely under-determined until the .dag parser exists — only then do we know which rows the parser actually dispatches on. Named: - Owner: whoever picks up SG-2c proper parser cutover - Migration-gate: SG-2c proper completion - Precedent rule: if any individual row needs to move before SG-2c proper lands, that mover-lane sets the classification for that row and the rest follow the same rule when touched Both thesis doc and ROADMAP row updated consistently. (Note: Codex finding #1 in the same review — ratchet definition mismatch between doc and ROADMAP — was already resolved by the prior ratchet-pin commit 7cc79ee which split the thesis doc into primary (compiler-only) / secondary (v3/std) / tertiary (hand-Rust) and aligned the ROADMAP to the primary scope.) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/gpt-5.4 - Commit:
c923a5d0· Trigger:schedule - Thinking:
629s wall
Non-blocking — Strengths
THESIS.mdThe new thesis section lands in the right place: it follows naturally from self-inspection and does not contradict the surrounding claims.docs/thesis/compiler-std-consolidation.mdThe positive-definition boundary is grounded in actual files and the current compiler/std inventory matches the live tree, including the expanded parse_tables.dag surface.
Non-blocking — Improvements (fix in-PR if easy, else defer to roadmap)
docs/thesis/compiler-std-consolidation.mdThe tertiary ratchet is phrased as a file count but reports a fuzzy “5-10 substantial hand-Rust files”; if you want it to function as a real ratchet, tie it to the same EXPECTED_HAND_AUTHORED or SG-0 census used in docs/design-pure-bootstrap.md (PB-0 if deferred).
ROADMAP — Verified
- Compiler-std consolidation program: The new ROADMAP row covers the obvious migration lanes the thesis doc names instead of leaving the consolidation end state implicit.
✅ The thesis addition, positive-definition split, and migration plan look coherent against the current branch state; only the tertiary ratchet wording feels worth tightening later.
… authority Codex non-blocking observation on #642: the tertiary ratchet was phrased fuzzily ("5-10 substantial hand-Rust files"). That estimate was actually order-of-magnitude wrong — per Pure Bootstrap design, the live count is 78, not 5-10. Fix: don't duplicate the ratchet — point at Pure Bootstrap's authoritative source. SG-0's EXPECTED_HAND_AUTHORED ∖ GENERATED_FILES (in src/v3/compiler/tests/integration/sg0_census_test.rs) is the live ratchet; docs/design-pure-bootstrap.md's PB-0 is the program. The consolidation doc's tertiary ratchet is now a pointer to the PB authority with explicit numbers (78 → ≤5), not an independent measurement. Connects Band-C-STUB dissolution (from lens capability register) as part of the hand-Rust dissolution story — some of the ~20 lens- adjacent Rust files are STUB backs waiting on substrate carriers + emit match capabilities. Single authority for the ratchet (PB's census); the consolidation doc composes that authority into its tracked-migration view. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review metadata
Verdict: APPROVE — docs-only PR adding a thesis claim + ratchet anchors. All quantitative claims verified against the worktree (tokenize.dag=6, runtime_mirrors.dag=14, parse_tables.dag=4, pipeline.dag=3, regen.dag=1, operators.dag=0, std/ tree = 142 types across 13 files — all exact matches). Each migration carries a named dissolution trigger (SG-2b/SG-3f, SG-2c-proper, file-preference scaffold dissolution, v2 retirement), satisfying the tracked-debt bar. The tertiary ratchet explicitly anchors to SG-0's census authority rather than duplicating it (commit |
|
Review metadata
Findings
Verdict: REQUEST_CHANGES. The new consolidation doc is otherwise coherent, and the primary/secondary ratchet numbers check out, but the tertiary ratchet is wrong in the current tree by the authority it cites. That should be corrected before merge. |
Codex BLOCKING review on #642 sha a070474: tertiary ratchet hardcoded "78 hand-maintained .rs files" which violates P1's Documentation-Describes-Live-State — the live EXPECTED_HAND_AUTHORED census has 89+ entries under src/v3/compiler/, not 78. My number was inherited from docs/design-pure-bootstrap.md's own stale count. Two fixes: 1. **Thesis doc**: stop hardcoding a count in prose. The authority is the live SG-0 census; any number written here ages immediately. Replaced with "do not hardcode a count here — the live census is the source of truth." Include one dated spot measurement for signal (89 entries on 2026-04-22) with the exact grep command, so future readers can reproduce rather than trust prose. 2. **ROADMAP**: the stale-receipt sweep debt row now explicitly includes the PB design doc's "78" count as an item to fix. That number is the upstream source I inherited from; the sweep should either refresh it or delete it and point at the live census. Lesson: if you're citing a ratchet, point at the ratchet authority. Don't paste its current value into prose. "See EXPECTED_HAND_AUTHORED" stays true; "EXPECTED_HAND_AUTHORED has 78 entries" goes stale in the next PR that adds a file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review metadata
All counts in the new thesis doc verified against the worktree:
VerdictAPPROVE — Docs-only PR (ROADMAP, THESIS, and one new The new discipline it introduces — home-check for new types in Exploratory observations (optional)
|
|
Review metadata
Findings
Verdict REQUEST_CHANGES The consolidation direction looks sound, and the factual counts I spot-checked match the tree. But the |
|
Review metadata
All numbers in the doc verify exactly against the live tree:
The diff is entirely docs (THESIS link + new Against the rubric:
Verdict: APPROVE — docs-only, all factual claims verified against tree, ratchets and exemptions are well-formed scaffolds with named triggers. Exploratory observations (not asks):
|
|
Review metadata
Findings
Verdict |
… disposition Codex BLOCKING review on #642 sha a1cb27e: the ratchet's "lens bodies only" framing conflated fn definitions (bodies) with type declarations in the same files. Current tree has 12 type decls across 6 lens files (CostLookup, Origin, TemplateArgumentLookup, UnusedParameter, DeclarationLookup, etc.) — these were outside the ratchet scope, making "20" an undercount of compiler-side type debt. Fix: broaden the ratchet scope and explicitly classify lens-local types. Three-way classification (the single answer Codex asked for): 1. Positive-def: lens-specific return-type carriers that represent the lens's published API (e.g., `Origin` for provenance, `UnusedParameter` for unused_parameters, `CostEntry` for cost) 2. In-ratchet (migrates to std/): generic-Lookup-pattern carriers that duplicate a 2-variant `Missing | Found(T)` shape across lenses (`CostLookup`, `TemplateArgumentLookup`, `DeclarationLookup`). Dissolution target: a single `std/Lookup<T>` generic. 3. Exempted pending trigger: parse_tables.dag (4 types, unchanged) Updates: - Ratchet scope now explicitly covers src/v3/compiler/*.dag AND src/v3/lenses/*.dag - Per-file disposition table extended with all 10 lens files and classification - Baseline: ~25 (20 tokenize+runtime_mirrors + ~5 Lookup-pattern across lenses; exact lens breakdown firms up as the Lookup generalization lane scopes; two structural_resolution.dag types pending header review) - Discipline rule #1 extended: home-check applies to src/v3/lenses/*.dag too, with explicit note that lens-local types are positive-def ONLY when genuinely lens-specific — generalizable patterns count against ratchet - Positive definition updated: "Lens bodies" split into two lines — fn definitions always positive-def; type declarations positive-def only when lens-API-specific Added ROADMAP migration row for the generic-Lookup-pattern dissolution: - Generic `Lookup<T>` in std/ → dissolve per-lens carrier duplicates - ~5 types → 1 - Owner: unassigned; no migration gate (pure type work, generics already work) At any point for any compiler-side lens or compiler .dag type, one authoritative classification applies: positive-def, in-ratchet, or exempted. No ambiguity. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review metadata
Findings
Exploratory observations
Verdict APPROVE_WITH_COMMENTS — docs-only PR, all verifiable claims tie out against the worktree, and the new thesis doc formalizes a real discipline with a measurable ratchet and a clean exemption protocol. The one nit is the P2/P3 citation at line 132 of the new doc. |
|
Review metadata
Findings
Verdict |
…ine 81 Pro non-blocking on #642 sha 225bdf3: I wrote 'See [INVARIANTS.md] P2 "Fail-closed lookup carriers"' but: - P2 is "Boundary Discipline", not "Fail-Closed" - "Fail-closed" is P3 - "Fail-closed lookup carriers" is not a named rule in INVARIANTS.md under either principle Dropped the quoted phrase. The underlying point — that generic-Lookup carrier generalization is a single-authority concern — is correctly P2 Boundary Discipline (typed-carrier shape shared across lenses shouldn't be re-declared per-lens). Reframed the citation without the non-existent quoted rule name. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/gpt-5.4 - Commit:
225bdf38· Trigger:schedule - Thinking:
376s wall
BLOCKING (1)
Root Cause
docs/thesis/compiler-std-consolidation.mdThe lookup-carrier inventory was copied from older debt state instead of being recomputed from the current src/v3/lenses/*.dag files -> refresh the lens slice, then update both the thesis baseline table and the matching ROADMAP lane text.
ROADMAP — Incomplete
- Generic Lookup lane: The new deferred-debt row still scopes the lane around DeclarationLookup, so it should be refreshed to the current lens carriers before it becomes dispatch authority.
| | `src/v3/lenses/provenance.dag` | 1 | positive-def (`Origin` — genuinely provenance-specific) | | ||
| | `src/v3/lenses/structural_resolution.dag` | 2 | classification pending (likely lens-API + regression pin carrier) | | ||
| | `src/v3/lenses/unused_parameters.dag` | 1 | positive-def (`UnusedParameter`) | | ||
| | `src/v3/lenses/variant_payload.dag` | 2 | 1 lens-API + 1 in-ratchet (`DeclarationLookup` — Lookup pattern) | |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
…ve shapes Codex BLOCKING review on #642 sha 225bdf3: I classified `VariantPayloadShapeLookup` as a 2-variant Missing|Found generic Lookup pattern candidate. Wrong — the live type is: VariantPayloadShapeLookup = DeclarationMissing | NotPayloadProduct | Found(VariantPayloadShape) Three variants with a semantically distinct NotPayloadProduct state. That's lens-API, not generic Lookup. Verifying against actual declarations surfaces a second misclassification I made: `TemplateArgumentBinding = Conflict | NoOp | Append` in infer_helpers.dag is also a 3-variant semantic carrier, not a 2-variant Missing|Found Lookup. Lens-API too. Strict verification of 2-variant Missing|Found Lookup pattern shows only 3 instances qualify: - CostLookup = MissingCost | FoundCost(Int) - SymbolicCostLookup = MissingCost | FoundCost(SymbolicCost) - TemplateArgumentLookup = MissingTemplateArgument | FoundTemplateArgument(DeclarationId) Both Codex's specific finding (`VariantPayloadShapeLookup`) and my independent re-verification ($TemplateArgumentBinding$) corrected. Baseline count: ~25 → 23 (20 tokenize+runtime_mirrors + 3 strict Lookup patterns). Updated positive-def text to be precise: carriers with additional semantic variants are lens-API even when they superficially look Lookup-shaped. Example names pinned to live shapes (Origin, UnusedParameter, VariantPayloadShapeLookup 3-variant, TemplateArgumentBinding 3-variant). ROADMAP row updated: baseline 23, in-ratchet list restricted to the three actual 2-variant Lookup patterns. Generic-Lookup migration row scope narrowed from "~5 types" to "3 types" with explicit exclusion of 3-variant semantic carriers. Lesson: classification claims need verification against live shapes, not inference from type names. "DeclarationLookup" doesn't exist; the real carrier name was different and the shape was 3-variant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tchet description Codex relay against line 153 was already fixed (variant_payload row is correctly classified as both lens-API 3-variant). But the parallel ratchet-tracked description at line 132 still had the stale "DeclarationLookup" reference that doesn't match any live type — inherited from the same misclassification my previous commit fixed at line 81 but missed propagating here. Replaced with the accurate 3-instance list (CostLookup, SymbolicCostLookup, TemplateArgumentLookup) plus an explicit anti-example (VariantPayloadShapeLookup and TemplateArgumentBinding are 3-variant semantic carriers, not generic Lookup pattern). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ix dissolved it) Codex BLOCKING review against sha 225bdf3: "lookup-carrier inventory was copied from older debt state instead of being recomputed from current lens files." Codex's specific findings (thesis doc table + Generic Lookup<T> row scope) were already addressed in c4f4643 + ac46a29. Verification surfaced an adjacent stale-inventory issue Codex didn't directly flag but it's the same pattern: ROADMAP line 172 described `DeclarationLookup` parallel authority in variant_payload.dag as live debt, when the SG-4b-1-fix lane had already dissolved it. Live state verified: - variant_payload.dag imports declaration_by_id from std.substrate (line 19) - Uses it at line 58: match declaration_by_id(d, variant_id) { ... } - No find_declaration function - No DeclarationLookup type - Exports VariantPayloadShapeLookup = DeclarationMissing | NotPayloadProduct | Found(VariantPayloadShape) as the 3-variant lens-API carrier Updated the debt row to mark it RESOLVED, note the current shape (declaration_by_id substrate accessor + VariantPayloadShapeLookup carrier), and flag it as a candidate for the 2026-04-21 stale- receipt sweep. Lesson reinforced: every ROADMAP inventory claim needs verification against live code. Stale debt rows that describe dissolved work as active debt contaminate the planning surface they're supposed to serve. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Both of Codex's specific findings are already addressed in commits after sha (1) Lookup-carrier inventory in thesis doc — fixed across commits
(2) Generic Bonus proactive fix in commit
Updated line 172 to mark that debt as RESOLVED, note the current shape, and flag it for the 2026-04-21 stale-receipt sweep. Current HEAD: |
|
Review metadata
Verdict: APPROVE — docs-only PR; numeric claims verified, no code changes. Spot-checked every load-bearing count in the new thesis doc against the tree:
The thesis aligns with INVARIANTS.md — it explicitly grounds itself in P1/P2/P5 and frames compiler-side dual representations as boundary-discipline debt, which is consistent. The ratchet is well-specified: positive-def set named, No code, no substrate changes, no findings. Thesis doc + ROADMAP row + THESIS.md pointer are mutually consistent. |
|
Review metadata
Findings
Verdict: REQUEST_CHANGES The new thesis doc is useful and most of the concrete inventory work checks out, but these two scope/baseline contradictions hit the core operational claim of the PR. I’d fix the ROADMAP summary to match the thesis rule and either classify or explicitly exempt |
…structural_resolution types Codex BLOCKING review on #642 sha 4c1f86f flagged two real contradictions. **Finding 1 — ROADMAP top-of-file callout scope drift.** The callout said new types in `src/v3/compiler/*.dag` or `src/v3/std/*.dag` require the home-check, with positive-def summary "pipeline / regen / lens-body / accessor". But the thesis doc's rule (lines 120, 178) extends to `src/v3/lenses/*.dag` AND uses more precise positive-def language ("lens-specific return carriers", not "lens-body", which conflated fn bodies with type declarations in the same files). Two different authorities for which files need the home-check and which lens-side types stay compiler-local — P2 violation in a doc whose job is to be the reviewer-facing tracker. Updated ROADMAP callout to: - Include `src/v3/lenses/*.dag` in scope - Positive-def summary: "pipeline types / regen types / lens-specific return carriers / substrate accessors" - Add explicit distinction: "Lens-local 2-variant Missing|Found Lookup duplicates count against the ratchet; carriers with distinct semantic variants stay lens-API" Now the callout summarizes the thesis rule faithfully; no dual authority. **Finding 2 — `structural_resolution.dag` baseline accounting.** Baseline of 23 = 20 (tokenize + runtime_mirrors) + 3 (Lookup patterns). But ratchet definition only exempts parse_tables.dag — and the `structural_resolution.dag` row was marked "classification pending" without being in the exemption list. So the baseline math didn't follow from the ratchet definition. Verified the file's actual types: - UnresolvedArrowBody { declaration, name, span } — record - NameKeyedReference { declaration, resolved_to, span } — record Both are lens-API record types carrying the lens's findings (list of unresolved arrow bodies as regression pins, list of name-keyed references). Neither is a 2-variant Lookup pattern. Classified both as positive-def (lens-specific return carriers). With this classification, the baseline of 23 is now mechanically derivable: every lens-local type has a pinned classification, and the math works. Both fixes preserve the invariant the review explicitly protects: a doc claiming to be the single source of truth can't itself carry dual authorities or unclassified items that break its own arithmetic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review metadata
Verdict: APPROVE — docs-only PR; new thesis claim, ROADMAP callout, and gap-analysis doc are well-grounded and self-checked against the live tree. Verification spot-checks (all pass):
On modeling discipline:
Exploratory observation (optional, non-blocking): four |
|
Review metadata
APPROVE Doc-only diff, and the new compiler– |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/gpt-5.4 - Commit:
aab147d3· Trigger:schedule - Thinking:
273s wall
Non-blocking — Strengths
docs/thesis/compiler-std-consolidation.mdThe positive-definition boundary and ratchet now stay honest against the live parser-table and lens-carrier shapes I spot-checked at the PR head.ROADMAP.mdThe new callout and migration row keep the operational tracker aligned with the thesis doc instead of restating a narrower or competing rule.
ROADMAP — Verified
- Compiler–std consolidation program: The new lane is documented, bounded, and tied to named dissolution triggers, which meets the tracked-debt bar from INVARIANTS.md.
✅ Docs-only diff, and the consolidation claim, ratchet, and roadmap hooks are now internally consistent with THESIS.md, INVARIANTS.md, and the cited live compiler/lens files I checked at the PR head.
|
Already resolved in current HEAD ( Line 153 in HEAD reads exactly:
No Both Pro (sha |
|
Review metadata
1. Story of the diffThis PR is a docs-only consolidation receipt that turns a broad thesis instinct into an operational program.
2. Invariant categories
N/A — diff is documentation-only; no substrate types, Dag mutation surfaces, or implementation-layer Rust APIs are changed.
Finding (NON-BLOCKING) — P2 Boundary Discipline / single-authority metadata:
N/A — no Rust implementation code changed; the diff only touches
N/A — docs-only PR; no executable behavior or bug fix landed, so there is no new regression surface that needs tests.
Compliant —
Finding (NON-BLOCKING) — named dissolution trigger missing: 3. VerdictAPPROVE_WITH_COMMENTS The consolidation end state itself is coherent, well-scoped, and usefully wired into both |
* docs: address OpenAI Pro follow-up findings from #642 review Two non-blocking findings flagged by openai-pro on already-merged #642 (sha aab147d, reviewed after merge). Applying as small follow-up cleanup. 1. **Self-contradicting hardcoded count in tertiary-ratchet section.** `docs/thesis/compiler-std-consolidation.md:167` said "Do not hardcode a count here" then immediately hardcoded "89 entries." That recreated the parallel-authority hazard the section explicitly tries to eliminate. Fix: remove the snapshot count entirely and give readers a reproducible command instead ("count is whatever the live census reads today"). 2. **ROADMAP migration rows with "migration-gate: none".** The compiler-std consolidation end-state doc requires scheduled migrations to have named triggers. "none" reads as absence of a trigger rather than as a positive trigger ("ready now"). Fix: rephrase to "ready-to-dispatch (no capability gap — types already composable today)" for tokenize.dag → std/tokenize.dag and Generic Lookup<T>. Same information, now phrased as a positive dispatch signal, not an absent trigger. Both fixes are small; both sharpen tracked-debt discipline the doc itself declares. No substantive content change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(thesis): remove inaccurate grep recipe from tertiary-ratchet section Codex non-blocking on #660 sha cb199ec: my "reproducible command" for the tertiary ratchet counted all `src/v3/compiler/` entries in EXPECTED_HAND_AUTHORED, but the authoritative set is EXPECTED_HAND_AUTHORED ∖ GENERATED_FILES — the subtraction happens at runtime in the ratchet test. My grep over-counted because it includes generated-fragment paths that live in EXPECTED_HAND_AUTHORED pre-subtraction (e.g., the entry at sg0_census_test.rs:250 Codex flagged). The command as-written measured the wrong set. Fix: remove the grep approximation entirely and point readers at the SG-0 census test directly as the source of truth. Explicitly warn against the grep approach with the reasoning (EXPECTED_HAND_AUTHORED is pre-subtraction; the ratchet applies GENERATED_FILES at runtime). Removes the parallel-authority hazard the section originally tried to eliminate: any snapshot-or-approximation-in-prose ages stale relative to the live ratchet, whether it's a number or a bad grep. "Run the test" is the only accurate answer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SG-2c-7 added `type PrimaryAtomRow` to parse_tables.dag; the #642 script must list it next to PrimaryPrefixRow and the other parse_tables row shapes. Unblocks: Compiler-std consolidation ratchet (v3 workflow). Made-with: Cursor
SG-2c-7 added `type PrimaryAtomRow` to parse_tables.dag; the #642 script must list it next to PrimaryPrefixRow and the other parse_tables row shapes. Unblocks: Compiler-std consolidation ratchet (v3 workflow). Made-with: Cursor
* WIP: SG-2c * feat(SG-2c cluster): parse_primary prefix + atom family — full receipt Complete same-PR extraction for PrimaryAtomRow (SG-2c-7) alongside SG-2c-6: - regen_parse_tables_emit: collect rows, emit primary_atom_class/PrimaryAtomClass - checked-in parse_tables_generated.rs + regen_parse parse_generated.rs - parse_parser_body: table-owned dispatch; remove open match on atomic TokenKinds - sg2c1 authority tests: row join + exact post-prefix token set - ROADMAP + compiler-std-consolidation: 7 exempted types, cluster note Cluster name: parse_primary prefix + atom family. Made-with: Cursor * chore: apply cargo fmt * WIP: SG-2c * docs(parse_tables): fix Pipe vs PipeArrow comment (review feedback) SG-2c-7 atomic tail uses TokenKind::Pipe (|), not PipeArrow (|>). Made-with: Cursor * fix: refresh parse_corpus_manifest after parse_tables.dag comment edit The Pipe vs PipeArrow doc fix changed source spans; fnv1a64 for the parse surface snapshot moved (items/byte len unchanged). Unblocks v3 CI handwritten_parse_snapshot_matches_manifest. Made-with: Cursor * fix(ci): exempt PrimaryAtomRow in compiler-std consolidation ratchet SG-2c-7 added `type PrimaryAtomRow` to parse_tables.dag; the #642 script must list it next to PrimaryPrefixRow and the other parse_tables row shapes. Unblocks: Compiler-std consolidation ratchet (v3 workflow). Made-with: Cursor
* WIP: Compiler std/ consolidation * WIP: Compiler std/ consolidation * docs: align ROADMAP and thesis Lookup closure (#750) Shared ratchet #642 scope + migration-gate/P2 wording per scheduled review (claude-opus-4-7 on d1b02cf): blocking codegen issues already fixed on 19a79e5; this addresses the exploratory doc asymmetry only. Made-with: Cursor * docs(v3-lens-register): infer_helpers row — template_arguments_match is generated Codex non-blocking on #750: drop stale 'stays in Rust' claim; note Cat-2 helpers live in lens + infer_helpers_generated.rs. Made-with: Cursor
* feat(v3): land CRDT cost-basis carriers and gate #93 demo test - Add CostBasisKind + CostBasisDeclaration to lenses/cost.dag per cost-basis audit. - Add t_las_crdt_cost_basis_demo fixture (§4.2 apply_lens target as comments). - Integration tests: composed symbolic cost vs O(log replicas) per-op budget using dominates; large-stack threads for symbolic-cost dimension walks. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * chore(sg0): ratchet hand-authored test list for t_las CRDT demo Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * test(v3): split gate #93 dominates assertions; share cached compile Addresses api-review exploratory note on TESTING.md one-claim-per-test: two focused tests plus crdt_field_dimension_ok helper and cached_compile_to_dag. Skipped optional fixture data pin: CostBasisKind = PerWrite caused a semantic compile failure in the test fixture module (follow-up if a structural pin is still desired). Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * docs(v3): note normalized SymbolicCost at root for CRDT cost demo Explains why composed cost can be Linear(num_writes) while per-op budget stays Log(replicas); dominance assertions remain the behavioral witness. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * test(v3): cite SizeVariable substrate for CRDT cost demo budget helper SizeVariable is source_port + display_name: String? in algebra.dag; refactor to size_var() matching lane2 symbolic-cost tests. Addresses inline review claiming missing display_name (substrate has had the field since v3 std algebra). Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * chore(v3): regen lens_cost_symbolic after CostBasis carriers in cost.dag New CostBasisKind/CostBasisDeclaration types in lenses/cost.dag must appear in lens_cost_symbolic_generated.rs (P2 emitter parity). Refreshed via: cargo run -p v3-compiler --bin regen_lens -- --lens cost_symbolic Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * test(v3): tie CRDT demo to CostBasisDeclaration + re-export carriers - Document that LinearCost dominates any LogCost in MVP dominates(), so the old composed-vs-per_op check was vacuous. - Build an in-test CostBasisDeclaration (PerWrite, LogCost(replicas), subject + span from my_crdt_field) so §4.2 per-write basis evidence flows through the cost-lens carrier; use basis.cost in the non-vacuous !dominates ceiling test. - Re-export CostBasisDeclaration and CostBasisKind from v3_compiler::lens_cost_symbolic. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * fix(v3): symbolic-cost Div → LogCost + CRDT basis lens-table witnesses - cost.dag: dispatch TransformTarget::Operator(Div) to LogCost(dividend port) so checked Int divide is visible in compute_symbolic_costs (E-P narrow fix). - Regenerate lens_cost_symbolic_generated.rs; export compute_symbolic_costs. - t_las_crdt tests: align CostBasisDeclaration.cost with merge-step dividend port, assert Log hits the lens table and basis.cost matches a Hit row; clarify SizeVariable/algebra + vacuous Linear>Log in module docs. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * docs(v3): repair CRDT cost-basis demo module doc + Div authority note - Fix fragmented module-level prose after merge (Practice 4 / gate story unchanged). - Align per_write_log_replicas_budget comment with transform_cost_for_target Operator(Div). Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * feat(v3): single-authority CostBasisDeclaration builder from Dag - Add cost_basis_declaration::build_per_write_log_cost_basis_declaration (P2): derives PerWrite LogCost(merge param) + DeclarationId + span from compiled binds; tests use it instead of hand-assembling the generated carrier. - Anchor consumer in lenses.cost next to CostBasisDeclaration; SG-0 census + pub re-export. - Refresh CRDT demo module docs to cite the builder as the declared consumer boundary. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * ci: classify cost-basis types in compiler-std ratchet + stage0 exclude - Add CostBasisKind/CostBasisDeclaration to POSITIVE_ROWS in check-compiler-std-ratchet (#642). - List cost_basis_declaration.rs in compiler.dag hand_maintained_src so stage0 clean/copy preserves it. - Update compiler-std consolidation thesis table for cost.dag type count. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * fix(cost): compose Div transform_cost with log surcharge + regression - transform_cost_for_target(Div): chain operand fold (transform_cost) before LogCost(dividend) so expensive operands are not dropped (PR #2299). - Regenerate lens_cost_symbolic projection. - Re-export transform_cost_for_target for lens tests. - Add lane2 test: dominate old Constant+Log under-approx when dividend is Linear; keep Log for cheap param-like operands (sum normalization drops Log when Linear dominates). Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * fix(v3): fail-closed CostBasisDeclaration builder (codex #2299) Replace panicking build_per_write_log_cost_basis_declaration with try_build_per_write_log_cost_basis_declaration returning CostBasisDeclarationBuildError. Re-export the error type. - SizeVariable already matches algebra.dag (source_port + display_name) in dag_cost_generated.rs; Div already composes transform_cost + LogCost — those review bullets were stale. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * ci: optional SG-0 PR-body append file for agent branches Merge scripts/ci-merge/sg0-pr-body-append.<PR#>.txt into PR_BODY before check-pr-sg0-net-shrink-discipline when present (fixes CI when editors cannot update GitHub PR description). Add machine-readable lines for #2299. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * ci: fix SG-0 declared hand-path delta (+2 after rebase vs main) Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * fix(v3): resolve cost-basis workflow bind via Declaration::Arrow UserDefined Codex/P2: subject + span must come from the same authority — walk declaration_by_name → TypeConnective::Arrow → ArrowBody::UserDefined(BindNodeId) for the workflow span bind; keep name scan only for merge_step helper. Add typed build errors for non-Arrow / non-UserDefined bodies. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * docs(cost): scaffold PeakMemory CostBasisKind + #1954 trigger (P5) Per inline review: PeakMemory had no named consumer; classify it 🟡 SCAFFOLD with dissolution trigger #1954, keep PerWrite/PerCall terminal, restore CostBasisDeclaration type block accidentally dropped in edit. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * fix(v3): fail-closed Div empty operands + basis vs lens Log witness - cost.dag: Div with Empty operand list → miss_symbolic_cost_lookup (regen lens). - try_build_per_write_log_cost_basis_declaration: require LogCost(dividend_port) row in compute_symbolic_costs merge param port (MergeStepLacksLogCostWitness). - Integration: merge step without divide rejects; lane2 asserts Div([])->Miss. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * docs(cost): inline PeakMemory scaffold note on CostBasisKind variant Clarifies at the variant site that PeakMemory is 🟡 SCAFFOLD (#1954), not a live terminal — addresses inline review that only skimmed the coproduct block. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * fix(v3): resolve merge-step cost basis via ArrowBody::UserDefined (P2) Drop BindNode.name scan; use the same declaration -> Arrow -> UserDefined bind path for the merge helper as for the workflow subject. Remove unused BindNotFound; rename merge-step error fields to *declaration* for accuracy. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * docs(test): honest gate #93 scoping — interim receipt vs §4.2 fold Module docs no longer read as full closure: name ROADMAP gate id but state explicitly that apply_lens + authored CostBasisDeclaration rows folded into compute_symbolic_costs are follow-on (same gate tracks debt). Align cost_basis_declaration crate docs to the same slice boundary. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> * fix(v3): CostBasisDeclaration.subject uses SectionRef (T-LAS §2 / audit) - cost.dag: import SectionRef from v3.std.lens_application; document NodeScope path. - dag.rs: add SectionRef Rust mirror (authority lens_application.dag). - regen_lens cost_symbolic; try_build wraps workflow id in DeclarationScope. - Integration test asserts SectionRef::DeclarationScope subject. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
v3 job failed on unclassified ^type ParallelismMode in parallelism.dag; add POSITIVE_ROWS inventory entry plus thesis/ROADMAP disposition sync (LAS gate #95 budget carrier). Co-authored-by: Cursor <cursoragent@cursor.com>
…trated (T-Lens-Application-Surface / **Cluster F (T-LP-Ret) (#3131) * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * fix(ci): SG-0 PR-body prepend for gate #95 census (+1) Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * docs(test): clarify gate #95 integration vs enforced_application split Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * chore: rustfmt enforced_lens_application (gate #95) CI fmt check drift on substrate-eval helpers and gate #95 asserts. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(v3-compiler): gate #95 probe returns Result (no public panic surface) Composer review #12221: parallelism_iteration_opt_in_enforcement_violates now returns Result<bool, LensApplyError>; missing parallelism.dag maps to SubstrateReflect. Document ParallelismIterationBudget as GREEN coproduct per modeling-discipline §4. Co-authored-by: Cursor <cursoragent@cursor.com> * docs(test): clarify gate #95 integration banner for Result probe Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * docs(parallelism): Practice §4 TERMINAL checkpoint for ParallelismMode Codex inline BLOCKING on parallelism.dag: classify OptInIndependent|Sequential coproduct per modeling-discipline §4 adjacent to the type declaration (LAS budget carrier vs Lane‑2 workflow). Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): classify ParallelismMode in compiler-std ratchet (#642) v3 job failed on unclassified ^type ParallelismMode in parallelism.dag; add POSITIVE_ROWS inventory entry plus thesis/ROADMAP disposition sync (LAS gate #95 budget carrier). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * WIP: R3 gate #95: opt_in_iteration_parallelism_via_lens_application_demonstra * docs(thesis): restore End state line in compiler-std consolidation Fix inline editing artifact (...findings. 0. Each...) by splitting the explicit primary-ratchet end-state sentence onto its own line (Claude api-review exploratory note). Co-authored-by: Cursor <cursoragent@cursor.com> * docs(thesis): align compiler-std primary ratchet count with TRACKED_ROWS (4) openai-pro review: prose said \"3\" while ROADMAP + check-compiler-std-ratchet.sh enumerate four in-ratchet scaffold carriers including NonCommutingPairLookup. Point readers at TRACKED_ROWS / BASELINE_TRACKED_TOTAL as authority; restore tokenizer-migration clause dropped in the tightening edit. Co-authored-by: Cursor <cursoragent@cursor.com> * docs(p5): enumerate gate #95 hand-Rust co-touches in 3131 prepend Extend sg0-pr-body-append.3131.txt to receipt dag.rs/lib.rs/lower.rs alongside enforced_lens_application for the same gate #95 slice; align INVARIANTS integration + LAS consumer cross-refs. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
New thesis claim: in the mature v3 state, the only things that exist are (1)
std/concepts and (2) a minimal set of pure.dagcompiler APIs. A "token" in the compiler is the sameTokena user's formatter uses; a "file" is the sameFileany program reads. Compiler-specific taxonomies that duplicate user-facing concepts are dual representations at the architectural layer — a P2 Boundary Discipline violation viewed at the layer between compiler and user-land.Why this is load-bearing
Existing invariants forbid dual representations within the compiler and within user-land. Silent exception: between them. A compiler carrying its own
TokenKindseparate from anystd/Tokencreates a layer-opacity that exists only because of historical bootstrapping convenience, not semantic need.This claim closes that gap. Pure Bootstrap is the implementation mechanism; this is the ontological commitment Pure Bootstrap points toward.
Three artifacts
1.
docs/thesis/compiler-std-consolidation.md(new, 160L)pipeline.dagorchestration,regen.dagcode-generation registry, lens bodies underlenses/*.dag, substrate reflection accessors, minimal stage0 shim (target ≤5 Rust files)tokenize.dag→std/tokenize.dag(6 types)runtime_mirrors.dag→std/syntax.dag(14 Surface* types)parse_tables.dag→ split decision deferredsrc/v3/std/*→dsl/std/*(whole tree, gated on v2 retirement)src/v3/compiler/*.dagoutside pipeline/regen/lenses → 02.
THESIS.mdclaim additionNew ### section "Compiler–
std/consolidation: no dual representations at the compiler/user boundary", inserted after "Self-inspection: the substrate is its own subject". Natural flow: the substrate is its own subject AND shares its ontology with user programs.3.
ROADMAP.mdupdatesstd/consolidation program — specific migrations" listing the five tracked migration lanesWhat this formalizes
Previously scattered across Pure Bootstrap design, file-preference scaffold, and
project_node_to_stdmemory — all three implicitly pointed at this end state without naming it. This PR names it, bounds it (positive definition), and makes it measurable (ratchet).Test plan
🤖 Generated with Claude Code