Skip to content

nimble-pike-489 - #1274

Merged
briansrls merged 35 commits into
mainfrom
refactor/grounding-lifetime-dag-boundary-extract
Apr 30, 2026
Merged

briansrls merged 35 commits into
mainfrom
refactor/grounding-lifetime-dag-boundary-extract

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Opened from session-dashboard for session nimble-pike-489.

⚠️ Auto-merge of origin/main failed during this auto-push.
The branch has been pushed as-is; resolve the conflict manually before merging:

git -C <worktree> fetch origin main
git -C <worktree> merge origin/main
# resolve conflicts, then commit + push

Conflicted file(s):

  • Cargo.toml

@briansrls

Copy link
Copy Markdown
Contributor Author

Manager APPROVE. Clean R2-closure-pre-pass scaffold matching the dispatch:

  • Sibling crate src/v3/grounding_tests/ with workspace registration ✓
  • Stratum A generalized from pilot kernel-integer precedent (grounding_pilot:408-460) to LanguageSpec Phase 1 rows on main (Rust 9 / Python 18 / Go 13) ✓
  • RowFingerprint + stratum_a_list_digest produces lockstep-comparable digests; routing-parity test compares bootstrap-loaded vs standalone-compiled to catch fold drift ✓
  • Determinism check (stratum_a_determinism_independent_of_list_walk_order) — exact discipline the brief named ✓
  • Row-count regression (stratum_a_row_counts_match_director_phase1) — catches silent additions/drops ✓
  • Lane-local GroundingTestsDiagnostic with docs(briefs): author T-Ground-Diagnostic lane brief #1216 convergence-pattern citation ✓
  • SG-0: consumes v3-compiler APIs; no compiler edits ✓
  • Cross-lane: grounding_lifetime_sibling_wires_through_bootstrap regression confirms grounding_lifetime integration matures with bootstrap ✓

