Skip to content

docs(r3): 12-lane sweep across Summary/Acceptance/Dep DAG/R2-dep sections - #1341

Merged
briansrls merged 6 commits into
mainfrom
docs/r3-structure-12-lane-sweep
May 1, 2026
Merged

briansrls merged 6 commits into
mainfrom
docs/r3-structure-12-lane-sweep

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

Address BLOCKING review on PR #1319 (briansrls 2026-04-30T23:00:42Z at docs/r3-structure.md:100): adding T-V2-Retirement and T-Free-Consequences-Demonstration only to the Lane structure table left Summary, Acceptance, Dependency DAG, and R2-dependency sections still reading "10 lanes" / "7 of 10 gated" — so R3 closure could omit the new gates despite the all-gates-green rule.

This is the same shape as the v2-retirement-contradiction fix from the previous review pass: a lane added in one section creates parallel authority unless every cross-reference is swept.

Sweep

  • §Acceptance — add 2 acceptance-gate blocks:
    • T-V2-Retirement (2 gates): v2_oracle_no_remaining_test_consumers, v2_directory_deleted
    • T-Free-Consequences-Demonstration (10 gates): auto_parallelism_* × 3, auto_loop_parallelism_* × 3, auto_memoization_* × 2, cross_target_optimization_* × 2; sequential-default + opt-in via Lens<Iteration-Independence> noted (Director-ratified 2026-04-30)
  • §Dependency DAG (visual ASCII):
    • Add T-V2-Retirement (cascade-gated on T-FixedPoint + T-LensProducer-Retirement)
    • Add T-Free-Consequences-Demonstration (R2-Evaluator + R2-T-Substrate-Lens-Primitive + T-CostLens-Composition)
    • T-Anthropic-Wire visual: scope-expansion note (+ProviderTypedWire<P> per C2 ratification 2026-04-30)
    • Parallel-capable bullet: 7+ → 9+
    • Critical-path bullet: extended through T-V2-Retirement
  • §Dependency on R2:
    • 7 of 10 R3 lanes → 9 of 12 R3 lanes with full enumeration including T-V2-Retirement (cascade gating) and T-Free-Consequences-Demonstration (witness + lens-instance prerequisites)
  • §Worker dispatch precondition:
    • 7 Evaluator-gated lanes → 9 Evaluator-gated lanes
    • Note T-V2-Retirement carries an additional internal cascade gate (T-FixedPoint + T-LensProducer-Retirement must close before retirement work begins)
    • :36 → :38 line reference (Summary edit shifted line numbers)

Test plan

  • grep -nE "(7 of 10|7 Evaluator|10 R3 lanes|ten lanes|R3 has 10)" docs/r3-structure.md → no matches
  • All 12 lanes appear in Summary §Acceptance with at least one gate each
  • Dependency DAG visual shows all 12 lanes
  • Lane numbering / lane count consistent across Summary, Lane structure, Manager structure, Dependency on R2

🤖 Generated with Claude Code

…ions

Address BLOCKING review on PR #1319 (briansrls 2026-04-30T23:00:42Z at
docs/r3-structure.md:100): adding T-V2-Retirement and
T-Free-Consequences-Demonstration only to the Lane structure table left
Summary, Acceptance, Dependency DAG, and R2-dependency sections still
reading "10 lanes" / "7 of 10 gated", so R3 closure could omit the new
gates despite the all-gates-green rule.

Sweep:
- Summary §Acceptance: add 2 acceptance-gate blocks
  - T-V2-Retirement: v2_oracle_no_remaining_test_consumers + v2_directory_deleted
  - T-Free-Consequences-Demonstration: 10 gates (auto-parallelism×3 +
    auto-loop-parallelism×3 + auto-memoization×2 + cross-target-opt×2);
    sequential-default + opt-in via Lens<Iteration-Independence> noted
- Dependency DAG visual: add T-V2-Retirement (cascade-gated on T-FixedPoint
  + T-LensProducer-Retirement) and T-Free-Consequences-Demonstration
  (R2-Evaluator + R2-T-Substrate-Lens-Primitive + T-CostLens-Composition);
  parallel-capable bullet 7+ → 9+; critical path extended through
  T-V2-Retirement
- T-Anthropic-Wire visual: scope-expansion note (+ProviderTypedWire<P>
  per C2 ratification 2026-04-30)
- §Dependency on R2: 7 of 10 → 9 of 12 with full enumeration including
  T-V2-Retirement (cascade gating) and T-Free-Consequences-Demonstration
  (witness + lens-instance prerequisites)
- §Worker dispatch precondition: 7 Evaluator-gated → 9 Evaluator-gated
  (with internal T-V2-Retirement cascade-gate note); :36 → :38 line ref

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls briansrls mentioned this pull request Apr 30, 2026
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 0a1a863c · Trigger: schedule
  • Comparison: origin/main @ 42e37700 ... review/pr-1341-0a1a863c @ 0a1a863c
  • Thinking: 42s wall

APPROVE — Docs-only update to docs/r3-structure.md expanding the R3 lane count from 10 to 12 with consistent counter updates across Summary, Acceptance gates, Dep DAG, and R2-dependency sections. Numbers reconcile (9 Evaluator-gated + 3 non-gated = 12; cascade gates documented). No code, no invariant surface touched.

@briansrls

Copy link
Copy Markdown
Contributor Author

LGTM — sweep is structurally consistent + arithmetic checks (PM perspective).

Verified all 4 sections updated cohesively:

Section Before After Verification
§Summary "ten lanes" "12 lanes" + items 11/12 explicit matches Lane structure table count
§Acceptance 10 gate blocks 12 gate blocks (added T-V2-Retirement [2 gates] + T-Free-Consequences-Demonstration [10 gates]) matches my C2 brief proposal verbatim including Loop-iteration sub-gates
§Dependency DAG 10-lane visual 12-lane visual with T-Anthropic-Wire scope-expansion note + cascade-gating callout for T-V2-Retirement structurally matches Summary + Lane structure
§Worker dispatch precondition "7 of 10 / 7 Evaluator-gated" + :36 ref "9 of 12 / 9 Evaluator-gated" + :38 ref + cascade-gate clarification for T-V2-Retirement arithmetic: 12 - 3 non-gated (Int128/Anthropic-Wire/Bridge-Retirement) = 9 Evaluator-gated ✓

One refinement worth flagging (not blocking — actually a strict improvement over my brief): the cascade-gating clarification for T-V2-Retirement is more precise than my brief. My C1 sibling brief says "dispatch-gated on R2-Evaluator readiness" without explicit cascade naming. This PR's wording — "T-V2-Retirement carries an additional internal cascade gate (T-FixedPoint + T-LensProducer-Retirement must close before v2 retirement work begins)" — captures the transitive Evaluator-gating through the cascade, which is the structurally honest read. Worth absorbing back into the T-V2-Retirement brief when it's authored.

10-gate T-Free-Consequences-Demonstration acceptance block:

  • auto_parallelism × 3 ✓
  • auto_loop_parallelism × 3 (sequential default + opt-in via Lens<Iteration-Independence> per Director ratification 2026-04-30) ✓
  • auto_memoization × 2 (subsumes lens-fold caching as one instance per user insight) ✓
  • cross_target_optimization × 2 ✓

The "no heuristic auto-parallelization" framing in auto_loop_parallelism_unproven_falls_back_sequential is exactly the zero-heuristic guarantee the user asked for.

— sent from deep-wolf-155

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

BLOCKING (1)

Root Cause

  • docs/r3-structure.md T-Free consequences conflates structural cost guarantees with external runtime measurement → define cross-target cost proportionality as a LanguageSpec/cost-lens derivation, or add a modeled benchmark environment before claiming measured cost.

