Skip to content
Merged
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
3 changes: 2 additions & 1 deletion docs/briefs/r2-pure-bootstrap-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ Authored:
- [`r3-pb-tv2-s1-input-packet.md`](r3-pb-tv2-s1-input-packet.md) — T-V2-Retirement S-1 input packet (input to PM/Director; not S-1 itself). Decision checklist for the PM-authored worker brief: 6 rows enumerating §3.1 / §3.2 / §3.3 / legacy emit chain / `verification.dag` convergence routing / S-1 scope; PB recommended defaults + owner per decision (PM / PB / Substrate / Director). Docs-only.
- [`r3-pb-tv2-population-coverage-audit.md`](r3-pb-tv2-population-coverage-audit.md) — T-V2-Retirement Population A (4 named tests in `src/v2/tests/`) + Population B (2 G-1 consumers outside `src/v2/`) coverage spot-check audit. Live v3 substrate analogs verified for all 4 Pop A targets (LIVE; tests MISSING — mechanical port). Pop B disposition recommendations match S-1 input packet Decisions 1+2; per-file v3-coverage state spot-checked. Net dispatch order from audit/matrix DAG. Docs-only.
- [`r3-pb-bridge-include-str-side-channels-closure.md`](r3-pb-bridge-include-str-side-channels-closure.md) — T-Bridge-Retirement bridge #4 (`bridge_include_str_side_channels_retired`) **closure worker brief** for `pipeline_authority` / #1171 lineage (PROPOSAL; **dispatch-gated** on structural compile-body witness or approved derivation — **not** runtime file-IO swap).
- [`r3-pb-bridge-canonical-lens-name-dispatch-closure.md`](r3-pb-bridge-canonical-lens-name-dispatch-closure.md) — T-Bridge-Retirement bridge #3 (`bridge_canonical_lens_name_dispatch_retired`) **closure worker brief** (PROPOSAL; **dispatch-gated** on PB-Runtime interpreter-as-data **or** typed lens-registry / cross-`Dag` resolution per §P1 — consumes [`r2-pb-canonical-lens-bridge-disposition.md`](r2-pb-canonical-lens-bridge-disposition.md)).

