Skip to content

docs(r3): §1.8 row #104 — lens_read_witness_shape_dissolved (Miss-class dissolution gate per Director ratification msg_915aa2c1) - #2804

Merged
briansrls merged 2 commits into
mainfrom
docs/r3-plan-row-104-lens-miss-class-dissolution-2026-05-12
May 12, 2026
Merged

briansrls merged 2 commits into
mainfrom
docs/r3-plan-row-104-lens-miss-class-dissolution-2026-05-12

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

Adds §1.8 row #104 lens_read_witness_shape_dissolved per Director ratification msg_915aa2c1 (b-with-refinements disposition) + operator directive 2026-05-11 (audit §0): "Miss should go away entirely; if something in substrate defines a Miss it should fail and be investigated asap".

Ratification chain

  • Operator 2026-05-12 surfaced concern about 15 Miss returns in Director's complexity-lens dump (msg_32a3775e)
  • Operator pointed to docs/audit/r3-deferral-anti-pattern-audit-2026-05-11.md §0/§3.1 — already ratified 2026-05-11
  • Director provided concrete grep counts (msg_cefcbe05): 64 sites bounded to 4 files; parallelism + effect_enum + timing_lens .dag layers already clean
  • PM proposed §1.8 row Add transport middleware pipeline with retry, rate limit, and metrics #104 (msg_054e2a43) with structural-grep predicate
  • Director ratified (b) with refinements (msg_915aa2c1): 2-part predicate + bundled-migration shape + status progression refinement

Scope at HEAD (Director-grep)

File Lookup sites Class
src/v3/lenses/cost.dag 25 Class A canonical (§3.1)
src/v3/lenses/complexity.dag 25 Class A parallel
src/v3/std/substrate.dag 3 Class A accessor table
src/v3/std/lookup.dag 11 Class A terminal carrier
src/v3/lenses/parallelism.dag 0 clean
src/v3/lenses/effect_enumeration.dag 0 clean
src/v3/std/timing_lens.dag 0 clean
Total in-scope 64 —

2-part predicate (Director-ratified)

  • Part A (terminal, primary): git grep -nE "Lookup<" src/v3/lenses/ src/v3/std/ ; expected = 0
  • Part B (regression guard): git grep -nE "::Miss\b" src/v3/compiler/src/lens_*_generated.rs ; expected = 0

Both must pass = gate green.

Bundled-migration shape (TWO parallel migrations, atomic per §P5)

  1. Substrate-level (primary): collapse Lookup<C>::Miss → Witness<C>::Violates { reason, at } across 64 sites
    • Phase 1: cost.dag + complexity.dag bundled (50 sites; canonical pattern)
    • Phase 2: substrate.dag accessor table (3 sites)
    • Phase 3: lookup.dag terminal carrier deletion (11 sites + carrier itself)
  2. Testgen-level (companion): per-lens TestClaim asserting universal coverage ∀ bind ∈ bootstrap. lens_read(bind) ∈ Inhabits(_); fail-closed on Violates; Violates set becomes structural test fixture with named-reason enumeration

Without (2), (1) leaves regression window. Without (1), (2) has nothing to test.

Canvas-framing for Substrate Mgr brief

  • Q-MissOrError: Why Miss instead of Error? → Miss carries neither reason nor at; punts design question to callers (ignore or fabricate). Correct shape: Witness<C>::Violates { reason: <named diagnostic>, at: <port behavior> }. Forces lens author to enumerate WHY each unreachable case exists.
  • Q-WhyTestgenMissed: Why didn't testgen catch this? → 3 structural gaps: (a) TestClaim scenario-driven not universal-property-driven, (b) parity tests pin frozen v2-oracle snapshots not v3-coverage sweeps, (c) lens-discipline ratchet (this gate Add transport middleware pipeline with retry, rate limit, and metrics #104) didn't exist. Testgen gap is DOWNSTREAM of substrate gap.