Non-blocking — Improvements (fix in-PR if easy, else defer to roadmap)

  • docs/r3-structure.md Line 89 references docs/design-pure-bootstrap-zero.md §First-time bootstrap, but this repo only has docs/design-pure-bootstrap.md; fix the T-V2-Retirement anchor in the R3 lane.

⚠️ The measured-cost gate needs to be brought back inside the modeled substrate before this plan lands.

Comment thread docs/r3-structure.md Outdated
- `auto_memoization_repeated_pure_call_cached` — repeated calls to a pure function with identical argument-value identity emit memoized target code (subsumes lens-fold caching as one instance)
- `auto_memoization_no_caching_for_one_shot` — single-call sites do not emit memoization scaffolding; memoization predicates compose `Lens<Purity>·Lens<Cost>` rather than firing universally
- `cross_target_optimization_constant_fold_consistent` — for the certification corpus, every emitted target collapses identical constant-fold opportunities (same algebraic shrink applied across Rust/Python/Go)
- `cross_target_optimization_cost_proportional` — emitted target programs' measured cost stays within the structural cost-lens prediction (cost lens drives lowering, not target-specific heuristics)

This comment was marked as resolved.

Address BLOCKING review on PR #1341 (codex 0a1a863, 2026-04-30T23:44:20Z):
the auto_consequence gate "cross_target_optimization_cost_proportional"
phrased emitted-program cost as "measured cost" — conflating structural
cost guarantees with external runtime measurement, which violates the
closed-system / lenses-not-passes discipline (cost is structurally
derivable from Lens<SymbolicCost>·LanguageSpec composition, not measured
at runtime; runtime perf is Design challenge #7's measurable-or-deferred
post-R3 work).

Fix:
- Rename gate: cost_proportional → cost_structurally_derived
- Rephrase as structural-fold equality between (a) Lens<SymbolicCost>
  applied to emitted target program (via LanguageSpec realization cost)
  and (b) compositional sum of .dag algebra-level cost (Lens<SymbolicCost>
  on the source Dag) + per-primitive realization cost from target's
  LanguageSpec — no runtime measurement; both readings are structural
  folds over substrate
- Same shape as coercion_cost_equals_complexity_by_construction from
  T-CostLens-Composition; restated over the certification corpus to
  operationalize the "cost lens drives lowering" free-consequence claim
- constant_fold_consistent gate also tightened: pre/post-emission
  Lens<SymbolicCost> reading equality minus the folded subtree's algebra
  cost (structural-fold equality across Rust/Python/Go via LanguageSpec
  realization-cost composition; no byte/string match on emitted source)

The non-blocking finding (alleging design-pure-bootstrap-zero.md doesn't
exist) is false — the file exists at the cited path with §First-time
bootstrap at line 81. No code change for that finding; reply posted on
the PR.

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

Copy link
Copy Markdown
Contributor Author

