Skip to content

test(evaluator): R3 diagnostics_empty_after_bootstrap ratchet for method-template-contracts - #1537

Merged
briansrls merged 2 commits into
mainfrom
session/merry-heron-351-diagnostics-empty-bootstrap
May 2, 2026
Merged

briansrls merged 2 commits into
mainfrom
session/merry-heron-351-diagnostics-empty-bootstrap

Conversation

@briansrls

@briansrls briansrls commented May 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Per Director / Debt-Paydown dispatch: smallest ratchet that pays down the missing diagnostics_empty_after_bootstrap debt row for the method-template-contract bootstrap fixture authorities.

Adds one combined-axis test in src/v3/compiler/tests/integration/method_template_contract_test.rs::bootstrap_method_template_contracts_lower_to_list_with_empty_diagnostics. The test asserts, for the full bootstrap Dag:

  1. dag.diagnostics().is_empty() (checked first so structural assertions cannot pass over a noisy Dag — exactly the failure mode ROADMAP.md:504 names).
  2. Each of rust_method_template_contracts / python_method_template_contracts / go_method_template_contracts is present.
  3. Each lowers to ValueBody::List(_) (not Map, not the no-body fallback).

Debt receipt — Disposition #1 / Debt paid

Per Debt-Paydown Mgr clarification: this is a Disposition #1 (Debt paid) target from docs/debt/r3-debt-paydown-ledger-2026-05-02.md (#1531), complementary to (not overlapping with) Grounding method-template migration. Any blocker / closure update routes through zesty-dove-500 #1526.

Citations (in dispatch authority order):

  • docs/debt/r3-debt-paydown-ledger-2026-05-02.md:82 (docs(r3-debt-paydown): initial debt-row inventory ledger 2026-05-02 #1531) — primary ledger row: "Missing diagnostics-empty bootstrap gate" / "Open" / diagnostics_empty_after_bootstrap ratchet for new bootstrap authorities. This PR closes the method-template-contract authority slice of that row.
  • ROADMAP.md:502 — "go_method_template_contracts live diagnostic mismatch": Dissolution = "structural gate that all 3 method-template-contract data declarations both lower to ValueBody::List AND leave dag.diagnostics() empty."
  • ROADMAP.md:504 — "diagnostics empty acceptance gate" missing for new bootstrap fixtures: Dissolution = "every new bootstrap fixture authority gets a diagnostics_empty_after_bootstrap ratchet test".
  • ROADMAP.md:576 (table row 6) — diagnostics_empty_after_bootstrap for new bootstrap fixture authorities, especially method-template-contract data.

This PR closes the method-template-contract slice of the ledger row. Other new bootstrap fixture authorities can adopt the same pattern as they land; the broader ledger row stays open until each authority has its receipt. Blockers / closure updates route through zesty-dove-500 #1526.

Constraints upheld

  • No broad bootstrap regeneration.
  • No unrelated snapshot churn.
  • No suppression of diagnostics — the gate fails closed if the Dag carries any.
  • No parser / substrate changes.
  • The bootstrap is already diagnostic-clean today; the gate ratchets the property forward, it does not require landing a fix.
  • Complementary to Grounding method-template migration (not overlapping).

Test plan

  • cargo test -p v3-compiler --test integration method_template_contract_test::bootstrap_method_template_contracts_lower_to_list_with_empty_diagnostics — 1 passed locally.
  • CI v3 + ci.

🤖 Generated with Claude Code

…hod-template-contracts

Per ROADMAP.md:502 (`go_method_template_contracts` live diagnostic
mismatch dissolution), ROADMAP.md:504,576 (general
`diagnostics_empty_after_bootstrap` pattern), and
docs/debt/r3-debt-paydown-ledger-2026-05-02.md:82 row.

New combined-axis ratchet test
`bootstrap_method_template_contracts_lower_to_list_with_empty_diagnostics`
asserts the three properties together for each method-template-contract
data declaration:

  1. Declaration present in the full bootstrap Dag.
  2. value_body lowers to ValueBody::List(_) (not Map, not no-body).
  3. Bootstrap Dag carries an empty diagnostics() table.

The diagnostics check runs first so per-contract structural assertions
cannot pass over a semantically diagnostic Dag — the failure mode the
ROADMAP row names. The combined gate is one test, one failure
surface, one dissolution receipt for the debt row.

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

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: 21a23b7b · Trigger: schedule
  • Comparison: origin/main @ 0ad95356 ... review/pr-1537-21a23b7b @ 21a23b7b
  • Thinking: 47s wall

Findings

None. This diff only adds an integration test plus comments in method_template_contract_test.rs; it does not touch substrate types, DAG modeling, or compiler boundaries, so INVARIANTS.md / docs/modeling-discipline.md do not apply in a meaningful way. CODING.md applies to compiler sources; the new code matches existing patterns in the same file (generated_full_bootstrap_dag(), reuse of assert_per_target_list_dag_method_unique). TESTING.md: the test is behavior-driven (diagnostics empty + structural shape), uses the same integration entry point as method_template_contract_per_target_dag_method_unique immediately above, and the bundled assertions are explicitly justified as one combined R3 ratchet rather than unrelated multi-claim noise.

Verdict

APPROVE — Small, targeted regression/ratchet test with clear documentation of overlap with neighboring tests and why the combined gate matters; no rubric violations grounded in this diff.

@briansrls
briansrls merged commit eb4196a into main May 2, 2026
4 checks passed
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