Skip to content

docs/briefs/t-permethodmetadata-pick-worker.md - #794

Merged
briansrls merged 9 commits into
mainfrom
session/merry-ant-120
Apr 25, 2026
Merged

briansrls merged 9 commits into
mainfrom
session/merry-ant-120

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Opened from session-dashboard for session merry-ant-120.

@briansrls

Copy link
Copy Markdown
Contributor Author

Director review — APPROVE Option 3 pick + implementation; flag draft-state CI gap.

merry-ant-120 made the §6a pick correctly and grounded it in the right evidence. Pick + rationale + implementation all match the brief's worker-decides + Director-reviews structure.

Decision review

Picked: Option 3 (unified `MethodContract` carrier). Rationale cited in the design-doc update:

"E-I/E-P evidence did not show `size_effect`, `cost_shape`, and `callback_element_position` are cleanly separable from the cost/descent path. `cost.dag` and `complexity.dag` both still name live call-site consumption of the E-C/E-I/E-P facts as their remaining behavioral gap, while the existing `AlgebraFieldTemplate` rows carry [those three facts] together for the same method. Splitting those facts back into lens-local tables (Option 0) would preserve the current duplicate lookup story at exactly the point the lenses need a shared method contract."

This is exactly the brief's req 1 — pick by evidence, not by author preference. Concrete consumer-shape evidence (cost.dag + complexity.dag co-location) is named. Option 0 explicitly considered + rejected with reasoning. Options 1 + 2 each get one-sentence dismissal with reasoning (substrate-out-of-scope; per-algebra carrier proliferation).

Implementation review

  • ✅ `MethodContract` carrier added to `dsl/std/algebra.dag:457-468` with the five fields (`algebra_id` + `method_id` + `size_effect` + `cost_shape` + `callback_element_position`). Doc-comment explicitly notes the §6a Option 3 framing.
  • ✅ Minimal lens-side adoption demo at `src/v3/lenses/cost.dag` (+8 lines: `method_contract_cost_shape` consumer). Worker did NOT bulk-migrate cost.dag / complexity.dag — exactly the brief's req 2 scope ("one demo migration is sufficient evidence; bulk migration is post-pick work").
  • ✅ §6a updated at `docs/design-substrate-carrier-port-program.md:168-175` — "Decision: pick Option 3, unified `MethodContract` carrier" + live-receipt citation. Replaces the prior "Recommendation (deferred)" language per brief req 3.
  • ✅ Regen snapshots updated (`bootstrap_generated.rs`, `bootstrap_generated_without_parse_surface.rs`, `bootstrap_std_generated.rs`, `lens_cost_symbolic_generated.rs`).

Diff stats are dominated by regen churn (~9k lines bootstrap regen); substantive code diff is ~30 lines. Aligned with the brief's S-sized "design-call close, not substrate-capability work" framing.

Flag — CI status

PR is in draft state; all 4 CI gates show `SKIPPED`. Per the cascade-promoted ratchet discipline, DB-8 `self_host_fixed_point` (req: bit-identical convergence; named no-compromise gate in the brief) hasn't been exercised yet. Flip to ready to engage `self_host_ratchet` + the broader CI; if green we can merge the same hour.

Verdict

APPROVE on substance + implementation discipline. Conditional on CI green post-ready-flip. Worker can flip when comfortable; nothing further needed from Director.

On follow-up scope (informational)

Brief's "On merge: bulk migration of remaining consumer lenses (if needed) is follow-up work" — that's a Director-ad-hoc dispatch decision later. `cost.dag` and `complexity.dag` still consume `AlgebraFieldTemplate` rows directly today; the bulk migration to `MethodContract` lookup at call sites is a clean post-pick brief once we want it.

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

BLOCKING (1)

Root Cause

  • dsl/std/algebra.dag The new carrier landed only in dsl/std/algebra.dag while the v3 lens and dag_cost_generated.rs are sourced from src/v3/std/algebra.dag → add or derive the carrier in the v3 std authority, or route the lens/mirror to the actual authority, then regenerate.

⚠️ One authority split needs to be fixed before this lands.

