Skip to content

docs(debt): DP1 stratum C — CollectionOps ledger row refresh (closes #1977) - #2129

Merged
briansrls merged 3 commits into
mainfrom
r3-dp1-c-collectionops-ledger-refresh
May 7, 2026
Merged

briansrls merged 3 commits into
mainfrom
r3-dp1-c-collectionops-ledger-refresh

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

DP1 Q-Drift-Reconcile — final stratum

Closes the remaining drift strand for R3 Debt-Paydown DP1 (issue #1977, brief docs/briefs/r3-dp1-q-drift-reconcile-worker.md).

Strata A (declaration_by_name ROADMAP↔ledger flip) and B (#1499 transitional fence row) already landed via PR #1892. This PR closes stratum C — the CollectionOps / StringOps / MapOps ledger refresh — completing DP1.

Debt receipt

Bucket counts updated honestly: "Partial (fold)" 1 → 0 (special-case bucket retired into "Partially closed"); "Partially closed" 9 → 10. Total catalog 75.

Scope

Docs-only. Single file: docs/debt/r3-debt-paydown-ledger-2026-05-02.md. No code paths, no ratchets, no ROADMAP edits (per brief non-scope).

Verification

  • cargo fmt / cargo clippy unchanged expectation (docs-only diff).
  • ROADMAP↔ledger consistency for strata A–C: see DP1 brief Acceptance.

🤖 Generated with Claude Code

Stratum C of R3 DP1 Q-Drift-Reconcile (issue #1977,
brief docs/briefs/r3-dp1-q-drift-reconcile-worker.md). Strata A
(declaration_by_name) and B (#1499 fence) already paid via PR #1892;
this PR closes the remaining ledger↔ROADMAP drift.

Debt receipt:
- (1) Debt paid: ledger row "CollectionOps / StringOps / MapOps duplicate
  operation surfaces" now carries Phase 1 (fold, 2026-05-03), Phase 2
  (concat/length/is_empty, PR #1602), and Phase 3 (map, 2026-05-05)
  receipts, matching ROADMAP §562 + brief
  docs/briefs/collectionops-algebra-reframe.md.
- Open list updated: drops `concat`/`length`/`map`; retains legacy
  literal fields (contains/empty_list/list_literal/cons) + StringOps /
  MapOps / PartialFunction + deferred dsl languages.dag work + Go
  `/* map(...) */` stub dissolution trigger.
- Bucket counts: "Partial (fold)" 1 → 0 (special-case bucket retired);
  "Partially closed" 9 → 10 (CollectionOps row absorbed). Total 75.
- Header amended marker added (2026-05-07).

Docs-only; no code paths touched. cargo fmt / clippy unchanged.

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: 49235f8c · Trigger: schedule
  • Comparison: origin/main @ d6cba0c9 ... review/pr-2129-49235f8c @ 49235f8c
  • Thinking: 13s wall

Findings

No findings. The diff only updates docs/debt/r3-debt-paydown-ledger-2026-05-02.md: header amendment note, summary counts (fold row folded into “Partially closed”), and a richer Partial (fold/concat/length/is_empty/map) receipt for the CollectionOps strand with explicit Open scope and references (including ROADMAP §562 / Go stub dissolution). Nothing here touches substrate, Rust boundaries, or tests, so INVARIANTS.md, docs/modeling-discipline.md, CODING.md, and TESTING.md do not surface concrete violations in this diff. Tracked debt for what remains is stated in the row’s Open: clause rather than implying full closure.

Verdict

APPROVE — Small, documentation-only ledger refresh; scope and remaining work are explicit; no rubric violations visible in the diff.

@briansrls

Copy link
Copy Markdown
Contributor Author

Reviewed (Mgr-tier; can't formal-approve own-author PR). LGTM for standing-authority merge once CI green + 30min sit:

  • 4-line docs-only diff in docs/debt/r3-debt-paydown-ledger-2026-05-02.md. No code touched.
  • Date header amended for 2026-05-07 stratum-C closure.
  • Bucket counts honestly updated: Partially-closed 9→10; Partial-fold 1→0.
  • CollectionOps row status updated from Partial (fold) → Partial (fold/concat/length/is_empty/map) with explicit Phase 1 (2026-05-03) / Phase 2 (PR quiet-otter-242 #1602) / Phase 3 (2026-05-05, v3 path) receipts.
  • Open clause now lists residual work (legacy literal fields, StringOps/MapOps/PartialFunction migrations, dsl languages.dag deferral, Go map stub trigger) — accurate per ROADMAP §562 + brief.
  • PR body has Debt receipt section + closes #1977 keyword.

No blocking concerns.

@briansrls

Copy link
Copy Markdown
Contributor Author

Closing — duplicate spawn. Per gentle-newt-665 (R3 Debt-Paydown Mgr, inbox #2062), DP1 strata A/B/C were already paid via merged PR #1892; #1977 stayed open only due to missing Closes keyword and has now been closed. The Phase-2/3 incremental detail I added on top is non-essential refresh, not within DP1 charter.

@briansrls

Copy link
Copy Markdown
Contributor Author

Reopening per gentle-newt-665 retraction (#2062 inbox): DP1 stratum C was indeed still open after #1892, this PR is in-scope for DP1 closure.

@briansrls briansrls reopened this May 7, 2026
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 49235f8c · Trigger: manual
  • Comparison: main @ d6cba0c9 ... r3-dp1-c-collectionops-ledger-refresh @ 49235f8c
  • Conversation: View conversation

1. Story of the diff

This PR refreshes the R3 debt-paydown ledger’s accounting for the CollectionOps / StringOps / MapOps duplicate operation-surface row. It adds a 2026-05-07 amendment note at docs/debt/r3-debt-paydown-ledger-2026-05-02.md:3, moves the old “Partial (fold)” special-case bucket into the broader “Partially closed” bucket at docs/debt/r3-debt-paydown-ledger-2026-05-02.md:22-23, and expands the CollectionOps row at docs/debt/r3-debt-paydown-ledger-2026-05-02.md:97 to record Phase 1, Phase 2, and Phase 3 receipts plus remaining open work. The important behavior is not a new implementation path; it is ledger normalization: fold is no longer treated as the only landed variant, and the row now names remaining migration surfaces and dissolution triggers.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — docs-only debt-ledger update; no Dag/substrate types, cross-pass carriers, or substrate variants are changed.

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

Finding — NON-BLOCKING, Boundary Discipline / single-authority metadata. The summary says the former special bucket has been merged into the broader category: docs/debt/r3-debt-paydown-ledger-2026-05-02.md:23: | Partial (fold) | 0 | _DP1 stratum C ... merged into "Partially closed" ..._ |, but the row’s status column still uses a bespoke partial category: docs/debt/r3-debt-paydown-ledger-2026-05-02.md:97: | ... | Partial (fold/concat/length/is_empty/map) | ... |. That leaves two plausible authorities for the row’s status taxonomy: the summary bucket says “Partially closed,” while the row status says a new custom “Partial (...)” category. Prefer Partially closed in the status column and keep the phase detail in the narrative cell, so future ledger counts have one status vocabulary.

  1. CODING.md.

N/A — no Rust implementation code, functions, APIs, helpers, naming surfaces, or error/result shapes are touched.

  1. TESTING.md.

N/A — documentation-ledger refresh only; no executable behavior changed, and no new regression test obligation is created by this diff.

  1. LOCKED DESIGN DECISIONS.

N/A — the diff references existing briefs/ROADMAP rows but does not alter a locked substrate/design decision or claim a divergence from one.

  1. TRACKED vs UNTRACKED DEBT.

Compliant — the refreshed row keeps the remaining debt tracked rather than converting it into vague prose: docs/debt/r3-debt-paydown-ledger-2026-05-02.md:97 names landed receipts, explicitly bounds open work to legacy literal fields plus StringOps / MapOps / PartialFunction / dsl languages.dag, and names the Go /* map(...) */ stub dissolution trigger via ROADMAP §562.

3. Verdict

APPROVE_WITH_COMMENTS

The diff is a documentation/accounting refresh and does not introduce substrate or implementation risk. I would only clean up the row status label so the ledger’s category count and the row’s status column use one authoritative taxonomy.

Per openai-pro review on PR #2129: the row status column was using a
bespoke 'Partial (fold/concat/length/is_empty/map)' category while the
summary bucket uses 'Partially closed'. Single-authority taxonomy fix:
status column now reads 'Partially closed'; phase detail moved into
the narrative cell ('Landed phases: fold / concat / length / is_empty /
map.').

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

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: c03baa23 · Trigger: schedule
  • Comparison: origin/main @ f70ba0c4 ... review/pr-2129-c03baa23 @ c03baa23
  • Thinking: 12s wall

Docs-only change updating a debt ledger row. Counts are consistent (9→10 partially closed, 1→0 partial-fold).

Verdict: APPROVE — Docs-only ledger amendment reclassifying the CollectionOps row from "Partial (fold)" to "Partially closed" with phase receipts. Counts balance, no code touched, nothing in this diff touches substrate or invariants.

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

BLOCKING (1)

Root Cause

  • docs/briefs/collectionops-algebra-reframe.md Phase-3 map receipt is not present in the referenced authority → either add/link the Phase 3 map implementation receipt and current CollectionOps.map_contract facts, or keep map in the open list.

⚠️ The ledger should not mark map as landed until the Phase 3 receipt is present or explicitly linked.

| 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) | 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. |
| `CollectionOps` / `StringOps` / `MapOps` duplicate operation surfaces | 2026-05-01 | R3 Grounding | Partially closed | Landed phases: fold / concat / length / is_empty / map. Same strand as ROADMAP **CollectionOps / StringOps / MapOps duplicate algebra operation surfaces** row (`FreeMonoid` / `PartialFunction` vs per-target string templates) — see `docs/briefs/collectionops-algebra-reframe.md` for migration order. **Phase 1 (fold, 2026-05-03):** v3 `emit_model.CollectionOps.fold_contract` + per-target `MethodTemplateContract` for `fold_method`. **Phase 2 (concat / length / is_empty, PR #1602):** per-target `MethodTemplateContract` literals for the corresponding `*_method` fields; cross-target `%Q` substrate-lift deferred (brief §Phase-2 receipt). **Phase 3 (map, 2026-05-05, v3 path):** `CollectionOps.map: String` → `map_contract: DeclarationRef` with `rust_/python_/go_language_spec_map_contract`; Python/Go `map_method` intentionally omitted from `{python,go}_method_template_contracts` per ROADMAP §562 (legacy adapter shape mismatch). **Open:** legacy literal fields on v3 `CollectionOps` (`contains`, `empty_list`, `list_literal`, `cons`) + `StringOps` / `MapOps` / `PartialFunction` migrations + dsl `languages.dag` (deferred per brief until v3 consumers are authoritative); Go `/* map(...) */` stub dissolution per ROADMAP §562 P5 trigger. |

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: The refreshed row removes map from the open work and claims map_contract landed, but the referenced/current model still has CollectionOps.map: String and the brief only records Phase 1/2, so INVARIANTS P5 tracked-debt closure lacks a documented dissolution receipt.

@briansrls
briansrls merged commit 114afc6 into main May 7, 2026
4 checks passed
@briansrls
briansrls deleted the r3-dp1-c-collectionops-ledger-refresh branch May 7, 2026 18:18
briansrls added a commit that referenced this pull request May 7, 2026
Per BLOCKING review on PR #2129 (codex): the brief lacked a Phase-3 map
receipt, while the ledger row marks map landed. Adds Phase-3 receipt
section mirroring Phase-2 structure: per-target named carriers
(rust/python/go_language_spec_map_contract), carrier-list omission
rationale (legacy adapter shape mismatch), Go stub dissolution
trigger with rg-based closure check. Updates Status header to list
all three landed phases. ROADMAP §562 remains the cross-row authority.

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

Copy link
Copy Markdown
Contributor Author

Re: inline BLOCKING at docs/debt/r3-debt-paydown-ledger-2026-05-02.md:97.

Verified the finding's premises against current code/docs at HEAD (6247b40ad):

  1. Premise "current model still has CollectionOps.map: String": contradicted. src/v3/std/emit_model.dag:381 reads map_contract: DeclarationRef (alongside flat_map_contract: DeclarationRef at :378). The opaque map: String field has been migrated.
  2. Premise "brief only records Phase 1/2": was true at the moment the review ran (sha c03baa23); now addressed in commit 6247b40ad — docs/briefs/collectionops-algebra-reframe.md carries an explicit Phase-3 receipt section (mirroring Phase-2 structure) with per-target carriers (rust_/python_/go_language_spec_map_contract), carrier-list omission rationale, Go stub dissolution trigger, and references ROADMAP §562 as cross-row authority. Status header updated to list all three landed phases.

P5 tracked-debt closure for the map field now has a documented dissolution receipt in the cited authority.

— sent from gentle-ant-90

briansrls added a commit that referenced this pull request May 7, 2026
…p contract, v3 path) (#2159)

* docs(debt): DP1 stratum C — refresh CollectionOps ledger row

Stratum C of R3 DP1 Q-Drift-Reconcile (issue #1977,
brief docs/briefs/r3-dp1-q-drift-reconcile-worker.md). Strata A
(declaration_by_name) and B (#1499 fence) already paid via PR #1892;
this PR closes the remaining ledger↔ROADMAP drift.

Debt receipt:
- (1) Debt paid: ledger row "CollectionOps / StringOps / MapOps duplicate
  operation surfaces" now carries Phase 1 (fold, 2026-05-03), Phase 2
  (concat/length/is_empty, PR #1602), and Phase 3 (map, 2026-05-05)
  receipts, matching ROADMAP §562 + brief
  docs/briefs/collectionops-algebra-reframe.md.
- Open list updated: drops `concat`/`length`/`map`; retains legacy
  literal fields (contains/empty_list/list_literal/cons) + StringOps /
  MapOps / PartialFunction + deferred dsl languages.dag work + Go
  `/* map(...) */` stub dissolution trigger.
- Bucket counts: "Partial (fold)" 1 → 0 (special-case bucket retired);
  "Partially closed" 9 → 10 (CollectionOps row absorbed). Total 75.
- Header amended marker added (2026-05-07).

Docs-only; no code paths touched. cargo fmt / clippy unchanged.

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

* docs(debt): unify CollectionOps row status with bucket taxonomy

Per openai-pro review on PR #2129: the row status column was using a
bespoke 'Partial (fold/concat/length/is_empty/map)' category while the
summary bucket uses 'Partially closed'. Single-authority taxonomy fix:
status column now reads 'Partially closed'; phase detail moved into
the narrative cell ('Landed phases: fold / concat / length / is_empty /
map.').

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

* docs(briefs): add Phase-3 map receipt to collectionops-algebra-reframe

Per BLOCKING review on PR #2129 (codex): the brief lacked a Phase-3 map
receipt, while the ledger row marks map landed. Adds Phase-3 receipt
section mirroring Phase-2 structure: per-target named carriers
(rust/python/go_language_spec_map_contract), carrier-list omission
rationale (legacy adapter shape mismatch), Go stub dissolution
trigger with rg-based closure check. Updates Status header to list
all three landed phases. ROADMAP §562 remains the cross-row authority.

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

---------

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