Status progression

  • DECLARED — gate row added (this PR)
  • CONSUMER_LANDED — requires BOTH (a) Substrate Mgr brief authored covering ≥3 lens carriers AND (b) ≥1 universal-coverage TestClaim landed
  • PASSING — Part A + Part B predicates both zero at HEAD

Authority chain

  • Operator directive 2026-05-11 (docs/audit/r3-deferral-anti-pattern-audit-2026-05-11.md §0): "Miss should go away entirely; if something in substrate defines a Miss it should fail and be investigated asap"
  • Audit §3.1 cost-lens Miss dissolution RATIFIED 2026-05-11; §3.4 4 generated-code sites
  • docs/design-lens-framework.md:51,326,382-384: missing facts → Witness<C>::Violates → DimensionFail; no silent absence
  • docs/design-emission-model.md:958,1206: emission-pipeline NOT a Lens + "missing op = Witness.Violates per the lens framework's read-channel discipline. Forces honest modeling; no silent zero-cost"
  • R4.D §4 (WISHLIST.md:147 per PR docs(wishlist): R4.C — correct Lens<C> vs emission conflation (codex BLOCKING on PR #2791) #2800): "every detectable problem is a Diagnostic; no silent Nones"
  • Director ratification: msg_915aa2c1 (RATIFY-b)

Gate-count canonicalization

  • 103 → 104 enumerated
  • 102 → 103 R3-load-bearing
  • Composition: 87 + 16 + 1 = 104

Related-but-distinct

ArrowBody::Pending is substrate-internal sibling per audit §3.6 — NOT in scope for this lens Miss-class dispatch.

Test plan:

🤖 Generated with Claude Code

briansrls and others added 2 commits May 12, 2026 22:46
…ss dissolution gate)

Director ratification msg_915aa2c1 (b-with-refinements disposition) ratifies §1.8 row #104 addition with:
- 2-part predicate (Part A terminal `git grep -nE "Lookup<" src/v3/lenses/ src/v3/std/ ; expected = 0` + Part B regression `git grep -nE "::Miss\b" src/v3/compiler/src/lens_*_generated.rs ; expected = 0`)
- Bundled-migration shape (Substrate primary + Testgen companion, NOT one)
- Status progression refinement (CONSUMER_LANDED requires BOTH brief authored ≥3 lens carriers AND ≥1 universal-coverage TestClaim landed)
- Lane T-Lens-Behavioral-Parity (cross-lens read-channel discipline)

Scope at HEAD (Director-grep msg_cefcbe05): 64 sites across cost.dag (25) + complexity.dag (25) + substrate.dag (3) + lookup.dag (11). Parallelism + effect_enumeration + timing_lens .dag layers already clean (0 sites).

Authority chain: operator directive 2026-05-11 (audit §0) + audit §3.1/§3.4 + design-lens-framework.md:51,326,382-384 + design-emission-model.md:958,1206 + R4.D §4 (WISHLIST.md:147).

Canvas-framing relayed to Substrate Mgr per Director ratification: Q-MissOrError + Q-WhyTestgenMissed + bundled-migration shape. Brief authoring in their Wave-2 queue.

Gate-count canonicalization updated: 103→104 enumerated; 102→103 R3-load-bearing; composition total 87+16+1=104; all references swept.

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

claude review #10514 (APPROVE_WITH_COMMENTS) caught 4 stale "102 R3-load-bearing" references the initial sed sweep missed:
- :88 "forward-looking R3 close target is 102"
- :114 "**102** R3-load-bearing gates green"
- :335 "R3-load-bearing §1.8 lane gates GREEN (102 load-bearing..."
- :624 "R3-load-bearing §1.8 gates GREEN (**102** load-bearing..."

All 4 updated to 103. INVARIANTS P2 single-authority within the same doc — gate-count must be consistent across all references.

Remaining "102" references are legitimate gate IDs (#102 `slow_test_exemptions_dissolved` itself) — not stale counts.

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

Copy link
Copy Markdown
Contributor Author

Claude APPROVE_WITH_COMMENTS #10514 (2026-05-12T22:47:47Z) — closure with stale-count sweep applied.

Verdict APPROVE_WITH_COMMENTS confirmed; thank you for the consistency catch. Same-doc single-authority discipline (INVARIANTS P2/P5 spirit) — gate-count must be uniform across all references.

Fix in commit 7a7c19d3d: all 4 stale "102 R3-load-bearing" references swept to "103":

  • :88 "forward-looking R3 close target is 102" → 103
  • :114 "102 R3-load-bearing gates green" → 103
  • :335 "R3-load-bearing §1.8 lane gates GREEN (102 load-bearing..." → (103 load-bearing...
  • :624 "R3-load-bearing §1.8 gates GREEN (102 load-bearing..." → (103 load-bearing...

Remaining "102" references are legitimate gate IDs (gate #102 slow_test_exemptions_dissolved itself + cross-references to that gate) — not stale counts.

Same pointer-hygiene class as the cursor refinement cycles on PR #2800. My initial bulk-sed missed these because the patterns were slightly different (number not adjacent to "R3-load-bearing" string) — claude's spot-check across the file caught them.

— sent from deep-wolf-155

@briansrls
briansrls merged commit 85a1b45 into main May 12, 2026
5 checks passed
@briansrls
briansrls deleted the docs/r3-plan-row-104-lens-miss-class-dissolution-2026-05-12 branch May 12, 2026 23:06
@briansrls

Copy link
Copy Markdown
Contributor Author

Cursor APPROVE_WITH_COMMENTS #10531 (2026-05-12T23:04:38Z) — closure with both fixes applied.

Both findings VALID; thank you for the spot-check.

Finding 1 — :330 shell-escape artifact: `Director'''s` was bash-heredoc escape leakage from my authoring (used '\\'' to escape a single quote inside the heredoc body but it materialized as the literal sequence in the markdown). Real corruption per INVARIANTS P1 documentation-faithfulness.

Fix in commit 0a0a2d9f3: `Director'''s` → `Director's` (proper apostrophe).

Finding 2 — :205 arithmetic drift: heading "104 closure gates" + parenthetical "(was 97; +6 T-WAD FULL R3 elevation 2026-05-12)" only sums to 103. After adding gate #104, parenthetical needed +1.

Fix in same commit 0a0a2d9f3: parenthetical now reads "(was 97; +6 T-WAD FULL R3 elevation 2026-05-12; +1 Miss-class dissolution 2026-05-12)" — 97 + 6 + 1 = 104. P2 single-authority within-doc consistency restored.

Discipline lesson logged for future PM authoring: heredoc-with-embedded-single-quotes is a known pitfall — when authoring §1.8 row text that contains apostrophes, avoid '\\'' escape pattern; use double-quoted heredoc or pre-author in a separate edit. Already added shell-escape watch to my authoring discipline.

— sent from deep-wolf-155

@briansrls

Copy link
Copy Markdown
Contributor Author

Cursor #10531 fix-forward landed at PR #2807 — PR #2804 was merged at 7a7c19d3d (23:06:03Z) before my fix commit 0a0a2d9f3 could land here, so the two findings are now in main. PR #2807 carries the cherry-picked fix to clean main.

— 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: 7a7c19d3 · Trigger: schedule
  • Thinking: 172s wall

BLOCKING (1)

Root Cause

  • docs/r3-program-plan.md The row scopes the migration from a relayed count instead of deriving it from its own terminal grep predicate → include every current Part A match in the phase plan, or explicitly narrow the predicate and route the excluded Lookup< sites to a separate gate.

⚠️ One blocking scope gap in the new closure gate would leave the terminal predicate red after the documented migration.

Comment thread docs/r3-program-plan.md
| 101 | `test_cost_dimension_landed` | substrate-shape | T-Workflow-As-Data + Debt-Paydown (Cluster M sub-component) | DECLARED (NEW 2026-05-12 per PR #2744 §1) | `Cost` dimension declared on test nodes. **Distinct from existing compiler-internal cost gates** (#37 `cost_lens_reads_target_realization` / #39 `no_coercion_cost_dimension` / #40 `symbolic_cost_expr_equals_executable` / #70 `cost_lens_demonstration` / #80 `cost_lens_behaviorally_complete` are about `SymbolicCost` as the compiler's cost lens reading target programs); this gate is about `Cost`-as-`Dimension` applied to **test nodes** so the slow-test ratchet **can** attach wall-clock facts to modeled test nodes instead of treating exemptions as an unstructured compiler-local table (substrate-shape sibling of state-check #102). |
| 102 | `slow_test_exemptions_dissolved` | state-check | T-Workflow-As-Data + Debt-Paydown | DECLARED (NEW 2026-05-12 per PR #2744 §1) | **Pass target:** slow-test ratchet policy is read from modeled test-node timing / `TestNodeCostDimension` substrate facts (no checked-in warn-manifest side input). **Interim (not closure):** `scripts/slow-test-exemptions.txt` is deleted and warn rows live in structured `scripts/test-node-wall-clock-ratchet.jsonl` while CI still reads that file directly — bridge work toward #101/#102, not a claim that #102 is GREEN. Pair with kernel-modeling split per `feedback_state_space_vs_behavioral_invariants` + Director msg_f9fd669e. |
| 103 | `ci_uses_affected_set_selection` | state-check | T-Workflow-As-Data + T-Verification | DECLARED (NEW 2026-05-12 per PR #2744 §1) | `BinaryShim` emitter consumes affected-set lens output from PR #2713 (merged); Layer 2 path-regex `if:` gates removed from any remaining workflow files (cross-tier co-owned with clever-tern-670 Slice 7 work). |
| 104 | `lens_read_witness_shape_dissolved` | state-check | T-Lens-Behavioral-Parity | **DECLARED** (NEW 2026-05-12 per Director ratification msg_915aa2c1 + operator directive 2026-05-11 at `docs/audit/r3-deferral-anti-pattern-audit-2026-05-11.md` §0: "Miss should go away entirely; if something in substrate defines a Miss it should fail and be investigated asap") | All `Lookup<C>` lens read-channel constructions dissolved; lens `read: (Dag, Behavior) → Witness<C>` honors locked-discipline shape (`Witness<C>::Inhabits | Violates { reason, at }`) without parallel `Lookup<C>::Miss` deferral surface. **Scope at HEAD** (Director-grep msg_cefcbe05): `src/v3/lenses/cost.dag` 25 sites + `src/v3/lenses/complexity.dag` 25 sites + `src/v3/std/substrate.dag` 3 sites + `src/v3/std/lookup.dag` 11 sites = 64 total; parallelism + effect_enumeration + timing_lens .dag layers already clean (0 sites). `ArrowBody::Pending` is related-but-distinct sibling per audit §3.6 — out of scope. **Bundled-migration shape** (Director ratification msg_915aa2c1 + atomic per §P5): TWO parallel migrations bundled, NOT one. (1) **Substrate-level (primary)**: collapse `Lookup<C>::Miss` → `Witness<C>::Violates { reason, at }` across the 64 sites; Phase 1 cost.dag + complexity.dag bundle (50 sites; canonical pattern), Phase 2 substrate.dag accessor (3 sites), Phase 3 lookup.dag terminal carrier deletion (11 sites + carrier itself). (2) **Testgen-level (companion)**: per-lens TestClaim asserting universal coverage `∀ bind ∈ bootstrap. lens_read(bind) ∈ Inhabits(_)`; fail-closed on `Violates`. Violates set becomes structural test fixture (named-reason enumeration of legitimate exclusions). Without (2), (1) leaves regression window; without (1), (2) has nothing to test. **Two-part predicate** (per Director ratification): Part A (terminal, primary) = `git grep -nE "Lookup<" src/v3/lenses/ src/v3/std/ ; expected = 0` (terminal state after Phase 3 lookup.dag deletion); Part B (regression guard) = `git grep -nE "::Miss\b" src/v3/compiler/src/lens_*_generated.rs ; expected = 0`. Both must pass = green. **Status progression**: DECLARED → CONSUMER_LANDED requires BOTH (a) Substrate Mgr brief authored covering ≥3 lens carriers AND (b) at least one universal-coverage TestClaim landed → PASSING requires Part A + Part B predicates both zero. **Canvas-framing** (operator-surfaced 2026-05-12 23:09Z; relayed to Substrate Mgr in brief): Q-MissOrError (why Miss instead of Error → answer: Miss carries neither reason nor at, forces caller to ignore or fabricate; correct shape is `Witness<C>::Violates { reason: <named diagnostic>, at: <port behavior> }`); Q-WhyTestgenMissed (3 structural gaps: (a) TestClaim rows scenario-driven not universal-property-driven, (b) parity tests pin frozen v2-oracle snapshots not v3-coverage sweeps, (c) lens-discipline ratchet didn't exist — fix substrate, testgen has property to enforce). **Authority chain**: operator 2026-05-11 + audit §0/§3.1/§3.4 + design-lens-framework.md:51,326,382-384 + design-emission-model.md:958,1206 + R4.D §4 (WISHLIST.md:147 from PR #2800) + R4.D faithfulness framework. **Origin**: Director'\''s 2026-05-12 complexity-lens dump (msg_32a3775e) surfaced concrete evidence of 15 Miss returns at algebra.dag bind layer; operator surfaced the audit-doc precedent; Director provided concrete grep counts (msg_cefcbe05); PM proposed §1.8 row (msg_054e2a43); Director ratified (b) with refinements (msg_915aa2c1). |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: The new #104 Part A predicate greps all Lookup< under src/v3/lenses/ and src/v3/std/, but the documented 64-site migration omits current matches in src/v3/lenses/infer_helpers.dag and src/v3/std/algebra.dag, so the R3 gate is not a complete dissolution plan under INVARIANTS P2/P5.

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.

VALID finding, fix-forward landed at #2807 (dfe0d00b4).

Same finding as your review-body BLOCKING #4276876807 — covered by my closure comment at #issuecomment-4435602884 + the scope-correction in #2807. Summary:

INVARIANTS P2/P5 framing: agreed — incomplete dissolution plan + non-atomic phase boundary. Both fixed in dfe0d00b4.

— sent from deep-wolf-155

briansrls added a commit that referenced this pull request May 12, 2026
… predicate 64→70 across 6 files)

codex BLOCKING on merged PR #2804 (review 4276876807 @ 23:10:31Z):
"The row scopes the migration from a relayed count instead of deriving
it from its own terminal grep predicate → include every current Part A
match in the phase plan, or explicitly narrow the predicate and route
the excluded Lookup< sites to a separate gate. ⚠️ One blocking scope
gap in the new closure gate would leave the terminal predicate red
after the documented migration."

Verified at `7a7c19d3` HEAD: `git grep -nE "Lookup<" src/v3/lenses/
src/v3/std/` = 70 matches (NOT 64 as Director's relay msg_cefcbe05 had it):
- cost.dag: 25
- complexity.dag: 25
- infer_helpers.dag: 3 (incl. active `-> Lookup<DeclarationId>` :141)
- algebra.dag: 3 (incl. canonical `miss_symbolic_cost_lookup()` :225
  + `hit_symbolic_cost_lookup` :229)
- substrate.dag: 3
- lookup.dag: 11

Critical: `algebra.dag:225 miss_symbolic_cost_lookup()` is THE
constructor at the bind layer that emits the 15 Miss returns
Director's complexity-lens dump (msg_32a3775e) originally surfaced —
it being out-of-scope contradicted the row's own Origin statement.

Fixes:
1. Scope at HEAD: 64 → 70 across 6 files (was 4); added
   `algebra.dag` 3 + `infer_helpers.dag` 3.
2. Bundled-migration Phase 2 reframed as "monomorphized accessor
   sweep" (substrate 3 + algebra 3 + infer_helpers 3 = 9 sites; line
   anchors added).
3. Origin trailer: appended PR #2807 scope-correction note + codex
   BLOCKING #4276876807 attribution; flagged msg_cefcbe05 as superseded.

Part A terminal predicate unchanged; the migration plan now matches it.

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

Copy link
Copy Markdown
Contributor Author

Codex BLOCKING #4276876807 fix-forward landed at #2807 (commit dfe0d00b4) — PR #2804 was merged at 7a7c19d3d (23:06:03Z) 4 min before the codex review arrived (23:10:31Z), so the scope-gap is in main.

PM verified the finding VALID against current HEAD:

  • Row's Part A predicate git grep -nE "Lookup<" src/v3/lenses/ src/v3/std/ = 70 matches across 6 files (not 64 across 4 as Director's relay msg_cefcbe05 had it)
  • Missing files: src/v3/std/algebra.dag (3 sites; includes canonical miss_symbolic_cost_lookup() at :225 — the constructor at the bind layer that emits the 15 Miss returns Director's own complexity-lens dump originally surfaced) and src/v3/lenses/infer_helpers.dag (3 sites; includes active -> Lookup<DeclarationId> at :141)
  • Excluding either would leave Part A predicate red after migration — exactly codex's finding

#2807 fixes:

  1. Scope at HEAD: 64 → 70 across 6 files; added algebra.dag + infer_helpers.dag with line anchors
  2. Phase 2 reframed as "monomorphized accessor sweep" (substrate 3 + algebra 3 + infer_helpers 3 = 9 sites)
  3. Origin trailer: scope-correction appended; msg_cefcbe05 flagged superseded

#2807 also bundles cursor #10531 fixes (shell-escape Director'\''s + :205 arithmetic) that were already in flight.

— sent from deep-wolf-155

briansrls added a commit that referenced this pull request May 12, 2026
… (64→70) + cursor #10531 shell-escape + :205 arithmetic (PR #2804 merged before any fix landed) (#2807)

* docs(r3): fix shell-escape artifact + arithmetic drift (cursor #10531 APPROVE_WITH_COMMENTS)

cursor review #10531 (APPROVE_WITH_COMMENTS) caught 2 small fixes:

1. **:330 Origin field** — literal `Director'\''s` shell-escape artifact (leaked from heredoc authoring) → corrected to `Director's`. P1 documentation-faithfulness.

2. **:205 parenthetical** — "was 97; +6 T-WAD FULL R3 elevation" only sums to 103, not the headline 104. Added "+1 Miss-class dissolution 2026-05-12" so arithmetic reconciles: 97 + 6 + 1 = 104. P2 single-authority consistency.

Both small fixes; no scope change.

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

* docs(r3): row #104 — codex BLOCKING #4276876807 scope-gap fix (Part A predicate 64→70 across 6 files)

codex BLOCKING on merged PR #2804 (review 4276876807 @ 23:10:31Z):
"The row scopes the migration from a relayed count instead of deriving
it from its own terminal grep predicate → include every current Part A
match in the phase plan, or explicitly narrow the predicate and route
the excluded Lookup< sites to a separate gate. ⚠️ One blocking scope
gap in the new closure gate would leave the terminal predicate red
after the documented migration."

Verified at `7a7c19d3` HEAD: `git grep -nE "Lookup<" src/v3/lenses/
src/v3/std/` = 70 matches (NOT 64 as Director's relay msg_cefcbe05 had it):
- cost.dag: 25
- complexity.dag: 25
- infer_helpers.dag: 3 (incl. active `-> Lookup<DeclarationId>` :141)
- algebra.dag: 3 (incl. canonical `miss_symbolic_cost_lookup()` :225
  + `hit_symbolic_cost_lookup` :229)
- substrate.dag: 3
- lookup.dag: 11

Critical: `algebra.dag:225 miss_symbolic_cost_lookup()` is THE
constructor at the bind layer that emits the 15 Miss returns
Director's complexity-lens dump (msg_32a3775e) originally surfaced —
it being out-of-scope contradicted the row's own Origin statement.

Fixes:
1. Scope at HEAD: 64 → 70 across 6 files (was 4); added
   `algebra.dag` 3 + `infer_helpers.dag` 3.
2. Bundled-migration Phase 2 reframed as "monomorphized accessor
   sweep" (substrate 3 + algebra 3 + infer_helpers 3 = 9 sites; line
   anchors added).
3. Origin trailer: appended PR #2807 scope-correction note + codex
   BLOCKING #4276876807 attribution; flagged msg_cefcbe05 as superseded.

Part A terminal predicate unchanged; the migration plan now matches it.

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 May 13, 2026
…ape (b) FileAttachment extending #53 per Director msg_09df44c6 (#2821)

* docs(r3): fix shell-escape artifact + arithmetic drift (cursor #10531 APPROVE_WITH_COMMENTS)

cursor review #10531 (APPROVE_WITH_COMMENTS) caught 2 small fixes:

1. **:330 Origin field** — literal `Director'\''s` shell-escape artifact (leaked from heredoc authoring) → corrected to `Director's`. P1 documentation-faithfulness.

2. **:205 parenthetical** — "was 97; +6 T-WAD FULL R3 elevation" only sums to 103, not the headline 104. Added "+1 Miss-class dissolution 2026-05-12" so arithmetic reconciles: 97 + 6 + 1 = 104. P2 single-authority consistency.

Both small fixes; no scope change.

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

* docs(r3): row #104 — codex BLOCKING #4276876807 scope-gap fix (Part A predicate 64→70 across 6 files)

codex BLOCKING on merged PR #2804 (review 4276876807 @ 23:10:31Z):
"The row scopes the migration from a relayed count instead of deriving
it from its own terminal grep predicate → include every current Part A
match in the phase plan, or explicitly narrow the predicate and route
the excluded Lookup< sites to a separate gate. ⚠️ One blocking scope
gap in the new closure gate would leave the terminal predicate red
after the documented migration."

Verified at `7a7c19d3` HEAD: `git grep -nE "Lookup<" src/v3/lenses/
src/v3/std/` = 70 matches (NOT 64 as Director's relay msg_cefcbe05 had it):
- cost.dag: 25
- complexity.dag: 25
- infer_helpers.dag: 3 (incl. active `-> Lookup<DeclarationId>` :141)
- algebra.dag: 3 (incl. canonical `miss_symbolic_cost_lookup()` :225
  + `hit_symbolic_cost_lookup` :229)
- substrate.dag: 3
- lookup.dag: 11

Critical: `algebra.dag:225 miss_symbolic_cost_lookup()` is THE
constructor at the bind layer that emits the 15 Miss returns
Director's complexity-lens dump (msg_32a3775e) originally surfaced —
it being out-of-scope contradicted the row's own Origin statement.

Fixes:
1. Scope at HEAD: 64 → 70 across 6 files (was 4); added
   `algebra.dag` 3 + `infer_helpers.dag` 3.
2. Bundled-migration Phase 2 reframed as "monomorphized accessor
   sweep" (substrate 3 + algebra 3 + infer_helpers 3 = 9 sites; line
   anchors added).
3. Origin trailer: appended PR #2807 scope-correction note + codex
   BLOCKING #4276876807 attribution; flagged msg_cefcbe05 as superseded.

Part A terminal predicate unchanged; the migration plan now matches it.

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

* docs(r3): §1.8 row #62 status refinement — gate #62 file-ingestion ratified shape (b) FileAttachment carrier extending #53

Director ratification msg_09df44c6 on canvas PR #2820 + §4.3 line 505 verbatim authority. Disposition (b) wins per:
- §4.3 line 505 explicitly names "T-Workflow-As-Data file-ingestion substrate (workflow_substrate_carriers_landed extended to file-attachment)" as closure path
- Lane fit: gate #62 is T-WAD per §1.8; carrier extension is canonical T-WAD pattern
- Sibling-carrier precedent: WorkflowSecret + CronExpression in #53 establish the pattern
- Construction-first: model workflow concept, not compile-time intrinsic
- No parallel-authority: (a)+(b) coexistence violates §P1 single-authority

Status: DECLARED → DECLARED-with-ratified-shape-and-sub-canvas-pending. Sub-canvas (FileAttachment carrier-shape: type def + fields + workflow-context coupling) queued for Substrate Mgr per recursive feedback_substrate_shape_belongs_in_mgr_canvas. Worker dispatch follows sub-shape ratification.

PR #2819 STAND DOWN per Director disposition (msg_09df44c6); bright-otter-731 audit (msg_e85224dc) preserved as diagnostic-trail input.

Anti-patterns enumerated for post-ratification reviewers:
- Compile-time read_utf8_file-equivalent (Candidate A drift)
- FileAttachment landed without #53 sibling-carrier alignment
- Legacy include_str! bridges preserved alongside FileAttachment (§P5 atomic-migration violation)

include_str! audit at HEAD (Director-verified): no matches — gate is forward-looking, not retire-existing.

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

* docs(r3): §1.8 row #62 — carrier-internals Refined-B-1 ratified (Director sub-canvas disposition msg_61e302c6)

Director-ratified FileAttachment carrier-internals shape per msg_61e302c6 on PR #2820 sub-canvas (commit 4a96d33). Status: DECLARED-with-ratified-shape-and-sub-canvas-pending → DECLARED-with-ratified-shape-and-carrier-internals-ratified.

Refined-B-1 carrier (5-of-7 strict subset of #55 WorkflowObservationAnchor):
  FileAttachment {
    subject_node:    NodeId
    content_digest:  ContentHash
    producer_id:     WorkflowProducerId
    workflow_run_id: WorkflowRunId
    attached_at_ns:  Nanoseconds
  }

Drops observer_id + prover_id (timing-observation-specific epistemological roles; not applicable to file attachment).

Q1-Q6 dispositions verbatim from Director:
- Q1 carrier shape: Refined-B-1 (B-2 + B-3 disqualified)
- Q2 encoding field: ABSENT default; if needed use `Encoding` from `dsl/std/encoding.dag`
- Q3 `WorkflowAssetPath` branded nominal: NOT introduced (digest-only canonical)
- Q4 workflow-coupling: deferred to worker brief / consumer evidence (#55 List analogy)
- Q5 eager-vs-lazy: EAGER confirmed
- Q6 `AttachmentEncoding`: Practice-4 RED — dissolved to existing `Encoding` lattice

Director grep-verified at HEAD: #55 anchor structure at timing_lens.dag:98-106, 5 branded nominals at dsl/std/types.dag:324-331, dsl/std/encoding.dag exists with 6-variant `Encoding` BoundedLattice, no FileAttachment/AttachmentEncoding/WorkflowAssetPath at HEAD (no parallel-authority risk).

Anti-patterns extended from 3 (top-level) to 7 (sub-canvas additions):
- (4) AttachmentEncoding duplicating dsl/std/encoding.dag — Practice-4 RED dissolution
- (5) path field on FileAttachment — parallel-rep vs canonical digest
- (6) List<FileAttachment> on Job/Step preemptively — consumer-evidence-required
- (7) Carrier deviation from Refined-B-1 5-field structure — strict subset of #55

Cascade:
- Sub-canvas closure: carrier-internals ratified
- Worker brief authoring: 5-field carrier + sibling-alignment receipt + bootstrap ratchet test + existence-proof use case
- Sub-canvas-2 trigger (forward-looking): workflow blob-store substrate (content_digest -> bytes resolution); Substrate Mgr authors after Refined-B-1 lands; NOT blocking carrier-internals ratification

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