Skip to content

test(v2): ratchet ephemeral source-root imports - #1575

Merged
briansrls merged 17 commits into
mainfrom
codex/r3-row85-v2-ephemeral-source-root
May 3, 2026
Merged

briansrls merged 17 commits into
mainfrom
codex/r3-row85-v2-ephemeral-source-root

Conversation

@briansrls

@briansrls briansrls commented May 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the smallest v2 substrate/build-pipeline hook for build-time-ephemeral generated .dag dependency roots without committing generated source.

Exact surfaces future PB work should follow:

  • Library/test resolver: src/v2/tests/src/helpers.rs::resolve_imports_transitively_with_source_roots and compile_dag_named_with_source_roots.
  • Self-compile subprocess helper: src/v2/tests/src/bootstrap.rs::run_self_compile_with_extra_source_roots, which keeps src/v2 as the entry root, keeps dsl as the canonical dependency root, and appends temp/OUT_DIR-style generated roots as dependency pools.
  • Stage0 CLI surface remains the existing compile --source-root <entry> --source-root <dependency> ... path; no direct stage0-only Rust hook was added.

This does not implement PB Gap 4 row projection. It only proves v2 can consume an ephemeral generated .dag dependency root when PB supplies one later.

Validation

  • cargo test -p v2-compiler-tests resolver_imports_ephemeral_generated_source_root -- --nocapture
  • cargo test -p v2-compiler-tests stage0_compile_imports_ephemeral_generated_source_root -- --ignored --nocapture
  • cargo fmt --all --check
  • git diff --check
  • git ls-files '*method_template_projection.dag' 'src/generated/*.dag' 'dsl/generated/*.dag' produced no tracked generated .dag files.

Receipt

No generated .dag projection was committed. The ratchets create temp-root .dag modules during the test run only. This adds no v2 -> v3.std.* import bridge, no copied committed map, and no PB method-template projection data.

@briansrls briansrls changed the title crisp-ibex-569 test(v2): ratchet ephemeral source-root imports May 3, 2026
@briansrls
briansrls marked this pull request as ready for review May 3, 2026 18:21
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 0c5afbbe · Trigger: schedule
  • Comparison: origin/main @ 93bb0297 ... review/pr-1575-0c5afbbe @ 0c5afbbe
  • Thinking: 54s wall

Verdict: APPROVE

Diff is narrowly scoped to v2 test helpers and ignored/bootstrap ratchet tests. I don’t see concrete violations of the pinned modeling, coding, or testing guidance: imports still use parser-backed module identity, the new ephemeral-root path is explicit, and the added tests are behavior-focused for the source-root import case.

I did not run builds or tests, per review instructions.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 0c5afbbe · Trigger: schedule
  • Thinking: 163s wall

✅ Classified as code/test-harness implementation; this looks clean and I found no concerns.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: ee021b4e · Trigger: schedule
  • Comparison: origin/main @ c6d3c60f ... review/pr-1575-ee021b4e @ ee021b4e
  • Thinking: 21s wall

Verdict: APPROVE — test-only diff that adds an ephemeral-source-root ratchet plus the helper plumbing to drive it. Substrate is untouched; this is implementation-layer test code. The new *_with_source_roots variants are additive, the existing build_module_index/resolve_imports_transitively keep their previous shape, and the CARGO_TARGET_DIR fallback in build_stage0 is a small, correct fix.

Exploratory observations (optional):

  • bootstrap.rs:331-335 and tests/src/helpers.rs both use fixed names under std::env::temp_dir() (v2-ephemeral-entry-root, etc.). Two concurrent test runners on the same host would race on those directories. The bootstrap test is #[ignore] so unlikely to bite, but the unit test goes through temp_dir("entry-root") — worth confirming that helper namespaces by pid/nonce; if not, a future parallel-test flake source.
  • The new display_source_path factoring is a clean pure helper — fine.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 4ad2b1f5 · Trigger: manual
  • Comparison: main @ c6d3c60f ... codex/r3-row85-v2-ephemeral-source-root @ 660df13a
  • Conversation: View conversation

1. Story of the diff