Comment thread src/v3/lenses/cost.dag
import std.substrate { Dag, Behavior, BranchPath, LoopNode, NodeId, PortId, node }
import std.algebra {
MethodContract,
CostShape,

This comment was marked as resolved.

@briansrls
briansrls marked this pull request as ready for review April 25, 2026 06:31
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 41c51ec8 · Trigger: schedule
  • Thinking: 49s wall

Verdict: APPROVE — this is a small, narrowly-scoped scaffold landing the §6a Option 3 decision: new MethodContract carrier in src/v3/std/algebra.dag:99-104, demo consumer in src/v3/lenses/cost.dag:59-60, and regenerated mirrors. The design doc update at docs/design-substrate-carrier-port-program.md:171-173 records the decision and explicitly names the dissolution trigger ("bulk migration of cost.dag / complexity.dag to live call-site MethodContract lookup"), so this qualifies as a tracked bridge — documented, bounded to §6a shape lock, and named follow-up. No invariant violations observed in the diff.

Exploratory observations (non-blocking):

  • MethodContract.algebra_id: String and method_id: String (src/v3/std/algebra.dag:100-101) are stringly-typed identifiers. dsl/std/algebra.dag:403 already has a typed AlgebraProfile sum. v3 may not have a sibling yet, but when live-wiring lands the lookup will be keyed by these strings — worth deciding before bulk migration whether algebra_id should narrow to a sum or named id type so illegal (algebra_id, method_id) keys aren't representable. Not in scope for this PR.
  • Nothing yet constructs a MethodContract; the demo consumer is a pure projection. That's expected for a shape-lock landing, but the §6a shape will only be exercised once a producer (template seeding from AlgebraFieldTemplate?) exists. Worth flagging in the next slice's brief so the producer/consumer pair is reviewed together.
  • Trivial: dsl/std/algebra.dag:621 trailing-newline removal looks unintentional/unrelated; harmless.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 41c51ec8 · Trigger: schedule
  • Thinking: 240s wall

Findings

  • [BLOCKING] src/v3/std/algebra.dag:81 and src/v3/std/algebra.dag:89 add new substrate-visible coproducts without a 🟢/🟡/🔴 classification, ledger, or dissolution trigger. That violates docs/modeling-discipline.md Practice 4 for new sum types; these variants become part of the MethodContract surface at src/v3/std/algebra.dag:102-103, so this should be tracked before landing.
  • [NON-BLOCKING] docs/design-substrate-carrier-port-program.md:173 says dsl/std/algebra.dag declares MethodContract, but the new declaration is actually in src/v3/std/algebra.dag:99. That violates the live-docs expectation under INVARIANTS.md P1; this looks like a path typo.

Verdict: REQUEST_CHANGES. The generated surface compiles and cargo test -p v3-compiler lane2_stage_2d_symbolic_cost_test -- --nocapture passes, but the new substrate coproducts need their modeling receipt before merge.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 41c51ec8 · Trigger: manual
  • Conversation: View conversation

1. Story of the diff

This PR resolves the per-method metadata placement question by choosing a unified std-level carrier: MethodContract groups algebra_id, method_id, size_effect, cost_shape, and callback_element_position so cost/complexity consumers can read one method-keyed contract instead of reconstructing the same facts from separate lens-local tables. The live code adds that carrier and its two supporting metadata coproducts in src/v3/std/algebra.dag:81-105, regenerates the Rust mirror types in dag_cost_generated.rs, and wires a minimal cost-lens consumer via method_contract_cost_shape at src/v3/lenses/cost.dag:59-60. The large bootstrap_generated*.rs churn is the expected declaration-id/port-id fallout from adding std declarations, and the parse corpus manifest is updated for the changed src/v3/std/algebra.dag.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

Compliant — the PR deliberately keeps the new authority out of Dag storage: src/v3/std/algebra.dag:99: type MethodContract { defines the shared std model, and src/v3/lenses/cost.dag:59: fn method_contract_cost_shape(contract: MethodContract) -> CostShape? = consumes it through the lens surface rather than adding ad hoc compiler-side lookup state.

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

Finding — BLOCKING, coproduct dissolution / illegal states discipline. The diff introduces two new flat coproducts without the required terminal/scaffold/dissolvable checkpoint:

src/v3/std/algebra.dag:81: type CollectionSizeEffect and src/v3/std/algebra.dag:89: type CostShape. The nearby existing file already uses explicit classification comments, for example the next existing type starts with // 🟢 TERMINAL...; these new enums instead have descriptive comments only. Because these are std-level modeling facts that will be mirrored into Rust and consumed by lenses, they need a coproduct classification: terminal with ledger, scaffold with named trigger, or dissolved now.

Finding — NON-BLOCKING, documentation describes live state. docs/design-substrate-carrier-port-program.md:173: **Live receipt:** \dsl/std/algebra.dagdeclaresMethodContract; ...does not match the diff: the actual declaration added here issrc/v3/std/algebra.dag:99: type MethodContract {, while dsl/std/algebra.dag only loses a trailing blank line. The receipt should name the live file, or future reviewers will follow the wrong authority.

  1. CODING.md.

Compliant — the generated Rust stays data-plus-free-functions: src/v3/compiler/src/dag_cost_generated.rs:20: pub struct MethodContract { is a plain carrier, and src/v3/compiler/src/lens_cost_symbolic_generated.rs:12: pub fn method_contract_cost_shape(p0: &MethodContract) -> Option<CostShape> { is a free accessor function, not a method hung off Dag or a stateful object.

  1. TESTING.md.

Compliant — this PR adds a new std declaration plus generated mirrors, and the parse corpus manifest is updated at src/v3/compiler/tests/integration/parse_corpus_manifest.txt:24: src/v3/std/algebra.dag 39 291651 49ca6c2f0cf984d7. There is no new behavioral cost algorithm yet; the only lens addition is a generated field accessor, so I do not see a missing regression test beyond the existing parse/regeneration coverage.

  1. LOCKED DESIGN DECISIONS.

Compliant — the design choice is explicit in the changed design doc: docs/design-substrate-carrier-port-program.md:171: **Decision:** pick **Option 3, unified \MethodContract carrier**.I do not see an unstated divergence from a locked decision in the diff; the only correction needed is the staledsl/std receipt path noted above.

  1. TRACKED vs UNTRACKED DEBT.

Compliant — the partial wiring is documented and bounded: src/v3/lenses/cost.dag:56: // §6a Option 3 demo consumer: cost analysis reads per-method metadata from names the demo-consumer role, and docs/design-substrate-carrier-port-program.md:173 bounds the follow-up to bulk migration of cost.dag / complexity.dag to live call-site MethodContract lookup. That is acceptable tracked scaffold shape, assuming the coproduct modeling checkpoint is added before landing.

3. Verdict

REQUEST_CHANGES. The direction is coherent and the single MethodContract carrier is the right kind of authority move, but the new std-level coproducts need the required dissolution classification before they become mirrored modeling substrate. Also fix the design receipt path from dsl/std/algebra.dag to the actual src/v3/std/algebra.dag.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 5dda84f9 · Trigger: schedule
  • Thinking: 33s wall

Findings

None blocking. The two new coproducts (CollectionSizeEffect, CostShape) carry 🟡 SCAFFOLD comments with documented, bounded, named dissolution triggers (post-§6a bulk MethodContract producer/consumer migration). The unified MethodContract carrier matches the design-doc decision recorded in the same diff (docs/design-substrate-carrier-port-program.md:171).

Verdict

APPROVE — Small, narrowly scoped: declare the §6a Option 3 carrier shape, regenerate mirrors, wire one demo consumer (method_contract_cost_shape) to prove the lens import path. Decision rationale is recorded in the design doc, scaffold markers track dissolution. No invariant violations observed.

Exploratory observations

  • scripts/regen_runtime_mirrors.py:88-110 adds CollectionSizeEffect / CostShape / MethodContract to the hardcoded DAG_COST_TEMPLATE prelude — and src/v3/compiler/src/dag_cost_generated.rs also gains the same three types at the top. If the codegen pipeline both emits the template prelude and emits coproduct/struct decls from algebra.dag, future regenerations risk duplicating these definitions. Worth confirming the script de-dupes (or that the template prelude is the only path for these three types and they aren't re-emitted from the DAG).
  • MethodContract has three independently-optional fields (size_effect, cost_shape, callback_element_position). A row with all three None is legal but meaningless. Not a blocker today (the carrier is fresh and untouched by producers), but worth deciding before bulk-migration whether absence should be modeled as a sum (e.g. method kind) rather than three parallel Options.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 5dda84f9 · Trigger: schedule
  • Thinking: 122s wall

Verdict: APPROVE

The diff is narrowly scoped and the new MethodContract/metadata coproducts include scaffold receipts plus dissolution triggers. I didn’t find concrete violations of the pinned invariants, coding, or testing guidance in the changed lines.

Checked with cargo check -p v3-compiler and git diff --check; both passed.

@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: 5dda84f9 · Trigger: schedule
  • Thinking: 277s wall

BLOCKING (1)

Root Cause

  • docs/design-substrate-carrier-port-program.md §6a chooses the unified carrier but does not specify a structural key representation → keep Option 3 and make the carrier key use existing typed declaration identity before cost/complexity consumers migrate.

⚠️ One substrate-level identity issue should be fixed before this carrier becomes the lookup shape consumers build on.

Comment thread src/v3/std/algebra.dag Outdated
// does not extend substrate declarations or create one carrier per algebra.
type MethodContract {
algebra_id: String
method_id: String

This comment was marked as resolved.

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.

Verified against current HEAD (0ac9c037c). This is addressed now: src/v3/std/algebra.dag:119-120 uses DeclarationId for both keys:

algebra_id: DeclarationId
method_id: DeclarationId

The generated Rust mirror was regenerated to the same shape (MethodContract { algebra_id: DeclarationId, method_id: DeclarationId, ... }). No copied string keys remain for the carrier identity.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 0ac9c037 · Trigger: schedule
  • Thinking: 22s wall

Verdict: APPROVE — small, narrowly scoped diff that lands the §6a Option 3 decision: declares MethodContract + CollectionSizeEffect + CostShape in src/v3/std/algebra.dag, regenerates Rust mirrors, adds a single demo consumer in src/v3/lenses/cost.dag, and locks the design doc. Both new coproducts carry explicit scaffold notes with bounded dissolution triggers (the bulk MethodContract producer/consumer migration), satisfying the tracked-debt criteria. algebra_id/method_id use the shared DeclarationId identity rather than parallel string keys, consistent with single-authority. No invariant or modeling-discipline violations grounded in the diff.

Exploratory observations (non-asks):

  • The locked decision doc (docs/design-substrate-carrier-port-program.md:170) promises "live call-site MethodContract lookup" as the dissolution path, but the demo consumer (cost.dag:59) is a trivial accessor that no other lens calls yet. That's fine for this PR's stated scope ("§6a shape locked"), but until the bulk migration lands, MethodContract is an unconsumed substrate type — worth keeping the follow-up lane visible so the scaffold doesn't drift into long-lived dead code.
  • callback_element_position: Int? carries an integer index where the v2 templates presumably encoded a positional fact. If a future structural form (e.g. an enum of element positions or a PortId reference) is anticipated by the dissolution trigger, jot it on the scaffold note so the eventual narrowing target is named, not just gestured at.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 0ac9c037 · Trigger: schedule
  • Thinking: 204s wall

Verdict: APPROVE

The diff is a narrow MethodContract scaffold with documented dissolution triggers, generated mirror updates, and a minimal generated consumer. I didn’t find concrete violations of the pinned invariants, modeling discipline, coding, or testing guidance in the changed lines.

Checked: cargo check -p v3-compiler and cargo test -p v3-compiler method_contract -- --nocapture both pass.

@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: 0ac9c037 · Trigger: schedule
  • Thinking: 275s wall

Non-blocking — Strengths

  • src/v3/std/algebra.dag The new coproducts have scaffold receipts with named dissolution triggers, and the carrier uses structural declaration identity.

✅ No blocking concerns in the current diff.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 0ac9c037 · Trigger: manual
  • Conversation: View conversation

1. Story of the diff

This PR turns the per-method metadata design from an open question into a concrete Option 3 choice: a unified MethodContract keyed by structural declaration identity rather than per-algebra metadata tables or substrate field refinements. The load-bearing source change is in src/v3/std/algebra.dag, which imports DeclarationId, declares the staged CollectionSizeEffect and CostShape vocabularies, and adds MethodContract { algebra_id, method_id, size_effect, cost_shape, callback_element_position } at src/v3/std/algebra.dag:77 and src/v3/std/algebra.dag:118-124. The cost lens then imports that carrier and adds a minimal generated-consumer proof, method_contract_cost_shape, at src/v3/lenses/cost.dag:36-37 and src/v3/lenses/cost.dag:56-60. The rest of the PR is the expected materialization: runtime mirror types in scripts/regen_runtime_mirrors.py:90-111, generated Rust mirrors in src/v3/compiler/src/dag_cost_generated.rs:4-26, generated lens code in src/v3/compiler/src/lens_cost_symbolic_generated.rs:12-14, bootstrapped DAG ID churn, and the parse-corpus manifest update at src/v3/compiler/tests/integration/parse_corpus_manifest.txt:24.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

Compliant — this is substrate-facing std modeling, but it does not widen dag.rs or add a second substrate store; the carrier uses existing structural identity via DeclarationId fields at src/v3/std/algebra.dag:118-120, and the design note explicitly chooses the no-substrate-extension carrier path at docs/design-substrate-carrier-port-program.md:171.

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

Compliant — single-authority metadata and coproduct-dissolution discipline are handled explicitly: the design rejects per-algebra duplicate carriers in favor of one MethodContract at docs/design-substrate-carrier-port-program.md:171, while both new coproducts carry scaffold classification and named dissolution triggers at src/v3/std/algebra.dag:80-89 and src/v3/std/algebra.dag:99-106. Fail-closed shape is also preserved for the new reader: method_contract_cost_shape returns CostShape? instead of fabricating a default shape at src/v3/lenses/cost.dag:59-60.

  1. CODING.md.

Compliant — the implementation follows data + free functions: MethodContract is plain data at src/v3/std/algebra.dag:118-124, and the lens surface is a free projection function rather than a method or builder at src/v3/lenses/cost.dag:59-60 / src/v3/compiler/src/lens_cost_symbolic_generated.rs:12-14.

  1. TESTING.md.

Compliant — no behavior-level cost migration lands here, so I do not see a missing cementing or parity test. The source corpus ratchet is updated for the std change at src/v3/compiler/tests/integration/parse_corpus_manifest.txt:24, and the only new lens behavior is a generated field projection over the new carrier.

  1. LOCKED DESIGN DECISIONS.

N/A — the diff records a local design pick in docs/design-substrate-carrier-port-program.md:167-173, but I do not see it altering a thesis/design item marked locked. It also explicitly scopes out substrate field-level refinement work at docs/design-substrate-carrier-port-program.md:171.

  1. TRACKED vs UNTRACKED DEBT.

Compliant — the new temporary shapes are tracked, not silent debt. CollectionSizeEffect documents why it is staged, what dissolution pattern is intended, and the trigger at src/v3/std/algebra.dag:80-89; CostShape does the same at src/v3/std/algebra.dag:99-106. The design note also bounds the remaining migration as post-shape-lock follow-up rather than pretending the bulk cost/complexity migration landed here at docs/design-substrate-carrier-port-program.md:173.

3. Verdict

APPROVE

The PR makes a bounded design choice, declares the carrier in one std location, gives the new coproducts explicit scaffold receipts, and adds the minimal generated consumer needed to prove the surface is reachable. I did not find a diff-anchored invariant violation requiring changes.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 3f47d476 · Trigger: schedule
  • Thinking: 24s wall

Verdict: APPROVE — Implements the §6a Option 3 decision cleanly: one MethodContract carrier in src/v3/std/algebra.dag:120-125 keyed by DeclarationId, with a minimal demo consumer in src/v3/lenses/cost.dag:59 and the regen mirrors updated in lockstep. The two new coproducts (CollectionSizeEffect, CostShape) are explicitly marked 🟡 SCAFFOLD with documented dissolution triggers tied to live call-site E-C/E-I/E-P consumption — meeting the tracked-debt bar (documented, bounded, named trigger). The design doc update flips from "deferred" to "decision" and adds a live-receipt section, matching what landed in code. No invariant or modeling-discipline violations grounded in the diff.

Exploratory observation (non-blocking): MethodContract ships with no producers yet — only the consumer-side accessor. The dissolution-trigger language ("bulk MethodContract producer/consumer migration") covers this, but it's worth keeping an eye on whether the carrier accumulates more optional fields before any producer exists, since that's the failure mode where the contract drifts away from what call sites can actually populate.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 931d095a · Trigger: schedule
  • Thinking: 160s wall

Verdict: APPROVE — the diff adds a documented, bounded MethodContract scaffold with coproduct receipts and dissolution triggers, plus a generated demo consumer. I don’t see a concrete violation of the pinned modeling, coding, or testing rubrics.

Validation run: cargo check -p v3-compiler passes.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 931d095a · Trigger: schedule
  • Thinking: 32s wall

Verdict: APPROVE — clean, narrowly-scoped design pick with tracked dissolution.

The diff:

  • Records the §6a decision (Option 3, unified MethodContract) in docs/design-substrate-carrier-port-program.md with reasoning against options 0/1/2.
  • Adds three new types to src/v3/std/algebra.dag (CollectionSizeEffect, CostShape, MethodContract), each carrying 🟡 SCAFFOLD/TRANSITIONAL markers with documented + bounded + named dissolution triggers (field-by-field dissolution into typed signatures / typed cost surface / typed callback shape; trigger = bulk producer/consumer migration after §6a lock). Tracked-bridge criteria all present.
  • Adds a single demo consumer method_contract_cost_shape in src/v3/lenses/cost.dag:59 and the matching generated mirror.
  • Regenerates bootstrap_generated*.rs, dag_cost_generated.rs, lens_cost_symbolic_generated.rs, manifest hash, and the regen_runtime_mirrors.py template — all consistent with the source .dag change.

No invariant violations observed. Single authority is preserved (MethodContract keyed by DeclarationId pair, no parallel facts introduced). Coproduct receipts present per the commit message and code (closed CollectionSizeEffect/CostShape enums explicitly justified vs Patterns 1/2/3).

Exploratory observation (non-blocking): the carrier currently has no producer — only one demo consumer reads cost_shape. That's expected per the doc ("Bulk migration … remains follow-up work"), but until then MethodContract is a type with no values flowing through it. Worth keeping the follow-up PR close behind so this doesn't become a stranded shape.

@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: 931d095a · Trigger: schedule
  • Thinking: 228s wall

Non-blocking — Strengths

  • src/v3/std/algebra.dag The MethodContract carrier is documented, bounded, keyed by structural identity, and has field-level dissolution paths.
  • src/v3/lenses/cost.dag The demo consumer stays narrow and returns CostShape? without fabricating a default before producer wiring exists.
  • docs/design-substrate-carrier-port-program.md The Option 3 decision is grounded in the current cost and complexity lens gaps and names the follow-up migration scope.

✅ No blocking concerns in the current mixed docs/.dag/generated diff.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: cab3efac · Trigger: schedule
  • Thinking: 36s wall

Verdict: APPROVE — small, narrowly-scoped doc + scaffold landing.

This PR converts the §6a per-method-metadata pick from "deferred" to "Option 3 unified MethodContract carrier", lands the carrier type in src/v3/std/algebra.dag, regenerates the Rust mirrors, and wires a one-line demo consumer in src/v3/lenses/cost.dag.

Checks against the rubric:

  • Scaffold discipline. All three new types (CollectionSizeEffect, CostShape, MethodContract) carry the 🟡 marker plus a documented, bounded, named dissolution trigger (src/v3/std/algebra.dag:78-103, 106-117, 124-130). MethodContract is explicitly transitional with field-by-field dissolution paths (size_effect → cardinality-refined sigs; cost_shape → typed cost surface; callback_element_position → typed HOF params). Tracked-bridge criteria met.
  • Single authority. The locked-decision rationale in docs/design-substrate-carrier-port-program.md:171-178 correctly argues that splitting back into per-lens tables would re-create duplicate lookup; one carrier keyed by (DeclarationId, DeclarationId) consolidates rather than parallels.
  • No substrate change. Reuses existing DeclarationId for both keys — consistent with the modeling-discipline preference for structural identity.
  • Generated mirrors. dag_cost_generated.rs and lens_cost_symbolic_generated.rs line up with the regen_runtime_mirrors.py template change; the manifest hash for algebra.dag was updated.
  • Demo-only consumer. method_contract_cost_shape is a one-line accessor with no live producer; the design doc and the type comments are explicit that bulk producer/consumer migration is follow-up. That's honest scaffolding, not hidden debt.

Exploratory observation (non-blocking): MethodContract lands with all three semantic fields Optional, which means an "all-None" contract is representable. Once a producer exists, that's a candidate "illegal state" worth tightening — likely at least one of the three should be required, or the variants partitioned. Not actionable today since there's no producer; flag for the bulk-migration PR.

@briansrls
briansrls merged commit cb4ebe2 into main Apr 25, 2026
3 checks passed
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: cab3efac · Trigger: schedule
  • Thinking: 175s wall

Verdict: APPROVE

No concrete invariant, coding, or testing violations observed in the diff. The new MethodContract surface is documented as transitional, the new coproducts have scaffold receipts and triggers, and the generated consumer/mirror path is present.

Verification: git diff --check clean; cargo test -p v3-compiler m2_substrate_inhabitance_test -- --nocapture passed 25/25.

briansrls added a commit that referenced this pull request Apr 26, 2026
…rief

Codex inline BLOCKING on r2-release-manager.md:30 surfaced that
docs/briefs/t-permethodmetadata-pick-worker.md (landed PR #794) already
exists as the pick-worker brief. My prior fix (74b679b) reframed
"pick decision brief" → "follow-through brief" but didn't reference the
existing worker, leaving readers to wonder if the follow-through was
re-picking.

Two precision tightenings:

- "Pick is closed." Names the worker brief explicitly + cites its
  scope-closure clause ("Do not migrate all consumer lenses ... bulk
  migration is post-pick work").
- "No duplicate decision authority — pick is closed; follow-through is
  post-pick scope." Closes the P2 single-authority concern codex named.

Surface change only; no scope expansion. The follow-through scope
(bulk migration + dissolution-trigger tracking) is unchanged from the
74b679b state — what's added is the explicit worker-brief anchor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Apr 26, 2026
…h worker brief

Two additions to the PM bundle.

## ROADMAP §"R1 Closure Manager" section (new)

Small registration section between §"Lane acceptance — .dag gates" and
§"Scheduled cleanups". Names the manager + lane structure (R1C-A through
R1C-F) + critical-path edge (R1C-A → R1C-D); points at the brief at
docs/briefs/r1-closure-manager.md as authority for the per-lane scope.

Parallel registration shape to docs/r2-structure.md's §"Manager structure"
treatment for R2 managers — short authoritative pointer in ROADMAP, full
manager scope in the brief. Manager dissolves on R1 all-gates-green; R2
spawn gated on this dissolution.

## §6a follow-through worker brief (new)

Per inbox #828 PM-portion split, this is the next PM deliverable in the
queue. Anchored against the existing pick-worker brief at
docs/briefs/t-permethodmetadata-pick-worker.md (landed PR #794) so there's
no duplicate decision authority — pick is closed; this brief is post-pick
scope only.

Three consumer-side requirements:
1. Inventory current consumption sites in cost.dag / complexity.dag for
   the three carrier fields (size_effect / cost_shape / callback_element_position).
2. Bulk-migrate to MethodContract-keyed lookup; retire lens-local reads
   of *_templates() result fields.
3. Track field-by-field dissolution triggers as named ROADMAP debt rows
   per §6a:175 (each field has a named upstream-fact landing condition
   that retires the carrier; when all three trigger conditions fire,
   MethodContract retires).

Slice: inventory → migrate → track. 1-3 PRs at worker discretion.

STOP-AND-ESCALATE clauses cite the new escalation channel discipline from
docs/escalation-paths.md (channel: GitHub session-inbox; Director decision
artifact = amendment PR or sibling brief). Behavioral-regression on R1
gates is non-negotiable STOP; DB-8 drift is STOP; carrier-shape gap
discovery is STOP (the pick may need amending).

## What this PR now contains (cumulative)

- docs/briefs/r1-closure-manager.md (new) — R1 Closure Manager brief
- docs/escalation-paths.md (new) — 45-clause union map
- docs/briefs/r2-release-6a-follow-through-worker.md (new) — post-pick worker brief
- ROADMAP.md edit — R1 Closure Manager registration section
- docs/r2-structure.md edits — signal channel + Director decision-artifact format (Fixes 1+2)
- docs/design-substrate-carrier-port-program.md edits — C1 lane explicit owner (Fix 3)

## Out of scope

Still-pending PM deliverables per inbox #828: B5 Loop construction-closure
audit brief; B6 file-preference rank checklist completion; B7 priority-hint
relay (cross-manager signal); thesis-claim coverage mapping table (lands
at R1 close → R2 promotion).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Apr 26, 2026
… readiness) (#835)

* docs(briefs): pre-stage 6 R2 manager briefs (PM portion of R2 spin-up readiness)

Per user direction: every lane/brief/design must be authored before
R2 managers spawn. PR #827 (merged) named the 6-manager structure;
Transition mechanics step 4 said "pre-stage skeletons during R1 final
week" — accelerated to "pre-stage now."

This PR lands all 6 R2 manager briefs as one bundle, structured
consistently:
- Status (PROPOSAL pre-spawn, spawns on R1 close)
- Orient before reading (R2 structure authority, scope source,
  cross-program coordination, demo coordination)
- Program scope (the lane/sub-program scope this manager owns)
- Owned deliverables (table of lanes/sub-lanes with status)
- Cross-program dependencies (produces/consumes signals)
- Autonomous dispatch authority (what manager does without Director)
- Reporting cadence (where signals flow)
- Sub-briefs (authored / pending)
- Working state (placeholder for fill on spawn)
- Cross-refs

Six briefs:

1. r2-grounding-manager.md — T-Ground sub-program (the one true R2
   critical path: Pilot → Rust → Engine → Tests → Dissolve, with
   Python/Go fill). Migrates from grounding-manager.md (which archives
   on R2 promotion). Names Engine sharpened-(b) consumer dependency
   on Substrate Manager's ValueBody-list/sum carrier.

2. r2-substrate-manager.md — T-Substrate (4 sub-lanes) + B4
   Identity-Carrier Substrate Pass program (12 sub-briefs). Largest
   single program in R2; produces 4 carriers consumed by Modeling
   (3 sub-lanes) + Grounding (Engine sharpened-(b)). Names watch
   condition for B4 split if Substrate becomes the new bottleneck.

3. r2-modeling-manager.md — T-Modeling (3 Goal 2 items + tokenizer
   charclass phase-2 added per shared T-Substrate dependency). All
   gated on Substrate Manager carrier readiness.

4. r2-impossible-bugs-manager.md — T-ImpossibleBugs (3 R2+ classes:
   nested-optional flatten, unhandled diagnostic paths, unenumerated
   effects). Design docs already authored (#798, #801, #808+#805
   prereq); needs Director conversion to worker briefs.

5. r2-pure-bootstrap-manager.md — POST-R1 only per gate-vs-program
   resolution in PR #827. Migrates from pure-bootstrap-zero-manager.md
   with scope narrowed (does NOT duplicate R1 T-PB-A/T-PB-B census-
   reduction work). Owns Tier 3 mirror dissolutions + Tier 2
   patch_lower_helpers retirement + post-R1 emergent dissolutions.

6. r2-release-manager.md — Goal 5 (§6a metadata-pick) + Goal 6 (R2
   demo coordination) + B-wave Tier 0/2 dispatch (#810) + discipline
   framework central reporting + thesis-claim coverage mapping
   (Open call 1) + R2 closure ledger + v2 retirement. Single authority
   for closure ledger and demo coordination.

Each brief explicitly defers to ROADMAP/THESIS/r2-structure.md for
upstream authority; does not duplicate gate semantics or scope
decisions. Cross-program coordination via R1 `Cross-manager
notifications queued` brief pattern.

Coordination split with Director on inbox #828: Director takes the
worker-level briefs (B4.2/B4.3/B4.4 + T-Substrate sub-lane scoping +
T-Modeling worker briefs + T-ImpossibleBugs design→worker conversion);
PM takes §6a + B5/B6/B7 + thesis-claim mapping in follow-up PRs.

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

* fix(briefs): r2-impossible-bugs-manager — canonical filenames + corrected scope (codex P2 on #835)

Codex P2 inline at r2-impossible-bugs-manager.md:63: design-brief
filenames were missing the canonical -design suffix; the actual
files are t-impossiblebugs-*-design.md.

Audit revealed a bigger correction needed than just filename suffix:

1. Worker briefs ALREADY EXIST for all three classes (I had said
   'needs Director conversion to worker briefs' — wrong). Correct
   state:
   - Nested-optional flatten: design + worker (DESIGN/SCOPING shape) authored
   - Unhandled diagnostic paths: design + worker (DESIGN/SCOPING shape) authored
   - Unenumerated effects: design authored, prior worker briefs SUPERSEDED 2026-04-25 by design doc

2. The two non-effects workers are DESIGN/SCOPING shape — they
   produce substrate proposals, not direct implementation. Manager
   role is dispatch + Substrate-Manager-handoff coordination, not
   convert-design-to-worker.

3. Effects has SUPERSEDED workers (closed-system framing dissolved
   the prior lens-vs-declaration framing). Manager owns design-doc
   routing + post-supersede implementation worker authoring against
   the canonical design.

4. Fn→Arrow refactor (PR #805) reframed as independent vestigial-
   syntax cleanup, not direct effects-framing prereq.

Three coordinated fixes in r2-impossible-bugs-manager.md:
- Program scope table: canonical filenames + per-class authored-status
  + SUPERSEDED notes
- Owned deliverables: 'Manager dispatches existing worker' (not
  'convert design to worker')
- Sub-briefs section: explicit Authored/SUPERSEDED/Pending tri-state
  with full canonical paths

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

* WIP: gunbc PM

* fix(briefs): add pre-spawn vs post-spawn authority subsection to all 6 R2 manager briefs (codex P2 on #835)

Codex flagged ownership ambiguity in r2-impossible-bugs-manager.md:
the brief said design/scoping docs would be 'converted to worker
briefs by Director' but elsewhere said the manager authors all worker
briefs autonomously. Without an explicit phase boundary (pre-spawn
vs post-spawn), ownership is ambiguous and dispatch can stall.

Resolution applied uniformly to all 6 briefs: new 'Pre-spawn vs
post-spawn authority' subsection inserted before 'Autonomous dispatch
authority':

- Pre-spawn (now, before R1 close): Director + PM coordinate on brief
  authoring per inbox #828 split. PM authors the manager skeleton;
  Director authors worker-level briefs not yet existing. Both stop
  authoring once R2 spawns.

- Post-spawn (R2 promotion onward): Manager owns all worker-brief
  authoring autonomously per Autonomous dispatch authority. Director
  narrows to cross-program conflict resolution + scope-change
  escalation.

Release Manager variant has the same boundary plus an explicit note
that PM also authors the §6a / B5 / B6 / B7 / thesis-claim-mapping
briefs as Release-Manager-portion PM deliverables (per inbox #828).

The phase boundary is now structurally explicit: no dispatch stall
from both Director and Manager assuming the other owns authoring.

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

* fix(briefs): tighten Pending-line authority qualifier (codex BLOCKING on #835 sha 3803266 :90)

Codex flagged the 'Pending — Director-authored per coordination on
inbox #828:' lines as creating dual authority — the line read in
isolation contradicted the 'Manager authors autonomously' framing
elsewhere. The d42f17e phase-boundary subsection resolved this
contextually, but a reader scanning just the Pending line could still
read it as a permanent assignment.

Surgical tightening: add explicit pre-spawn qualifier inline so the
Pending line is self-resolving without requiring the reader to
cross-reference the phase-boundary subsection.

Old: 'Pending — Director-authored per coordination on inbox #828:'
New: 'Pending — pre-spawn Director-authored per inbox #828
      coordination split; post-spawn manager-authored autonomously
      per "Pre-spawn vs post-spawn authority" subsection above:'

Applied to 4 briefs (Modeling, Substrate, Pure Bootstrap, Release).
Release variant uses 'PM-authored' instead of 'Director-authored'
since R2 Release Manager's pre-spawn portion is PM-owned per inbox
#828 split (the §6a / B5 / B6 / B7 / thesis-claim-mapping briefs).

The Pending line now reads cleanly in isolation: pre-spawn / post-
spawn boundary is explicit at the line itself, not deferred to a
cross-reference.

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

* fix(briefs): resolve openai-pro REQUEST_CHANGES on #835 sha bfaab66

Two surgical fixes for the two BLOCKING findings (P2 + P5):

1. r2-release-manager.md:67 — B7 dual-authority contradiction.
   Was: "Authors all T-Release worker briefs without Director (§6a pick, B5/B6/B7, ...)"
   But B7 is "Cross-manager signal, not a worker brief" per :33 + :86.
   Now: "Authors all T-Release owned deliverables ...: worker briefs
   (§6a pick, B5, B6, thesis-claim coverage mapping) and cross-manager
   signals (B7 priority-hint relay)." — distinguishes briefs from signals,
   no item carries two contracts.

2. r2-grounding-manager.md:62 — Pending line unbounded across pre/post
   spawn. The other 4 briefs got the "pre-spawn Director-authored;
   post-spawn manager-authored" temporal qualifier in bfaab66;
   Grounding was missed. Same pattern applied here.

Both fixes mechanical; no scope or authority change beyond removing
the ambiguity openai-pro flagged.

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

* fix(briefs): resolve codex BLOCKING on #835 sha bfaab66 — stale §6a + B4.1 status

Two codex BLOCKING findings, both about briefs copying status from earlier
state without verifying against live receipts:

1. r2-release-manager.md §6a — DECISION already locked.
   docs/design-substrate-carrier-port-program.md §6a:171 says
   "pick **Option 3, unified MethodContract carrier**." :173 names the
   live receipt (src/v3/std/algebra.dag declares MethodContract;
   src/v3/lenses/cost.dag imports it via method_contract_cost_shape).
   :175 names the dissolution trigger (size_effect / cost_shape /
   callback_element_position field-by-field retirement).

   Brief was framing this as "DECISION BRIEF NOT YET AUTHORED — write
   up the 4 options ... recommend one based on E-I evidence." Stale.

   Fix: rename "pick decision brief" → "follow-through brief"; status
   from "NOT YET AUTHORED" to "DECISION LOCKED — Option 3 ... live
   receipt landed"; describe remaining work as bulk migration +
   dissolution-trigger tracking. Updated the deliverable table row,
   the Core deliverables list, the Autonomous dispatch authority line,
   the Sub-briefs Pending list, and the Cross-refs §6a source.

2. r2-substrate-manager.md B4.1 — BLOCKING already resolved.
   PR #819 ("docs(briefs): add B4.1a DeclarationRef runner migration
   brief") merged 2026-04-26 01:13:32. The §0.2 scope gap was resolved
   in 6f564f5 BEFORE merge per Director receipt on inbox #828. B4.1a
   follow-on brief landed in the same PR. Real open residual is the
   first-consumer migration at PR #826 (regen drift on r1_gates.dag —
   worker CI-fix, not brief authoring).

   Brief was still saying "DRAFTED (with §0.2 BLOCKING outstanding —
   codex finding on PR #819)" and "with outstanding BLOCKING ...
   resolution pending." Stale on both the BLOCKING and the residual
   shape.

   Fix: status to "BRIEF LANDED (PR #819, merged 2026-04-26 — §0.2
   scope gap resolved in 6f564f5 before merge); B4.1a runner-migration
   follow-on brief landed same PR. Real residual: first-consumer
   migration #826 OPEN with regen drift (worker CI-fix)." Updated the
   deliverable table row, the Sub-briefs Authored list, and the
   Cross-refs adjacent line.

Both findings: feedback_verify_thesis_claims violation on the PM
authoring side. Two surgical text updates per finding; no scope or
authority change.

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

* fix(briefs): anchor §6a follow-through against existing pick worker brief

Codex inline BLOCKING on r2-release-manager.md:30 surfaced that
docs/briefs/t-permethodmetadata-pick-worker.md (landed PR #794) already
exists as the pick-worker brief. My prior fix (74b679b) reframed
"pick decision brief" → "follow-through brief" but didn't reference the
existing worker, leaving readers to wonder if the follow-through was
re-picking.

Two precision tightenings:

- "Pick is closed." Names the worker brief explicitly + cites its
  scope-closure clause ("Do not migrate all consumer lenses ... bulk
  migration is post-pick work").
- "No duplicate decision authority — pick is closed; follow-through is
  post-pick scope." Closes the P2 single-authority concern codex named.

Surface change only; no scope expansion. The follow-through scope
(bulk migration + dissolution-trigger tracking) is unchanged from the
74b679b state — what's added is the explicit worker-brief anchor.

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

* fix(briefs): resolve openai-pro APPROVE_WITH_COMMENTS on #835 sha 3260d71

Finding (P2 single-authority): T-Ground-Rust had two contradictory states —
deliverables table at :23 said DISPATCHED, but Sub-briefs Pending list at
:62-63 listed "T-Ground-Rust full implementation" as pending pre-spawn work.
Same lane, two authoritative states.

Audit: T-Ground-Rust full lane (Rust target-spec primitive declarations
end-to-end) has not been authored. Pilot (PR #765) and Engine Phase 1
typestructure (PR #788) are separate dispatched lanes (their own rows in the
table); the "DISPATCHED (Engine implementation parked pending loader-close)"
parenthetical was a status leak from the Engine row's parking note.

Fix: row status now reads "NOT YET AUTHORED — listed under Sub-briefs
Pending below; gated on pre-spawn Director scope refinement per inbox #828.
(Pilot PR #765 + Engine Phase 1 typestructure PR #788 are separate dispatched
lanes — see those rows; the prior 'DISPATCHED' status here was a parenthetical
leak from the Engine row's loader-close parking note.)"

Now table status matches Sub-briefs Pending list. Single authority restored.

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

* fix(briefs): refresh impossible-bugs manager against PR #836 merge

Codex BLOCKING on r2-impossible-bugs-manager.md:78 (sha bfaab66) was
correct in spirit and now newly actionable: the brief's Pending section
re-dispatched the older DESIGN/SCOPING workers
(t-impossiblebugs-nested-optional-flatten-worker.md +
t-impossiblebugs-unhandled-diagnostic-paths-worker.md) even though
their design docs (PR #798 + PR #801) had landed with next-step
recommendations + PR #836 just authored the IMPLEMENTATION workers
(r2-impossible-bugs-{nested-optional-flatten,unhandled-diagnostic-paths,
unenumerated-effects}-worker.md).

Re-dispatching DESIGN/SCOPING workers when implementation workers are
authored = duplicate decision authority under P2 + accumulating ad-hoc
state under P5. Codex was right.

Three sections updated to reflect PR #836-merged state:

## Program scope table (lines 17-19)

Reframed columns: "Design authority + implementation worker (post PR #836
merge)" / "Implementation status" / "Substrate gating". Each class row
now names:
- Design doc PR + closed-in-scope status
- Implementation worker filename (PR #836) + IMPLEMENTATION WORKER LANDED
- UNGATED status per design-doc audit (Director's reframes #1, #2 confirmed
  no substrate gates — substrate-constructor invariant for nested-optional;
  totality-by-omission for unhandled-diagnostic; closed-system for effects)

The OLD DESIGN/SCOPING workers are explicitly named SUPERSEDED for
unenumerated-effects already; nested-optional + unhandled-diagnostic
older workers are now also marked superseded by their PR #836
implementation counterparts.

## Owned deliverables (lines 25-31)

Reframed from "Worker brief is already authored ... DESIGN/SCOPING shape"
to "Implementation worker brief landed on main via PR #836 merge ... do
not re-dispatch the older workers." Substrate-gap escalation reframed as
the exception path (was the expected path under the older DESIGN/SCOPING
worker assumption); expected path is direct implementation per design-doc
Director-actionable recommendation.

## Sub-briefs Pending (lines 78-86)

Reframed from "Dispatch nested-optional-flatten worker (DESIGN/SCOPING
produces substrate proposal → escalate)" to "Dispatch nested-optional-flatten
implementation worker (ungated; dispatchable Day-1 post-spawn)" + same
pattern for the other two classes. PR #836's 3 implementation workers are
now the canonical dispatch targets.

Added explicit SUPERSEDED list for the older workers (4 entries: 2
DESIGN/SCOPING + 2 effects-worker variants) with their respective
implementation-worker successors named.

## Discipline note

This finding was real, not an echo. PR #836 merging changed the substrate
of facts the manager brief grounds against. Same class as the §6a stale
framing on Release Manager + the B4.1 stale BLOCKING on Substrate Manager:
brief authored against pre-merge state; merge surfaces the staleness.

The matrix's pre-author verification invariant catches state-drift at
authoring time; the matrix's status-consistency rule catches dual-state
within a single brief. This finding is a third class: cross-PR state drift
(brief A's Pending list cites brief B's content; brief B merges and
brief A's content goes stale). Worth noting as a refresh-discipline
trigger separately from authoring discipline.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Apr 26, 2026
* docs: PM bundle — R1 Closure Manager + escalation-paths union map

Two PM-portion deliverables, bundled per the user-preferred bundling cadence
for multiple workstreams.

## R1 Closure Manager (new) — docs/briefs/r1-closure-manager.md

Strict-interpretation gate-close authority. Per-HEAD gate audit against
ROADMAP.md §"Lane acceptance — .dag gates" surfaced 12+ unwired gates
under strict reading ("the release gate IS a .dag program" per THESIS):

  - T-P0 (3): repeat_string_correct / no_fabrication_sentinel /
    rest_ops_aligned — features work, no .dag TestClaim wrappers
  - T-Sub (1): sub_type_alias_where_lowers — PR #703 landed feature,
    no fixture wrapper
  - T-TestGen (1 compiles-only): testgen_mock_backed_integration_safe —
    runner returns NotYetImplemented; M1(2.8) data body blocker
  - T-PB census (6): hand_rust_at_shim_floor / lens_producer_files_remaining
    / self_compile_fixed_point / compiler_std_ratchet_zero (T-PB-A) +
    test_file_generated_from_dag / rust_tests_outside_residual_zero
    (T-PB-B) — enforced as Rust ratchets, not .dag TestClaims
  - T-Emit (3): rust_fixtures_rustc_green / generic_bounds_survive /
    omni_demo_fixtures_green — host-harness only, no .dag wrappers
  - T-Demo (1): demo_user_authored_lens_rejects_violating_program —
    no fixture

Six mutually-exclusive lanes (R1C-A through R1C-F) at the
fixture-file / runner-dispatch-arm level. R1C-A (T-TestGen schema
extensions) unblocks R1C-D (T-PB census-as-.dag); other 4 lanes
parallel-dispatchable Day-1.

Lane variants per user direction: T-PB-A and T-PB-B merged into R1C-D
(single predicate-shape work); T-Emit kept (no host-harness pragmatic
acceptance).

Manager dissolves on R1 all-gates-green declaration; R2 managers spawn
post-dissolution per docs/r2-structure.md transition mechanics. No
overlap with R2 managers (R2 spawn gated on this manager's close).

## Escalation paths union map (new) — docs/escalation-paths.md

Sweep against main HEAD 407a8bc cataloged 45 "if X happens, escalate"
clauses across INVARIANTS / ROADMAP / THESIS / r2-structure.md / all
docs/briefs / docs/design-*.md / docs/thesis.

  - 73% GROUNDED (32 clauses): trigger condition is concrete +
    measurable (specific gate names, file:line citations, mechanical
    search verifiable)
  - 27% SOFT (13 clauses): trigger requires human judgment to fire

No significant authority conflicts. Three minor naming-tightening
opportunities surfaced as Fix 1 / Fix 2 / Fix 3 (applied below). One
near-orphan (DB-revision target unattested on main) — resolved by R2
promotion housekeeping; not load-bearing now.

Sweep boundary: main only. PR #835 (PM portion) and PR #836 (Director
portion) are NOT in this map's current sweep — second-pass sweep
planned on those PRs' merge to main.

## Three surgical fixes to source authority docs

Each fix is a 1-2 line edit closing an open-resolution-path gap the
sweep surfaced:

### Fix 1 — Signal channel naming (docs/r2-structure.md)

New paragraph in §"Manager structure" preamble naming the escalation
signal channel: GitHub session-inbox issue comment for human-target
escalations; cross-manager queue (per R1 "Cross-manager notifications
queued" pattern) for inter-manager signals. Worker-brief STOP-AND-
ESCALATE clauses no longer need to restate the channel.

### Fix 2 — Director decision-artifact format (docs/r2-structure.md)

Extended the "Scope-change escalation" bullet in §"Director" to name
where Director's adjudication decision lands: (a) amendment PR to the
originating brief OR (b) sibling brief if scope creates new program.
Closes the escalation cycle explicitly — originating brief stays open
until artifact lands.

### Fix 3 — C1 lane explicit owner (docs/design-substrate-carrier-port-program.md)

Two STOP-AND-ESCALATE clauses (Lane E-T :120 and Lane E-P :148)
rewritten from "→ C1 lane" to "→ escalate to Director (Director opens
a C1 substrate-capability lane if escalation requires substrate work)."
Director becomes the explicit receiver; C1 lane becomes the optional
dispatch outcome.

## Out of scope for this PR

- §6a follow-through brief authoring (next PM deliverable per inbox #828
  PM portion; tracked in r2-release-manager.md per PR #835)
- B5 / B6 / B7 brief authoring (next PM deliverables per inbox #828 PM
  portion)
- Thesis-claim coverage mapping table (lands at R1 close → R2 promotion
  transition per r2-structure.md)
- Authority matrix structural normalization (per openai-pro PAUSE_AND_REGROUP
  meta-review on PR #835; deferred — escalation-paths.md provides initial
  evidence base for any future matrix authoring)

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

* docs: add R1 Closure Manager ROADMAP registration + §6a follow-through worker brief

Two additions to the PM bundle.

## ROADMAP §"R1 Closure Manager" section (new)

Small registration section between §"Lane acceptance — .dag gates" and
§"Scheduled cleanups". Names the manager + lane structure (R1C-A through
R1C-F) + critical-path edge (R1C-A → R1C-D); points at the brief at
docs/briefs/r1-closure-manager.md as authority for the per-lane scope.

Parallel registration shape to docs/r2-structure.md's §"Manager structure"
treatment for R2 managers — short authoritative pointer in ROADMAP, full
manager scope in the brief. Manager dissolves on R1 all-gates-green; R2
spawn gated on this dissolution.

## §6a follow-through worker brief (new)

Per inbox #828 PM-portion split, this is the next PM deliverable in the
queue. Anchored against the existing pick-worker brief at
docs/briefs/t-permethodmetadata-pick-worker.md (landed PR #794) so there's
no duplicate decision authority — pick is closed; this brief is post-pick
scope only.

Three consumer-side requirements:
1. Inventory current consumption sites in cost.dag / complexity.dag for
   the three carrier fields (size_effect / cost_shape / callback_element_position).
2. Bulk-migrate to MethodContract-keyed lookup; retire lens-local reads
   of *_templates() result fields.
3. Track field-by-field dissolution triggers as named ROADMAP debt rows
   per §6a:175 (each field has a named upstream-fact landing condition
   that retires the carrier; when all three trigger conditions fire,
   MethodContract retires).

Slice: inventory → migrate → track. 1-3 PRs at worker discretion.

STOP-AND-ESCALATE clauses cite the new escalation channel discipline from
docs/escalation-paths.md (channel: GitHub session-inbox; Director decision
artifact = amendment PR or sibling brief). Behavioral-regression on R1
gates is non-negotiable STOP; DB-8 drift is STOP; carrier-shape gap
discovery is STOP (the pick may need amending).

## What this PR now contains (cumulative)

- docs/briefs/r1-closure-manager.md (new) — R1 Closure Manager brief
- docs/escalation-paths.md (new) — 45-clause union map
- docs/briefs/r2-release-6a-follow-through-worker.md (new) — post-pick worker brief
- ROADMAP.md edit — R1 Closure Manager registration section
- docs/r2-structure.md edits — signal channel + Director decision-artifact format (Fixes 1+2)
- docs/design-substrate-carrier-port-program.md edits — C1 lane explicit owner (Fix 3)

## Out of scope

Still-pending PM deliverables per inbox #828: B5 Loop construction-closure
audit brief; B6 file-preference rank checklist completion; B7 priority-hint
relay (cross-manager signal); thesis-claim coverage mapping table (lands
at R1 close → R2 promotion).

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

* fix(escalation-paths): resolve P2 single-authority wording ambiguity

Codex on #847 sha 265d97f flagged that line 3's "Authoritative single
source for ... escalation clauses" contradicts line 18's "descriptive,
not prescriptive ... source briefs remain authoritative" — direct P2
single-authority ambiguity per INVARIANTS.md.

Fix: line 3 now reads "Authoritative union receipt + conflict map ...
The source briefs remain authoritative on their own escalation clauses
(per §How to use below); this doc owns the union view + cross-brief
consistency surfacing."

Surface change only; the doc's actual authority scope is unchanged
from the §"How to use" semantics — clauses live in source briefs;
this doc surfaces the union + conflicts. The status line now matches
the body.

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

* docs: B5 / B6 / B7 — R2 Release Manager B-wave Tier 2 (PM portion)

Per inbox #828 PM portion, three deliverables completing the B-wave
Tier 2 PM authoring queue per docs/briefs/debt-paydown-synthesis-
2026-04-25.md §5 (lines 526-528). All three target R2 Release Manager
ownership (post-spawn).

## B5 — Loop construction-closure audit (worker brief)

S, R2-coupled. Audit-FIRST per parent scope statement (lines 300-314).
Step 1: enumerate every Behavior::Loop construction site in lower.rs
+ anywhere; trace caller path. Step 2 (conditional on audit):

  - Closure-holds (preferred per feedback_construction_over_ratchets):
    deliverable is structural integration test asserting closure;
    speculative LoopKind marker retired.
  - Closure-fails: marker spec authored as separate brief; escalates
    to substrate-amendment per synthesis-doc STOP discipline.

STOP-AND-ESCALATE clauses cover: (a) ambiguous construction-site
origin; (b) marker spec requiring new substrate connective (C1-class
escalation per feedback_compiler_is_dag_processor); (c) self-fulfilling
closure if audit's own scaffold triggers.

## B6 — file-preference rank checklist completion (worker brief)

XS-trivial. Audit-first per feedback_audit_adjacent_authority_first.
Two paths: (a) add the three missing modules (computation/induction/
termination) to dag.rs:2735-2764 checklist; (b) document exemption
in source if the modules are intentionally exempt.

Single-PR deliverable; either +3 line addition or +1 line comment cite.

STOP if rank-function semantics are genuinely ambiguous, or if "fix"
turns out to require substrate work (don't ratchet on a scaffold
already named for dissolution).

## B7 — priority-hint relay to Pure Bootstrap Manager (signal doc, NOT worker brief)

Cross-manager signal content snapshot. NOT a worker brief — documents
the signal R2 Release Manager queues to R2 Pure Bootstrap Manager
once both spawn at R1 close.

Payload: lift patch_lower_helpers_generated_type_alias_refinement
retirement to PB-Tier1-Sweep priority within R2 Pure Bootstrap
Manager's owned-deliverable queue.

Pre-spawn: this file documents content. Post-spawn: R2 Release
Manager queues the signal as one of its first dispatch actions; R2
PB Manager acks + adjusts priority. Closure trigger: signal delivered
+ consumed (or dissolution already fired pre-R1); file marks RESOLVED
in follow-up cleanup.

Distinguished from B5 / B6 worker briefs by the explicit "NOT a worker
brief" framing in the synthesis doc; preserves single-authority discipline
(deliverables vs signals do not blur).

## Cumulative PR contents (PR #847)

- docs/briefs/r1-closure-manager.md
- docs/briefs/r2-release-6a-follow-through-worker.md
- docs/briefs/r2-release-b5-loop-construction-closure-audit-worker.md (this commit)
- docs/briefs/r2-release-b6-file-preference-rank-checklist-worker.md (this commit)
- docs/briefs/r2-release-b7-priority-hint-relay-to-pure-bootstrap.md (this commit)
- docs/escalation-paths.md
- ROADMAP.md (R1 Closure Manager registration section)
- docs/r2-structure.md (Fixes 1+2 + earlier signal-channel section)
- docs/design-substrate-carrier-port-program.md (Fix 3 — C1 lane explicit owner)

## What's left in PM inbox-#828 queue

- Thesis-claim coverage mapping table — gated on R1 close → R2 promotion
  per docs/r2-structure.md Open call 1; not in this PR.

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

* docs: R1 Closure Manager — 4 trivial-to-small lane worker briefs (R1C-B / -C / -E / -F)

Per user direction "lets do the trivial ones" — authoring the four
R1 Closure Manager lanes that don't depend on R1C-A (T-TestGen schema
extensions). All four are parallel-dispatchable Day-1 once R1 Closure
Manager spawns; sized S or smaller per the manager brief.

## R1C-B — T-P0 fixtures (S; 3 gates)

- p0_repeat_string_correct (Day-1, DB-15 schema): authored immediately
- p0_no_fabrication_sentinel (ext): audit predicate shape; possibly blocks on R1C-A
- p0_rest_ops_aligned (ext): audit predicate shape; possibly blocks on R1C-A

Branch on audit per gate; bundle PRs if all DB-15-suffices, split if any
blocks on R1C-A schema landing.

## R1C-C — T-Sub sub_type_alias_where_lowers fixture (XS; 1 gate)

PR #703 already landed the feature with test_db11_type_alias_where_*
integration receipts. Brief authors the .dag wrapper; predicate likely
Compiles on a fixture program exercising type-alias where lowering.
Single PR; dispatchable Day-1.

## R1C-E — T-Emit .dag TestClaim wrappers (S; 3 gates)

PB-Runtime ExecuteCommand (PR #792) is the runner enabler. Three gates:

- emit_rust_fixtures_rustc_green: ExecuteCommand running rustc on emitted output
- emit_generic_bounds_survive: audit-decided shape (ExecuteCommand+grep or structural)
- emit_omni_demo_fixtures_green: multi-target; ForAllTargets quantifier may need
  R1C-A schema, OR can be expressed as 3 ExecuteCommand claims (1 per target)

STOP if ForAllTargets needed and not in scope; STOP if PR #792 ExecuteCommand
runner doesn't cover the bounded-execution shape.

## R1C-F — T-Demo demo_user_authored_lens_rejects_violating_program (S; 1 gate)

Built on T-LensAPI user_authored_lens_compiles (GREEN). Three components:
- ~20-line user-authored lens in .dag (e.g., "max external HTTP calls per workflow"
  per THESIS canonical example)
- Violating program (~10-20 lines)
- TestClaim with FailsWithDiagnostic predicate (asserts lens rejects violator)

Demo artifact also authored per docs/r2-structure.md §"Demo discipline".

## Discipline anchors applied

- feedback_construction_over_ratchets — fixtures ground in observable
  behavior (compiles / output / exit-code), not parallel asserts
- feedback_audit_adjacent_authority_first — every brief mandates audit
  step before authoring (pick predicate / pick lens example / pick path)
- All four briefs cite docs/escalation-paths.md as escalation discipline
  authority

## Out of scope

- R1C-A T-TestGen schema extensions worker brief (M; meatier; authored separately)
- R1C-D T-PB census-as-.dag worker brief (M-L; meatier; gated on R1C-A; authored separately)
- Implementation of any of these briefs (worker dispatch happens at R1
  Closure Manager spawn)

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

* docs: thesis-claim coverage map (R2 promotion Open call 1 deliverable)

Per docs/r2-structure.md §"Open calls" item 1 — required pre-promotion
audit table mapping every THESIS claim to R1-closed / R2-gated /
post-R2-external disposition with gate name + evidence + status.

## Sweep result

74 claims cataloged across THESIS.md §"Thesis claims — complete list"
(Tier 1 / Tier 2 / Tier 3 + categorical claims under Concept unifications,
Epistemic stacking, Substrate shape, Free consequences, Omni-emission,
Meta-process modeling, Self-hosting, Audience duality, Adoption model,
Tests-as-data, Enumerable impossible-bug classes, Modeling discipline).

## Coverage statistics

- R1-closed: 52
- R2-gated: 18
- post-R2-external: 4
- GAP (no disposition): 0

**Pre-promotion blocker count: 0.** Open call 1's gate is satisfied —
every thesis claim has a named disposition + documented evidence.

## Coverage anomalies (partial-status, NOT blockers)

Four claims have partial-status notes:
1. Ownership (Tier 1) — full infrastructure may have post-R1 tail
2. Shape A omni-emission — R1 demonstrates 3 of 6+ targets (TS/Swift/HDL post-R1)
3. Self-hosting fixed-point + tests-as-data — [ext] gates pending T-TestGen
   runner closure; structural commitment R1
4. Grounding completeness — Tier 1 but R2-gated (intentional, single co-anchor
   claim per docs/r2-structure.md)

## Doc shape (mirrors escalation-paths.md authority pattern)

- Status: PROPOSAL pre-R1-close; promotes to ACTIVE on R1 close → R2 promotion
- Authority: descriptive (union receipt + GAP-surfacing); THESIS + ROADMAP
  + r2-structure.md remain authoritative on claim text + dispositions
- Refresh discipline: every release transition; rebuild on new claims

## What this PR (#847) now contains

Cumulative deliverables:
- docs/briefs/r1-closure-manager.md (R1 Closure Manager brief, 6 lanes)
- docs/briefs/r1c-b/c/e/f-*.md (4 trivial R1C lane worker briefs)
- docs/briefs/r2-release-6a-follow-through-worker.md
- docs/briefs/r2-release-b5-loop-construction-closure-audit-worker.md
- docs/briefs/r2-release-b6-file-preference-rank-checklist-worker.md
- docs/briefs/r2-release-b7-priority-hint-relay-to-pure-bootstrap.md
- docs/escalation-paths.md (45-clause union map)
- docs/thesis-claim-coverage.md (74-claim coverage map; this commit)
- ROADMAP.md edit — R1 Closure Manager registration section
- docs/r2-structure.md edits — Fix 1+2 (signal channel + Director decision artifact)
- docs/design-substrate-carrier-port-program.md edits — Fix 3 (C1 lane explicit owner)

## Out of scope

- R1C-A (M) and R1C-D (M-L) worker briefs — meatier; defer to next PM iteration
- Implementation of any worker brief (R1 Closure Manager dispatches at spawn)
- Authority matrix structural normalization per openai-pro PAUSE_AND_REGROUP
  meta-review — escalation-paths.md + thesis-claim-coverage.md provide
  evidence base; matrix authoring optional next iteration

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

* docs: R2 manager-brief authority matrix (resolves PAUSE_AND_REGROUP meta-review)

Per openai-pro PAUSE_AND_REGROUP meta-review on PR #835 sha bfaab66, the
recurring "authority ambiguity at stage boundaries" pattern (B7 dual-contract,
Grounding pending unbounded, §6a stale framing, B4.1 stale BLOCKING) was being
fixed instance-by-instance via wording sweeps. The structural fix is a shared
authority matrix that makes the categories disjoint at brief-authoring time.

This commit graduates the recurring class out of per-instance review.

## docs/briefs/r2-manager-brief-authority-matrix.md (new)

5 disjoint artifact categories with explicit invariants:

  1. Worker brief — dispatchable authoring task; produces concrete deliverable
  2. Decision brief — scoped design call (pick + lock); follow-through is
     distinct Category 1 worker brief (resolves §6a anti-pattern)
  3. Cross-manager signal — routes priority/scope info; NOT a worker brief
     (resolves B7 anti-pattern)
  4. Standing reporting duty — continuous-state ledger / monitor; activates
     on spawn, dissolves on manager dissolution
  5. Pre-spawn placeholder — skeleton authored before spawn; graduates into
     1-4 OR dissolves at spawn

Per-manager deliverable inventory tags every owned deliverable from all 6 R2
managers (Grounding / Substrate / Modeling / Impossible-Bugs / Pure Bootstrap /
Release) with category. Inventory references PR #835 (manager briefs), PR #836
(14 Director worker briefs), and PR #847 (this PR's worker briefs + signal doc).

Local review checklist (per meta-review recommendation #3): Owned deliverables
+ Pre-spawn vs post-spawn authority + Autonomous dispatch authority + Sub-briefs
sections must agree on owner + artifact type per matrix categorization. Doesn't
need new top-level INVARIANTS rule; P2 + P5 already cover; this is the local
invariant for the manager-brief family.

## Sweep verification — current state of 6 R2 manager briefs (PR #835 sha 3260d71)

All 6 manager briefs verified consistent with matrix:

  - Grounding: ✅ no category conflicts (Pending bounds fixed in f916fba)
  - Substrate: ✅ no category conflicts (B4.1 staleness fixed in 74b679b)
  - Modeling: ✅ no category conflicts
  - Impossible-Bugs: ✅ no category conflicts (filenames fixed 70df547)
  - Pure Bootstrap: ✅ no category conflicts
  - Release: ✅ no category conflicts (B7 dual-contract fixed f916fba; §6a
    stale framing fixed 74b679b + 3260d71)

No additional fix-pushes needed on PR #835 from this matrix introduction.

## docs/r2-structure.md (edit)

Added "Manager-brief authority matrix" paragraph in §"Manager structure"
preamble, citing the matrix doc as authority. Manager briefs now cite the
matrix and stop self-categorizing.

## What this PR (#847) now contains

Cumulative deliverables:
- docs/briefs/r1-closure-manager.md (R1 Closure Manager brief, 6 lanes)
- docs/briefs/r1c-b/c/e/f-*.md (4 trivial R1C lane worker briefs)
- docs/briefs/r2-release-6a-follow-through-worker.md
- docs/briefs/r2-release-b5-loop-construction-closure-audit-worker.md
- docs/briefs/r2-release-b6-file-preference-rank-checklist-worker.md
- docs/briefs/r2-release-b7-priority-hint-relay-to-pure-bootstrap.md
- docs/briefs/r2-manager-brief-authority-matrix.md (this commit)
- docs/escalation-paths.md (45-clause union map)
- docs/thesis-claim-coverage.md (74-claim coverage map; 0 GAPs)
- ROADMAP.md edit — R1 Closure Manager registration section
- docs/r2-structure.md edits — signal channel + Director decision artifact
  + authority matrix reference (this commit)
- docs/design-substrate-carrier-port-program.md edits — Fix 3 (C1 lane
  explicit owner)

## What's outstanding (out of scope for this PR)

- R1C-A and R1C-D worker briefs (M and M-L; meatier; deferred per user's
  "trivial ones" direction)
- Sweep of PR #836's 14 worker briefs against the matrix at PR #836 merge
  (current sweep is main-only)
- Authority matrix becomes ACTIVE on R1 closure → R2 promotion transition
  per the matrix's status; PROPOSAL until then

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

* docs(matrix): add status-consistency + pre-author verification invariants

Two additions to the local review checklist on the R2 manager-brief
authority matrix, both surfaced by review activity since the matrix's
initial landing:

## Status-consistency rule

openai-pro APPROVE_WITH_COMMENTS on PR #835 sha 3260d71 found T-Ground-Rust
in two contradictory states: deliverables table said DISPATCHED, but
Sub-briefs Pending list said "T-Ground-Rust full implementation" pending.
Same lane, two authoritative states — the matrix's existing checklist
covered owner + artifact type but not status, leaving room for this class.

Added rule: a single deliverable cannot be both DISPATCHED/AUTHORED in the
deliverables table AND Pending/NOT YET AUTHORED in the Sub-briefs section.
Partial-state lanes must scope the partial explicitly in the table (e.g.,
"PARTIAL — Pilot PR #X done; full implementation pending"). Sub-briefs
section is single authority for authored-vs-pending; deliverables table
cites that authority without duplicating ambiguously.

Fixed in 3ef1509 on PR #835 (T-Ground-Rust row scoped to NOT YET AUTHORED).

## Pre-author verification invariant

Director's PR #836 hit feedback_verify_thesis_claims 7 times in one PR
authoring cycle (consistently: brief authored without grepping
source-of-truth before slicing). The pattern is a separate failure class
from categorization — not what the matrix's prior checklist addressed.

Added invariant: before authoring a brief that references substrate state,
gate condition, existing brief, or design-doc disposition, grep
src/v3/std/ + src/v3/spec/ + src/v3/compiler/src/ for state cited; grep
docs/briefs/ for existing canonical briefs; read the design doc's
§Director-actionable / §Q-recommendation / §Decision in full. Cite
specific file:line / brief filename / §ref in Read first. State audit
receipt before slicing.

This operationalizes feedback_verify_thesis_claims for the brief-authoring
family. Doesn't need a new INVARIANTS rule; cited existing P2 + P5 +
feedback_verify_thesis_claims as authority. Local invariant collected
here as a single review checkpoint.

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

* docs: R1 Closure Manager — full lane brief queue (R1C-A + R1C-D meatier briefs)

Per user direction "lets keep going here until we have full dispatch/briefing
for both with thorough review please" — authored the two non-trivial R1
Closure Manager lane worker briefs deferred earlier per "do the trivial ones"
direction. R1 Closure Manager lane queue now fully authored.

## R1C-A — T-TestGen schema extensions (M-L; was M before audit)

Pre-author audit at main HEAD 407a8bc (per matrix verification invariant)
revealed three coupled sub-deliverables, sized M-L total:

- **Sub-deliverable A — M1(2.8) list-body lowering for `data` declarations.**
  Compiler work in lower.rs:2446 (currently rejects `data: List<T> = [...]`
  as ValueBody::Unparsed). Predecessor for MockBackedInvariant fixture
  authoring + 6 PB-census predicate authoring. Substrate dependency: T-Substrate
  ValueBody-list/sum (PR #790; R2 sub-lane) — verify substrate state at brief-
  dispatch time per feedback_thesis_gate_state_drift.

- **Sub-deliverable B — Predicate-shape scoping for 6 PB-census gates.**
  No `.dag` predicate shape exists for any of the 6 census gates today; ROADMAP
  line 65 names T-TestGen as scoping authority. R1C-A authors them from scratch.
  Proposed shapes: CensusBoundCheck / CensusSubsetCount / FixedPointConverges /
  RatchetZero / GeneratedFromDag (per gate). Audit-first: grep dsl/std/
  test_infrastructure.dag for existing predicate-variant pattern; mirror
  schema discipline.

- **Sub-deliverable C — MockBackedInvariant minimal-demo fixture.**
  Closes testgen_mock_backed_integration_safe gate. Depends on Sub-deliverable
  A (fixture body uses list literal). 5-10 lines `.dag`.

Slice: A → B → C, sequential. STOP-AND-ESCALATE if substrate variant absent,
predicate shapes need substrate work, or DB-8 drifts.

## R1C-D — T-PB census-as-`.dag` (M-L)

Pre-author audit established census authority at sg0_census_test.rs:166-297
(EXPECTED_HAND_AUTHORED_NON_TEST 41 entries; EXPECTED_HAND_AUTHORED_TEST 77
entries; EXPECTED_HAND_AUTHORED_FRAGMENTS 1 entry). Drift test sg0_v3_hand
_authored_census at :387-451 panics with narrative on mismatch.

6 fixtures, one per census gate, each consuming an R1C-A Sub-deliverable B
predicate shape:

- D.1 pb_hand_rust_at_shim_floor (CensusBoundCheck on NON_TEST list)
- D.2 lens_producer_files_remaining (CensusSubsetCount on lens-producer pattern)
- D.3 pb_self_compile_fixed_point (FixedPointConverges on bootstrap snapshot)
- D.4 pb_compiler_std_ratchet_zero (RatchetZero on consolidation ratchet)
- D.5 pb_test_file_generated_from_dag (GeneratedFromDag on test partition)
- D.6 pb_rust_tests_outside_residual_zero (CensusBoundCheck on TEST list)

Dispatch gated on R1C-A Sub-deliverable B landing. STOP-AND-ESCALATE if
predicate shapes don't capture gate semantics (back-pressure to R1C-A);
or if cascade-promotion 0-floor work hasn't reduced census to 0 by R1 close
declaration time (gates D.1/D.2/D.6 stay RED; Director arbitration).

## R1 Closure Manager status sync

Updated r1-closure-manager.md deliverables table + Sub-briefs section to
reflect all 6 lane worker briefs as AUTHORED (per matrix's status-consistency
rule — table cannot say NOT YET AUTHORED while worker briefs are landed).
R1C-A row sized up from M to M-L per audit revealing Sub-deliverable A is
compiler work.

## Matrix invariants applied

Both new briefs follow the matrix's local checklist:
- Categorization: Category 1 (worker brief) — explicit in Cross-refs
- Owner / artifact type / status — consistent across deliverables, slice,
  acceptance, STOP-AND-ESCALATE sections
- Pre-author verification — explicit audit receipt section at top of each
  brief with file:line citations to runner / lowering / schema / census
- Discipline anchors named (feedback_construction_over_ratchets,
  feedback_audit_adjacent_authority_first, feedback_thesis_gate_state_drift,
  feedback_verify_thesis_claims, feedback_compiler_is_dag_processor,
  feedback_foundation_over_speed)

## What this PR (#847) now contains (final state expected)

- R1 Closure Manager brief + ROADMAP registration + 6 lane worker briefs
  (R1C-A through R1C-F) — full R1 closure dispatch surface
- §6a follow-through worker brief
- B5 / B6 / B7 (worker briefs + signal doc)
- Escalation-paths union map (45 clauses)
- Thesis-claim coverage map (74 claims, 0 GAPs)
- Authority matrix (5 categories + per-manager inventory + status-consistency
  + pre-author verification invariants)
- ROADMAP + r2-structure.md + design-substrate-carrier-port-program.md edits

R2 spin-up brief queue: complete. R1 closure brief queue: complete. PM inbox
#828 fully delivered.

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

* fix(briefs): correct R1C-A citations from self-review pass

Self-review pass against the matrix's pre-author verification invariant
caught two factual citation misses in r1c-a-t-testgen-schema-extensions-worker.md:

## BLOCKING — wrong file path for TestClaim schema (4 occurrences)

Brief cited `dsl/std/test_infrastructure.dag` and `src/v3/std/test_infrastructure.dag`
in 4 places (audit receipt at :17 + Sub-deliverable B framing at :61, :66 +
Slice PR-B at :87 + Cross-refs Schema authority at :119). That file does NOT
exist on main HEAD 407a8bc.

The actual TestClaim schema authority lives at:
- DSL-side: `dsl/std/verification.dag` (TestClaim at :36; full schema)
- v3-mirror: `src/v3/std/verification.dag` (TestClaim.requires at :187)

All 4 occurrences corrected to point at the real file. Schema authority
line in Cross-refs now also explicitly cites `dsl/std/verification.dag:36`
(DSL-side type declaration) for completeness.

## MINOR — predicate dispatch line range was off

Brief cited "Predicate dispatch inventory at test_runner.rs:1423-1431 has
all 10 predicates wired" — but lines 1423-1431 only contain 9 predicates
(Compiles through ExecuteCommand); MockBackedInvariant arm starts at
line 1432 and runs through 1448.

Corrected to: "in the match block at test_runner.rs:1424-1448 has all 10
predicates wired (Compiles / FailsWithDiagnostic / OutputEquals / PortHasState
/ CostBounded / LensOutputEquals / DifferentialEquals / AlgebraicLaw /
ExecuteCommand wired across :1424-1431; MockBackedInvariant arm at :1432-1448)."

## MINOR — ResourceReference line range corrected

Brief cited `src/v3/std/resources.dag:25-27` — actual range is :25-26 (the
type spans 2 lines, not 3). Corrected.

## Discipline note

Both misses were exactly the failure mode `feedback_verify_thesis_claims`
names: state cited from memory rather than grepped at brief-authoring time.
The pre-author audit was largely accurate (runner :1432-1448 quote was
exact; lower.rs:2446 diagnostic was exact; census line ranges all correct),
but two slips made it through. The matrix's pre-author verification invariant
worked at the self-review pass level — caught before automated reviewers.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls briansrls mentioned this pull request Apr 26, 2026
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