Skip to content

R3 gate #69: bridge retirement demonstration - #2551

Merged
briansrls merged 12 commits into
mainfrom
session/warm-otter-654
May 10, 2026
Merged

briansrls merged 12 commits into
mainfrom
session/warm-otter-654

Conversation

@briansrls

@briansrls briansrls commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

R3 gate #69 (bridge retirement demonstration): adds bridge_retirement_demonstration integration test in canonical_lens_bridge_ratchet_test.rs that exercises one retired-bridge replacement path end-to-end.

What

  • Asserts all four bridge ratchets remain at zero (canonical-lens include_str!, name-eq dispatch, name lookups, declaration-ref name-dispatch helpers).
  • Compiles r1_gates.dag, runs r1_lens_output_equals_suite via TestRunner, and verifies lens_output_equals_gate resolves the lens as a DeclarationRef through production apply_lens_declaration (not the retired bridges) and passes.

Why

Demonstrates that retired-bridge consumers go through the live production path, not legacy include_str/name-dispatch. Closure-gate evidence for §1.8 row #69.

P5 Receipt

  • SG-0 census before/after in src/v3/compiler/tests/integration/sg0_census_test.rs: unchanged; this PR adds no new hand-Rust production surface and only adds a focused Rust integration receipt for R3 gate Implement interface-driven SDLC pipeline with profiles and state machines #69. Bridge residual dissolution is checkable through the zero-ratchet assertions in canonical_lens_bridge_ratchet_test.rs::bridge_retirement_demonstration.

Tests

cargo test -p v3-compiler --test integration bridge_retirement_demonstration — passing (4 checks green).

Closes dashboard work-item r3-gate-69.

@briansrls
briansrls marked this pull request as ready for review May 10, 2026 03:42

@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: 14b652ff · Trigger: schedule
  • Thinking: 221s wall

Non-blocking — Strengths

  • src/v3/compiler/tests/integration/canonical_lens_bridge_ratchet_test.rs The added test stays implementation-local, pins the retired bridge counters at zero, and exercises the existing LensOutputEquals fixture through TestRunner.

ROADMAP — Verified

  • bridge_canonical_lens_name_dispatch_retired: The new gate matches the R3 bridge-retirement intent by demonstrating the DeclarationRef-backed path while the canonical lens name/include_str bridge surface remains zero.

✅ No blocking concerns.

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified the relayed codex approval artifact against the current PR: the cited witness remains at src/v3/compiler/tests/integration/canonical_lens_bridge_ratchet_test.rs:372, and the doc status flips at docs/r3-program-plan.md:295 and docs/r3-structure.md:187 match that executable receipt. No actionable change was requested or needed. — sent from warm-otter-654

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified the 2026-05-10T05:39:48Z codex approval artifact against current HEAD: bridge_retirement_demonstration still ratchets the retired bridge residuals to zero and executes the LensOutputEquals replacement path through TestRunner, and the R3 docs still cite that executable receipt. No actionable change was requested or needed. — sent from warm-otter-654

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-thinking
  • Commit: 37f9fde5 · Trigger: manual
  • Comparison: main @ b96a51a2 ... session/warm-otter-654 @ 37f9fde5
  • Conversation: View conversation

1. Story of the diff

This PR turns R3 gate #69 from a declared bridge-retirement target into a landed receipt. The docs now say bridge_retirement_demonstration is CONSUMER_LANDED, not merely declared, and tie that status to a specific integration test path: LensOutputEquals resolves a fixture-local DeclarationRef and executes production apply_lens_declaration rather than using canonical-lens byte inclusion or name-dispatch bridges (docs/r3-program-plan.md:295, docs/r3-structure.md:187; diff lines 10 and 23). The test side adds a small compile helper and a new bridge_retirement_demonstration test that first ratchets existing bridge counters to zero, then compiles tests/fixtures/r1_gates.dag, runs r1_lens_output_equals_suite, and asserts the single lens_output_equals_gate claim passes (src/v3/compiler/tests/integration/canonical_lens_bridge_ratchet_test.rs:372-395; diff lines 62-85).

2. Invariant categories

  1. LAYER MODEL — Compliant. The diff does not introduce or mutate substrate types, DAG resident variants, or cross-pass model fields. It is an implementation/test/doc receipt. The load-bearing execution path is through the existing production runner: TestRunner::new(&dag).run_suite("r1_lens_output_equals_suite") at canonical_lens_bridge_ratchet_test.rs:390 (diff line 80).
  2. INVARIANTS.md + modeling-discipline.md — Compliant. P5 / Progress Is Dissolution is handled directly: the test asserts zero residual canonical-lens bridge mechanisms before executing the replacement path — count_canonical_lens_include_str_bridges, name-dispatch counts, name-lookups, and helper counts are all asserted as zero at canonical_lens_bridge_ratchet_test.rs:381-384 (diff lines 71-74). This matches the invariant that bridges should dissolve rather than become steady state. chatgpt-review-2ef8d799-6669-4a…
  3. CODING.md — Compliant. The added helper is a free function with explicit inputs, compile_clean(source: &str, file: &str) -> Dag, and it keeps the test’s setup dependency visible rather than hiding compilation behind global state (canonical_lens_bridge_ratchet_test.rs:31-40; diff lines 44-53). Test-only panics are acceptable under the coding doc’s “Only main and test code unwrap/panic” allowance. chatgpt-review-c1fcd923-b6d9-4b…
  4. TESTING.md — Compliant. The new test is integration-level because the subject is the gate’s end-to-end production path: compile fixture → construct TestRunner → run suite → assert ClaimResult::Pass (canonical_lens_bridge_ratchet_test.rs:387-394; diff lines 77-84). That fits TESTING.md’s allowance that compile_to_dag is correct when the pipeline is the unit, and the test is still hermetic because it declares its fixture and expected suite result locally. chatgpt-review-0f8b8e24-c034-44…
  5. LOCKED DESIGN DECISIONS — N/A. The diff does not alter a locked design doc or change any locked substrate/design decision. It updates R3 program status text and adds a receipt test.
  6. TRACKED vs UNTRACKED DEBT — Compliant. No new scaffold, TODO, temporary bridge, or residual path is introduced. The changed docs explicitly mark gate Implement interface-driven SDLC pipeline with profiles and state machines #69 as landed via a named consumer receipt (docs/r3-program-plan.md:295, diff line 10), and the test ratchets the named bridge residuals to zero before claiming the execution path.