This PR adds a v2 test/helper ratchet for importing modules from ephemeral/generated source roots instead of relying on committed generated .dag files under src/. The core helper change is that import resolution can now build a parser-backed module index from an explicit root set via build_module_index_for_roots and resolve_imports_transitively_with_source_roots (src/v2/tests/src/helpers.rs:109, src/v2/tests/src/helpers.rs:183), while the default resolve_imports_transitively path still delegates through the cached canonical index (src/v2/tests/src/helpers.rs:180). On the bootstrap side, the stage0 binary lookup now respects CARGO_TARGET_DIR (src/v2/tests/src/bootstrap.rs:25), and self-compile command construction has a new extra-source-root surface that appends generated roots after the canonical src/v2 and dsl roots (src/v2/tests/src/bootstrap.rs:42–src/v2/tests/src/bootstrap.rs:60). The added tests cover both the helper-level behavior and an ignored stage0 CLI path where an entry module imports a generated module from a separate temp root (src/v2/tests/src/helpers.rs:381, src/v2/tests/src/bootstrap.rs:330).

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — this is v2 test/helper Rust only; it does not add or mutate substrate/Dag types, variants, fields, or cross-pass substrate carriers. The touched surfaces are command construction and test import-resolution helpers (src/v2/tests/src/bootstrap.rs:46, src/v2/tests/src/helpers.rs:183).

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

Compliant — Boundary Discipline / single authority is preserved: the default resolver delegates to the existing cached parser-backed module_index() (src/v2/tests/src/helpers.rs:180), while the custom-root path builds one explicit index from the provided roots and passes that same index into the shared resolver (src/v2/tests/src/helpers.rs:188–src/v2/tests/src/helpers.rs:189). The actual import lookup reads that one index (src/v2/tests/src/helpers.rs:217) rather than introducing a second ad hoc lookup path.

  1. CODING.md.

Compliant — the new surfaces keep dependencies explicit and use free helpers rather than hidden state: run_self_compile_with_extra_source_roots takes extra_source_roots as an input (src/v2/tests/src/bootstrap.rs:46–src/v2/tests/src/bootstrap.rs:49), and the resolver variant takes source_roots directly (src/v2/tests/src/helpers.rs:183–src/v2/tests/src/helpers.rs:187). The custom-root import path deliberately avoids the global OnceLock cache by building a local index for the requested roots (src/v2/tests/src/helpers.rs:188).

  1. TESTING.md.

Finding — NON-BLOCKING. The ignored stage0 ratchet has a couple of assertions that pin implementation/environment details more than the behavior contract. src/v2/tests/src/bootstrap.rs:381 asserts stderr.contains("indexed 2 modules from 2 source roots"), which couples the test to a diagnostic/progress string even though compile success on an entry file importing from the generated root already exercises the behavior. src/v2/tests/src/bootstrap.rs:390 checks Path::new("src/generated/method_template_projection.dag"), which is process-CWD-relative rather than anchored through workspace_root(), so the “must not rely on committed generated .dag under src/” ratchet is weaker than its message says. I would anchor that path through crate::helpers::workspace_root() or remove the redundant assertion if the supplied source-root-only compile is the intended proof.

  1. LOCKED DESIGN DECISIONS.

N/A — the diff does not reference or alter a locked thesis/design decision, substrate target, Arrow/body realization, target binding, or locked emission schema.

  1. TRACKED vs UNTRACKED DEBT.

N/A — no new TODO, bridge, deprecation marker, or temporary scaffold is introduced. The forward-looking comment on the helper names the intended steady-state use of the surface — generated temp/OUT_DIR roots as dependency pools after canonical roots — rather than creating a separate migration artifact (src/v2/tests/src/bootstrap.rs:42–src/v2/tests/src/bootstrap.rs:45).

3. Verdict

APPROVE_WITH_COMMENTS

The core change is implementation-only and preserves a single explicit source-root index path for the new ephemeral import scenario. The one issue I’d clean up is test-shape brittleness in the ignored stage0 ratchet; it is non-blocking because the helper-level regression covers the essential behavior and the problem is confined to assertions, not the import mechanism itself.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: 660df13a · Trigger: schedule
  • Comparison: origin/main @ c6d3c60f ... review/pr-1575-660df13a @ 660df13a
  • Thinking: 68s wall

Findings

None. Nothing in the diff clearly breaks INVARIANTS.md, docs/modeling-discipline.md, CODING.md, or TESTING.md: this is v2 test/helper work (implementation), refactors the resolver to take an injectable module index, adds a fast unit ratchet plus an #[ignore] stage0 check, and respects CARGO_TARGET_DIR for the stage0 binary path.

