Skip to content
Merged

α #533

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ Cleared (prior PR #521): `DerivedOpEffect { method, path_template, shape }` coll

**Deferral: 1b full implementation (M).** 1b's first attempt escalated (PR #495 shipped 1a; 1b code was reverted). Root cause: `.dag` linear-walk bodies for substrate accessors polluted every user DAG. DB-14 codifies the correct pattern (ExternalRealization mirroring pipeline.dag). Unblocked once DB-14 (PR #497) lands. Design: [design-substrate-external-primitives.md](docs/design-substrate-external-primitives.md) (DB-14). Acceptance in DB-14 §Acceptance.

### Lane 1 Stage 1d

**🟢 Design complete, pending P2-L1 sign-off.** [phase1-lane3-consolidation-build-plan.md](docs/phase1-lane3-consolidation-build-plan.md) is the authoritative design for how `emit_rust.rs` / `emit_go.rs` / `emit_python.rs` dissolve into one `emit.rs` walker + per-target specs. The plan locks: **walker contract** (§7 — five structural authorities per target + typed `SubstrateAccessorBinding`), **spec reading protocol** (§8 — Q5 compliant, zero name-keyed lookups; typed `DeclarationId` caches mirror the PR #528 `PatternBindingRuleVariants` pattern), **determinism plan** (§9 — invariant D-1, `BTreeMap` everywhere, structural grep gate), **migration plan** (§10 — prerequisite bridge **1e.0** Python schema migration + DB-2's six sub-stages 1e.1–1e.6 with definitions of done), **bootstrap-once + snapshot-ratchet** (§11 — mirrors PR #477 / #518 / #530 `lens_*_generated.rs` pattern), and **determinism test suite** (§12 — `tests/determinism_test.rs` per-fixture 5× re-run per DB-8). Companion inventory docs (PR #540): [`emit-functions-inventory.md`](docs/emit-functions-inventory.md) (92 functions classified), [`spec-field-gaps.md`](docs/spec-field-gaps.md) (P0/P1/P2-tagged gaps), [`emit-bridges.md`](docs/emit-bridges.md) (bridges B11–B19 with dissolution targets). Authority note: `src/v3/spec/<target>.dag` is the bootstrap-loaded staging fixture — the canonical home for Shape A language specs is `dsl/extdeps/languages/<target>/` per THESIS.md §"Bootstrap staging note." **Four of five §Acceptance gates met**; **P2-L1 owner sign-off** is the fifth and only remaining gate. **No new DB number allocated** — the plan extends DB-2 (walker API), DB-4 (clean-emission contract), and DB-8 (fixed-point ratchet) rather than introducing a novel structural decision. **Unblocks Stage 1e dispatch on P2-L1 sign-off.**

### Lane 1 Stage 1c

**Cleared this PR (PR 3 Python pilot):** `python_clean_emission: CleanEmissionContract` landed in `spec/python.dag` with `pattern_bindings = NotApplicablePatternBinding`. `emit_python::CleanEmissionContractBinding::build` reads the contract via the typed `PatternBindingRuleVariants` cache on `Dag` (Lane 1 Stage 1c PR 2.5) and rejects every variant except `NotApplicablePatternBinding`. `render_branch_body_expr` dispatches on the parsed binding and selects the substitute-at-render-time path — the emitter maps each payload-binding port to an extraction expression (`__match._0` / `__match`) inside `arm_locals`, so the source-level identifier never appears at a pattern site. Contract-shape generalized without modification: Python's rule is a legitimate variant of the existing `PatternBindingRule` disjunction, not a shape change. Targeted tests in `m1_4_emit_python_test` prove (a) unused bindings leak no identifier, (b) used bindings render via `__match._0` substitution, and (c) emitted Python passes `python3 -m py_compile` (ignored roundtrip matching the Rust/Go pilots).
Expand Down
2 changes: 1 addition & 1 deletion docs/phase-plan-2026-04-18.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ The draft reserved DB-18/19/20/21/22 speculatively. This review dropped those re
| DB-7 / Lane 2 Stage 2d | [`design-symbolic-cost-algebra.md`](./design-symbolic-cost-algebra.md) |
| Stage 3b | [`design-correction-shape.md`](./design-correction-shape.md) (DB-1), [`lane3-self-hosting-cycle.md`](./lane3-self-hosting-cycle.md) §Stage 3b; Lane 1c blockers [`ROADMAP.md`](../ROADMAP.md) §Lane 1 Stage 1c |
| Stage 3c mechanics | [`design-fixed-point-ratchet.md`](./design-fixed-point-ratchet.md) (DB-8) |
| Lane 1 Stage 1e scope, emit determinism, `tests/determinism_test.rs` | [`post-l15-phase-plan.md`](./post-l15-phase-plan.md) Lane 1 summary (incl. DB-8 pointer), [`design-generic-walker-api.md`](./design-generic-walker-api.md) (DB-2) |
| Lane 1 Stage 1e scope, emit determinism, `tests/determinism_test.rs` | [`phase1-lane3-consolidation-build-plan.md`](./phase1-lane3-consolidation-build-plan.md) §§7–12 (**primary** — 1d design **partial** 2026-04-18; §§7–12 land the walker contract / spec reading protocol / determinism plan / migration plan / bootstrap-once / determinism test suite; §§1–3 separate inventory docs + P2-L1 sign-off remain open per the doc's own §Acceptance gates); [`design-generic-walker-api.md`](./design-generic-walker-api.md) (DB-2 walker API); [`design-fixed-point-ratchet.md`](./design-fixed-point-ratchet.md) (DB-8 determinism); [`post-l15-phase-plan.md`](./post-l15-phase-plan.md) Lane 1 summary (sequencing) |
| Open program questions (what `compiler.dag` is today) | **§6** below — not a design substitute for DB-8 |

---
Expand Down
Loading
Loading