BLOCKING (1) — addressed in 94f739f. Reviewer is correct on the substance: cross_target_optimization_cost_proportional phrased emitted-program cost as "measured cost," which conflated structural cost guarantees with external runtime measurement and violated feedback_lenses_not_passes / closed-system discipline (cost is structurally derivable from Lens<SymbolicCost>·LanguageSpec composition; runtime perf measurement is Design challenge #7's measurable-or-deferred post-R3 work).

Fix:

  • Renamed: cost_proportional → cost_structurally_derived
  • Rephrased as structural-fold equality between (a) Lens<SymbolicCost> applied to the emitted target program (via LanguageSpec realization cost) and (b) compositional sum of .dag algebra-level cost + per-primitive realization cost from the target's LanguageSpec
  • Explicit "no runtime measurement; both readings are structural folds over substrate"
  • Tied to coercion_cost_equals_complexity_by_construction from T-CostLens-Composition (same shape; restated over the certification corpus to operationalize the "cost lens drives lowering, not target-specific heuristics" free-consequence claim)
  • cross_target_optimization_constant_fold_consistent also tightened: pre/post-emission Lens<SymbolicCost> reading equality minus the folded subtree's algebra cost (structural across Rust/Python/Go via LanguageSpec composition; not byte/string match on emitted source)

Non-blocking — declined as factually wrong. Reviewer claims "this repo only has docs/design-pure-bootstrap.md" but docs/design-pure-bootstrap-zero.md is at the cited path:

$ ls docs/design-pure-bootstrap*.md
docs/design-pure-bootstrap-zero-audit.md
docs/design-pure-bootstrap-zero.md
docs/design-pure-bootstrap.md
$ grep -n "^## First-time bootstrap" docs/design-pure-bootstrap-zero.md
81:## First-time bootstrap (the genuine N=0 problem)

Both file and §First-time bootstrap anchor exist verbatim at the link target. No fix needed; the reviewer was looking at a stale cache or partial tree.

— sent from zesty-bear-812

Line 117 (T-Free-Consequences Lane structure description) still named
the gate by its old name cost_proportional after 94f739f renamed it
to cost_structurally_derived in the §Acceptance block. Same parallel-
authority shape as the original BLOCKING — referenced gate-name
divergence between two sections.

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

Copy link
Copy Markdown
Contributor Author

Re: BLOCKING inline at docs/r3-structure.md:100 (2026-04-30T23:44:21Z) — already fixed in 94f739f (pre-relay). Verified at HEAD:

Line 100 now reads cross_target_optimization_cost_structurally_derived with explicit "no runtime measurement; both readings are structural folds over substrate." Gate is structural-fold equality between Lens<SymbolicCost>·LanguageSpec reading on emitted target and the compositional sum of .dag algebra-level cost + per-primitive realization cost. Same shape as coercion_cost_equals_complexity_by_construction from T-CostLens-Composition.

While verifying, also caught a stale reference at line 117 (T-Free-Consequences Lane structure description) still naming the gate by its old name cost_proportional — same parallel-authority shape as the original BLOCKING, just one more cross-reference. Fixed in d5be0e1.

— sent from zesty-bear-812

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 94f739f9 · Trigger: schedule
  • Comparison: origin/main @ 42e37700 ... review/pr-1341-94f739f9 @ 94f739f9
  • Thinking: 69s wall

Findings

  • docs/r3-structure.md:117 names the T-Free-Consequences gate as cross_target_optimization_cost_proportional, but the acceptance list defines it as cross_target_optimization_cost_structurally_derived at docs/r3-structure.md:100. This creates two authorities for the same gate name, violating INVARIANTS P2 / single-authority metadata. Please use one predicate name consistently.

Verdict: REQUEST_CHANGES — the diff is otherwise narrowly scoped and structurally aligned, but the mismatched gate name should be fixed before merge because it affects the release acceptance ledger.

@briansrls

Copy link
Copy Markdown
Contributor Author

Codex review reading commit 94f739f9 (pre-relay snapshot); the single-authority drift was caught + fixed in d5be0e1 (pushed before this review arrived). At HEAD:

$ grep -n "cost_proportional\|cost_structurally_derived" docs/r3-structure.md
100:  - `cross_target_optimization_cost_structurally_derived` — ...
117:  | ... `cross_target_optimization_cost_structurally_derived`. **Loop-iteration ...

Both Acceptance gate (§:100) and Lane structure description (§:117) now name the gate consistently as cost_structurally_derived. P2 single-authority restored.

— sent from zesty-bear-812

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: d5be0e18 · Trigger: schedule
  • Comparison: origin/main @ 42e37700 ... review/pr-1341-d5be0e18 @ d5be0e18
  • Thinking: 134s wall

Findings

None. The diff only updates docs/r3-structure.md (12-lane summary, acceptance bullets, lane table, dependency ASCII art, R2 dependency counts, and the :36→:38 cross-ref). That is planning prose, not substrate or Rust, so CODING.md / TESTING.md do not apply in a way this diff can violate. Nothing here weakens fail-closed modeling, introduces parallel implementation authority in code, or misstates live repo state as already true—the new bullets are named future TestClaim gates and lane scope, not “already landed” claims.

A C2 vs design challenge #8 tension around the 6-month dissolution trigger already exists on origin/main (same file, unchanged by this diff), so it is out of scope for a “diff-only” finding here.

Verdict

APPROVE — Narrow doc alignment for the 12-lane program; no invariant or discipline violation grounded in these edits.

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

✅ Design-doc PR; the added R3 sweep is aligned with the thesis after the structural cost-gate fix, and I found no remaining blocking concerns.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: d5be0e18 · Trigger: manual
  • Comparison: main @ 42e37700 ... docs/r3-structure-12-lane-sweep @ d5be0e18
  • Conversation: View conversation

1. Story of the diff

This PR turns docs/r3-structure.md from the prior 10-lane R3 plan into a 12-lane plan, explicitly pulling T-V2-Retirement and T-Free-Consequences-Demonstration into R3 instead of leaving them past the milestone. The change is not just a count update: it threads those two lanes through the Summary, Acceptance gates, dependency DAG, critical path, and R2 dispatch preconditions, while also expanding T-Anthropic-Wire to include ProviderTypedWire<P> and per-provider parameter rows at docs/r3-structure.md:32. The load-bearing move is that the new free-consequences work is framed as structural .dag gates, not empirical/runtime-performance claims: the renamed cross_target_optimization_cost_structurally_derived gate at docs/r3-structure.md:100 keeps the acceptance criterion on cost-lens derivation rather than runtime measurement.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — this is a documentation-only change to the R3 plan; it does not modify live substrate types, Dag, dag.rs, .dag declarations, or compiler implementation. The doc does name future substrate/lens targets, for example ProviderTypedWire<P> at docs/r3-structure.md:32 and Lens<Iteration-Independence> at docs/r3-structure.md:90, but it does not introduce them in this diff.

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

Compliant — P2 single-authority / facts-flow-forward is handled by updating the same R3 lane count and dependency split across the summary, dependency section, and dispatch precondition: 9 of 12 appears at docs/r3-structure.md:38, docs/r3-structure.md:327, and docs/r3-structure.md:333, and the carve-out remains scoped to the same 3 non-Evaluator-gated lanes at docs/r3-structure.md:334. P5 dissolution is also explicit for the new retirement lane: v2_oracle_no_remaining_test_consumers and v2_directory_deleted at docs/r3-structure.md:88-89 are concrete closure gates, not vague cleanup prose. P3 fail-closed / no-heuristic behavior is respected in the free-consequences gates: unproven loop independence stays sequential at docs/r3-structure.md:95, and provable dependence stays sequential even when the opt-in lens is requested at docs/r3-structure.md:96.

  1. CODING.md.

N/A — no Rust code, functions, APIs, error/result shapes, helpers, or module boundaries are changed. The diff is planning documentation, so CODING.md’s implementation-style rules are not exercised.

  1. TESTING.md.

Compliant — the acceptance section adds behavior-shaped .dag gate names rather than implementation-detail assertions. The new free-consequences suite is decomposed into one-claim gates such as auto_parallelism_independent_binds_emit_parallel, auto_parallelism_dependent_binds_emit_sequential, and auto_memoization_no_caching_for_one_shot at docs/r3-structure.md:91-98; the V2 retirement lane likewise has direct observable gates at docs/r3-structure.md:88-89. Since this PR only edits roadmap/acceptance documentation, I do not see a required same-PR executable test addition.

  1. LOCKED DESIGN DECISIONS.

Compliant — the diff references locked or ratified decisions without silently diverging from them. The loop-iteration parallelism call is explicitly labeled Director-ratified and defines the zero-heuristic opt-in shape at docs/r3-structure.md:90, and the R3 worker precondition remains tied to the prior Director-locked decision while explicitly documenting the 2026-04-30 expansion at docs/r3-structure.md:331.

  1. TRACKED vs UNTRACKED DEBT.

Compliant — I do not see new untracked TODOs, unnamed scaffolds, or open-ended bridges. The new transitional sequencing is bounded by named gates: V2 retirement requires no test consumers and directory deletion at docs/r3-structure.md:88-89, and the additional cascade condition for T-V2-Retirement is explicitly named at docs/r3-structure.md:333. The free-consequences runtime-performance line at docs/r3-structure.md:100 is scoped as non-R3 empirical measurement while the R3 deliverable is the structural cost derivation gate, so it does not create a hidden R3 scaffold.

3. Verdict

APPROVE

The diff is internally consistent across the R3 summary, acceptance gates, dependency DAG, and R2 dispatch preconditions. I did not find a line in the changed diff that introduces duplicate authority, an untracked bridge, an unbounded scaffold, or a substrate-level modeling violation.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: cc18bd02 · Trigger: schedule
  • Comparison: origin/main @ c8a44b88 ... review/pr-1341-cc18bd02 @ cc18bd02
  • Thinking: 103s wall

Findings

  • docs/r3-structure.md:35 and docs/r3-structure.md:116 — Both added lines say 28 .dag files under src/v2/. In this worktree, find src/v2 -name '*.dag' reports 32 files (79 .rs matches the doc). That makes the scope line not grounded in the current tree, which cuts against INVARIANTS.md P1 (Modeling Faithfulness) when the prose reads as a concrete inventory. NON-BLOCKING: use ~32, re-count before merge, or soften to “O(tens) of .dag files” so the lane brief does not encode a false bound.

Verdict

APPROVE_WITH_COMMENTS — The change is documentation-only (12-lane summary, acceptance gates, dependency DAG, R2 gating copy), aligns with P2 single-authority cleanup (7→9 gated lanes, :36→:38 carve-out reference), and names checkable gates / dissolution-style receipts for the new lanes, consistent with P5 and TESTING.md’s structural-claim framing. No substrate or Rust CODING.md surface is touched. Fix the src/v2/ .dag count (or drop the exact number) so the doc does not contradict the repo.

Cursor non-blocking finding on PR #1341 (sha cc18bd0): the v2 scope line
said "28 .dag files" but find src/v2 -name '*.dag' reports 32 in this
worktree (.rs count of 79 was correct). Reviewer correctly cites P1
modeling-faithfulness — encoding a false bound in the lane brief.

Two call sites updated to ~32 (Summary lane #11 + Lane structure
T-V2-Retirement description); the ~ prefix matches the .rs side's
established convention so the count stays grounded but doesn't lock to
exact numbers.

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

Copy link
Copy Markdown
Contributor Author

Non-blocking finding on cc18bd0 — verified against worktree:

```
$ find src/v2 -name '.dag' | wc -l
32
$ find src/v2 -name '
.rs' | wc -l
79
```

Reviewer correct: `.rs` count matched but `.dag` was 28 in the doc vs 32 in the tree, encoding a false bound (P1 modeling-faithfulness).

Fixed in 399101b: both call sites (Summary lane #11 + Lane structure T-V2-Retirement description) updated to `32` with the `` prefix matching the `.rs` side's convention so the number stays grounded but doesn't lock to exact counts.

— sent from zesty-bear-812

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 8307aeaf · Trigger: schedule
  • Comparison: origin/main @ e771893b ... review/pr-1341-8307aeaf @ 8307aeaf
  • Thinking: 11s wall

Docs-only PR updating lane count from 10 to 12 across the document. Internally consistent updates to Summary, Acceptance gates, Lane structure table, Dep DAG, and R2-dep section.

APPROVE — pure docs sweep, internally consistent (10→12, 7→9 gated, parallel dispatch counts updated). The line-reference update from :36 to :38 matches the new bullet position. No INVARIANTS / MODELING / CODING / TESTING violations possible in a doc-only diff.

briansrls added a commit that referenced this pull request May 1, 2026
Cursor APPROVE_WITH_COMMENTS on PR #1331 sha 9e79b5b caught 3
real leftover inconsistencies from the reframe iterations:

1. Title still said "Carrier Extraction Worker Brief" while the
   body explicitly abandoned carrier extraction as the structural
   move. Renamed to "Mirror Dissolution + T-Ground-Services
   Consumption Worker Brief" — matches the reframed lane shape.

2. Line 162 said "Carrier extraction IS the dissolution" — direct
   contradiction with §"Lane reframe" (lines 38-57) and §"Scope"
   (lines 18-29). Rewrote to align: "The dissolution mechanism is
   option (a) from feedback_isomorphism_or_generation_for_mirrors —
   generation/parsing from the canonical authority — implemented
   here via T-Ground-Services parsing the canonical extdeps."

3. Line 170 named ratchet `provider_wire_no_per_provider_duplication`
   but the actual gate at line 92 is `provider_wire_no_fact_re_encoding`.
   Same-doc naming drift. Fixed all 6 questions of the substrate-
   principle audit to reference the correct gate name + extended the
   audit answers to reflect the reframed lane (T-Ground-Services
   parsing as recovery pattern; canonical extdeps preserved).

All 3 findings were direct artifacts of the prior reframe (aca422d)
not propagating through every cite — same self-consistency-sweep
pattern that PR #1341 just landed for r3-structure.md.

Per `feedback_verify_thesis_claims`: when reframing, sweep ALL
references; partial sweeps create exactly this kind of contradictory
documentation that confuses dispatch.

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

* docs(r3): add free-consequences verification lane brief

* docs(r3): clarify space-bound CX is not closed

* docs(r3): rename cost_proportional → cost_structurally_derived per #1341

* docs(r3): require effect evidence for auto-parallelism

* docs(r3): cite PR 1341 gate rename authority
briansrls added a commit that referenced this pull request May 1, 2026
…re<P>) (#1331)

* docs(briefs): R3 C1 + C2 worker briefs (perf budget + ProviderTypedWire<P>)

Authored per PR #1319 Director ratification ask 4 (PM-side authoring).

C1 — `r3-pb-tier3-perf-budget-worker.md`
- Sub-gate of T-Tier3-Dissolution: tier3_mirror_dissolution_perf_within_budget
- Thresholds: median ≤2x hand-Rust, p99 ≤5x (Director-ratified)
- Cargo bench fixtures per retired mirror (termination/computation/induction/effect-carrier)
- Owner: PB Manager (R2→R3 continuation); S-M scope ~2-3 days

C2 — `r3-substrate-provider-typed-wire-worker.md`
- T-Anthropic-Wire scope expansion: extract `ProviderTypedWire<P>` carrier
- Per-provider parameter rows in `dsl/extdeps/providers/*/`
- Drops prior 6-month elapsed-time check per user directive
  ("nothing can be deferred past R3")
- Owner: Substrate Manager (R2→R3 continuation); M scope ~1-2 weeks
- Resolves R3 design challenge #8 via path-(a) commit

Both briefs are dispatch-gated on R2-Evaluator readiness; STOP+PING
discipline matches `feedback_worker_stall_diagnosis` substrate-gap-stall
pattern.

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

* docs(briefs): address codex BLOCKING review (3 BLOCKING + 1 non-blocking)

Codex review on PR #1331 sha 1870104 flagged 3 BLOCKING + 1 non-blocking
findings against the C1 + C2 briefs. All 4 verified valid against current
code; this commit pushes fixes.

C2 — `r3-substrate-provider-typed-wire-worker.md`:

1. (BLOCKING) Operation-indexed carrier, not provider-level envelope.
   `dsl/extdeps/llm/anthropic.dag:168-200` declares
   `service llm.Anthropic { operation Messages { transport rest { … } } }`;
   providers carry MULTIPLE operations each with own request/response/error
   envelopes. Single provider-level envelope loses per-operation typing.
   Fix: split into two carriers — `ProviderOperationWire<P>` keyed on
   (provider, operation) for per-op wire envelopes, `ProviderConfig<P>`
   for provider-level shared facts (auth, base_url, models). Multi-op
   coverage required (Anthropic Messages + OpenAI Chat Completions at
   minimum; Embeddings/Tool Use land as additional rows).

2. (BLOCKING) Migration discipline — no parallel-authority window.
   Prior framing said old per-provider files "either retired or kept as
   v2-parsed legacy until v2 retirement" — exactly the parallel-authority
   anti-pattern (`feedback_parallel_representation_debt`). Fix: explicit
   commit to ONE of two paths in same PR — (a) deletion, preferred; OR
   (b) one-way generated projection from new carriers (un-editable
   header; CI rejects manual edits). "Kept as legacy" is rejected per
   user directive 2026-04-30 ("nothing deferred past R3").

C1 — `r3-pb-tier3-perf-budget-worker.md`:

3. (BLOCKING) std mirror path coverage. Verified `dsl/std/{termination,
   computation,induction,effects}.dag` AND `src/v3/std/{...}` both exist
   for all four blocks. CI wiring updated to reference both — `dsl/std/`
   as canonical authority + `src/v3/std/` as substrate twin + Rust
   mirror sites (`dag.rs`, `dag/effects.rs`, `workflow_idempotency.rs`).

4. (Non-blocking) `criterion` dev-dep claim. Verified `criterion` is NOT
   in any Cargo.toml. Fix: removed false "already in Cargo.toml" claim;
   adding criterion as `[dev-dependencies]` is part of THIS lane's
   deliverables (worker's first commit), not a precondition.

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

* docs(briefs): fix OpenAI operation example to match live extdeps

Codex inline BLOCKING comment on PR #1331 sha 1870104 flagged that
ProviderTypedWire<P> would drop per-operation wire facts when OpenAI
has ChatCompletion + Responses as distinct REST operations.

The structural fix (operation-indexed ProviderOperationWire<P>) landed
in d881e2a. This commit corrects the EXAMPLE data rows to match
the actual operations declared in dsl/extdeps/llm/openai.dag (verified
live: ChatCompletion at :163, Responses at :200) — prior commit used
"Embeddings" as the second operation, which is not declared.

Both ChatCompletion + Responses are now explicit in the migration
deliverables and acceptance gate; multi-operation coverage table cites
exact line numbers for both Anthropic Messages and OpenAI ChatCompletion
/ Responses.

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

* docs(briefs): fix self-contradiction in tier3 perf-budget brief

Cursor/composer-2 review on PR #1331 sha d881e2a caught a real
self-contradiction in deliverable #1: it called criterion an "existing
dev-dep" while deliverable #4 (added in d881e2a) explicitly says
criterion is NOT in any Cargo.toml and adding it is part of THIS lane.

Both can't be true. Fix: deliverable #1 now says "added as new dev-dep
per deliverable #4 below; not currently in any Cargo.toml" — single
authority on the criterion state, no contradiction.

Per INVARIANTS Documentation Describes Live State: documentation
should not assert repo state that doesn't exist.

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

* docs(briefs): fix cross-ref label/link mismatch (sibling brief)

Cursor/composer-2 review on PR #1331 sha 89e4082 caught a copy-paste
slip in C2 brief cross-refs: line labeled "Sibling: T-V2-Retirement"
but pointed at r3-pb-tier3-perf-budget-worker.md (which is the C1 brief
for T-Tier3-Dissolution sub-gate, not T-V2-Retirement).

Fix: label the link correctly as "Sibling brief: r3-pb-tier3-perf-
budget-worker.md (C1 sub-gate of T-Tier3-Dissolution; co-sibling in
same wave per PR #1319 ratification ask 4)". No T-V2-Retirement
reference here since neither brief is for T-V2-Retirement.

Exploratory finding (not BLOCKING) per cursor APPROVE verdict.

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

* docs(briefs): two-phase perf gate pattern (no parallel implementations)

Codex BLOCKING review on PR #1331 sha 19dc267 correctly flagged a
structural contradiction in the C1 perf-budget brief: comparing
median(eval) against median(hand-Rust) requires both paths to exist
simultaneously, but T-Tier3-Dissolution removes the hand-Rust side.
Either the mirror stays alive (parallel-implementation, INVARIANTS
§P2 violation) or the comparison is impossible.

Fix reframes the gate as two-phase:

**Phase 1 (sibling PR; pre-dissolution)**:
- 0a: criterion dev-dep added
- 0b: hand-Rust mirror benchmarks; deletes alongside dissolution
- 0c: frozen tier3_baseline.json with median+p99 captured on
       canonical CI machine

**Phase 2 (this brief; post-dissolution)**:
- 1: eval-path bench fixtures (.dag-evaluator only)
- 2: shared deterministic fixture corpus (Phase 1 + Phase 2 share)
- 3: .dag TestClaim comparing measured timings against frozen
     baseline JSON
- 4: CI wiring on Evaluator path + baseline file (read-only)

Director's ≤2× median / ≤5× p99 thresholds preserved (now relative
to frozen baseline data, not live mirror code).

Strict temporal ordering: Phase 1 → mirror dissolution → Phase 2.
Reverse order is impossible (STOP condition #1). Phase 1 baseline
JSON survives mirror dissolution; mirror code does not.

Discipline: explicit INVARIANTS §P2 callout — only DATA survives
post-dissolution, not parallel authority. tier3_baseline.json is
read-only after capture; CI rejects edits.

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

* docs(briefs): reframe C2 — preserve service-block facts via T-Ground-Services dependency

Codex BLOCKING review on PR #1331 sha 19dc267 flagged that
ProviderOperationWire<P> as drafted captured only a fraction of what
service { operation { ... } } blocks at dsl/extdeps/llm/{anthropic,
openai}.dag carry. Deleting those extdeps with the carrier as
replacement would lose 8 fact-classes per operation:
  - Output projection paths (e.g., "content/0/text")
  - Input field declarations + types
  - Output field declarations + types
  - Transport body composition
  - Transport headers
  - Response status mapping (200/4xx/5xx)
  - Mock responses (per status, with descriptions)
  - Service-level config (rate_limit, retry, auth)

This violates feedback_projections_must_compose_facts.

Reframe: the structural answer is NOT to extract a subset-carrier
replacing the canonical authority. It's to make the canonical
authority parseable natively via T-Ground-Services (R3 Grounding
lane) and dissolve the v3-side parallel MIRROR.

The lane now delivers 3 structural moves, all gated on
T-Ground-Services landing first:
  1. Relocate dsl/extdeps/llm/{openai,anthropic}.dag to
     dsl/extdeps/providers/{openai,anthropic}/wire.dag (path-only
     move; content unchanged)
  2. Delete src/v3/std/anthropic_schema.dag (v3-side parallel
     mirror); update BOOTSTRAP_FIXTURE_PATH_KEYS to read canonical
     extdeps directly
  3. Optionally author ProviderTypedWire<P> as thin alias wrapping
     Service<P> (T-Ground-Services owned) — only if cross-provider
     lens-instance authoring needs a parametric handle; defaults to
     "no alias unless consumer demand"

Acceptance gates updated: 4 gates (relocation + mirror dissolution
+ optional alias decision + no fact re-encoding) instead of prior
5 gates that assumed carrier extraction.

Hard prerequisite added: T-Ground-Services parser-grammar slice
must land first. Without it, the lane has nothing to do — it can't
delete the canonical extdeps without the parser to read them.

STOP conditions updated: STOP+PING if T-Ground-Services not landed,
or if alias scope creeps into fact reification.

Per ROADMAP `### Post-merge debt (2026-04-30 analyses)` "Provider/
API mirror multiplication risk": "Corrective action: prioritize
shared T-Ground-Services ingestion path over per-provider mirrors.
Owner: R3 Grounding (post-Anthropic-chain)."

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

* docs(briefs): tighten C1 lane-summary bullets to match two-phase pattern

Cursor/composer-2 APPROVE_WITH_COMMENTS on PR #1331 sha 30413c3
caught a residual inconsistency in the C1 lane-summary at lines
24-26. Item 1 still read "Cargo bench fixtures comparing hand-Rust
mirror invocation vs Evaluator-backed .dag invocation for each of
the four retired mirrors" — implying a simultaneous side-by-side
harness, contradicting the two-phase pattern (Phase 1 hand-Rust
captures frozen JSON; Phase 2 eval-only vs baseline) that lives
in §"Acceptance gate" and Deliverables.

Same class of bug as the criterion self-contradiction caught by
cursor on sha d881e2a — fixed the structural shape but left the
lane-summary bullet describing the prior shape.

Fix: lane-summary now explicitly names Phase 1 + Phase 2 and the
INVARIANTS §P2 framing (no simultaneous dual paths). Adds a 4th
deliverable line for CI integration that explicitly notes the
dissolved Rust mirror sites no longer exist as gate triggers
post-dissolution.

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

* docs(briefs): surface real substrate gap — BehavioralObservation doesn't carry perf-budget shape

Codex BLOCKING inline on PR #1331 sha 62c20e9 line 51 caught a real
unverified claim. The brief said "no new substrate variant; structural
composition over existing BehavioralObservation-shaped TestPredicates"
but verified BehavioralObservation at src/v3/std/verification.dag:126-130
only carries:
  - subject: DeclarationRef
  - input_sample: DeclarationRef
  - expected_output: DeclarationRef

It's shaped for input/output equality testing, NOT perf-budget-against-
baseline. The prior brief was hand-waving the substrate target.

Honest fix: surface the substrate gap explicitly. Two paths, Director/
Substrate-Mgr decision at brief-finalization:

Path (a) — preferred: new TestPredicate variant. Substrate Mgr authors
PerfWithinBaseline { bench_subject, baseline_data, median_factor_max,
p99_factor_max } in src/v3/std/verification.dag as hard prerequisite
for C1 dispatch. Cleanest structurally; preserves "tests are data"
facet 3 discipline.

Path (b) — fallback: existing ExecuteCommand variant. Bench harness
becomes a subprocess via ExecuteCommand { command, args,
expect_exit_code: 0 }; binary parses baseline + measured + exits
non-zero on breach. No new substrate but loses structural-acceptance
precision.

Updates:
- §"Acceptance gate" — explicit two-path framing with shape sketch
- Per-mirror claim shape — uses PerfWithinBaseline (path a) with
  ExecuteCommand fallback (path b) noted
- Deliverable #3 — predicate variant per Substrate-Mgr decision
- Dependencies — added #1: Substrate-Mgr decision on the variant
  before Phase 2 dispatches (renumbered prior 1-4 to 2-5)
- STOP conditions — added #1: STOP+PING if path (a) variant not
  authored; OR explicit downshift to path (b) with Director sign-off

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

* docs(briefs): surface substrate gaps for C2 acceptance gates honestly

Codex BLOCKING inline on PR #1331 sha aca422d line 65 caught the
C2 brief hand-waving "compose via existing BehavioralObservation"
without naming subjects/lenses. Same pattern as the C1 substrate
gap caught earlier — and same honest fix.

Verified that none of the 4 C2 gates have existing TestPredicate
variants that structurally observe what they require:
  - Gate 1 (relocation): file-existence at new path + non-existence
    at old path — no existing variant
  - Gate 2 (mirror dissolved): file-non-existence + path-key
    membership change — no existing variant for file check;
    BOOTSTRAP_FIXTURE_PATH_KEYS membership covered by Compiles
    on a fixture
  - Gate 3 (alias optional): TestPredicate::Compiles on import
    fixture covers if alias declared; meta-fact recording if not
  - Gate 4 (no fact re-encoding): structural-absence across
    substrate — no existing variant

Honest fix: per-gate, name the substrate-Mgr-decision shape:

Path (a) — preferred: new TestPredicate variants
  - BootstrapFixturePathPresent { path, must_exist } for gates 1+2
  - NoDeclarationMatching { kind, in_directory, except } for gate 4

Path (b) — fallback: ExecuteCommand subprocesses
  - test -f for gates 1+2
  - tier3_no_re_encoding_check for gate 4

Path (c) for gate 4 only: PR-review checklist (reviewer-enforced)
with Director sign-off on the structural-precision tradeoff

STOP conditions extended:
  - #2: STOP if Substrate Mgr declines all 3 paths for any gate

Per `feedback_no_textual_enforcement_bridges`: file-presence is a
typed substrate fact, not a grep operation — preferring path (a)
with new typed variants.

Same shape as C1's PerfWithinBaseline gap surfaced honestly in
86f0292.

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

* docs(briefs): align C2 brief title + framing + ratchet name with reframe

Cursor APPROVE_WITH_COMMENTS on PR #1331 sha 9e79b5b caught 3
real leftover inconsistencies from the reframe iterations:

1. Title still said "Carrier Extraction Worker Brief" while the
   body explicitly abandoned carrier extraction as the structural
   move. Renamed to "Mirror Dissolution + T-Ground-Services
   Consumption Worker Brief" — matches the reframed lane shape.

2. Line 162 said "Carrier extraction IS the dissolution" — direct
   contradiction with §"Lane reframe" (lines 38-57) and §"Scope"
   (lines 18-29). Rewrote to align: "The dissolution mechanism is
   option (a) from feedback_isomorphism_or_generation_for_mirrors —
   generation/parsing from the canonical authority — implemented
   here via T-Ground-Services parsing the canonical extdeps."

3. Line 170 named ratchet `provider_wire_no_per_provider_duplication`
   but the actual gate at line 92 is `provider_wire_no_fact_re_encoding`.
   Same-doc naming drift. Fixed all 6 questions of the substrate-
   principle audit to reference the correct gate name + extended the
   audit answers to reflect the reframed lane (T-Ground-Services
   parsing as recovery pattern; canonical extdeps preserved).

All 3 findings were direct artifacts of the prior reframe (aca422d)
not propagating through every cite — same self-consistency-sweep
pattern that PR #1341 just landed for r3-structure.md.

Per `feedback_verify_thesis_claims`: when reframing, sweep ALL
references; partial sweeps create exactly this kind of contradictory
documentation that confuses dispatch.

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 merged commit 1ab3813 into main May 1, 2026
4 checks passed
briansrls added a commit that referenced this pull request May 1, 2026
* docs(briefs): R3 C1 + C2 worker briefs (perf budget + ProviderTypedWire<P>)

Authored per PR #1319 Director ratification ask 4 (PM-side authoring).

C1 — `r3-pb-tier3-perf-budget-worker.md`
- Sub-gate of T-Tier3-Dissolution: tier3_mirror_dissolution_perf_within_budget
- Thresholds: median ≤2x hand-Rust, p99 ≤5x (Director-ratified)
- Cargo bench fixtures per retired mirror (termination/computation/induction/effect-carrier)
- Owner: PB Manager (R2→R3 continuation); S-M scope ~2-3 days

C2 — `r3-substrate-provider-typed-wire-worker.md`
- T-Anthropic-Wire scope expansion: extract `ProviderTypedWire<P>` carrier
- Per-provider parameter rows in `dsl/extdeps/providers/*/`
- Drops prior 6-month elapsed-time check per user directive
  ("nothing can be deferred past R3")
- Owner: Substrate Manager (R2→R3 continuation); M scope ~1-2 weeks
- Resolves R3 design challenge #8 via path-(a) commit

Both briefs are dispatch-gated on R2-Evaluator readiness; STOP+PING
discipline matches `feedback_worker_stall_diagnosis` substrate-gap-stall
pattern.

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

* docs(briefs): address codex BLOCKING review (3 BLOCKING + 1 non-blocking)

Codex review on PR #1331 sha 1870104 flagged 3 BLOCKING + 1 non-blocking
findings against the C1 + C2 briefs. All 4 verified valid against current
code; this commit pushes fixes.

C2 — `r3-substrate-provider-typed-wire-worker.md`:

1. (BLOCKING) Operation-indexed carrier, not provider-level envelope.
   `dsl/extdeps/llm/anthropic.dag:168-200` declares
   `service llm.Anthropic { operation Messages { transport rest { … } } }`;
   providers carry MULTIPLE operations each with own request/response/error
   envelopes. Single provider-level envelope loses per-operation typing.
   Fix: split into two carriers — `ProviderOperationWire<P>` keyed on
   (provider, operation) for per-op wire envelopes, `ProviderConfig<P>`
   for provider-level shared facts (auth, base_url, models). Multi-op
   coverage required (Anthropic Messages + OpenAI Chat Completions at
   minimum; Embeddings/Tool Use land as additional rows).

2. (BLOCKING) Migration discipline — no parallel-authority window.
   Prior framing said old per-provider files "either retired or kept as
   v2-parsed legacy until v2 retirement" — exactly the parallel-authority
   anti-pattern (`feedback_parallel_representation_debt`). Fix: explicit
   commit to ONE of two paths in same PR — (a) deletion, preferred; OR
   (b) one-way generated projection from new carriers (un-editable
   header; CI rejects manual edits). "Kept as legacy" is rejected per
   user directive 2026-04-30 ("nothing deferred past R3").

C1 — `r3-pb-tier3-perf-budget-worker.md`:

3. (BLOCKING) std mirror path coverage. Verified `dsl/std/{termination,
   computation,induction,effects}.dag` AND `src/v3/std/{...}` both exist
   for all four blocks. CI wiring updated to reference both — `dsl/std/`
   as canonical authority + `src/v3/std/` as substrate twin + Rust
   mirror sites (`dag.rs`, `dag/effects.rs`, `workflow_idempotency.rs`).

4. (Non-blocking) `criterion` dev-dep claim. Verified `criterion` is NOT
   in any Cargo.toml. Fix: removed false "already in Cargo.toml" claim;
   adding criterion as `[dev-dependencies]` is part of THIS lane's
   deliverables (worker's first commit), not a precondition.

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

* docs(briefs): fix OpenAI operation example to match live extdeps

Codex inline BLOCKING comment on PR #1331 sha 1870104 flagged that
ProviderTypedWire<P> would drop per-operation wire facts when OpenAI
has ChatCompletion + Responses as distinct REST operations.

The structural fix (operation-indexed ProviderOperationWire<P>) landed
in d881e2a. This commit corrects the EXAMPLE data rows to match
the actual operations declared in dsl/extdeps/llm/openai.dag (verified
live: ChatCompletion at :163, Responses at :200) — prior commit used
"Embeddings" as the second operation, which is not declared.

Both ChatCompletion + Responses are now explicit in the migration
deliverables and acceptance gate; multi-operation coverage table cites
exact line numbers for both Anthropic Messages and OpenAI ChatCompletion
/ Responses.

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

* docs(briefs): fix self-contradiction in tier3 perf-budget brief

Cursor/composer-2 review on PR #1331 sha d881e2a caught a real
self-contradiction in deliverable #1: it called criterion an "existing
dev-dep" while deliverable #4 (added in d881e2a) explicitly says
criterion is NOT in any Cargo.toml and adding it is part of THIS lane.

Both can't be true. Fix: deliverable #1 now says "added as new dev-dep
per deliverable #4 below; not currently in any Cargo.toml" — single
authority on the criterion state, no contradiction.

Per INVARIANTS Documentation Describes Live State: documentation
should not assert repo state that doesn't exist.

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

* docs(briefs): fix cross-ref label/link mismatch (sibling brief)

Cursor/composer-2 review on PR #1331 sha 89e4082 caught a copy-paste
slip in C2 brief cross-refs: line labeled "Sibling: T-V2-Retirement"
but pointed at r3-pb-tier3-perf-budget-worker.md (which is the C1 brief
for T-Tier3-Dissolution sub-gate, not T-V2-Retirement).

Fix: label the link correctly as "Sibling brief: r3-pb-tier3-perf-
budget-worker.md (C1 sub-gate of T-Tier3-Dissolution; co-sibling in
same wave per PR #1319 ratification ask 4)". No T-V2-Retirement
reference here since neither brief is for T-V2-Retirement.

Exploratory finding (not BLOCKING) per cursor APPROVE verdict.

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

* docs(briefs): two-phase perf gate pattern (no parallel implementations)

Codex BLOCKING review on PR #1331 sha 19dc267 correctly flagged a
structural contradiction in the C1 perf-budget brief: comparing
median(eval) against median(hand-Rust) requires both paths to exist
simultaneously, but T-Tier3-Dissolution removes the hand-Rust side.
Either the mirror stays alive (parallel-implementation, INVARIANTS
§P2 violation) or the comparison is impossible.

Fix reframes the gate as two-phase:

**Phase 1 (sibling PR; pre-dissolution)**:
- 0a: criterion dev-dep added
- 0b: hand-Rust mirror benchmarks; deletes alongside dissolution
- 0c: frozen tier3_baseline.json with median+p99 captured on
       canonical CI machine

**Phase 2 (this brief; post-dissolution)**:
- 1: eval-path bench fixtures (.dag-evaluator only)
- 2: shared deterministic fixture corpus (Phase 1 + Phase 2 share)
- 3: .dag TestClaim comparing measured timings against frozen
     baseline JSON
- 4: CI wiring on Evaluator path + baseline file (read-only)

Director's ≤2× median / ≤5× p99 thresholds preserved (now relative
to frozen baseline data, not live mirror code).

Strict temporal ordering: Phase 1 → mirror dissolution → Phase 2.
Reverse order is impossible (STOP condition #1). Phase 1 baseline
JSON survives mirror dissolution; mirror code does not.

Discipline: explicit INVARIANTS §P2 callout — only DATA survives
post-dissolution, not parallel authority. tier3_baseline.json is
read-only after capture; CI rejects edits.

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

* docs(briefs): reframe C2 — preserve service-block facts via T-Ground-Services dependency

Codex BLOCKING review on PR #1331 sha 19dc267 flagged that
ProviderOperationWire<P> as drafted captured only a fraction of what
service { operation { ... } } blocks at dsl/extdeps/llm/{anthropic,
openai}.dag carry. Deleting those extdeps with the carrier as
replacement would lose 8 fact-classes per operation:
  - Output projection paths (e.g., "content/0/text")
  - Input field declarations + types
  - Output field declarations + types
  - Transport body composition
  - Transport headers
  - Response status mapping (200/4xx/5xx)
  - Mock responses (per status, with descriptions)
  - Service-level config (rate_limit, retry, auth)

This violates feedback_projections_must_compose_facts.

Reframe: the structural answer is NOT to extract a subset-carrier
replacing the canonical authority. It's to make the canonical
authority parseable natively via T-Ground-Services (R3 Grounding
lane) and dissolve the v3-side parallel MIRROR.

The lane now delivers 3 structural moves, all gated on
T-Ground-Services landing first:
  1. Relocate dsl/extdeps/llm/{openai,anthropic}.dag to
     dsl/extdeps/providers/{openai,anthropic}/wire.dag (path-only
     move; content unchanged)
  2. Delete src/v3/std/anthropic_schema.dag (v3-side parallel
     mirror); update BOOTSTRAP_FIXTURE_PATH_KEYS to read canonical
     extdeps directly
  3. Optionally author ProviderTypedWire<P> as thin alias wrapping
     Service<P> (T-Ground-Services owned) — only if cross-provider
     lens-instance authoring needs a parametric handle; defaults to
     "no alias unless consumer demand"

Acceptance gates updated: 4 gates (relocation + mirror dissolution
+ optional alias decision + no fact re-encoding) instead of prior
5 gates that assumed carrier extraction.

Hard prerequisite added: T-Ground-Services parser-grammar slice
must land first. Without it, the lane has nothing to do — it can't
delete the canonical extdeps without the parser to read them.

STOP conditions updated: STOP+PING if T-Ground-Services not landed,
or if alias scope creeps into fact reification.

Per ROADMAP `### Post-merge debt (2026-04-30 analyses)` "Provider/
API mirror multiplication risk": "Corrective action: prioritize
shared T-Ground-Services ingestion path over per-provider mirrors.
Owner: R3 Grounding (post-Anthropic-chain)."

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

* docs(briefs): tighten C1 lane-summary bullets to match two-phase pattern

Cursor/composer-2 APPROVE_WITH_COMMENTS on PR #1331 sha 30413c3
caught a residual inconsistency in the C1 lane-summary at lines
24-26. Item 1 still read "Cargo bench fixtures comparing hand-Rust
mirror invocation vs Evaluator-backed .dag invocation for each of
the four retired mirrors" — implying a simultaneous side-by-side
harness, contradicting the two-phase pattern (Phase 1 hand-Rust
captures frozen JSON; Phase 2 eval-only vs baseline) that lives
in §"Acceptance gate" and Deliverables.

Same class of bug as the criterion self-contradiction caught by
cursor on sha d881e2a — fixed the structural shape but left the
lane-summary bullet describing the prior shape.

Fix: lane-summary now explicitly names Phase 1 + Phase 2 and the
INVARIANTS §P2 framing (no simultaneous dual paths). Adds a 4th
deliverable line for CI integration that explicitly notes the
dissolved Rust mirror sites no longer exist as gate triggers
post-dissolution.

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

* docs(briefs): surface real substrate gap — BehavioralObservation doesn't carry perf-budget shape

Codex BLOCKING inline on PR #1331 sha 62c20e9 line 51 caught a real
unverified claim. The brief said "no new substrate variant; structural
composition over existing BehavioralObservation-shaped TestPredicates"
but verified BehavioralObservation at src/v3/std/verification.dag:126-130
only carries:
  - subject: DeclarationRef
  - input_sample: DeclarationRef
  - expected_output: DeclarationRef

It's shaped for input/output equality testing, NOT perf-budget-against-
baseline. The prior brief was hand-waving the substrate target.

Honest fix: surface the substrate gap explicitly. Two paths, Director/
Substrate-Mgr decision at brief-finalization:

Path (a) — preferred: new TestPredicate variant. Substrate Mgr authors
PerfWithinBaseline { bench_subject, baseline_data, median_factor_max,
p99_factor_max } in src/v3/std/verification.dag as hard prerequisite
for C1 dispatch. Cleanest structurally; preserves "tests are data"
facet 3 discipline.

Path (b) — fallback: existing ExecuteCommand variant. Bench harness
becomes a subprocess via ExecuteCommand { command, args,
expect_exit_code: 0 }; binary parses baseline + measured + exits
non-zero on breach. No new substrate but loses structural-acceptance
precision.

Updates:
- §"Acceptance gate" — explicit two-path framing with shape sketch
- Per-mirror claim shape — uses PerfWithinBaseline (path a) with
  ExecuteCommand fallback (path b) noted
- Deliverable #3 — predicate variant per Substrate-Mgr decision
- Dependencies — added #1: Substrate-Mgr decision on the variant
  before Phase 2 dispatches (renumbered prior 1-4 to 2-5)
- STOP conditions — added #1: STOP+PING if path (a) variant not
  authored; OR explicit downshift to path (b) with Director sign-off

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

* docs(briefs): surface substrate gaps for C2 acceptance gates honestly

Codex BLOCKING inline on PR #1331 sha aca422d line 65 caught the
C2 brief hand-waving "compose via existing BehavioralObservation"
without naming subjects/lenses. Same pattern as the C1 substrate
gap caught earlier — and same honest fix.

Verified that none of the 4 C2 gates have existing TestPredicate
variants that structurally observe what they require:
  - Gate 1 (relocation): file-existence at new path + non-existence
    at old path — no existing variant
  - Gate 2 (mirror dissolved): file-non-existence + path-key
    membership change — no existing variant for file check;
    BOOTSTRAP_FIXTURE_PATH_KEYS membership covered by Compiles
    on a fixture
  - Gate 3 (alias optional): TestPredicate::Compiles on import
    fixture covers if alias declared; meta-fact recording if not
  - Gate 4 (no fact re-encoding): structural-absence across
    substrate — no existing variant

Honest fix: per-gate, name the substrate-Mgr-decision shape:

Path (a) — preferred: new TestPredicate variants
  - BootstrapFixturePathPresent { path, must_exist } for gates 1+2
  - NoDeclarationMatching { kind, in_directory, except } for gate 4

Path (b) — fallback: ExecuteCommand subprocesses
  - test -f for gates 1+2
  - tier3_no_re_encoding_check for gate 4

Path (c) for gate 4 only: PR-review checklist (reviewer-enforced)
with Director sign-off on the structural-precision tradeoff

STOP conditions extended:
  - #2: STOP if Substrate Mgr declines all 3 paths for any gate

Per `feedback_no_textual_enforcement_bridges`: file-presence is a
typed substrate fact, not a grep operation — preferring path (a)
with new typed variants.

Same shape as C1's PerfWithinBaseline gap surfaced honestly in
86f0292.

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

* docs(briefs): align C2 brief title + framing + ratchet name with reframe

Cursor APPROVE_WITH_COMMENTS on PR #1331 sha 9e79b5b caught 3
real leftover inconsistencies from the reframe iterations:

1. Title still said "Carrier Extraction Worker Brief" while the
   body explicitly abandoned carrier extraction as the structural
   move. Renamed to "Mirror Dissolution + T-Ground-Services
   Consumption Worker Brief" — matches the reframed lane shape.

2. Line 162 said "Carrier extraction IS the dissolution" — direct
   contradiction with §"Lane reframe" (lines 38-57) and §"Scope"
   (lines 18-29). Rewrote to align: "The dissolution mechanism is
   option (a) from feedback_isomorphism_or_generation_for_mirrors —
   generation/parsing from the canonical authority — implemented
   here via T-Ground-Services parsing the canonical extdeps."

3. Line 170 named ratchet `provider_wire_no_per_provider_duplication`
   but the actual gate at line 92 is `provider_wire_no_fact_re_encoding`.
   Same-doc naming drift. Fixed all 6 questions of the substrate-
   principle audit to reference the correct gate name + extended the
   audit answers to reflect the reframed lane (T-Ground-Services
   parsing as recovery pattern; canonical extdeps preserved).

All 3 findings were direct artifacts of the prior reframe (aca422d)
not propagating through every cite — same self-consistency-sweep
pattern that PR #1341 just landed for r3-structure.md.

Per `feedback_verify_thesis_claims`: when reframing, sweep ALL
references; partial sweeps create exactly this kind of contradictory
documentation that confuses dispatch.

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

* docs(r3): T-Numeric-Construction lane reframe (was T-Int128)

Per Director ratification at gunbc#828 comment 4357704426 (2026-05-01).
User pushback: "model real numbers/natural numbers and then form int64
based on those models - not jump straight to int64."

Reframes R3 Lane #6 (T-Int128 → T-Numeric-Construction; same lane slot,
expanded scope). Director's prior `OrderedRing<Magnitude>` shorthand
ratification (4357686725) explicitly SUPERSEDED in favor of the explicit
construction chain ℕ → ℤ → ℚ → ℝ that the user requested.

Construction chain (ratified verbatim):
  Magnitude (terminal carrier) → Nat = Semiring<Magnitude> →
  Int = AbelianGroup<Nat> via Grothendieck →
  Rational = Field<Int> → Real = ApproximateField<Rational>

Refinement chain at any layer: Int<N>, Nat<N>, Real<N>.
Width-specific aliases (Int8..Int128, UInt8..UInt128, Float32/64) are
refinements, not parallel substrate.

Lane absorbs:
  - T-Int128 (was its own R3 lane)
  - post-R3 BigInt deferral (BigInt = Int unbounded; same substrate
    landing as Int<128>)
  - Float widening (was unscoped)
  - UInt widening (parallel bake-in to Int)
  - IntLit refinement

8 types in scope: 3 direct (Int, UInt, Float) + 5 inherited via Int
chain (Char, EpochMs, Duration, Milliseconds, Seconds — auto-fix when
Int becomes abstract).

Files in this PR:

NEW:
  - docs/design-numeric-construction.md — design doc; covers
    construction chain, 5 substrate-introductions needing 6Q audit
    (Magnitude, AbelianGroup verify, Grothendieck encoding choice,
    Field verify, ApproximateField), refinement chain, per-target
    grounding mapping (Rust/Python/Go), v2-refinement-syntax-blocker
    coordination (path-a same wave with T-V2-Retirement),
    cost-lens implications per layer

AMENDMENTS:
  - docs/r3-structure.md — Lane #6 reframe across §Summary,
    §Acceptance, §Lane structure, §Manager structure, §Dependency DAG
    visual, §Dependency on R2, §Worker dispatch precondition. Lane
    size L-XL. T-Numeric-Construction is one of 3 non-Evaluator-gated
    lanes but has its own internal cascade gate on T-V2-Retirement.

  - docs/r2-structure.md — cross-program-producer §"3 non-Evaluator-
    gated R3 lanes" updated to reflect post-12-lane structure +
    T-Numeric-Construction reference

  - docs/thesis/r2-r3-thesis-mapping.md — Integer overflow thesis
    claim updated to refinement-parametric form; Tier 2 Int128/Word128
    row noted as subsumed by T-Numeric-Construction

  - docs/briefs/r2-release-manager.md — manager continuation pattern
    updated; R2 close gate framing reflects 12-lane structure

  - ROADMAP.md — new "Post-merge debt (2026-05-01 R3 substrate-
    completion adjacents)" section for Json/Bytes opaque kernel types
    (out of scope for T-Numeric-Construction; assess post-lane-close
    per Director disposition)

DELETED:
  - docs/briefs/t-int128-r3-initial-slice.md — superseded by lane
    reframe; eager-ram's prior PR #1333 work (Word128Carrier + signed
    i128 pilot row) preserved as load-bearing under reframe (Word128
    becomes storage refinement under Int<128>)

Substrate Mgr authoring follows: 6Q audits on the 5 substrate-
introductions, then docs/briefs/t-numeric-construction-worker.md
brief.

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