Verdict

APPROVE — Scope is narrow (ephemeral multi–source-root import resolution + bootstrap ergonomics), structure matches existing helpers (build_module_index → parameterized core + thin wrapper), and the behavior-facing coverage lives in a normal #[test] while the expensive path stays ignored.

Exploratory observations (optional)

The ignored test in src/v2/tests/src/bootstrap.rs asserts a specific stderr substring (indexed 2 modules from 2 source roots around line 393). That is somewhat coupled to log wording; if that text is not treated as part of the CLI’s stable contract, future log edits could break the test without a semantic regression. Non-blocking given #[ignore] and the stronger checks (status.success(), artifact path, no src/generated/... reliance).

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: a74c99c8 · Trigger: schedule
  • Comparison: origin/main @ 9399ccb9 ... review/pr-1575-a74c99c8 @ a74c99c8
  • Thinking: 24s wall

APPROVE — Test-only diff that ratchets a behavior the project already wants (ephemeral/OUT_DIR generated .dag modules resolvable via additional --source-root args) and asserts no committed src/generated/...dag exists. Both new tests are hermetic (per-test temp dirs with nanosecond suffix), the helpers refactor is a clean parameterization (build_module_index_for_roots, resolve_imports_transitively_with_index) preserving the existing single-authority module index, and the CARGO_TARGET_DIR honoring in build_stage0 is a reasonable env fix. No INVARIANTS / modeling-discipline concerns — nothing in this diff touches Dag substrate.

Minor exploratory note (non-blocking): the new bootstrap test duplicates much of the existing test scaffolding rather than going through run_self_compile_with_extra_source_roots that this same PR introduces — could call that helper (with --target dag) to keep one path. Not a violation, just a tidy-up.

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified current head a74c99c against the exploratory helper-reuse note. I am leaving the test shape as-is.

run_self_compile_with_extra_source_roots is intentionally scoped to the future PB/self-compile surface: canonical src/v2 as the entry root, dsl as dependency root, and generated temp/OUT_DIR roots appended as dependency pools. The ignored ratchet here uses a tiny temp entry root plus --target dag so it can prove the stage0 --source-root import behavior without invoking the full self-compile surface or emitted Rust path.

Reusing the helper would require broadening it with custom entry roots and target selection, which would blur the production-facing self-compile contract just to remove a few lines of explicit command setup in the focused ratchet.

— sent from crisp-ibex-569

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 660df13a · Trigger: schedule
  • Thinking: 83s wall

✅ Classified as code/test-harness implementation; the ephemeral source-root ratchets stay in test/helper surfaces, keep parser-backed module discovery as the single authority, and I found no blocking concerns.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: a3324acc · Trigger: schedule
  • Comparison: origin/main @ 716ec0e7 ... review/pr-1575-a3324acc @ a3324acc
  • Thinking: 50s wall

Verdict: APPROVE

Diff is narrowly scoped to v2 test helpers/bootstrap ratchets. I don’t see concrete violations of the pinned modeling, coding, or testing guidance in the changed lines: the new source-root path keeps parser-backed module indexing as the authority, adds focused regression coverage, and does not introduce substrate/modeling shape. I did not run builds or tests per instruction.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: a3324acc · Trigger: manual
  • Comparison: main @ 716ec0e7 ... codex/r3-row85-v2-ephemeral-source-root @ e94ce987
  • Conversation: View conversation

1. Story of the diff

This PR ratchets the v2 import resolver and stage0 bootstrap tests so generated .dag files can live in an ephemeral source root instead of being committed under src/generated. The helper layer now builds a module index from caller-supplied source roots (src/v2/tests/src/helpers.rs:109-115) and routes both the existing default resolver and the new custom-root resolver through one shared indexed resolution function (src/v2/tests/src/helpers.rs:180, src/v2/tests/src/helpers.rs:188-189, src/v2/tests/src/helpers.rs:199-203). The tests then exercise the intended behavior at two levels: a fast helper test compiles an inline entry source against a temp generated root and verifies that the loaded module path came from that temp root, while an ignored stage0 test invokes the built v2-compiler with separate entry/generated --source-root arguments and ratchets that no committed generated projection is required (src/v2/tests/src/bootstrap.rs:372-381, src/v2/tests/src/bootstrap.rs:397-401). The bootstrap helper also now respects CARGO_TARGET_DIR when locating the stage0 binary (src/v2/tests/src/bootstrap.rs:25-28).

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — the diff is v2 test harness/test-helper code only; it does not add or alter Dag substrate types, cross-pass substrate facts, or dag.rs-resident modeling.

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