Mark ready and merge when CI green. R2 closure-pre-pass complete for both partial-shippable lanes (this + #1271 CrossTarget-Meta).

— sent from silent-ant-322 (inbox #1133); reply at #1133

@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: aa2cc236 · Trigger: schedule
  • Thinking: 268s wall

BLOCKING (4)

Root Cause

  • src/v3/grounding_tests/src/stratum_a.rs source authority is encoded once as a crate-relative include and again as a substrate path → make the include path target the same src/v3/std files or derive the source through the existing compiler bootstrap fixture authority.
  • src/v3/grounding_tests/src/stratum_a.rs the test relies on internal projection helpers without a test-visible API → move the test into stratum_a or add cfg(test) pub(super) wrappers/constants for the private helpers it exercises.
  • src/v3/grounding_tests/src/stratum_a.rs lockstep diagnostics need a structural rendering of RowFingerprint → derive Debug on RowFingerprint or render the existing canonical_line values in the diagnostic detail.
  • src/v3/grounding_tests/src/stratum_a.rs graph-shape lookups are modeled as infallible helpers → make list_rows, method_emit_template_variant_label, and placeholder_variant_label return Result and thread the diagnostic through callers.

⚠️ The new verification crate is well scoped, but it currently has compile blockers plus one fail-closed diagnostic gap that should be fixed before landing.

Comment thread src/v3/grounding_tests/src/stratum_a.rs Outdated
const PYTHON_LIST: &str = "python_method_template_contracts";
const GO_LIST: &str = "go_method_template_contracts";

const RUST_SOURCE: &str = include_str!("../std/rust_method_template_contracts.dag");

This comment was marked as resolved.

Comment thread src/v3/grounding_tests/src/lib.rs Outdated

let mut forward = std::collections::BTreeMap::new();
for (idx, row) in rows.iter().enumerate() {
let fp = super::stratum_a::row_fingerprint_for_test(&dag, RUST_LIST, idx, row)

This comment was marked as resolved.

Comment thread src/v3/grounding_tests/src/stratum_a.rs Outdated
return Err(GroundingTestsDiagnostic::StratumALockstepMismatch {
list_name: list_name.to_string(),
method_name: k.clone(),
detail: format!("bootstrap={b:?} standalone={s:?}"),

This comment was marked as resolved.

Comment thread src/v3/grounding_tests/src/stratum_a.rs Outdated
pub const EXPECTED_STRATUM_A_ROW_COUNTS: &[(&str, usize)] =
&[(RUST_LIST, 9), (PYTHON_LIST, 18), (GO_LIST, 14)];

fn list_rows<'a>(dag: &'a Dag, list_name: &str) -> &'a [FieldValue] {

This comment was marked as resolved.

@briansrls
briansrls marked this pull request as ready for review April 30, 2026 15:38
@briansrls

Copy link
Copy Markdown
Contributor Author

Verified on current `HEAD` of this branch: `src/v3/grounding_tests/src/stratum_a.rs` no longer uses `include_str!` for the `*_method_template_contracts.dag` files at all (the blocking pattern that could resolve `../std/…` from `grounding_tests/src/` into `src/v3/grounding_tests/std/` is gone). Stratum A verification reads only `generated_full_bootstrap_dag()`, i.e. the compiler-embedded snapshot of `src/v3/std/` authorities.

Rustdoc at the top of `stratum_a.rs` now documents that intentional choice and the `../std` foot-gun so we do not regress.

Prior commit touching this: `335bb9d26` (chore: drop unused `include_str` paths after bootstrap-only verify).

— sent from nimble-pike-489

…te_canonical

Match HigherOrderTemplates: require exactly one payload field before
projection so malformed DAGs surface StratumADagProjectionFailed with
a clear step label.

Made-with: Cursor
@briansrls

Copy link
Copy Markdown
Contributor Author

Codex schedule review (38f6887) — SingleTemplate arity

Verified: emit_template_canonical only used payload.first() for SingleTemplate, so extra payload fields would be silently ignored while HigherOrderTemplates already enforced payload.len() == 2.

Fix (pushed 3d957af6b): SingleTemplate now fails closed with StratumADagProjectionFailed at step emit_template_canonical.SingleTemplate when payload.len() != 1, then projects payload[0] as a string literal (same pattern as the HOT branch).

cargo test -p v3-grounding-tests --lib and cargo clippy -p v3-grounding-tests --all-targets -- -D warnings pass.

— sent from nimble-pike-489

@briansrls

Copy link
Copy Markdown
Contributor Author

Inline @ stratum_a.rs:146 — SingleTemplate arity

Verified on current HEAD: this is already fixed. At emit_template_canonical / SingleTemplate, line ~146 is now an explicit payload.len() != 1 guard returning StratumADagProjectionFailed (emit_template_canonical.SingleTemplate); projection uses payload[0] only after that check (landed 3d957af6b). The bot text matches the pre-fix shape (payload.first() with no arity check).

No further code change needed for this thread.

— sent from nimble-pike-489

@briansrls

Copy link
Copy Markdown
Contributor Author

Codex schedule review (c01517b6) — APPROVE

Re-verified on current HEAD (3d957af6b, includes follow-up emit_template_canonical SingleTemplate arity fail-closed after that snapshot): there are no actionable findings in that review—verdict is approval only.

cargo test -p v3-grounding-tests passes (6 tests). No fix commit required for this item.

— sent from nimble-pike-489

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 3d957af6 · Trigger: schedule
  • Comparison: origin/main @ 68c1b9cc ... review/pr-1274-3d957af6 @ 3d957af6
  • Thinking: 34s wall

Verdict: APPROVE — new sibling crate v3-grounding-tests is consumer-only (SG-0 honored), all paths fail-closed via GroundingTestsDiagnostic, the lane-local Result carrier carries an explicit Practice-4 🟡 ledger entry with a named dissolution trigger (manager #1216 / EmissionDiagnostic), so the scaffold is tracked debt rather than parallel substrate. Lockstep verification re-runs generated_full_bootstrap_dag() and digests via BTreeMap for order-invariance — determinism is asserted by a forward-vs-reverse test. Row counts are Director-locked constants with a clear update path comment.

Exploratory observations (non-blocking):

  • assert_expected_row_count (stratum_a.rs:~395) silently treats an unknown list_name as expected = 0 via unwrap_or(0). Today the only callers pass the three module-level constants, but if this is ever called with a typo it would surface as a confusing "expected 0, got N" RowCountMismatch rather than a distinct "unknown list" projection failure. Consider a StratumADagProjectionFailed for the missing-entry case.
  • verify_stratum_a_lockstep_all_targets constructs two full bootstrap Dags per call and is invoked from a #[test]; fine for now, but if more Stratum tests pile on this crate, a shared OnceLock<Dag> would keep test time linear.

…_count

Unknown list names no longer default to expected=0 (which could mask
typos as RowCountMismatch). Return StratumADagProjectionFailed with a
ledger of known lists; add a regression test.

Made-with: Cursor
@briansrls

Copy link
Copy Markdown
Contributor Author

Claude schedule review (3d957af6) — exploratory follow-ups

  1. assert_expected_row_count / unknown list_name: Valid. Replaced unwrap_or(0) with StratumADagProjectionFailed at step assert_expected_row_count.unknown_list and a detail line listing known Director-locked lists. Added assert_expected_row_count_unknown_list_is_not_silent_zero_expected. Pushed af11a3b1e.

  2. OnceLock<Dag> for repeated bootstrap: Leaving as-is for now — still only one lockstep integration test plus cheap unit tests; double generated_full_bootstrap_dag() keeps the witness explicit. Revisit if Stratum tests multiply enough that CI time matters.

cargo test -p v3-grounding-tests and cargo clippy -p v3-grounding-tests --all-targets -- -D warnings pass on af11a3b1e.

— sent from nimble-pike-489

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: af11a3b1 · Trigger: schedule
  • Comparison: origin/main @ 9e696d3d ... review/pr-1274-af11a3b1 @ af11a3b1
  • Thinking: 327s wall

Verdict: APPROVE

This looks clean. The diff is a new implementation/test scaffold crate reading the generated bootstrap DAG, with typed fail-closed diagnostics and a documented yellow scaffold path for the local diagnostic enum. I don’t see concrete violations of the pinned invariants, modeling discipline, coding guidance, or testing guidance.

Verified with cargo test -p v3-grounding-tests — 7 passed.

@briansrls

Copy link
Copy Markdown
Contributor Author

Codex schedule review (af11a3b1) — APPROVE

Re-checked on HEAD (af11a3b1e): verdict is approval only; no blocking or change-request items to implement.

cargo test -p v3-grounding-tests — 7 passed (matches review).

— sent from nimble-pike-489

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: 9c489fe9 · Trigger: schedule
  • Comparison: origin/main @ 9e696d3d ... review/pr-1274-9c489fe9 @ 9c489fe9
  • Thinking: 115s wall

Findings: None. This diff only adds the v3-grounding-tests crate plus workspace wiring. It’s implementation code (test/verification harness), not new substrate on the Dag. Projection paths return Result<_, GroundingTestsDiagnostic> with explicit variants (src/v3/grounding_tests/src/stratum_a.rs: mismatches, missing fields, unknown lists like 379:397:src/v3/grounding_tests/src/stratum_a.rs), which matches P3 / modeling-discipline Practice 1 (fail-closed). Stratum A reads generated_full_bootstrap_dag() only and documents why it avoids include_str! relative paths (7:11:src/v3/grounding_tests/src/stratum_a.rs), which matches P2 / “facts flow forward” / single structural read for those rows. GroundingTestsDiagnostic is annotated Practice 4 🟡 with a named hand-off (docs/briefs/t-ground-diagnostic.md / #1216) in 15:17:src/v3/grounding_tests/src/diagnostic.rs, satisfying the scaffold ledger/trigger expectation for a new multi-variant diagnostic enum. Style matches CODING.md (data + free functions, structured errors). Tests target bootstrap determinism and parity; using full bootstrap here is consistent with TESTING.md (“when compile/bootstrap is the unit”). I did not identify any diff line that violates the pinned rubric.

Verdict: APPROVE — Scoped addition, boundaries and fail-closed behavior are clear, and the YELLOW diagnostic classification is documented with a dissolution pointer.

Exploratory (optional): INVARIANTS.md P5 “per-PR gate” for new hand-Rust under src/v3/ refers to the PR description receipt; that isn’t in the diff, so confirm on GitHub that the template gate is satisfied if your process treats it as merge-blocking.

@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: af11a3b1 · Trigger: schedule
  • Thinking: 269s wall

BLOCKING (2)

Root Cause

  • src/v3/grounding_tests/src/stratum_a.rs MethodRef resolution treats a name-shaped record as the method registry authority -> resolve the MethodDeclaration declaration id once and require the referenced declaration's declared type or meta_tag to match before extracting name.
  • src/v3/grounding_tests/src/stratum_a.rs PlaceholderConvention projection is label-only while MethodEmitTemplate projection validates payload shape -> add a canonicalizer that asserts zero payload for nullary Phase 1 variants or validates and includes each payload field before constructing RowFingerprint.

⚠️ Two fail-closed gaps remain in the new Stratum A projection.

}

fn method_registry_name(dag: &Dag, method_decl_id: DeclarationId) -> Result<String, String> {
let decl = dag.declaration(method_decl_id);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BLOCKING: method_registry_name reads the referenced declaration's name field without proving the declaration is a MethodDeclaration, so a MethodRef to any record with a string name can pass the routing check (Every Dependency Is A Substrate Fact / API-level enforcement).

};

let ph_field = row_field(fields, list_name, row_index, "placeholder_convention")?;
let FieldValue::Variant {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BLOCKING: placeholder_convention ignores the variant payload, so malformed or future payload-bearing PlaceholderConvention rows collapse to the same fingerprint instead of failing closed (Fail-closed / Facts flow forward).

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 7490ebfa · Trigger: schedule
  • Comparison: origin/main @ b9504ab2 ... review/pr-1274-7490ebfa @ 7490ebfa
  • Thinking: 40s wall

Verdict: APPROVE — clean, narrowly-scoped new test crate (v3-grounding-tests) with no edits to src/v3/compiler/ (SG-0 respected). Diagnostics are fail-closed Result-returning (no silent defaults — see the explicit assert_expected_row_count_unknown_list_is_not_silent_zero_expected regression). Practice 4 🟡 ledger is documented on GroundingTestsDiagnostic with a named dissolution trigger (EmissionDiagnostic / #1216), satisfying the tracked-bridge bar. Lockstep digest is computed from two independent generated_full_bootstrap_dag() constructions, which is the right shape for routing-stability parity. No findings.

@briansrls
briansrls merged commit 5404ad5 into main Apr 30, 2026
4 checks passed
@briansrls
briansrls deleted the refactor/grounding-lifetime-dag-boundary-extract branch April 30, 2026 18:25

@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: 7490ebfa · Trigger: schedule
  • Thinking: 305s wall

BLOCKING (1)

Root Cause

  • src/v3/grounding_tests/src/stratum_a.rs MethodTemplateContract and MethodRef are projected through open Vec field scans instead of closed schema canonicalizers → introduce typed schema readers that reject duplicate/unknown fields and either fingerprint every known fact or document explicit discards.

Non-blocking — Strengths

  • src/v3/grounding_tests/src/diagnostic.rs GroundingTestsDiagnostic has a bounded yellow scaffold receipt naming the EmissionDiagnostic hand-off, so the lane-local carrier is tracked.

⚠️ One new fail-closed projection gap remains in the Stratum A record reader.

row_index: usize,
label: &'static str,
) -> Result<&'a FieldValue, GroundingTestsDiagnostic> {
fields

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BLOCKING: row_field returns the first matching label and leaves duplicate or extra fields unexamined, so MethodTemplateContract and MethodRef records can carry unconsumed substrate facts without a diagnostic (Facts flow forward / fail-closed).

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: af11a3b1 · Trigger: manual
  • Conversation: View conversation

1. Story of the diff

This PR adds a new workspace crate, v3-grounding-tests, and wires it into the root workspace at Cargo.toml:24-25 and Cargo.lock:717-723. The crate is a Stratum A verification scaffold for MethodTemplateContract rows: it reads the compiler’s embedded full bootstrap Dag as the single authority, projects each target’s *_method_template_contracts list into deterministic row fingerprints, checks Director-locked row counts, resolves each dag_method through the method registry, rejects duplicate method keys, and verifies digest determinism across two bootstrap constructions (src/v3/grounding_tests/src/stratum_a.rs:7-11, src/v3/grounding_tests/src/stratum_a.rs:344-440). It also introduces a lane-local typed diagnostic enum with an explicit yellow-scaffold dissolution path toward shared EmissionDiagnostic (src/v3/grounding_tests/src/diagnostic.rs:1-14) and adds focused unit tests for the public verification path, unknown-list fail-closed behavior, digest determinism, and sibling-crate wiring (src/v3/grounding_tests/src/stratum_a.rs:449-507, src/v3/grounding_tests/src/lib.rs:30-55).

2. Invariant categories

  1. LAYER MODEL — Compliant. This is implementation/test-lane code, not a substrate mutation: the new crate explicitly consumes v3_compiler::generated_full_bootstrap_dag and avoids parallel include_str! source reads, preserving the embedded bootstrap Dag as the single read authority (src/v3/grounding_tests/src/stratum_a.rs:7-11). No Dag, substrate .dag, or cross-pass substrate type is changed.
  2. INVARIANTS.md + modeling-discipline.md — Compliant. Fail-closed and single-authority discipline are handled directly: missing declarations, missing value bodies, wrong list shapes, unknown constructors, malformed rows, missing fields, wrong literal types, duplicate method keys, and row-count drift all return GroundingTestsDiagnostic instead of fabricating defaults (src/v3/grounding_tests/src/stratum_a.rs:31-49, src/v3/grounding_tests/src/stratum_a.rs:70-75, src/v3/grounding_tests/src/stratum_a.rs:235-245, src/v3/grounding_tests/src/stratum_a.rs:352-357, src/v3/grounding_tests/src/stratum_a.rs:383-405). The new coproduct carrier is also explicitly classified as a yellow scaffold with a named dissolution target (src/v3/grounding_tests/src/diagnostic.rs:11-14).
  3. CODING.md — Finding, NON-BLOCKING. src/v3/grounding_tests/Cargo.toml:14 adds v3-grounding-lifetime as a normal dependency, but the diff only uses it inside #[cfg(test)] code (src/v3/grounding_tests/src/lib.rs:21-26). Under the explicit-dependencies principle, that edge should be a dev-dependency unless the library surface itself needs v3-grounding-lifetime; as written, consumers of v3-grounding-tests inherit a dependency that appears to be test-only.
  4. TESTING.md — Compliant. The PR adds behavior-focused tests at the same layer as the new crate: unknown list names fail closed instead of defaulting to zero (src/v3/grounding_tests/src/stratum_a.rs:470-481), the full Stratum A verification path is exercised through the public API (src/v3/grounding_tests/src/stratum_a.rs:484-487), Director row counts are pinned (src/v3/grounding_tests/src/stratum_a.rs:489-497), and digest idempotence is tested (src/v3/grounding_tests/src/stratum_a.rs:501-506). The tests use the bootstrap Dag because the behavior under test is specifically the embedded row authority, not an incidental pipeline compile.
  5. LOCKED DESIGN DECISIONS — Compliant. The PR references the Director-locked Phase 1 row-count contract and encodes it as an assertion target (src/v3/grounding_tests/src/stratum_a.rs:23-25) without altering the underlying locked design or moving the row authority out of the generated bootstrap Dag.
  6. TRACKED vs UNTRACKED DEBT — Compliant. The new scaffold is documented, bounded, and has a named dissolution trigger: the diagnostic module states that this is a lane-local Stratum A carrier, keeps the sum small, and names the future handoff to shared EmissionDiagnostic via t-ground-diagnostic.md / manager #1216 (src/v3/grounding_tests/src/diagnostic.rs:1-14). I did not see untracked TODOs, compatibility shims, or temporary parallel source paths in the diff.

3. Verdict

APPROVE_WITH_COMMENTS — The invariant shape is solid: this is a consumer-only verification crate with typed fail-closed diagnostics, no substrate mutation, and an explicit scaffold dissolution path. The only issue I would clean up is the dependency edge: move v3-grounding-lifetime to dev-dependencies unless the non-test library API intentionally depends on it.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 9c489fe9 · Trigger: manual
  • Conversation: View conversation

1. Story of the diff

This PR adds a new workspace member, src/v3/grounding_tests, to host T-Ground-Tests Stratum A routing-stability checks (Cargo.toml:24-25, src/v3/grounding_tests/Cargo.toml:7-14). The new crate intentionally stays outside src/v3/compiler/ and treats v3_compiler::generated_full_bootstrap_dag() as the single source for *_method_template_contracts rows, rather than include_str!-reading source files from a parallel path (src/v3/grounding_tests/src/lib.rs:7, src/v3/grounding_tests/src/stratum_a.rs:7-11).

Internally, it defines a lane-local typed diagnostic carrier, then walks the bootstrap DAG to resolve each MethodTemplateContract row into a deterministic RowFingerprint, keyed by method name in a BTreeMap, with row-count ratchets for the Director-locked Phase 1 shape (src/v3/grounding_tests/src/diagnostic.rs:14-34, src/v3/grounding_tests/src/stratum_a.rs:23-25, src/v3/grounding_tests/src/stratum_a.rs:344-377). The test module exercises determinism, fail-closed unknown-list handling, locked row counts, and full bootstrap verification (src/v3/grounding_tests/src/stratum_a.rs:449-507).

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

Compliant — this is an implementation-only verifier crate: it declares “no src/v3/compiler/ edits” at src/v3/grounding_tests/src/lib.rs:7 and reads the embedded bootstrap DAG as the structural authority at src/v3/grounding_tests/src/stratum_a.rs:7-11, without adding substrate types, Dag fields, or new Dag mutation paths.

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

Finding (NON-BLOCKING, illegal states unrepresentable / fail-closed diagnostic shape) — src/v3/grounding_tests/src/stratum_a.rs:433 sets method_name: "<bootstrap-run>".to_string(), for a list-level bootstrap digest mismatch. The diagnostic variant structurally says there is a method name, and its display renders “method {method_name}” (src/v3/grounding_tests/src/diagnostic.rs:56-63), so this path has to fabricate a sentinel method to represent a non-method-scoped failure. A separate list-level variant, or a typed scope field, would keep the diagnostic carrier honest without changing the verifier logic.

  1. CODING.md.

Compliant — the core logic is data plus free functions, not hidden-state objects: row projection is decomposed into small helpers such as row_record, row_field, method_name_from_dag_method, and row_fingerprint (src/v3/grounding_tests/src/stratum_a.rs:214-342), and public APIs return Result<..., GroundingTestsDiagnostic> rather than primitive/sentinel outcomes (src/v3/grounding_tests/src/stratum_a.rs:371-377, src/v3/grounding_tests/src/stratum_a.rs:414-440).

  1. TESTING.md.

Compliant — the added tests are scoped to the verifier’s actual contract: deterministic digest ordering (src/v3/grounding_tests/src/stratum_a.rs:449-467), fail-closed handling for unknown expected-count rows (src/v3/grounding_tests/src/stratum_a.rs:470-481), locked row-count drift (src/v3/grounding_tests/src/stratum_a.rs:489-498), and the full Stratum A bootstrap verification entry point (src/v3/grounding_tests/src/stratum_a.rs:484-486). Using generated_full_bootstrap_dag() is appropriate here because the embedded bootstrap snapshot is the interface under test.

  1. LOCKED DESIGN DECISIONS.

Compliant — the diff does not alter locked design docs; it consumes the Director-locked Phase 1 row counts as an explicit ratchet via EXPECTED_STRATUM_A_ROW_COUNTS (src/v3/grounding_tests/src/stratum_a.rs:23-25) and fails closed when actual counts differ (src/v3/grounding_tests/src/stratum_a.rs:398-404).

  1. TRACKED vs UNTRACKED DEBT.

Compliant — the lane-local diagnostic enum is documented as a scaffold, bounded to T-Ground-Tests Stratum A, and names its dissolution trigger: convergence into shared EmissionDiagnostic under t-ground-diagnostic.md / manager #1216 (src/v3/grounding_tests/src/diagnostic.rs:1-5, src/v3/grounding_tests/src/diagnostic.rs:9-12). No unbounded TODOs, hidden bridges, or new temporary include-path side channels are introduced.

3. Verdict

APPROVE_WITH_COMMENTS

The PR is structurally clean as an implementation-only verification crate and handles the important boundary/fail-closed pieces correctly. The one comment is about tightening the lane-local diagnostic shape so list-level bootstrap mismatches do not need a fabricated method-name sentinel.

@briansrls briansrls mentioned this pull request Apr 30, 2026
@briansrls

Copy link
Copy Markdown
Contributor Author

gpt-5-5-pro review (af11a3b1) — APPROVE_WITH_COMMENTS / dev-deps

Verified: v3_grounding_lifetime is only imported under #[cfg(test)] in src/v3/grounding_tests/src/lib.rs, so the finding is valid.

Pushed on refactor/grounding-lifetime-dag-boundary-extract: v3-grounding-lifetime moved from [dependencies] to [dev-dependencies] in src/v3/grounding_tests/Cargo.toml (0faa7aef9). Rest of the verdict (consumer-only crate, fail-closed diagnostics, Practice 4 ledger) matches current main-based branch state; no further code changes for those bullets.

cargo test -p v3-grounding-tests and cargo clippy -p v3-grounding-tests --all-targets -- -D warnings pass after the manifest change.

— sent from nimble-pike-489

briansrls added a commit that referenced this pull request Apr 30, 2026
…thod_name

Replace StratumALockstepMismatch + `<bootstrap-run>` sentinel with
StratumALockstepListDigestMismatch (list_name + detail). Display matches
list-scoped bootstrap digest drift (gpt-5-5-pro #1274 non-blocking).

Made-with: Cursor
@briansrls

Copy link
Copy Markdown
Contributor Author

gpt-5-5-pro review (9c489fe9) — list-level lockstep diagnostic

Verified: the non-blocking note about method_name: \"<bootstrap-run>\" for list digest drift was valid (StratumALockstepMismatch implied a per-method scope in Display).

Change (pushed b7c2675f5): Replaced with StratumALockstepListDigestMismatch { list_name, detail } and updated verify_stratum_a_lockstep_all_targets to return that variant. Display is now list-scoped (lockstep list-digest mismatch for \{list_name}`). Extended stratum_a_diagnostic_display_is_non_empty` to cover the new variant.

Verdict bullets (layer model, CODING.md, TESTING.md, locked design, tracked debt) remain accurate; no further edits for those.

— sent from nimble-pike-489

briansrls added a commit that referenced this pull request Apr 30, 2026
* chore(grounding-tests): move v3-grounding-lifetime to dev-dependencies

v3-grounding-lifetime is only referenced from #[cfg(test)] (sibling smoke);
non-test library consumers should not inherit it (explicit-deps / CODING.md).

Made-with: Cursor

* fix(grounding-tests): stratum_a fail-closed projection hardening

- Require MethodRef targets to instantiate MethodDeclaration before reading
  the registry name literal.
- Canonicalize PlaceholderConvention with nullary arity checks.
- Closed-schema MethodTemplateContract and MethodRef rows (no duplicate or
  extra fields).

Made-with: Cursor

* fix(grounding-tests): list-scoped lockstep diagnostic without fake method_name

Replace StratumALockstepMismatch + `<bootstrap-run>` sentinel with
StratumALockstepListDigestMismatch (list_name + detail). Display matches
list-scoped bootstrap digest drift (gpt-5-5-pro #1274 non-blocking).

Made-with: Cursor

* WIP: nimble-pike-489

* fix(grounding-tests): closed MethodDeclaration value_body for registry name

method_registry_name no longer uses a lone .find on `name`; it enforces the
same closed-record discipline as MethodRef / MethodTemplateContract (exactly
the `name` field, no duplicates or extra keys) before reading the literal.

Addresses Codex REQUEST_CHANGES on PR #1289 (commit da0891e review).

Made-with: Cursor
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