Pending — pre-spawn Director-authored per inbox #828 coordination split; post-spawn manager-authored autonomously:
- `kernel_algebra_profile` worker brief (gated on Substrate Manager `ValueBody::Map` consumer plumbing)
- **R3 T-Tier3-Dissolution** worker brief (may share with Tier 3 Manager continuing post-R2)
- **R3 distributed bridge retirements** — remaining worker briefs where not superseded by authored closures (**canonical lens-name dispatch** closure brief still pending; ~~`include_str!`~~ → [`r3-pb-bridge-include-str-side-channels-closure.md`](r3-pb-bridge-include-str-side-channels-closure.md); ~~`patch_lower_helpers_*` Tier-2 slice~~ closed PR #1014)
- **R3 distributed bridge retirements** — ~~canonical lens-name dispatch~~ → [`r3-pb-bridge-canonical-lens-name-dispatch-closure.md`](r3-pb-bridge-canonical-lens-name-dispatch-closure.md); ~~`include_str!`~~ → [`r3-pb-bridge-include-str-side-channels-closure.md`](r3-pb-bridge-include-str-side-channels-closure.md); ~~`patch_lower_helpers_*` Tier-2 slice~~ closed PR #1014

Closed:
- Tier 2 `patch_lower_helpers_*` retirement first slice (PR #1014)
Expand Down
66 changes: 66 additions & 0 deletions docs/briefs/r3-pb-bridge-canonical-lens-name-dispatch-closure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
status: PROPOSAL
owning_manager: Pure Bootstrap Manager (R2 → R3 continuation)
lane: T-Bridge-Retirement — distributed bridge #3 (`bridge_canonical_lens_name_dispatch_retired`)
authored: 2026-05-06 (neat-bear-351 — PB Mgr cycle #1861 / next-tier queue)
---

# R3 PB — canonical lens-name dispatch closure — worker brief

**Status:** PROPOSAL — **pre-authored closure brief** (dispatch-gated). Aligns with [`docs/briefs/r2-pb-canonical-lens-bridge-disposition.md`](r2-pb-canonical-lens-bridge-disposition.md): partial retirement + ratchet already landed; **full** `bridge_canonical_lens_name_dispatch_retired` remains **open** until substrate-level unblockers fire.

**Owning manager:** Pure Bootstrap Manager (R3 continuation per [`docs/r3-structure.md`](../r3-structure.md) §"Lane structure" T-Bridge-Retirement distribution map).

**Verification Manager ledger row:** [`docs/briefs/r3-verification-manager.md`](r3-verification-manager.md) — bridge **#3** canonical lens-name dispatch; ledger-zero pending until structural closure.

## Purpose

Drive **`bridge_canonical_lens_name_dispatch_retired`** to **green** by eliminating the **remaining** runner-side bridge surface in `src/v3/compiler/src/test_runner.rs`:

- **(A)** `include_str!` of canonical lens bytes (`named_function_count.dag`, `complexity.dag`).
- **(B)** `lens_decl.name.as_deref() == Some("cost_of" | "named_function_count")` dispatch arms in `LensOutputEquals`.
- **(C)** Generic `lens_decl.name.as_deref()` name-keyed lens lookup (two sites).

**Non-goal:** claiming closure by swapping one string/path side channel for another. Per disposition §"Precise dependency", PB **must not** replace `include_str!` with an ad hoc path registry without a **structural** lens-identity carrier introduced through [`INVARIANTS.md`](../../INVARIANTS.md) §P1.

## Live authority — disposition consumed

Full gap analysis, P2 cross-`Dag` reflection rationale, and ratchet (`tests/integration/canonical_lens_bridge_ratchet_test.rs`) are **not re-argued here** — read [`r2-pb-canonical-lens-bridge-disposition.md`](r2-pb-canonical-lens-bridge-disposition.md).

## Acceptance (`bridge_canonical_lens_name_dispatch_retired` — full close)

**Green** when **all** hold:

1. **Zero** remaining bridge debt in categories **A + B + C** above in `test_runner.rs` (or documented successor module), **without** violating P2 reflection discipline ([`INVARIANTS.md#p2-boundary-discipline`](../../INVARIANTS.md#p2-boundary-discipline)).
2. **`canonical_lens_bridge_ratchet_test`** updated or retired per closure — counts **never increase** per `feedback_ratchet_only_down`; ratchet may tighten to zero targets when bridge is gone.
3. **Verification** records ledger row movement toward **`bridge_retirement_ledger_zero`** in cadence with PB + Verification Manager.

## Dispatch triggers (mechanical)

Pick up implementation **only when** a **single live-state check** shows **at least one** path is real on main:

| # | Trigger | Authority |
|---|---------|-----------|
| T1 | **PB-Runtime interpreter-as-data** ( [`docs/design-pb-runtime-interpreter.md`](../design-pb-runtime-interpreter.md) Item 4 ) reaches a milestone where lens application routes by **typed `DeclarationRef` identity** — dissolving **B** and **C** — *or* | PB + Evaluator program |
| T2 | **Typed lens-registry / cross-`Dag` `DeclarationRef` substrate** lands per §P1 — dissolving **A** without a new string registry bridge — *or* | Substrate Manager |
| T3 | **Pair-authored Verification ledger note** — closure row movement coordinated with Verification Manager | PB + Verification |

Until **T1 or T2** is true, this brief stays **PROPOSAL / queued** — PB may maintain **disposition + ratchet** artifacts only; **no** fake structural resolution.

## STOP conditions

- **String/path registry substitute** for canonical lens bytes **without** T2 — **STOP** (disposition §"Either path is a substrate-level change").
- **Dropping P2 reflection invariant** to delete name dispatch — **STOP**; escalate emission-model / Evaluator if a new reconciliation mechanism is required.
- **Broadened scope** ("delete all lens-name checks") without per-site ledger mapping — **STOP**.

## Non-goals

- Retiring **`bridge_include_str_side_channels_retired`** (bridge #4 — [`r3-pb-bridge-include-str-side-channels-closure.md`](r3-pb-bridge-include-str-side-channels-closure.md)).
- **T-LensProducer-Retirement** sub-gates beyond what Item 4 + Item 5 already own — this brief **consumes** their convergence when triggers align.

## Cross-refs

- Disposition + ratchet authority: [`r2-pb-canonical-lens-bridge-disposition.md`](r2-pb-canonical-lens-bridge-disposition.md).
- B4 consumer migration STOP (registry escalation): [`docs/briefs/b4-1-declarationref-consumer-migration-worker.md`](b4-1-declarationref-consumer-migration-worker.md).
- PB Manager acceptance row: [`r2-pure-bootstrap-manager.md`](r2-pure-bootstrap-manager.md) §`bridge_canonical_lens_name_dispatch_retired`.
- Verification ledger: [`r3-verification-manager.md`](r3-verification-manager.md) bridge table row #3.
Loading