Compliant — single-authority/facts-flow-forward is preserved by routing both default and custom-root import resolution through the same indexed resolver: the existing resolve_imports_transitively delegates to resolve_imports_transitively_with_index at src/v2/tests/src/helpers.rs:180, while the custom-root path builds one index and passes it into that same function at src/v2/tests/src/helpers.rs:188-189.

  1. CODING.md.

Compliant — the new seam uses explicit dependencies and free helper functions rather than hidden global state: custom roots are passed as source_roots: &[std::path::PathBuf] at src/v2/tests/src/helpers.rs:183-186, and the resolver takes its module index as an explicit parameter at src/v2/tests/src/helpers.rs:199-203.

  1. TESTING.md.

Compliant — the PR adds behavior-driven, hermetic regression coverage for the exact contract: the helper test creates a temp generated module at src/v2/tests/src/helpers.rs:382-390, compiles an entry that imports it at src/v2/tests/src/helpers.rs:392-404, and asserts the dependency was loaded from the generated temp root rather than src/ at src/v2/tests/src/helpers.rs:412-420. The heavier stage0 executable check is present but ignored for cost, which is reasonable because the fast helper-level test covers the core resolver behavior.

  1. LOCKED DESIGN DECISIONS.

N/A — no locked design document, substrate decision, or thesis-level design surface is referenced or changed by this diff.

  1. TRACKED vs UNTRACKED DEBT.

Compliant — I do not see new TODOs, temporary scaffolds, or bridge representations. The temp-root tests clean up their own directories (src/v2/tests/src/bootstrap.rs:405-407, src/v2/tests/src/helpers.rs:423-424), and the “future build-time generated projections” comment documents the intended durable helper surface rather than introducing an unresolved temporary shape (src/v2/tests/src/bootstrap.rs:54-57).

3. Verdict

APPROVE

I did not find a reviewable defect in the diff. The change stays implementation/test-only, keeps import resolution centralized through one resolver path, and adds a focused regression ratchet for ephemeral generated source-root imports without introducing new substrate modeling or untracked debt.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: e94ce987 · Trigger: schedule
  • Comparison: origin/main @ 716ec0e7 ... review/pr-1575-e94ce987 @ e94ce987
  • Thinking: 111s wall

Verdict: APPROVE

Diff is narrowly scoped to v2 test helpers and bootstrap ratchets. I don’t see concrete violations of the pinned invariants, coding guidance, or testing discipline in the changed lines. The new source-root path keeps parser-backed module identity as the authority and adds hermetic temp-root coverage for ephemeral generated imports.

Per instruction, I did not run builds or tests.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 342f6b70 · Trigger: schedule
  • Comparison: origin/main @ 9b5b8a7e ... review/pr-1575-342f6b70 @ 342f6b70
  • Thinking: 53s wall

Verdict: APPROVE

Diff is narrowly scoped to v2 test helpers/bootstrap ratchets. I don’t see concrete violations of the pinned invariants, coding guidance, or test discipline in the changed lines. I did not run builds or tests per instruction.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 342f6b70 · Trigger: schedule
  • Thinking: 121s wall

Non-blocking — Strengths

  • src/v2/tests/src/helpers.rs Classified as code/test-harness implementation; the added source-root override preserves parser-backed module discovery as the single authority and does not introduce substrate modeling debt.

✅ No blocking concerns; the PR cleanly ratchets ephemeral generated source-root imports without changing compiler substrate behavior.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: ca7c3a7f · Trigger: schedule
  • Comparison: origin/main @ bbc16188 ... review/pr-1575-ca7c3a7f @ ca7c3a7f
  • Thinking: 53s wall

Verdict: APPROVE

The diff is test-only and narrowly scoped to v2 source-root import coverage. I don’t see concrete violations of the pinned invariants: module/import authority still flows through the parser-backed index, missing imports remain deferred to compiler diagnostics, and the new tests are behavior ratchets for ephemeral generated roots rather than parallel production logic. I did not run builds or tests per instruction.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: ab00508c · Trigger: schedule
  • Comparison: origin/main @ e6b516ba ... review/pr-1575-ab00508c @ ab00508c
  • Thinking: 86s wall

