diff --git a/docs/briefs/r3-dp1-q-drift-reconcile-worker.md b/docs/briefs/r3-dp1-q-drift-reconcile-worker.md new file mode 100644 index 00000000000..8a5a39bc5aa --- /dev/null +++ b/docs/briefs/r3-dp1-q-drift-reconcile-worker.md @@ -0,0 +1,48 @@ +# DP1 — Q-Drift-Reconcile worker brief `(S, R3-standing)` + +**Dispatch:** `docs/r3-design-schedule-2026-05-06.md` §6 **DP1** + `docs/r3-program-plan.md` §10.1 **Q7** + §533 drift normalization (Grounding Mgr poke-hole 2026-05-06 finding 5). +**Goal:** one reconciliation PR that retires **ledger↔authority drift** for three named strands — no new substrate behavior unless a strand exposes an execution gap (then STOP-and-escalate per `r3-debt-paydown-program-coordination.md`). + +## Read first + +- `docs/debt/r3-debt-paydown-ledger-2026-05-02.md` — catalog rows to reconcile (especially rows touching **`declaration_by_name`**, **CollectionOps/StringOps/MapOps**, transitional fence). +- `ROADMAP.md` — **§Tracked debts** row for `declaration_by_name` (RETIRED **PR #1638**). +- `docs/r3-program-plan.md` §533–536 — drift item definitions (same three strands this brief bundles). +- `docs/briefs/collectionops-algebra-reframe.md` — **partial** Phase-1 work on CollectionOps; DP1 **does not** redo that program — it **aligns ledger text** with ROADMAP + plan for the duplicate-surfaces row and cites this brief where Partial → Open/Partial is adjusted honestly. + +## Scope — three strands in one PR + +### Stratum A — `declaration_by_name` ROADMAP↔ledger + +- **Facts:** ROADMAP records emit-site retirement (**PR #1638**); ledger row still **Open** (`declaration_by_name(...) emit pattern`). +- **Work:** flip ledger row to **Retired** (cite **#1638**, ratchet name `emit_production_code_has_no_declaration_by_name_calls` if useful). No code unless reviewer proves drift in ratchet vs ROADMAP — then file substrate-gap note; do not “fix” without lane owner. + +### Stratum B — **#1499** transitional fence ledger gap + +- **Facts:** ROADMAP transitional-fence narrative moved; ledger missing aligned row or status. +- **Work:** single-row reconciliation — either add ledger paragraph pointing at ROADMAP anchor + merge receipt, or mark **N/A** with grep-proof that no predicate-passing row remains. Cite **#1499** in PR debt-receipt section. + +### Stratum C — CollectionOps / StringOps / MapOps ledger refresh + +- **Facts:** ledger row **Partial (fold)** with open **concat/length/map** + StringOps/MapOps; design continuation in `collectionops-algebra-reframe.md`. +- **Work:** update ledger row text so **status**, **remaining fields**, and **pointer to collectionops brief** match ROADMAP **CollectionOps/StringOps/MapOps** duplicate-surfaces row + plan §533 wording — **documentation reconciliation**, not the algebra migration itself. + +## Non-scope + +- DP2 (**#1807** / SG-0 CI gate), DP3 tripwire, DP5 (**#1566**) — separate dispatches. +- Tier-2 ROADMAP narrative edits beyond the three strands unless a citation chain requires a one-line pointer fix in the same PR. + +## Acceptance + +- [ ] Exactly **one** merged PR whose **Debt receipt** names each stratum **(1) Debt paid** with path + anchor. +- [ ] `docs/debt/r3-debt-paydown-ledger-2026-05-02.md` rows consistent with ROADMAP + plan for strata A–C. +- [ ] No open **internal contradiction** between ROADMAP “RETIRED #1638” and ledger for `declaration_by_name`. +- [ ] `cargo fmt` / `cargo clippy` unchanged expectation for docs-only PR (if diff touches only `docs/`). + +## Dispatch trigger + +**Now** (Q7 RATIFIED-by-default). **Worker pin:** any idle Debt-Paydown worker session; **Mgr coordination:** quiet-otter-416. + +## Blocking conditions + +None for authoring — execution waits merge approval only. Cross-lane substrate work **does not** gate this slice (ledger honesty). diff --git a/docs/debt/r3-debt-paydown-ledger-2026-05-02.md b/docs/debt/r3-debt-paydown-ledger-2026-05-02.md index 7015ab28480..797ac35e981 100644 --- a/docs/debt/r3-debt-paydown-ledger-2026-05-02.md +++ b/docs/debt/r3-debt-paydown-ledger-2026-05-02.md @@ -1,6 +1,6 @@ # R3 Debt-Paydown Ledger -**Date:** 2026-05-02 +**Date:** 2026-05-02 (**amended 2026-05-06** — DP1 / Q7 ledger↔ROADMAP reconciliation) **Owner:** R3 Debt-Paydown Manager **Authority parent:** [#1518](https://github.com/gunb-ai/gunbc/pull/1518) **Scope:** ROADMAP.md tracked-debt rows under `## Tracked debts -- 2026-04 analyses` through the 2026-05-04 Exploratory + Reflective paired-analysis ingestion, plus rows that explicitly route to the R3 standing debt-paydown program. (Original 2026-05-02 baseline extended on 2026-05-04 to absorb the F2/F5/F11/F12/R1 novel-finding routings; eight already-tracked findings from the same ingestion are confirmed against existing catalog rows rather than duplicated.) @@ -13,15 +13,15 @@ ## Baseline Counts -This pass classifies 74 ROADMAP-tracked debt rows (69 baseline + 5 added 2026-05-04 from the Exploratory + Reflective analysis ingestion: F2, F5, F11, F12, R1): +This pass classifies 74 ROADMAP-tracked debt rows (69 baseline + 5 added 2026-05-04 from the Exploratory + Reflective analysis ingestion: F2, F5, F11, F12, R1). **Amendment 2026-05-06 (DP1 / Q7):** ledger-only acknowledgment row for **#1499** added below — catalog table row count **75** (74 ROADMAP-sourced + 1 reconciliation acknowledgment). | Bucket | Count | Meaning | |---|---:|---| -| Open implementation / retirement work | 44 | Needs a named retirement PR, executable gate, owner closure receipt, or disposition decision. | +| Open implementation / retirement work | 43 | Needs a named retirement PR, executable gate, owner closure receipt, or disposition decision. | | Open / disposition pending | 1 | Open with a parked decision (e.g., await an upstream lane before classifying). | | Partially closed | 9 | Has a landed partial receipt but still names remaining work. | | Partial (fold) | 1 | Special-case partial closure (e.g., one variant landed, others pending). | -| Retired / stale receipt row | 19 | ROADMAP already records retirement or stale-finding resolution; next action is ledger cleanup, not code. | +| Retired / stale receipt row | 21 | ROADMAP already records retirement or stale-finding resolution; next action is ledger cleanup, not code. | The highest concentration is in Substrate-adjacent rows: operator authority, value-body / mirror isomorphism, illegal-state carriers, bootstrap diagnostics, and algebra-law conformance. The second concentration is PB/Verification scaffolding: `test_runner.rs`, author-now/fire-later claims, bridge-ledger open rows, and SG-0 hand-Rust growth. @@ -47,7 +47,8 @@ The highest concentration is in Substrate-adjacent rows: operator authority, val | `dsl/std/effects.dag` vs `src/v3/std/effects.dag` | 2026-04 | Substrate / PB-zero | Open | Pick canonical home; collapse duplicate authority. | | `container_template_algebra_rows` duplicate aliases | 2026-04 | Substrate type reflection | Open | Alias reflection derives rows; hand table deleted. | | String-keyed authorities in `types.dag` / `coercion.dag` | 2026-04 | Substrate type reflection | Open | Structural declarations replace string-keyed tables. | -| `declaration_by_name(...)` emit pattern | 2026-04 | Substrate / emit | Open | Typed substrate access with cached declaration ids. | +| `declaration_by_name(...)` emit pattern | 2026-04 | Substrate / emit | Retired | **PR #1638** (`emit_production_code_has_no_declaration_by_name_calls` ratchet): production `emit*` uses cached `DeclarationId` via `EmitAnchorCache` / `EmitModelVariants`; aligns with ROADMAP tracked-debt row **RETIRED 2026-05-04**. Test-only fixture lookups out of scope per ROADMAP. | +| `#1499` W1 `DifferentialEquals` harness + transitional carve-outs | 2026-05-06 | R3 Verification / Lane 1 | Retired | **PR #1499** — closes plan §533 **#1499 transitional fence ledger-row gap**: no predicate-passing ROADMAP row was missing; ledger had **no** prior row for this merge receipt. Explicit acknowledgment ties **#1499** body §“Transitional fences” to catalog (Q7 stratum B). | | `pipeline_authority.rs` dual-authoring drift | 2026-04 / 2026-04-30 | Substrate / PB | Open | Generate one surface from the other or mark `fn compile` non-authoritative until structural lowering. | | LLM service flattening | 2026-04 | Grounding services | Open | Service operations consume typed carriers and return typed outputs. | | GitHub auth model bypass | 2026-04 | Grounding GitHub extdeps | Retired | PR #1700 (`7b415f1eb`) closes ROADMAP:376: `github_token()` now returns full `GitHubAuthToken`; hardcoded GCP Secret Manager policy removed in favor of typed `GitHubAuthSource { credential_source, token_metadata }` using `CredentialSource::EnvVar` + `env_credential`, with declared metadata verification tracked separately. | @@ -93,7 +94,7 @@ The highest concentration is in Substrate-adjacent rows: operator authority, val | SubValueRelation bounded-lattice law violation | 2026-05-01 | R3 Substrate + Verification | Retired | PR #1543 (`3c77a60c9`) stops claiming `BoundedLattice` in `src/v3/std/induction.dag`; PR #1542 extends the same Path B correction to `dsl/std/induction.dag` and the audit/design receipts. | | Emitter `as_bind().expect()` panic paths | 2026-05-01 | R3 Substrate / PB | Retired | PR #1548 (`0427f96f7`) landed the typed `BindNodeId` witness on `ArrowBody::UserDefined`; all six emitter sites consume `(*bind_id).bind(self.dag)`, guarded site uses `.bind_opt(dag)` returning typed `EmitError::MalformedUserDefinedCallable`. Local-typed-error path was rejected at design split as parallel-representation debt. | | `??` / `%` syntax authority mismatch | 2026-05-01 | R3 Substrate + Grounding | Retired | PR #1552 (`d9bda3e3d`) deletes the unsupported `dag` operator rows and gates syntax coverage with a 4-authority cross-validation gate. | -| `CollectionOps` / `StringOps` / `MapOps` duplicate operation surfaces | 2026-05-01 | R3 Grounding | Partial (fold) | v3 `emit_model.CollectionOps.fold_contract` + per-target `MethodTemplateContract` for `fold_method` (brief: `docs/briefs/collectionops-algebra-reframe.md`); `concat` / `length` / `map` + `StringOps` / `MapOps` / `PartialFunction` + dsl `languages.dag` still open. Remaining fields: target templates reference algebra method contracts / declaration refs. | +| `CollectionOps` / `StringOps` / `MapOps` duplicate operation surfaces | 2026-05-01 | R3 Grounding | Partial (fold) | Same strand as ROADMAP **CollectionOps / StringOps / MapOps duplicate algebra operation surfaces** row (`FreeMonoid` / `PartialFunction` vs per-target string templates). **Phase 1 (fold):** v3 `emit_model.CollectionOps.fold_contract` + per-target `MethodTemplateContract` for `fold_method` per `docs/briefs/collectionops-algebra-reframe.md`. **Open:** `concat` / `length` / `map` + `StringOps` / `MapOps` / `PartialFunction` + dsl `languages.dag`; target templates must reference algebra method contracts / declaration refs. | | Author-now/fire-later verification style | 2026-05-01 | R3 Verification | Open | Make one `BinaryDimensionReportEquals` claim actually execute. | | Typed-carrier-landed + Rust-mirror-remains pattern | 2026-05-01 | R3 PB debt discipline | Open | Pair mirror introductions with isomorphism/generation or deletion. | | BridgeLedgerZero known-open reporting | 2026-05-01 | R3 Verification | Retired | PR #1571 (`c3138a946`) lands the decreasing-open-count ratchet (`test(v3): add BridgeLedger open-count ratchet`); known-open count can no longer silently grow. Closes Bundle 4a. | diff --git a/docs/r3-program-plan.md b/docs/r3-program-plan.md index 980821cca55..e0d05f468a9 100644 --- a/docs/r3-program-plan.md +++ b/docs/r3-program-plan.md @@ -530,11 +530,11 @@ This plan section reports cumulative bridge counts; **the audit doc in this PR ( **Authoritative counts populate via Phase 3 compile of [`docs/audit/r3-debt-sweep-2026-05-06.md`](audit/r3-debt-sweep-2026-05-06.md) §1.A–§1.G in this PR** (Phase 2 partial deliverables on now-superseded PR #1804 comment thread fold in during Phase 3). Net-bridge count at R3 close is 0 (per `bridge_retirement_ledger_zero` + 5 substrate-gap-class closure gates). Each bridge has a named dissolution trigger; bridges without triggers escalate to substrate gap requiring named R3 lane (per audit doc §4 anticipation discipline). -**Drift items from Phase 2 sweep** (per Grounding Mgr poke-hole 2026-05-06 finding 5 normalization — earlier list double-counted #1638/declaration_by_name as same issue + omitted CollectionOps drift): +**Drift items from Phase 2 sweep** (per Grounding Mgr poke-hole 2026-05-06 finding 5 normalization — earlier list double-counted #1638/declaration_by_name as same issue + omitted CollectionOps drift) — **reconciled 2026-05-06 (DP1 / Q7, R3 Debt-Paydown Mgr)** in `docs/debt/r3-debt-paydown-ledger-2026-05-02.md`: -- **`declaration_by_name` ROADMAP↔ledger drift**: ROADMAP says `declaration_by_name(...) pattern in emit` retired by PR #1638; `docs/debt/r3-debt-paydown-ledger-2026-05-02.md` still marks `declaration_by_name(...) emit pattern` Open. Single-row reconciliation needed. -- **#1499 transitional fence ledger-row gap**: ROADMAP transitional-fence retirement not reflected in ledger row. -- **CollectionOps / StringOps / MapOps stale ledger refresh**: ROADMAP records CollectionOps fold + map progress, but ledger row says `Partial (fold)` and text says `concat / length / map` remain open. Ledger refresh needed. +- **`declaration_by_name`**: ledger row → **Retired** citing **PR #1638** + ratchet name (matches ROADMAP). +- **`#1499` transitional fence ledger-row gap**: ledger **acknowledgment row** added for **PR #1499** merge receipt (plan stratum B — no separate ROADMAP predicate row was omitted). +- **CollectionOps / StringOps / MapOps**: ledger row refreshed with explicit ROADMAP strand cross-reference + unchanged **Partial (fold)** status. ---