2.5. Top-down PM intent review

Compliant. The highest-level direction is bridge dissolution and movement away from hand-maintained / parallel authority: the thesis and zero-floor docs push tests and compiler behavior toward .dag/structural declarations and away from Rust-side residuals, while INVARIANTS P5 says progress is dissolution, not permanent bridging. chatgpt-review-2ef8d799-6669-4a…

chatgpt-review-0f8b8e24-c034-44…

This PR does not dilute that into “we’ll retire it later”; it upgrades the gate only after adding a concrete production-path consumer test and zero-bridge ratchets (canonical_lens_bridge_ratchet_test.rs:381-394; diff lines 71-84). The one caveat is that this remains a Rust integration receipt during the transition, but TESTING.md explicitly allows Rust integration tests until the 0-floor migration reaches its end state. chatgpt-review-0f8b8e24-c034-44…

3. Verdict

APPROVE. The PR is narrow, diff-cited, and aligns the R3 gate status with a real integration receipt. I found no blocking substrate issue, no untracked bridge, and no PM-level semantic dilution.

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified the 2026-05-10T05:54:51Z openai-pro approval artifact against current HEAD: the bridge_retirement_demonstration witness still ratchets the retired bridge surface to zero and exercises the TestRunner/LensOutputEquals replacement path, and both R3 doc status updates remain tied to that executable receipt. No actionable change was requested or needed. — sent from warm-otter-654

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified the cursor APPROVE_WITH_COMMENTS item: the PR body was missing a literal P5 receipt shape, so I updated the PR body with an explicit P5 Receipt section naming the unchanged SG-0 census and the zero-ratchet bridge-residual assertions as the checkable receipt. No code change was required. — sent from warm-otter-654

@briansrls
briansrls merged commit f9171c1 into main May 10, 2026
4 checks passed
@briansrls
briansrls deleted the session/warm-otter-654 branch May 10, 2026 06:04
briansrls added a commit that referenced this pull request May 10, 2026
…2648)

* docs(r3): §1.8 ledger-receipt sync — 2026-05-10 batch (V Mgr lane)

Flip §1.8 ledger Status from DECLARED/CONSUMER_LANDED to PASSING for V-Mgr
lane gates whose CONSUMER_LANDED PRs landed in main as of 2026-05-10. Each
row cites the merging PR per Director-ratified post-merge ledger-receipt
sync discipline (gunbc#828 c#4415884211).

Gates flipped (17): #9 (#2585), #10 (#2602), #11 (#2603), #12 (#2598),
#14 (#2571), #31 (#2586), #43 (#2495), #44 (#2523), #45 (#2527),
#46 (#2529), #47 (#2532), #48 (#2535), #49 (#2536), #50 (#2547),
#51 (#2577), #52 (#2578), #69 (#2551).

Skipped per discipline: #15 (PR #2604 not landed); #35 already PASSING.

Doc-only; no code or test changes. Closes #2640.

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

* docs(r3): preserve corpus-quantified + canvas-deferral qualifiers on rows #9/#10/#11

Reviewer (claude-opus-4-7 on PR #2648) flagged that the prior status text
on rows #9, #10, #11 carried Director/PM-ratified semantic qualifiers that
must not be silently elided when citing a new slice receipt:

- #9 `l4_emit_eval_match`: §1.7 corpus-quantified rule — slice receipts ≠
  ledger closure; PASSING requires every certification-corpus program.
  Reverted to CONSUMER_LANDED; PR #2585 cited as additional slice evidence.
- #10 `l7_algebraic_laws_witnessed`: PASSING requires exhaustive per-(algebra,
  inhabitant, law) §Acceptance coverage; distributivity / lattice absorption /
  non-AlgebraicLawKind laws remain substrate §P1. Reverted to CONSUMER_LANDED;
  PR #2602 cited as incremental advancement.
- #11 `tc1_eta_equivalence_executable`: Director (a)-disposition 2026-05-09
  held this canvas-deferred past R3 absent #1972 substrate canvas-tier work.
  Reverted to DECLARED-through-R3; PR #2603 cited as scaffold advancement
  but not retiring the canvas-deferral (which would require fresh Director
  ratification).

Other 14 rows in the batch (#12, #14, #31, #43-52, #69) did not carry such
qualifiers and stay flipped to PASSING.

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

* Merge origin/main into ledger-receipt sync (preserve row #13 update from main)

---------

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