Findings

None. The diff only touches v2 test helpers and bootstrap tests (implementation-layer Rust). Nothing here violates INVARIANTS.md substrate or boundary rules, docs/modeling-discipline.md (no new multi-variant enums or cross-stage modeling), CODING.md in a way that conflicts with “new code” guidance (small refactors, explicit parameters, test-appropriate unwrap/expect), or TESTING.md in a serious way: the new coverage is hermetic (unique temp dirs, cleanup), behavior-targeted (multi-root import resolution and stage0 compile with extra roots), and the heavy path is correctly #[ignore] with a focused unit test carrying the default CI signal.

Verdict

APPROVE — Scoped test/ratchet work with a clean generalization (build_module_index_for_roots / compile_dag_named_with_source_roots / run_self_compile_with_extra_source_roots) and no rubric violations visible in the diff.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 662131dc · Trigger: schedule
  • Comparison: origin/main @ a483c209 ... review/pr-1575-662131dc @ 662131dc
  • Thinking: 25s wall

APPROVE — Test-only diff that ratchets the ability to import from ephemeral (non-src/) source roots, with both a unit-level test using the in-process resolver and an ignored stage0 binary integration test. The helper refactor (build_module_index_for_roots, resolve_imports_transitively_with_index, display_source_path) is a clean parameterization that preserves the existing single-arg entry points. temp_dir and assert_no_diagnostics already exist. The new temp_dir helper in bootstrap.rs mirrors the helpers.rs one — minor duplication, but bootstrap.rs is binary-integration scoped so keeping it self-contained is reasonable. Honors TESTING.md (hermetic temp dirs, behavior-driven, unit before integration) and CODING.md (free functions, data in/out). No substrate or invariant concerns.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 662131dc · Trigger: schedule
  • Thinking: 71s wall

✅ Code/test-harness implementation only; no blocking concerns in the changed lines.

@briansrls
briansrls merged commit 2b3d90f into main May 3, 2026
4 checks passed
briansrls added a commit that referenced this pull request May 3, 2026
Per openai-pro / gpt-5-5-pro review on PR #1598 (non-blocking, TESTING.md
contract mismatch): the test file header claimed "re-reading + parsing
via the v2-compatible kernel grammar (validated through v3 compile)"
but the actual tests assert via string `contains` / `matches` on the
generated bytes, not a parse / compile check.

Adding a real parse check needs cross-tree dep relaxation
(v3-compiler-tests → v2-compiler or vice versa) which the architecture
forbids, so narrow the prose to match what the tests actually validate
and point readers at the accepted split test chain (Director / PB
acceptance `#issuecomment-4367336134`) and PR #1575's `#[ignore]`d
end-to-end byte-equivalent ratchet.

No code change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 3, 2026
…yte identity

Per cursor review on PR #1598 (non-blocking, INVARIANTS.md "documentation
describes live state" family): the v2 fixture's docstring claimed it
matched the producer's output "character-for-character," but the
header text in the fixture is intentionally distinct from
`render_dag`'s actual header (so reviewers cannot mistake the fixture
for producer-authoritative bytes).

Update the module docstring and the inline comment to claim what the
ratchet actually covers: **structural shape parity** (module declaration,
per-target `Map<String, String>` declaration names, one `count`
spot-check entry per target) — not byte identity. Point at PR #1575's
`#[ignore]`d `stage0_compile_imports_ephemeral_generated_source_root`
as the byte-equivalent end-to-end coverage when needed.

No code change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 4, 2026
…Map adapter (#1598)

* WIP: silent-boar-29

* chore: apply cargo fmt

* WIP: silent-boar-29

* chore: apply cargo fmt

* WIP: silent-boar-29

* chore: apply cargo fmt

* test(r3): bound higher-order skip block by next data declaration (BLOCKING)

Per codex (and earlier claude-opus exploratory) review on PR #1598:
the `higher_order_rows_are_skipped` test used `find("}")` to locate
the end of the Rust map, but template values themselves contain
escaped `\}` characters. An unanchored `find("}")` could halt
mid-row, and `"filter":` appearing later in the same map would
silently slip past the assertion.

Anchor on the next `data ` declaration (`data python_method_template_emit:`)
instead. The producer always emits Python's map immediately after
Rust's, so the next-`data` boundary is structural and deterministic.
This restores the TESTING.md behavior-driven ratchet for the
higher-order skip contract.

Validation: cargo test … higher_order_rows_are_skipped — 1/1 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(r3): narrow producer-test header to match actual coverage

Per openai-pro / gpt-5-5-pro review on PR #1598 (non-blocking, TESTING.md
contract mismatch): the test file header claimed "re-reading + parsing
via the v2-compatible kernel grammar (validated through v3 compile)"
but the actual tests assert via string `contains` / `matches` on the
generated bytes, not a parse / compile check.

Adding a real parse check needs cross-tree dep relaxation
(v3-compiler-tests → v2-compiler or vice versa) which the architecture
forbids, so narrow the prose to match what the tests actually validate
and point readers at the accepted split test chain (Director / PB
acceptance `#issuecomment-4367336134`) and PR #1575's `#[ignore]`d
end-to-end byte-equivalent ratchet.

No code change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(r3): tighten v2 consumability test wording — shape parity, not byte identity

Per cursor review on PR #1598 (non-blocking, INVARIANTS.md "documentation
describes live state" family): the v2 fixture's docstring claimed it
matched the producer's output "character-for-character," but the
header text in the fixture is intentionally distinct from
`render_dag`'s actual header (so reviewers cannot mistake the fixture
for producer-authoritative bytes).

Update the module docstring and the inline comment to claim what the
ratchet actually covers: **structural shape parity** (module declaration,
per-target `Map<String, String>` declaration names, one `count`
spot-check entry per target) — not byte identity. Point at PR #1575's
`#[ignore]`d `stage0_compile_imports_ephemeral_generated_source_root`
as the byte-equivalent end-to-end coverage when needed.

No code change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(r3): tighten v2 consumability path-equality assertion

Per openai-pro / gpt-5-5-pro review on PR #1598 (non-blocking, TESTING.md
ratchet weakness): the v2 consumability test asserted
`path.contains("generated/method_template_projection.dag")` which would
silently accept any absolute committed path containing the same
relative segment, leaving the "loaded only from the ephemeral root"
claim weaker than its prose said.

Replace the unanchored `contains()` with equality against the absolute
path `generated_root.join("generated/method_template_projection.dag")
.to_string_lossy().to_string()`. v2's `display_source_path` strips the
workspace root prefix; for files outside the workspace (a temp dir)
the path falls through to the absolute string, so the equality check
is well-defined.

The negative `starts_with("src/") / starts_with("dsl/")` check is
preserved as a redundant defense.

Validation: cargo test -p v2-compiler-tests pb_method_template_projection_consumability — 1/1 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: silent-boar-29

* WIP: silent-boar-29

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 4, 2026
…+ 5b (parked)

Reconcile the row-85 packet with PR #1598's actual landed surface: a
bounded Map<String, String> build-step adapter for
MethodEmitTemplate::Single rows only, not a typed
MethodTemplateContract projection.

- Add §6.0 recording #1598's scope clamp and what it does/doesn't
  satisfy against the original A1–A7 acceptance: A1+A2+A3+A7 satisfied;
  A4 (five-field preservation) intentionally partial — Single-arm
  emit_template only — and parked on 5b.
- Reframe P3 as P3a (Map-shape Single-row consumability — satisfied
  by #1575 + #1598) + P3b (typed contract at LanguageSpec assignment
  sites — NOT satisfied; remains gating).
- Split §6.2 landing surface into Gap 5a (Single-row leaf re-export
  migration in dsl/extdeps/languages/*/emit.dag — enabled, but
  R3-Grounding-owned and not dispatched by this packet) and Gap 5b
  (typed LanguageSpec rewrite + higher-order arms — parked on
  Substrate/Director typed-read carrier decision).
- Add B6 (higher-order arms covered) and B7 (A4 five-field
  preservation reinstated) to Gap 5b acceptance.
- Update §6.4 non-goals: explicitly forbid src/v2/languages.dag edit
  until P3b flips — the merged Map adapter does not unblock a
  LanguageSpec rewrite without dropping fields or introducing a
  parallel typed authority alongside the Map.
- Update §9 sequencing diagram to show landed (§4 decision, Gap 4
  scope-clamped) vs parked (P3b gate, Gap 5b) work.
- Reference §4 decision doc + #1598 producer + v2 consumer ratchet.

No src/v2/languages.dag edit unblocked. Single-template leaf migration
is enabled but R3-Grounding-owned per ledger row 85.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant