Skip to content

Design: LLM-powered code review pipeline with Codex CLI - #15

Merged
briansrls merged 15 commits into
mainfrom
claude/llm-code-review-pipeline-lJVXe
Feb 1, 2026
Merged

briansrls merged 15 commits into
mainfrom
claude/llm-code-review-pipeline-lJVXe

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

This PR introduces a comprehensive design document for an LLM-powered code review pipeline that integrates with Codex CLI. The pipeline follows gunbc's philosophy of state-as-values and composable DAG patterns, enabling durable local execution with resume capabilities.

Key Design Elements

  • Codex CLI Integration: Defines CodexOps enum with three-phase pattern (PrepareRequest → Execute → ParseResponse) treating Codex as an I/O boundary
  • Durability via Idempotent Upsert: Uses checkpoint-based resumption rather than external state machines; each step checks if complete before executing
  • Fractal Composition: Builds from smaller patterns (CodexUpsert, ContextGather, ReviewLoop, OutputFormat) into a cohesive pipeline
  • Multi-turn Conversations: Loop-carried state (CodexSessionState) accumulates messages and findings across iterations
  • Structured State Types: Defines ReviewFinding, CodexConfig, CodexSessionState with serialization support for persistence

DAG Architecture

  • Top-level pipeline: CodexUpsert → GatherContext → ReviewLoop → FormatOutput
  • GatherContext SubDag: Routes on target type (staged, git ref, file path) to gather code context
  • ReviewLoop SubDag: WhileBuilder with checkpoint upsert pattern for idempotent multi-turn execution
  • CheckpointUpsert Pattern: Implements "check exists → skip if done → execute → mark complete" for durable resumption

Storage & Configuration

  • Checkpoint storage at ~/.gunbc/checkpoints/code-review/ with content-hash-based IDs
  • Configuration file support (~/.gunbc/config/codex.toml) for model, temperature, system prompts
  • CLI commands: gunbc review staged|<files>|<git-ref> with --resume, --format, and model options

Implementation Roadmap

Four phases: Core infrastructure → DAG patterns → CLI integration → Testing & Polish, with future GitHub Actions integration planned.

Notes

  • Durability is achieved through DAG structure and idempotent operations, not external checkpointing
  • All existing testing infrastructure (DryRun, mocks, testgen) applies automatically
  • Open questions documented on multi-file chunking, response parsing robustness, session scope, and concurrency

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju

claude added 15 commits February 1, 2026 19:18
Comprehensive design covering:
- Codex CLI as transport boundary (three-phase pattern)
- Durability via idempotent CheckpointUpsert (not traditional checkpoints)
- State-as-values flowing through DAG edges
- Loop-carried state for multi-turn conversations
- Storage layout and checkpoint ID strategy (content-hashed)
- Full DAG structure: CodexUpsert → GatherContext → ReviewLoop → FormatOutput
- CLI interface design and configuration
- Mock specifications for testing

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
Major restructuring around two composable phases:

**Part 1: Fractal Workflow Architecture**
- Meta-DAG showing full dev cycle: Requirements → Design → Implement → Review → Test → Commit
- ReviewPhase appears at multiple points (reusable SubDag)
- Maps existing primitives: GitOps, CargoOp, LlmOps, patterns

**Part 2: ImplementationPhase (Codex Session)**
- Step-level checkpointing for crash resilience
- Content-addressed step IDs (same inputs = skip)
- ImplementationSession tracks conversation state, artifacts, completed steps
- StepUpsert pattern: CheckStepDone → Guard → Execute → SaveResult

**Part 3: ReviewPhase (General-Purpose)**
- Artifact + Rubric → Findings abstraction
- Works for code, designs, tests, docs (same shape)
- Predefined rubrics: code_review(), design_review(), test_review()
- Multi-source review with parallel execution and MergeResults

**Part 4: Composition**
- ImplementAndReview workflow composing both phases
- LoopBuilder for per-artifact review
- BranchBuilder for pass/fail → iterate decision

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
…SPEC.md

Reconciles new transport distinction with existing design principles:

**Query vs Command Transport**:
- Query: Read-like, no world mutation (LLM calls, file reads, git diff)
  - Allowed inside DAGs (reasoning zone)
- Command: Write-like, mutates state (file writes, git commit, patches)
  - Only at DAG boundaries (action zone)

**Scope Purity**:
- Aligns with SPEC.md §2.7 "No side channels"
- SubDags are hermetic — internals can't reach outside
- Parent only sees entrypoints/boundaries, not internal transport

**Applied to phases**:
- ReviewPhase: Query only (LLM observes, outputs findings as data)
- ImplementationPhase: Query for Codex, Command for applying changes
- Reasoning → Acting pattern: decide first, act at boundaries

References AGENT.md §4 "Nodes are Pure, Boundaries are Structural"

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
Based on detailed review feedback, major updates:

**Boundary terminology** (fixes conflation):
- Transport boundary = ExecuteQuery/Journal/Command nodes (I/O happens here)
- Workflow boundary = unconnected output ports (DAG interface)

**Transport classification now structural** (not rhetorical):
- ExecuteQuery: read external state (LLM, file reads)
- ExecuteJournal: write tool-owned state (checkpoints, cache)
- ExecuteCommand: mutate user artifacts (file writes, commits)
- Enables "this SubDag contains no ExecuteCommand" verification

**Type fixes** (aligns with repo principles):
- Removed Finding.confidence (kills confidence heuristics)
- Added Finding.evidence for traceability
- Renamed Severity → FindingLevel (Info|Nit|Concern|Blocker)
- Avoids "Warning" which conflicts with "No Warnings" invariant

**NextStep for fractal loop**:
- ReviewResult now includes NextStep
- Enables invariant loop: state → Review → NextStep → Branch → Implement/Done

**V0 scope defined** (minimal useful pipeline):
- Review current branch diff → JSON report
- Reuses existing: GitOps, LlmOps, CargoOp
- Explicitly embeds lib/llm-ops subdag (don't re-implement)
- Does NOT include durability, Codex, apply commands

**V1 scope**: Codex follow-up loop with patch artifacts

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
…ration

Key changes:
- ReviewPhase is now pure: (artifact, criteria) → findings
- No verdict, severity levels, or next_step in ReviewPhase
- Added Part 4: Review Cycle as orchestration layer
- Three-stage pattern: Coherence → Quality → Wisdom
- Updated all type references (Criteria, Check, ReviewOutput)
- Updated V0/V1 scope to reflect simplified model

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
- Criteria are now fully configurable, not prescriptive
- Removed Coherence/Quality/Wisdom stage definitions
- Order is flexible (sequential usually makes sense, but not enforced)
- Updated all references from `stages` to `criteria`

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
…esume

Incorporates feedback to make the design more operational:

- Effect Capabilities: Fine-grained runtime enforcement (ReadRepo, WriteRepo,
  SpawnProcess, WriteTemp, WriteUserState, Network) underneath Query/Command
- RemediationPlan: Structured output from ReviewPhase that makes the loop
  truly fractal - (artifact, criteria) → (findings, remediation_plan)
- Finding identity: Hash-based id for deterministic merge/dedup
- Location with DiffSide: Handle old vs new lines in diff reviews
- CachePolicy: Explicit policy for nondeterministic LLM steps
  (Immutable, Refresh, RefreshIfOlderThan, RefreshIfModelChanged)
- Codex native resume: Use codex_session_id + `codex resume <id>` instead
  of duplicating conversation state

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
The read/write axis is convenient for testing/purity reasoning but not
structurally fundamental. The actual concern is risk/interest - we care
more about some reads (secrets) than some writes (caches).

For now: Query/Journal/Command at the structural level is sufficient.
As project advances: domain-specific risk profiles, writes can structure
their own risk categories.

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
- Rename `suggested_fix` to `remediation_hint` (reconciliation, not advice)
- Add `source` provenance to Finding for MultiReview merging
- Change `ApplyChanges` to `PrepareArtifacts` (Query-only)
- Add JournalScope contract (allowed paths prevent Command-in-disguise)
- Add DryRunMode enum (Strict/Safe/Off) for preview runs
- Add phase-level validation table (ReviewPhase: no Command/Journal)
- Update IteratePolicy: OnRemediableFindings, add OnAnyFindings
- Update implementation tasks in Phases 1 and 2

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
User feedback: read/write classification isn't structurally fundamental.
Will use fermi-style risk categories (low/medium/high/extreme) instead.

- Simplified main Transport Classification section to "Future Consideration"
- Moved JournalScope, DryRunMode, phase-level validation to appendix
- Updated phase table to use risk levels instead of transport types
- Updated implementation tasks to reference risk categories
- Preserved full Q/J/C design in appendix for future reference

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
Major clarifications based on detailed review:

**Boundary terminology**:
- Rename "Workflow Boundary" → "Interface Boundary" to avoid confusion
- Add north star paragraph unifying the design philosophy

**Phase taxonomy**:
- Introduce Reasoning vs Action phases (replaces Query/Command at phase level)
- Action phases (Apply/Commit) explicitly designated for mutation
- Static validation: reasoning phases contain no high-risk transport ops

**Transport classification**:
- Add "ownership not security" framing
- Add TransportMeta struct for future risk policies (domain, scope)
- Preserve fermi-style risk levels (low/medium/high/extreme)

**Finding stability**:
- Add issue_key field for stable cross-iteration matching
- Use issue_key instead of observation text for ID hashing
- Add ReviewBundle for multi-source merge container

**Remediation framing**:
- Rename RemediationPlan → CandidateRemediations (proposals, not commands)
- Rename suggested_fix → candidate_fix throughout
- Review = reconciliation + candidate repairs (not "what to do next")

**Session/step model**:
- Split session_id (UUID identity) vs task_id (content hash)
- Add world state inputs requirement for step caching
- Fix statelessness → "no implicit state" contract

**ImplementationPhase invariant**:
- Explicit: Codex cannot mutate user artifacts
- Changes emitted as patch artifacts, applied by separate ApplyPhase

**V0 checklist**:
- Add crispness checklist for architecture alignment acceptance

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
Preserve core concepts, defer details to implementation:
- North star (pure dataflow, risk levels, action vs reasoning)
- Two boundary types (transport vs interface)
- Phase taxonomy with risk levels
- ReviewPhase = reconciliation + candidate repairs
- ImplementationPhase = produces patches, doesn't apply
- V0/V1 scope with crispness checklist

Detailed type definitions preserved in git history.

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
- I/O type (read/write): for purity, testing, DryRun mocking
- Risk level (low/medium/high/extreme): for safety/interest

These are orthogonal: cache write is low-risk but still a write.
Credential read is high-risk but still a read.

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
- I/O type (read/write): stable domain knowledge, core model
- Risk modeling: separate concern, context-dependent
  (same write is low-risk in test, extreme in prod)

Updated phase taxonomy to use I/O instead of risk levels.
Risk modeling deferred until we have concrete use cases.

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
Four sections for V0:
1. Core Types (lib/review/) - Artifact, Criteria, Finding, etc.
2. ReviewOps - PreparePrompt, ParseResponse, MergeOutputs
3. DAG Wiring - ReviewPhaseBuilder using existing primitives
4. CLI Integration - gunbc review command

Each section can be tackled independently.

https://claude.ai/code/session_01RZryjdBirzK2p6KVyGttju
@briansrls
briansrls merged commit 49aaa29 into main Feb 1, 2026
1 check passed
briansrls added a commit that referenced this pull request May 10, 2026
briansrls added a commit that referenced this pull request May 10, 2026
…2648)

* docs(r3): §1.8 ledger-receipt sync — 2026-05-10 batch (V Mgr lane)

Flip §1.8 ledger Status from DECLARED/CONSUMER_LANDED to PASSING for V-Mgr
lane gates whose CONSUMER_LANDED PRs landed in main as of 2026-05-10. Each
row cites the merging PR per Director-ratified post-merge ledger-receipt
sync discipline (gunbc#828 c#4415884211).

Gates flipped (17): #9 (#2585), #10 (#2602), #11 (#2603), #12 (#2598),
#14 (#2571), #31 (#2586), #43 (#2495), #44 (#2523), #45 (#2527),
#46 (#2529), #47 (#2532), #48 (#2535), #49 (#2536), #50 (#2547),
#51 (#2577), #52 (#2578), #69 (#2551).

Skipped per discipline: #15 (PR #2604 not landed); #35 already PASSING.

Doc-only; no code or test changes. Closes #2640.

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

* docs(r3): preserve corpus-quantified + canvas-deferral qualifiers on rows #9/#10/#11

Reviewer (claude-opus-4-7 on PR #2648) flagged that the prior status text
on rows #9, #10, #11 carried Director/PM-ratified semantic qualifiers that
must not be silently elided when citing a new slice receipt:

- #9 `l4_emit_eval_match`: §1.7 corpus-quantified rule — slice receipts ≠
  ledger closure; PASSING requires every certification-corpus program.
  Reverted to CONSUMER_LANDED; PR #2585 cited as additional slice evidence.
- #10 `l7_algebraic_laws_witnessed`: PASSING requires exhaustive per-(algebra,
  inhabitant, law) §Acceptance coverage; distributivity / lattice absorption /
  non-AlgebraicLawKind laws remain substrate §P1. Reverted to CONSUMER_LANDED;
  PR #2602 cited as incremental advancement.
- #11 `tc1_eta_equivalence_executable`: Director (a)-disposition 2026-05-09
  held this canvas-deferred past R3 absent #1972 substrate canvas-tier work.
  Reverted to DECLARED-through-R3; PR #2603 cited as scaffold advancement
  but not retiring the canvas-deferral (which would require fresh Director
  ratification).

Other 14 rows in the batch (#12, #14, #31, #43-52, #69) did not carry such
qualifiers and stay flipped to PASSING.

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

* Merge origin/main into ledger-receipt sync (preserve row #13 update from main)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 10, 2026
briansrls added a commit that referenced this pull request May 10, 2026
briansrls added a commit that referenced this pull request May 10, 2026
briansrls added a commit that referenced this pull request May 10, 2026
briansrls added a commit that referenced this pull request May 10, 2026
briansrls added a commit that referenced this pull request May 10, 2026
* WIP: R3 gate #15: l5 cross target consistency

* test(r3): tolerate missing go toolchain in l5 runner

* WIP: R3 gate #15: l5 cross target consistency

* test(r3): tighten l5 go missing receipt

* test(r3): require l5 go execution receipt

* docs(r3): cite roadmap row for l5 p5 receipt

* test(r3): document l5 host toolchain precondition

* WIP: R3 gate #15: l5 cross target consistency

* ci: install v3 host toolchains

* ci: use user-space v3 toolchains

* WIP: R3 gate #15: l5 cross target consistency

* test: assert l5 output selector

* WIP: R3 gate #15: l5 cross target consistency

* docs: avoid fragile landed claim for pr 900

* build: refresh v3 bootstrap snapshots

* WIP: R3 gate #15: l5 cross target consistency

* test: update verification predicate shape

* test: make l5 output selector value-free

* Document L5 scaffold dissolution notes

* WIP: R3 gate #15: l5 cross target consistency

* Validate L5 output selector per target
briansrls added a commit that referenced this pull request May 11, 2026
…te-landing tests) (#2665)

* docs(audit): SG-0 trajectory snapshot 2026-05-11 (+4 vs prior EOD)

PM standing daily-cadence duty per docs/audit/r3-sg0-trajectory-tracker.md §5.

Today (31acf43): non_test=53 test=112 fragments=2 total=167.
Delta vs 2026-05-10 EOD baseline (163): +4 test entries.

The 4 new entries are gate-landing tests, identified via per-entry diff:
- lens_behavioral_parity_demonstration_test.rs (gate #73, snappy-raven-508 PR #2525)
- r3_gate_87_lens_cementing_regen_receipts_test.rs (gate #87 PR #2639)
- r3_lens_producer_retirement_executable_witness_test.rs (PR #2595)
- t_ci_workflow_as_data_demo_test.rs (T-Workflow-As-Data demo)

Many gates landed during the 2026-05-10 → 2026-05-11 cycle (T-Tests-As-Data
#84/#85/#86/#87; T-Bridge-Retirement #31; T-LensProducer #5+#6; T-V-L4
#11/#13; T-V-L7 #10/#15; #74 + #27 + #26 and many others).

Cluster M Phase 3 bulk-port has NOT yet kicked in to shrink the census —
calm-newt-602 (gate #84) + silent-swift-300 (cementing+behavioral-parity
census slice) are active workers; their migration work is what flips
trajectory from accumulating to shrinking.

11-day cumulative is +47 entries; per-day avg +4.3. Velocity tripwire
status remains pending/uncomputed until Phase 3 migration begins
producing dissolution events.

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

* docs(audit): address codex BLOCKING on PR #2665 — PR-merge vs §1.8 gate-PASSING

Same root cause as PR #2583 codex BLOCKING #5/#6 (memorized as
feedback_pm_compile_audits_pre_existing_errors): PR-merge events ≠
§1.8 gate-PASSING promotion.

Cell text said "T-Tests-As-Data gates #84/#85/#86/#87 landed". Verified
against §1.8 ledger at HEAD:
- #84 `every_rust_test_ports_to_dag_or_generated`: DECLARED — cannot
  promote until EXPECTED_HAND_AUTHORED_TEST = 0 (Phase 3 bulk-port
  close criterion)
- #85 `forall_exists_quantifier_substrate_landed`: DECLARED — carriers
  landed via PR #2647 but CONSUMER_LANDED not yet claimed; §P2 requires
  generated consumer of declared surface
- #86 `program_generator_carrier_landed`: CONSUMER_LANDED + PASSING ✓
- #87 `lens_cementing_test_discipline_complete`: CONSUMER_LANDED (PR
  #2639), NOT PASSING — 8 regen harnesses still Compiles-only
  placeholders per §1.8 close-criterion

Only #86 is fully PASSING. Cell reframed to distinguish PR-merge
evidence from canonical §1.8 status per memorized discipline; row notes
the status drift sweep step that promotes evidence to PASSING.

Same reframe applied to T-Bridge-Retirement #31, T-LensProducer #5/#6,
T-V-L7 #10 — PR-merges with §1.8 status drift sweep pending.

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 12, 2026
…ts, dynamic ratchet floor, polarity-residual)

Brian inline BLOCKINGs + codex scheduled review BLOCKING #9XXX at PR #2725
sha 698ba61 (4 findings total; codex overlaps with all 3 Brian findings):

(1) #2725 line 70 (constraint #4) — shared-fixture helper carve-out
permits expanded hand-Rust under src/v3/compiler/tests without INVARIANTS
P5 receipt. Brian: P5 receipt required for new/expanded src/v3 Rust.
Codex: require P5 receipt OR state SG-0-neutral without helper expansion.

(2) #2725 line 83 (§3 acceptance final bullet) — hard-codes ratchet floor
≤80 (pre-hot-fix baseline), preserving stale debt. Brian: current main has
84 active exemptions with 20 hot-fix rows; post-rebuild floor should be
recomputed, not preserved at 80. Codex: derive final floor from live
non-hot-fix exemptions at Mgr finalization; delete hard-coded ≤80.

(3) #2719 line 217 (§4 hard constraint #5 Polarity invariant sub-bullet) —
restates skip formula as dimension-only, contradicting two-step
NodeRef+dimension contract. Brian: silently drops testclaim_references in
violation of P2 Facts Flow Forward. Codex: rewrite every formula to skip
when refs∩nodes empty OR dims∩changed_dims empty. (Partial-absorption-
residual: cursor's catch on #2725 review #9799 was fixed at §3 substantive
paragraph at commit 403833e but didn't propagate to §4 constraint #5
sub-bullet at line 217 — different polarity-mentioning site within the
same brief.)

Fixes (single-pass per discipline; same pattern as prior 14-catch cycle):

#2725 constraint #4 (line 70) rewrite:
- 'No new hand-Rust beyond shared-fixture helpers' (carve-out) →
  'Shared-fixture helpers require P5 receipt + SG-0-neutrality'
- Per-PR P5 receipt explicit: (a) helper LOC delta cited, (b) dissolution
  path named (helper retires when cluster's pattern lands in .dag
  TestClaim authority), (c) SG-0 census-delta computation showing net
  ≤ 0
- SG-0-neutrality enforcement: helpers may add lines but net delta ≤ 0
  (helper additions offset by exemption-row retirements + ratchet-down).
  Net positive = escalate (substrate-shape signal)

#2725 §3 acceptance final bullet (line 83) rewrite:
- 'ratchet floor returned to ≤80 (pre-hot-fix baseline)' → 'ratchet floor
  recomputed DYNAMICALLY from live state at activation'
- Concrete computation: starts at current main HEAD's
  TEST_TIMEOUT_MAX_EXEMPTIONS (84 at dfbc010; verify via grep at Mgr
  finalization); each rebuild PR decrements by N (cuts rebuilt that PR);
  post-all-20-rebuild target = (value at activation) - 20 (e.g., 64 at
  current state)
- Removed '≤80 pre-hot-fix baseline' framing
- Explicit acknowledgment: 80 was ITSELF stale debt; 16 non-hot-fix
  exemptions have separate paydown owners; rebuild does NOT freeze goal
  at 80; long-run target per feedback_pb_zero_is_r3_close_target is 0

#2719 §4 constraint #5 (line 217) rewrite:
- Header changed: '...dimensions: Set<Dimension> field on every group
  entry' → '...dimensions: Set<Dimension> + testclaim_references:
  Set<NodeRef> fields on every group entry'
- Polarity invariant rewritten to canonical 2-step join (BOTH NodeRef AND
  dimension intersections; skip = either empty)
- Two fail-open bug patterns explicitly named: (a) inversion (b)
  dimension-only collapse
- Bridge-tier proxy framing preserved (path-regex over-approximates
  canonical; fail-closed-safe coarseness)

15th + 16th + 17th distinct review-class catches this polish cycle (16
on #2719 brief; #15 on rebuild scaffold #2725):
- #15 (BLOCKING #1): shared-fixture helper P5 receipt obligation
- #16 (BLOCKING #2): dynamic ratchet floor recomputation
- #17 (BLOCKING #3): polarity-residual at second site (partial-absorption-
  residual within partial-absorption-fix; pattern: 'when canonical
  algorithm gets corrected, ENUMERATE all polarity-mentioning sites'
  is the discipline)
briansrls added a commit that referenced this pull request May 12, 2026
* docs(audit): R3 deferral anti-pattern audit (PROPOSAL — Director-authored)

Surfaces the broader anti-pattern class around cost-lens Miss dissolution
(operator-ratified 2026-05-11). Grep-verified ~1600+ instances of
deferral-via-wrapper-variant in v3 compiler production surface across 13
categories (Option<T>, panic!, .expect(), NotYetImplemented, DescentUnknown,
ArrowBody::Pending, _ => catch-alls, etc.).

Per operator-directive: "Miss should go away entirely; if something in
substrate defines a Miss it should fail and be investigated asap" — extended
to whole anti-pattern class. Each category dissolution path proposed.

Tagged for PM (deep-wolf-155) + Mgr ratification: scope, sequencing, PR-template
ratchet authoring authority.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* WIP: gunbc Director

* docs(audit): address openai-pro REQUEST_CHANGES — narrow Miss-class scope; reconcile DescentUnknown authority

Per openai-pro review (#2708 c#4425020297, verdict REQUEST_CHANGES):

3 valid blocking findings addressed:

1. LAYER MODEL — §3.2 DescentEvidence::DescentUnknown removal conflated
   Miss-class deferral with fail-closed lattice bottom (INVARIANTS.md:63-66).
   Reframed: dissolution requires PM-tier ratification on (a) keep 3-variant
   lattice + construction-side narrowing OR (b) authority update first +
   2-variant collapse. No worker dispatch until PM ratifies.

2. INVARIANTS + modeling-discipline — §1 row 1, §2.2 paragraph: "all 83
   Option<T> = pure deferral" overgeneralized. Per modeling-discipline.md:41-50
   + CODING.md:95-97, Option<T> is allowed when absence is meaningful.
   Reframed as triage candidates with per-site classification (error-None
   = Miss-class; legitimate-absence = compliant); explicit "don't bulk-convert."

3. CODING.md — §4 review checklist phrased as "flag for conversion" which
   conflicts with CODING.md:307-309 (Option/Result OK when meaningful).
   Reframed as "flag for justification": reviewer asks, author justifies;
   non-compliant cases convert, compliant wrappers survive.

§0 framing also clarified: Miss-class deferral ≠ all Option<T>; per-site
classification required; bulk-conversion would itself be a discipline violation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* docs(audit): address codex REQUEST_CHANGES — eliminate internal authority contradictions

Per codex review (#2708 c#4425182*, verdict REQUEST_CHANGES):

2 valid blocking findings addressed:

1. §1 table — rows 2-7 stated definitive violations ("should be typed
   Diagnostics", "admits non-exhaustiveness", "explicit 'I haven't decided
   this'") while §2.2 later correctly narrowed these to per-site triage.
   Two conflicting authorities within the same brief violated INVARIANTS P2
   single-authority discipline. Fix: table notes now reflect the triage
   framing (boundary tooling vs interior substrate flow per CODING.md
   307-309; closed-enum vs deliberate-default catch-alls; etc.). Rows 9-13
   tagged with explicit cross-references to §3 disposition.

2. §5 sequencing — proposed §3.2 (DescentUnknown) same-batch dispatch with
   §3.1, but §3.2 itself blocked dispatch on PM ratification of path (a)
   vs (b). Fix: §5 now explicitly marks §3.2 + §3.6 as PM-blocked authority
   gates; only path (a) ratification would enable same-batch with §3.1;
   path (b) requires INVARIANTS.md edit landing first. Authority-gate
   summary appended.

Also relabeled §2.1 "Pure deferral" → "Miss-class deferral" and removed
DescentUnknown from the auto-classified list (consistent with §3.2 gate).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* docs(audit): address inline blocking — reconcile §3.3 DescentResidual with Director-ratified γ-shape

Per inline review finding at docs/audit/r3-deferral-anti-pattern-audit-2026-05-11.md:101
(2026-05-11T21:03:41Z):

> "BLOCKING: §3.3 reclassifies the Director-ratified terminal DescentResidual
> as Miss-shape without reconciling the current termination.dag authority,
> which violates P1 modeling faithfulness and locked-decision discipline."

Valid finding. The `DescentResidual = EvidenceUnknown(NonStrictEvidence) |
EvidenceIncomplete` shape was Director-ratified via the
illegal-states-unrepresentable rationale in
docs/briefs/r3-substrate-descent-execution-proof-worker.md (gunbc#828
issuecomment-4395060514). The audit incorrectly conflated the analyzer's
runtime-failure surface with a Miss-class design-laziness deferral.

Same pattern as the prior §3.2 DescentUnknown correction (openai-pro
REQUEST_CHANGES):

- §3.3 reframed: no direct dissolution proposed; instead, pre-dispatch
  requirement to read existing authority + produce grep-verified reason
  + PM ratification.
- §1 table row 11: tagged "authority-conflicting per Director-ratified
  γ-shape — compliant as written today."
- §2.1: removed residual from Miss-class auto-classified list; appended
  to the "NOT auto-classified" entries alongside DescentUnknown.
- §5 sequencing: §3.3 now authority-blocked (same as §3.2 + §3.6); cannot
  same-batch with §3.1 until reconciliation lands. Authority-gate footer
  updated.

Pattern: every authority-conflicting dissolution proposal must (a) start
from grep-verified read of existing authority, (b) name the specific
authority doc affected, (c) require PM ratification before dispatch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* docs(audit): address inline blocking — §3.6 ArrowBody location was factually wrong

Per inline review finding at docs/audit/r3-deferral-anti-pattern-audit-2026-05-11.md:120
(2026-05-11T21:03:41Z):

> "BLOCKING: ArrowBody::Pending is stored on TypeConnective::Arrow.body/
> ResolvedArrow, not Behavior::Transform.body, so §3.6 aims the redesign
> at the wrong substrate boundary under P2 facts-flow-forward."

Verified at HEAD:
- ArrowBody enum at src/v3/compiler/src/dag.rs:1092
- Used in TypeConnective::Arrow { body, .. } patterns (bootstrap.rs:288 etc.)
- All ArrowBody::Unparsed sites in bootstrap_generated.rs are inside
  TypeConnective::Arrow { body: ArrowBody::Unparsed(...), .. }

Original §3.6 claim that ArrowBody is on Behavior::Transform.body was wrong.
Actual location is declaration-tier type-connective (Declaration.connective
= TypeConnective::Arrow { body: ArrowBody::Pending }).

Fix: §3.6 reframed. The substrate-shape question is at the declaration-tier
type-connective layer, NOT Behavior::Transform. The "paper-over" cost is at
the type-connective-walking layer; Behavior walkers already see only resolved
bodies. Revised proposal: PM ratification on R3-load-bearing-ness + Substrate
Mgr canvas on partition-vs-sum-with-Pending design question, citing
M1_DESIGN.md authority + per-walker impact analysis.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* docs(audit): address inline blocking — LensSurfacePending is terminal, not in-progress

Per inline review finding at docs/audit/r3-deferral-anti-pattern-audit-2026-05-11.md:37
(2026-05-11T21:03:41Z):

> "BLOCKING: LensSurfacePending is a terminal ParallelismUnsupportedKind in
> the effects substrate, not an in-progress substrate state, so grouping it
> with ArrowBody::Pending needs explicit authority reconciliation before
> dispatch under P1 modeling faithfulness."

Verified at HEAD: src/v3/compiler/src/dag/effects.rs:197 places
LensSurfacePending as a variant of ParallelismUnsupportedKind, explicitly
marked 🟢 TERMINAL in code comments. It's an explicit unsupported-reason
payload for the parallelism lens, NOT a transitional in-progress state.
The "Pending" suffix is misleading.

Fix: removed LensSurfacePending from §3.6 (which only covers true pre-lowering
transitional state ArrowBody::Pending). Updated §1 table row 12 + §2.1
Miss-class list to explicitly NOT auto-classify it. Removed scope contradiction.

Pattern continues from prior corrections: every classification in the audit
needs grep-verified factual grounding. Misleading variant names ("Pending"
suffix on terminal carriers) are themselves a discipline gap.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* docs(audit): address cursor NON-BLOCKING table nits — rows #10/#11 misattributed conflict

Per cursor APPROVE_WITH_COMMENTS review at sha 0c07f7a (2026-05-11T21:08:35Z):

> Row 10/11 phrase 'Authority-conflicting per X' but the cited authority X is
> exactly where the standing design is *defined*. The real tension is between
> the operator's Miss-elimination directive and that existing authority text,
> not 'conflict' within or stated by those authorities themselves.

Fix: reframe rows #10/#11 to name the standing authority + locate the tension
correctly:
- Row 10 (DescentUnknown): standing authority is INVARIANTS.md fail-closed
  bottom; tension is with operator directive (not within the invariant).
- Row 11 (DescentResidual): standing authority is Director-ratified γ-shape;
  carrier is compliant; my prior audit framing was the conflict, corrected in
  §3.3.

NON-BLOCKING per reviewer but legitimate clarity improvement; reviewer's verdict
was APPROVE_WITH_COMMENTS.

* docs(audit): tighten CODING.md citations — boundary roles at :311-321, not :307-309

Per cursor APPROVE_WITH_COMMENTS finding at sha 0af402f (2026-05-11T21:24:39Z):

> The notes point boundary-tooling legitimacy at CODING.md:307-309, but those
> lines only state the narrow 'Hidden panic surface' rule (library avoids
> contract-violation panics/unwrap()). The explicit Bootstrap and
> Code-generation binaries edge roles appear under 'When impurity is
> acceptable' beginning around CODING.md:311 (table ~317-321).

Fix: split the citation so:
- CODING.md:307-309 covers the contract-violation-in-library rule (interior
  substrate-flow panics dissolve to typed Diagnostic per C-8).
- CODING.md:311-321 covers the boundary roles legitimacy (Build script /
  Code-generation binaries / Bootstrap entries in the impurity-acceptable
  table).

Updated table rows #2/#3 (lines 27-28), §2.2 prose (line 66), and §4 review
checklist (line 171). NON-BLOCKING per reviewer; landing as documentation
hygiene.

* docs(audit): add §3.8.1 concrete 10-entry NON_TEST inventory per velocity-walk

Per PM ratification (msg_45457c77 in response to Director ask msg_048fdfa6):
empirical-grounding-strengthens-the-case path. §3.8 currently treats
structural_coverage_gap audit as abstract pattern; with zesty-boar-261's
velocity-walk diagnostic (gunbc#846 c#4425420798) producing a 9 NON_TEST +
1 FRAGMENTS enumerated inventory over the 7d window pre-2026-05-11, §3.8
graduates from speculative to grounded.

Adds §3.8.1 with:
- 10-entry table: file path + LOC + adjacent-lane/dissolution-path mapping
- Total 2,171 LOC; omni_shape_b_openapi.rs identified as ~40% of class
- Audit implication: per-file promote-or-carve discipline applies
- Per-PR review state-space framing (Director conformance read flags
  absent dissolution-path mapping)
- Re-audit cadence note (this is window-relative intro composition,
  not full main §3.8 audit; per feedback_intro_rate_not_residual_share)

Citations grep-verified at HEAD eed86ff: all 9 NON_TEST files exist
with stated LOC; FRAGMENTS entry confirmed in sg0_census_test.rs:688-691.

* docs(briefs): Director scaffold-fill for Cluster M Phase 3 reflected-Dag + DimensionReport bulk-port worker briefs

Per feedback_pre_authored_brief_queue + feedback_director_mgr_energy_input
(Director energy INTO system until real workflow substrate exists).

Verification Mgr (clever-tern-670) status pass (msg_755c3f43) identified
Phase 3 dissolution-rate bottleneck as Mgr-tier brief-authoring bandwidth
on the two biggest unauthored classes:

- Reflected-Dag structural assertion family (~25-30 entries; 16 seed-named)
- Generic DimensionReport / runner-discipline family (~20-25 entries; 10 seed-named)

These ~50 entries combined are roughly half of the #84 EXPECTED_HAND_AUTHORED_TEST
partition (116 entries on origin/main eed86ff). Authoring scaffolds + Mgr
finalization + dispatch should land bulk-port PRs within 7-10 days, with
velocity-tripwire arrow (12.7:1 intros:dissolves at gunbc#846 c#4425420798)
flipping intra-week.

Authority split per Director msg_eb2372c7 to PM:
- Director: scaffold shape (this commit) — locked-design citations, substrate
  carrier references at exact lines, Phase-2 pattern site refs, hard constraints,
  STOP-and-escalate criteria, decomposition recommendations.
- Verification Mgr: finalization — complete inventory (Mgr-fill placeholders
  marked throughout), per-entry classification, pilot selection, dispatch.

Substrate citations grep-verified via Verification Mgr msg_755c3f43:
- ProgramGenerator/ProgramShape/Quantifier/QuantifiedTestClaim/SuiteClaim:
  src/v3/std/verification.dag:118-133 + :379-402 (carriers landed)
- TestSuite.claims still List<TestClaim>: verification.dag:404-407 (staged
  trigger at :394-399) — Reflected-Dag class CONSUMER-GATED on this flip
- Phase-2 pattern: t_pb_b_1_dag_runner_test.rs:257-357 (R3_GATE_87_CEMENTING_REGEN_SUITES,
  run_suite_all_pass_with_expected_claim_names)
- Receipt discipline: r3_gate_87_lens_cementing_regen_receipts_test.rs:13-24 + :122-132
- DimensionReport class NOT consumer-gated (Phase-2 pattern is the load-bearing
  predicate, not full #87 PASSING, per feedback_construction_over_ratchets)

* docs(briefs): Director scaffold-fill for R3 CI Layer 2 path-conditional gating

Per PM ratification at gunbc#828 c4425726922 + Director ratification msg_a77c7f42
(Verification Mgr routing per feedback_parallel_representation_debt coherence).

Bridge-debt with named dissolution trigger: when gate
ci_uses_provable_minimal_affected_set_selection lands, the affected-set
Introspect-lens output (canvas PR #2713) replaces the bridge's
required_paths_regex column.

Brief covers:
- §0 scope: extend PR #2718's changes job, do not parallel
- §1 mechanism: per-group skip_* boolean outputs + STEP-level if: on v3
- §2 inventory sources (slow-test-exemptions.txt + /tmp/v3-test-timings.log
  + NEW per-group required-paths mapping)
- §3 per-dimension structural target — every entry has dimension: Dimension
  field matching lens enum (parallel-representation-debt prevention)
- §4 hard constraints (8 invariants)
- §5 acceptance
- §6 decomposition (Mgr-fill recommendation: cost_lens pilot first)
- §7 STOP-and-escalate criteria
- §8 bridge-debt + dissolution path explicit

Verification Mgr (clever-tern-670) fills inventory + per-group regex +
dispatch. Director scaffold preserves coherence; Mgr finalizes per
feedback_director_mgr_energy_input.

* docs(briefs): fix Layer 2 YAML naming inconsistency (skip_cost → skip_cost_lens)

Per cursor APPROVE_WITH_COMMENTS at sha 04c5b08 (review 9701):

> The changes outputs define skip_cost, but the v3 step's if: uses
> needs.changes.outputs.skip_cost_lens. That disagrees with the same brief's
> post-dissolution sketch (skip_$group with cost_lens → skip_cost_lens, lines
> 129-134). Not a formal invariant breach by itself, but it is easy for an
> implementer to copy the wrong name and get an always-on/off step.

Fix: normalize the example YAML outputs block to match the if: lines and the
post-dissolution sketch. Naming convention: skip_<group_name> where
<group_name> matches the per-group table's group_name column verbatim
(no abbreviation). Updated all 4 example outputs:

  skip_lens   → skip_complexity_lens (was vague; tied to specific group)
  skip_emit   → skip_emit_target (matches starting template at §2)
  skip_parser → skip_parser_grammar (matches starting template)
  skip_cost   → skip_cost_lens (matches if: line + post-dissolution sketch)

Also added an inline comment documenting the naming convention so future
copy-paste from the example stays mechanically correct.

* docs(briefs): cite PM pre-staged Mgr-fill template (PR #2721) + converge pilot recommendation on Cluster B

Per PM msg_bba47649 — pre-staged Mgr-fill template landed as PR #2721
(docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md, 220 lines).

Two scaffold updates:

1. §2 (inventory sources): replaced 'PM pre-staged skeleton to be attached
   if/when available' speculative reference with explicit cite-and-link to
   the landed template doc. Describes what the PM template provides:
   - All 78 slow-test-exemptions.txt entries grouped into 9 clusters (A-I)
   - (test_pattern, dimension, required_paths_regex) skeleton table
   - 12 [Mgr-fill] placeholders for substrate-lens / R3-V L4/L7 / R1C-E /
     free-consequences cross-target tracing

2. §6 (decomposition): converged my prior cost_lens-first pilot
   recommendation with PM's Cluster B recommendation — these are the same
   family (Lane 2 Stage 2d symbolic cost = cost-lens). Updated wording to
   reflect Cluster naming + cross-citation to PM template's Cluster B
   detail. Added [Mgr-fill] placeholder resolution wave to decomposition.

Inline sketch table retained as illustrative; defer to PM template for
actual starting inventory.

* WIP: gunbc Director

* docs(briefs): fix singular dimension → Set<Dimension> per PM caught semantic violation

PM (msg_ab551c52) surfaced codex RC on template PR #2721 (review #9707):
singular 'dimension:' field violates locked-design §2 union semantics. A
multi-dim consumer (e.g., LBP demonstration reading both complexity + cost)
declared with singular dimension: cost would be silently skipped when only
complexity changes — fail-open violation against P3.

PM fixed their template at dedcf69: dimension → dimensions (Set<Dimension>),
union-formula clarified, multi-dim rows expanded.

This brief had the same singular semantics; absorbed the fix per PM
recommendation so Verification Mgr inherits coherent dim-set semantic across
both authority chain artifacts (brief + template).

Changes:
- §0 authority bullet: contains(single) → (∩ ≠ ∅) intersection-non-empty;
  dimension: Dimension → dimensions: Set<Dimension>
- §2 table column rename + type spec + union semantics note + multi-dim
  consumer guidance
- §2 starting template citation updated to reflect post-fix template at
  dedcf69
- §3 section header renamed; substantive paragraph explaining WHY
  Set<Dimension> not Dimension (cites PM caught violation + P3 fail-open
  framing)
- §3 YAML example: jq script updated to set-intersection check
- §4.5 hard constraint: dimensions: Set<Dimension> with members from enum;
  empty set invalid
- §5 acceptance: every group has dimensions: Set<Dimension>; multi-dim
  fidelity language
- §6 pilot description: 'singleton {cost} dimensions' phrasing; class wave
  reviewer-check language updated
- §7 STOP: added multi-dim escalation path; explicit warning against
  defaulting to singleton {primary}
- §8 surviving artifact: (group_name, dimensions) — set-typed column survives
- inline illustrative table: explicit set-literal notation with multi-dim row
  example (lbp_demonstration: {complexity, cost})

Same authority chain absorbs cleanly: brief (primary) + template (data
attachment) now both set-typed; Verification Mgr inherits coherent
semantic.

* docs(briefs): fix boolean polarity inversion + add polarity invariant per openai-pro RC on template

PM (msg_9a188e22) surfaced openai-pro BLOCKING re-review (#9721) on template
PR #2721 at 93080af — caught load-bearing boolean polarity inversion:
brief stated skip_* formula as (affected ∩ row.dimensions) ≠ ∅ (skip when
intersection NON-empty) while CI consumer wires if: skip != 'true' (run
when skip is false). Net effect: literal-following Mgr/worker would wire
the gate to silently skip AFFECTED tests when intersection is non-empty.
TESTING.md + Boundary Discipline violation.

PM fixed template at 262f42d (4 sites inverted; explicit polarity table
added at §1/§3/§4/§5).

Same risk on this brief (#2719) at the post-dissolution mapping site I
authored when absorbing the prior dim-set fix at efacecd. Fix:

§0 authority bullet (line 10, the inversion site):
  before: 'skip_* flags become (∩ ≠ ∅)' [INVERTED — fail-open]
  after:  'skip_* flags become skip_<group> = (∩ = ∅)' [canonical]
  + explicit polarity check note + carrier-vs-contract explanation
  + skip-form / run-form equivalence stated

§3 substantive paragraph (after Set<Dimension> WHY): added Polarity
invariant block citing PM's caught inversion + 262f42d fix + explicit
warning that skip = (∩ ≠ ∅) is the canonical fail-open boolean-polarity
bug pattern.

§4 hard constraint #5 (dimensions field): added inline Polarity invariant
restating the canonical skip-form + run-form equivalent + 'never invert'
clause.

§5 acceptance: added 'Polarity check passes' criterion enumerating the
acceptable forms + naming the inverted form as the fail-open pattern to
reject in review. Self-test text clarified: cost-dimension groups run,
other-dimension groups skip (verifies correct polarity in actual gate).

YAML example at §3 (lines 139-149) was already polarity-correct (skip iff
intersection empty; skip=true when intersection empty) so unchanged.

Single-pass absorption per PM recommendation — both brief and template
now lockstep on polarity semantics. Verification Mgr inherits both files
without polarity mismatch in finalization.

* WIP: gunbc Director

* docs(briefs): align §0 example names with §1 naming convention (cursor exploratory)

Per cursor APPROVE exploratory observation on PR #2719 sha 13b0db9
(review #9732):

§0 line 25 illustrative outputs used abbreviated names (skip_lens /
skip_emit / skip_parser) while §1 line 53-54 establishes strict
'skip_<group_name>' naming convention matching the per-group table
verbatim. Non-policy violation per cursor but tightening avoids ambiguity
for implementer.

Fix: replace abbreviated names with full-form (skip_cost_lens /
skip_emit_target / skip_parser_grammar) + cross-reference §1 naming
convention in the same sentence. Brief now consistent across all naming
sites.

* docs(briefs): add P3 fail-closed shared-infrastructure full-run bucket per codex BLOCKING

codex REQUEST_CHANGES on PR #2719 at sha 52c6cf0 (review #9744):

Line 102 narrowed required-paths inventory to 'src/v3/*' deps only; the
illustrative table at lines 114-118 followed that shape. A PR that changes
shared test infrastructure or selection machinery outside src/v3/*
(.github/workflows/ci.yml, scripts/*, Cargo.lock, rust-toolchain.toml,
etc.) would be classified as 'unaffected' for every per-group regex and
silently skip tests whose behavior actually changed.

That's the fail-open boundary class P3 forbids + TESTING.md
behavior-driven discipline violation. Real correctness issue in the
proposed mechanism, not just an implementation detail.

Fix: add shared-infrastructure full-run fail-closed bucket as the
join-point that catches inter-group / cross-cutting changes:

§2 (inventory sources): added 'Shared-infrastructure full-run fail-closed
bucket' subsection with explicit mechanism — changes job computes
force_full_run = (any changed file matches shared-infra regex); when
true, all per-group skip_* short-circuit to false. Regex spec:
^(\.github/.*|scripts/.*|Cargo\.(toml|lock)|rust-toolchain\.toml|
\.cargo/.*|build\.rs)$. Names the structural rationale: per-group
regexes cover ONLY their own src/v3/* deps; the full-run trigger is
the join-point. Fail-closed by construction.

§4 hard constraint #9 (new): formalizes the invariant + 'never collapse
the full-run trigger into per-group regexes' (structural fail-open shape).

§5 acceptance: added 'Shared-infrastructure full-run check passes' as
separate criterion + self-test case (c) — a PR touching only
.github/workflows/ci.yml or Cargo.lock or scripts/check-test-timeout.sh
MUST run all test groups. Expanded self-test from 3 to 4 cases (a/b/c/d).

§2 added [Mgr-fill]: validate shared-infra regex against representative
recent PRs.

Single-pass absorption; brief now P3 fail-closed at the cross-cutting
boundary.

* WIP: gunbc Director

* docs(briefs): fix two openai-pro BLOCKINGs — harness-arm in shared-infra regex + cargo test substring not glob

openai-pro REQUEST_CHANGES on PR #2719 at sha 0d3b44b (review #9749 +
manual c4426188322):

BLOCKING #1 (P3 Fail-Closed): brief at line 104 names 'harness code' as
a class to catch in full-run regex but the actual regex at line 109 had
no harness/test-selection arm. Harness-only changes (e.g., to
tests/integration/common/* or sg0_census_test.rs) would miss both
full-run regex AND per-group regexes — silent skip.

BLOCKING #2 (TESTING.md fail-closed CI): test_pattern field documented
as 'cargo test arg pattern' but examples used glob-looking syntax
(cost_lens_*, *_emit_*). Cargo positional test arg is a libtest SUBSTRING
filter, not a glob. Worker following the brief literally would produce
a step that runs zero intended tests + exits successfully — silent skip
converting 'selected group tested' into 'selected group filtered out.'

Fixes:

#1 (harness arm in shared-infra regex):
- §2 mechanism: extended regex to include
  src/v3/compiler/tests/integration/common/.*,
  sg0_census_test.rs, test_runner_test.rs, t_pb_b_1_dag_runner_test.rs,
  integration.rs, integration test entry points
- §2 new paragraph naming the harness/test-selection-machinery arms
  explicitly + hard rule: harness-class files MUST never appear in a
  per-group required_paths_regex
- §4 hard constraint #9: extended invariant to include harness class
  with explicit file list
- §5 acceptance: extended self-test case (c) to include harness-class
  example (common/cached_compile.rs) + explicit verification list

#2 (cargo test substring, not glob):
- §1 YAML examples: cost_lens_* → cost_lens; *_emit_* → emit; added
  IMPORTANT comment explaining libtest substring semantics +
  forbidding glob syntax
- §2 test_pattern column spec: re-documented as 'libtest test-name
  SUBSTRING filter (NOT a glob)' with cost_lens example + glob
  forbiddance + --exact alternative
- §2 inline illustrative table: cost_lens_* → cost_lens (and others);
  added trailing comment naming substring semantics
- §4 new hard constraint #10: test_pattern is substring filter not
  glob; self-test that the value substitutes verbatim into cargo test
  and runs positive number of tests
- §5 acceptance: new 'test_pattern substring-filter check passes' criterion
  with empirical pilot-wave validation requirement

Brief now P3 fail-closed at both the boundary (shared-infra full-run
including harness) AND the selector (substring filter that workers can
copy verbatim without silent zero-test execution). Single-absorption
pass; awaiting fresh review at new HEAD.

* docs(briefs): reframe PM template citation per codex P1/P2 — template is on PR #2721, NOT yet landed on main

codex REQUEST_CHANGES on PR #2719 (review #9754):

Line 128 named docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md
as a 'landed' starting authority, but git ls-tree origin/main returns no
blob and git ls-files returns nothing. A worker following this brief
would be sent to a non-existent source of truth — INVARIANTS P1/P2
authority-grounding violation in a dispatch document.

Verified at HEAD:
- git ls-tree origin/main -- docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md → empty
- gh pr view 2721 → state=OPEN, mergedAt=null
- Template lives on PR #2721's branch only

Fix: reframe the template citation to acknowledge PR #2721 is open-not-landed.
- 'landed via PR #2721' → 'open as PR #2721 ... NOT yet landed on main'
- Added codex BLOCKING citation + verification receipt (git ls-tree result)
- Added explicit authority caveat: Verification Mgr finalization MUST
  coordinate merge sequencing — (a) merge #2721 first, OR (b) read from
  PR #2721 branch until it merges
- Named PM (deep-wolf-155) as PR #2721 author + cross-link for merge coordination
- Cited sha 262f42d (PR #2721 post-fix state per PM msg_125e3aa5)

Brief now accurately grounded on the actual file location (PR #2721 branch)
with merge-sequencing guidance for Mgr finalization. Authority chain
honest about in-flight vs landed state.

* WIP: gunbc Director

* docs(briefs): absorb 3 BLOCKING findings (Brian + codex) — R4 lifecycle reframe + canonical 2-step + count fix

Brian inline BLOCKING #1 + codex BLOCKING #1 (P5 dissolution-trigger
authority): brief framed dissolution as R3 close-blocking gate
'ci_uses_provable_minimal_affected_set_selection' but
docs/design-affected-set-lens.md:3 = 'R4 wishlist', :354 = 'CI integration
sketch (deferred to R4 full delivery)', :366 = 'CI integration is R4
full-delivery work'. No ROADMAP authority exists for the cited gate name
— that was Director-tier speculation.

Brian inline BLOCKING #2 + codex BLOCKING #2 (Facts Flow Forward / surviving
schema): §3 post-dissolution sketch only encoded dimension intersection,
silently dropping NodeRef intersection. Canonical 2-step per design §5:359
requires BOTH (TestClaim.refs ∩ affected_nodes) ≠ ∅ AND (TestClaim.dims ∩
changed.dims) ≠ ∅. Reducing surviving schema to (group_name, dimensions)
too early.

codex non-blocking: slow-test-exemptions.txt count cited as 78 (PM
template value); actual is 80 at 2026-05-12T00:50Z (verified locally:
grep -v '^#' ... | grep -v '^$' | wc -l = 80).

Fixes (single absorption pass):

§0 'Bridge-debt → dissolution lifecycle' bullet:
- Reframed from 'R3 close-blocking gate' to 'R4-bounded dissolution
  lifecycle (NOT R3 close)' with explicit citation of design doc :3 + :354
  + :366. Names R4.B as R4 owner. Removes the speculative gate name.
  Names Brian's BLOCKING #1 absorption.

§0 NEW 'Post-dissolution selection semantics (canonical 2-step join)'
bullet: explicit NodeRef + dimension joins per design :359; run formula;
skip formula; bridge coarseness acknowledgment (path-regex over-approximates
canonical lens; fail-closed-safe but coarser). Names Brian's BLOCKING #2
absorption.

§0 polarity check bullet: updated skip-form to reflect 2-step (NodeRef-empty
OR dim-empty ⇒ unaffected ⇒ skip).

§2 inventory source (a): count 78 → 80 at 3 sites (replace_all), with
explanation that count grows over time + Mgr re-runs grep at finalization
rather than relying on stale citations.

§2 table column spec: added 'testclaim_references' as 5th column. Cited
Brian's BLOCKING #2; explains bridge-tier proxy vs post-dissolution proxy.

§2 [Mgr-fill]: extended to require testclaim_references computation per
canonical 2-step.

§3 YAML post-dissolution sketch: rewrote classify step to compose BOTH
NodeRef AND dimension intersections via jq + cite Brian's BLOCKING #2
absorption inline. Header comment names R4.B authority and acknowledges
no current ROADMAP gate ID.

§4 #4 PR-body bridge-debt template: reworded from 'R3 close-blocking gate'
to 'R4.B Introspect-lens saturation lane CI integration delivery; NOT R3
close-blocking.'

§8 surviving artifact: corrected from (group_name, dimensions) to
(group_name, dimensions, testclaim_references) per canonical; cited
Brian's BLOCKING #2.

Removed all references to 'ci_uses_provable_minimal_affected_set_selection'
as a current ROADMAP gate name; replaced with R4.B owning-lane references
+ explicit acknowledgment of authority gap.

Brief now P5-honest: dissolution trigger is checkable (R4.B owning lane)
even if no concrete gate ID yet; surviving schema preserves both lens
join inputs per canonical algorithm.

* docs(briefs): reconcile §3 substantive + §7 STOP with §0/§8 — surviving schema is 3-column (cursor internal-consistency catch)

cursor REQUEST_CHANGES on PR #2719 sha 540113f (review #9767):

Two internal contradictions surfaced from my partial absorption of Brian's
BLOCKING #2:

(a) §3 substantive paragraph still said '(group_name, dimensions) mapping
survives the dissolution — only required_paths_regex column gets retired'
contradicting §0 + §8 which were updated to 3-column (group_name,
dimensions, testclaim_references).

(b) §7 STOP bullet referenced 'Layer 2 dissolution shape doesn't match
(group_name, dimensions) schema' — 2-column framing, same contradiction.

Fix:

§3 substantive paragraph (around the parallel-representation-debt rationale):
- 2-column → 3-column framing
- both dimensions AND testclaim_references must be authored
- cite design §:359 canonical 2-step join
- cite cursor internal-consistency catch alongside Brian's BLOCKING #2

§7 STOP escalation bullet:
- (group_name, dimensions) → (group_name, dimensions, testclaim_references)
  + cite canonical 2-step join

Verified via grep: all remaining
references are within meta-statements explicitly documenting the removal
(line 10 + line 268); no live references remain. All
appearances are either in updated 3-column contexts or in meta-statements
referencing the absorption (line 15 catch citation).

Brief now internally coherent across §0, §3, §7, §8 on:
- dissolution trigger (R4.B owning lane, NOT removed-gate-name)
- surviving schema (3 columns including testclaim_references)
- canonical 2-step join semantics

* docs(briefs): fix stale 78 inventory references at §2 lines 114 + 141 per openai-pro BLOCKING

openai-pro REQUEST_CHANGES on PR #2719 sha 8ae7938 (review #9779):

Brief had stale '78 active >2s entries' at line 114 + 'All 78 ... entries'
at line 141, despite §0 line 19 + §2 line 157 stating live count is 80
and Mgr should re-run count at finalization. A worker following §2
literally could build the gating table from stale 78-entry basis,
omitting 2 slow-test entries — fail-open shape against the brief's own
P3 fail-closed contract (under-inventory = exemption falls in neither
per-group regex nor full-run bucket = silently skipped).

Fix:

§2 inventory source (a) (line 114): replaced 'start with the 78 active
>2s entries' with 'start with the current live count of active >2s
entries (Mgr MUST re-run grep ... | wc -l at finalization; 80 at
2026-05-12T00:50Z but count grows; do NOT cite the stale 78 from PM
template PR #2721 or any earlier reference)'. Added 'fail-closed
completeness invariant' inline: every active exemption MUST appear in
either a per-group required_paths_regex OR the harness/shared-infra
full-run bucket; no exemption left unclassified.

§2 PM template description (line 141): 'All 78 entries' → 'PM-grouped
entries (PM template snapshot was 78 at template authoring time; live
count grows — Mgr re-verifies via wc -l at finalization, NOT this
stale historical reference)'. Added note that the 9-cluster taxonomy
survives count growth; Mgr maps new entries to existing clusters or
escalates if a new cluster surface emerges.

Brief is now internally consistent on inventory-count freshness:
- §0 line 19: live 80 with verification command
- §2 line 114: re-run command at finalization; explicit do-not-cite-78 instruction
- §2 line 141: PM template snapshot historical; live count grows
- §2 line 157 (Mgr-fill): re-run grep, don't trust stale citations

12th distinct review-class catch this polish cycle: inventory-citation
freshness as fail-closed completeness invariant.

* docs(briefs): §5 acceptance requires testclaim_references explicitly per codex BLOCKING #9780

codex REQUEST_CHANGES on PR #2719 sha 8ae7938 (review #9780):

Finding #1 (stale 78 at lines 114 + 141) already fixed at prior commit
487d175; codex finding overlaps with openai-pro #9779 absorbed before.

Finding #2 (new): §5 acceptance at line 228 only required dimensions:
Set<Dimension> on each group entry, NOT testclaim_references: Set<NodeRef>,
even though the brief makes that column load-bearing at:
- §0 line 104 (post-dissolution selection canonical 2-step)
- §3 line 178 (substantive paragraph: 3-column surviving schema)
- §8 line 269 (surviving artifact 3-column)

A Mgr reading §5 acceptance literally could call PR-set 'done' with
dimensions-only column population — that's the dimensions-only closeout
codex flags as facts-flow-forward violation.

Fix: §5 acceptance adds new explicit criterion:
'Every group entry has testclaim_references: Set<NodeRef> field' with
explicit citation chain (design §:359 + Brian BLOCKING #2 + codex
BLOCKING #9780). Includes bridge-tier-proxy vs post-dissolution-proxy
note. Includes 'Dimensions-only acceptance closeout is rejected: P2
facts-flow-forward requires both lens-join inputs.'

§5 acceptance now coherent with §0/§3/§8 on the 3-column surviving
schema; no path to 'done' that skips testclaim_references.

13th distinct review-class catch this polish cycle:
acceptance-vs-substantive-text divergence on load-bearing fields.

* docs(briefs): Director scaffold for cold-v3 rebuild coordinator (Phase 3-pattern; per-cut child workers)

Per PM greenlight msg_07f73de0 + Brian operator greenlight at gunbc#846
reply (~01:25Z 2026-05-12). Pre-authored scaffold per
feedback_pre_authored_brief_queue + feedback_director_mgr_energy_input;
activation triggers on empirical post-#2723 cold-v3 wall-clock measurement.

Scope: rebuild 20 hot-fix-2026-05-12-tagged cut tests under
OnceLock/cached_compile/shared-fixture amortization. Each rebuild PR:
- Removes #[ignore] attribute
- Retires slow-test-exemptions.txt row
- Decrements TEST_TIMEOUT_MAX_EXEMPTIONS in lockstep
- Verifies <2s wall on cold ubuntu-latest

Brief covers:
- §0 scope: full 20-test inventory grouped into 9 clusters (A-I) by
  lane + amortization affinity
- §1 mechanism: 4-step per-cut worker pattern (baseline, refactor,
  verify, re-enable + retire-exemption)
- §2 6 hard constraints (preserve semantics, ratchet-down per PR,
  amortization-mechanism-only, no new hand-Rust, per-cluster fidelity,
  re-enable-with-ratchet-down enforcement)
- §3 acceptance: per-PR + final cold-v3 ≤10min + ratchet floor ≤80
- §4 decomposition: pilot (Cluster A) → high-impact (Cluster H TC1
  140s) → parallel rollout → ratchet sweep
- §5 STOP-and-escalate criteria
- §6 cross-coordinator notes:
  - T-LAS Mgr seat gap (Cluster F) — Director surfaces ownership
  - Phase 3 #84 cluster overlap — Verification Mgr decides Layer 2
    rebuild PR vs Cluster M Phase 3 PR routing
  - Layer 2 brief #2719 INDEPENDENT — rebuild is structural regardless

Activation decision branch:
- post-#2723 cold-v3 >20min → second cut session
- 10-20min → rebuild alongside possible second-cut
- ≤10min → rebuild can de-prioritize

Per-cluster routing:
- A+I → PB Mgr (Lane 3 Stage 3c)
- B → Substrate Mgr (M1_5_DESIGN)
- C/D/E/G → Verification Mgr (this brief's coordinator)
- F (T-LAS) → Director-routed operator-tier (no standing Mgr seat)
- H (TC1 substrate-adjacent) → Substrate Mgr or dedicated session

Authority chain documented in footer.

* docs(briefs): absorb Brian + codex 3-finding BLOCKING wave (P5 receipts, dynamic ratchet floor, polarity-residual)

Brian inline BLOCKINGs + codex scheduled review BLOCKING #9XXX at PR #2725
sha 698ba61 (4 findings total; codex overlaps with all 3 Brian findings):

(1) #2725 line 70 (constraint #4) — shared-fixture helper carve-out
permits expanded hand-Rust under src/v3/compiler/tests without INVARIANTS
P5 receipt. Brian: P5 receipt required for new/expanded src/v3 Rust.
Codex: require P5 receipt OR state SG-0-neutral without helper expansion.

(2) #2725 line 83 (§3 acceptance final bullet) — hard-codes ratchet floor
≤80 (pre-hot-fix baseline), preserving stale debt. Brian: current main has
84 active exemptions with 20 hot-fix rows; post-rebuild floor should be
recomputed, not preserved at 80. Codex: derive final floor from live
non-hot-fix exemptions at Mgr finalization; delete hard-coded ≤80.

(3) #2719 line 217 (§4 hard constraint #5 Polarity invariant sub-bullet) —
restates skip formula as dimension-only, contradicting two-step
NodeRef+dimension contract. Brian: silently drops testclaim_references in
violation of P2 Facts Flow Forward. Codex: rewrite every formula to skip
when refs∩nodes empty OR dims∩changed_dims empty. (Partial-absorption-
residual: cursor's catch on #2725 review #9799 was fixed at §3 substantive
paragraph at commit 403833e but didn't propagate to §4 constraint #5
sub-bullet at line 217 — different polarity-mentioning site within the
same brief.)

Fixes (single-pass per discipline; same pattern as prior 14-catch cycle):

#2725 constraint #4 (line 70) rewrite:
- 'No new hand-Rust beyond shared-fixture helpers' (carve-out) →
  'Shared-fixture helpers require P5 receipt + SG-0-neutrality'
- Per-PR P5 receipt explicit: (a) helper LOC delta cited, (b) dissolution
  path named (helper retires when cluster's pattern lands in .dag
  TestClaim authority), (c) SG-0 census-delta computation showing net
  ≤ 0
- SG-0-neutrality enforcement: helpers may add lines but net delta ≤ 0
  (helper additions offset by exemption-row retirements + ratchet-down).
  Net positive = escalate (substrate-shape signal)

#2725 §3 acceptance final bullet (line 83) rewrite:
- 'ratchet floor returned to ≤80 (pre-hot-fix baseline)' → 'ratchet floor
  recomputed DYNAMICALLY from live state at activation'
- Concrete computation: starts at current main HEAD's
  TEST_TIMEOUT_MAX_EXEMPTIONS (84 at dfbc010; verify via grep at Mgr
  finalization); each rebuild PR decrements by N (cuts rebuilt that PR);
  post-all-20-rebuild target = (value at activation) - 20 (e.g., 64 at
  current state)
- Removed '≤80 pre-hot-fix baseline' framing
- Explicit acknowledgment: 80 was ITSELF stale debt; 16 non-hot-fix
  exemptions have separate paydown owners; rebuild does NOT freeze goal
  at 80; long-run target per feedback_pb_zero_is_r3_close_target is 0

#2719 §4 constraint #5 (line 217) rewrite:
- Header changed: '...dimensions: Set<Dimension> field on every group
  entry' → '...dimensions: Set<Dimension> + testclaim_references:
  Set<NodeRef> fields on every group entry'
- Polarity invariant rewritten to canonical 2-step join (BOTH NodeRef AND
  dimension intersections; skip = either empty)
- Two fail-open bug patterns explicitly named: (a) inversion (b)
  dimension-only collapse
- Bridge-tier proxy framing preserved (path-regex over-approximates
  canonical; fail-closed-safe coarseness)

15th + 16th + 17th distinct review-class catches this polish cycle (16
on #2719 brief; #15 on rebuild scaffold #2725):
- #15 (BLOCKING #1): shared-fixture helper P5 receipt obligation
- #16 (BLOCKING #2): dynamic ratchet floor recomputation
- #17 (BLOCKING #3): polarity-residual at second site (partial-absorption-
  residual within partial-absorption-fix; pattern: 'when canonical
  algorithm gets corrected, ENUMERATE all polarity-mentioning sites'
  is the discipline)

* docs(briefs): apply §3 polarity 2-step rewrite on rebuild-scaffold branch (cursor #9815 catch + #2719-branch parity)

cursor APPROVE_WITH_COMMENTS on #2725 review #9815 caught that line 208
(§3 substantive Polarity invariant paragraph) on rebuild-scaffold branch's
copy of #2719 brief was still dimensions-only — even though line 217 (§4
constraint #5 sub-bullet) was updated to canonical 2-step in commit
900d5a3.

Root cause: my prior #2719 polarity fix at commit 403833e was on #2719's
own branch (director/r3-ci-layer-2-path-conditional-gating-scaffold) and
never propagated to main → never reached rebuild-scaffold branch's copy
of the #2719 brief brought in via main-merge.

Applied same §3 polarity rewrite on rebuild-scaffold branch for parity
with #2719 branch's content:
- run = (refs ∩ nodes) ≠ ∅ AND (dims ∩ changed_dims) ≠ ∅
- skip = ¬run = either intersection ∅
- Explicit naming of TWO fail-open patterns: (a) inversion (b)
  dimension-only collapse
- Bridge-tier proxy framing preserved

Cross-branch state now consistent:
- #2719 branch (director/r3-ci-layer-2-path-conditional-gating-scaffold)
  has canonical 2-step at lines 208 + 229 (via 403833e)
- #2725 branch (director/r3-ci-cold-v3-rebuild-coordinator-scaffold) has
  canonical 2-step at lines 208 + 229 (via 900d5a3 + this commit)

Both branches' copies of #2719 brief now structurally identical on
polarity semantics. Will fully reconcile at merge time if both PRs land
separately.

18th distinct review-class catch this polish cycle:
cross-branch-divergence-on-shared-doc — when two Director-scaffold PRs
both touch a shared brief (one via direct edit, one via main-merge),
fixes on one branch must explicitly propagate to the other branch OR
the shared content reconciles at merge time. Pattern: 'shared doc in
two PRs requires explicit cross-branch parity discipline'.

* docs(briefs): fix Phase 4 ratchet sweep residual ≤80 → dynamic (value − 20) per codex BLOCKING #9827

codex BLOCKING on #2725 review #9827 caught residual at line 92 (§4 Phase 4
ratchet sweep description) — still said 'back to ≤80' despite §3 acceptance
bullet's stale-baseline correction (which removed the ≤80 framing in favor
of dynamic '(value at activation) - 20').

Same partial-absorption-residual class as cursor's earlier catches:
fixing the §3 acceptance bullet correction didn't propagate to §4 Phase 4
description; sites referring to the same stale value need parallel updates.

Fix: Phase 4 description now uses dynamic '(value at activation) − 20'
(e.g., 64 at current state of 84) with explicit acknowledgment that 80
was itself stale debt + cross-link to feedback_pb_zero_is_r3_close_target
naming the long-run target = 0 exemptions.

21st distinct review-class catch this polish cycle:
phase-description-vs-acceptance-bullet-residual — when an acceptance
bullet gets a corrected target, the phase descriptions that motivate
phases toward that target need parallel updates. Pattern: 'when target
gets corrected, ENUMERATE all phase descriptions / decomposition / STOP
criteria that motivate work toward that target.'

* fix(#2725): cursor BLOCKING #9834 absorbed

Two findings addressed:

1. Line 76 copy-paste slip: "The Layer 2 PR-set is acceptable when:"
   in a cold-v3 rebuild brief. Changed to "The cold-v3 rebuild PR-set
   is acceptable when:" to match brief's actual scope. INVARIANTS.md
   P1 modeling faithfulness for dispatch authority.

2. Line 70 prose tightening: SG-0-neutrality framing previously
   conflated SG-0 census mechanism with exemption-list mechanism
   ("helper additions offset by exemption-row retirements +
   ratchet-down"). These are DIFFERENT bookkeeping: SG-0 counts
   hand-Rust files/lines per sg0_census_test.rs; exemption-row
   retirement only reduces slow-test-exemptions.txt count. Corrected
   prose: helper-LOC additions in common/* MUST be offset by EQUAL-
   or-greater LOC reductions in per-test files consuming the helper
   (shared fixture extraction → per-test setup boilerplate dropped).
   Exemption-row retirement + ratchet-down are independent
   obligations per constraint #2 and do NOT count toward SG-0
   census-delta.

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

* WIP: gunbc Director

* fix(#2725): openai-pro REQUEST_CHANGES — 2 BLOCKING findings absorbed

Finding 1 (P3 Fail-Closed): Layer 2 shared-infra regex anchored Cargo.toml/
Cargo.lock/build.rs to workspace-root only. Crate-local manifests (e.g.,
src/v3/compiler/build.rs per CODING.md:319) would NOT match, silently
skipping tests for crate-local manifest/build-script changes — fail-open
boundary class P3 forbids. Fixed by changing the anchored alternates to
use (.*/)?Cargo\.(toml|lock) and (.*/)?build\.rs — non-capturing optional
path prefix matches both root-level AND any-depth crate-local files.

Finding 2 (ratchet/test discipline): Cold-rebuild brief had execution-path
contradiction. §2#2 + §3 require same-PR lockstep ratchet-down. But §4
Phase 4 description said "drops TEST_TIMEOUT_MAX_EXEMPTIONS to (activation)
- 20", creating a fail-open path where workers could defer per-PR ratchet-
down to Phase 4 cleanup. Reframed Phase 4 as VERIFICATION + budget-tighten
(NOT decrement). Phase 4 verifies cumulative ratchet matches target +
drops cold-CI --timeout. If verification finds mismatch, escalate per §5
(per-PR discipline violation), do NOT silently patch.

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
…gs at HEAD (#2829)

* docs(r3): §3.1 emission interrogation — scope correction + GAP findings at HEAD

The §3.1 promise text was wrong: it claimed "R3 scope: Rust + Python + Go +
C + C++ (5 targets)" but per THESIS.md:180 L5 + WISHLIST.md:67-73 R4.A, C/C++
is R4-scope (operator ratification 2026-05-12). R3 scope is 3 Shape-A targets
(Rust/Python/Go). LLVM IR / assembly / machine code is R4.C scope.

Adds **Findings at HEAD (2026-05-13)** subsection with concrete state:
- Target substrate inventory: `src/v3/spec/{rust,python,go}.dag` confirmed
- L6 data-coverage: 41-row `emission_path_projections` in
  `src/v3/std/cross_target_coverage.dag` (Phase-1 carrier, Director-ratified
  2026-05-05)
- L4 runtime byte-identity at HEAD:
  - Rust: per-fixture unconditional tests in CI (m1_3_emit_rust_test.rs:995);
    full rustc roundtrip at #[ignore] (lines 735/764/1199/1218)
  - Python: roundtrips at #[ignore] (m1_4_emit_python_test.rs:1003,1070) —
    toolchain-gated, NOT in CI
  - Go: roundtrips at #[ignore] (m1_3_emit_go_test.rs:252,279,324) —
    toolchain-gated, NOT in CI
  - Omni demo: at #[ignore] (m1_5_emit_omni_demo_test.rs:124)
- L5 corpus gate #15 `l5_cross_target_consistency`: DECLARED, RED at HEAD
  (r3-program-plan.md:243 + :431)

Surfaces an **Open R3 question (PM-surfaced, not yet routed)**: the close-shape
divergence between (a) L6 data-coverage interpretation (✓ for all 3 targets)
and (b) L4 runtime byte-identity interpretation (✓ Rust-runtime in CI;
Python/Go toolchain-gated). THESIS.md:180 reads as runtime-shape ("same .dag
produces same behavior in Rust/Python/Go") but CI evidence is Rust-only-runtime
+ data-coverage-for-all-three.

Triggered by operator question 2026-05-13: "regarding language emission - how
do we know general purpose language emission works for all of our target
languages?" Director-busy + PM-owned doc → PM-tier fix-forward.

— sent from deep-wolf-155

* docs(r3): §3.1 emission — fix omni-demo wording (3-target not 5) + clarify L4 evidence is stdout-parity not byte-identity (cursor BLOCKING-shape APPROVE_WITH_COMMENTS on PR #2829)

Two fixes per cursor/composer-2 review on PR #2829:

1. **Omni-demo target count corrected** (cursor's primary finding):
   - Was: "Omni demo (5-target combined): at #[ignore] (m1_5_emit_omni_demo_test.rs:124)"
   - Now: distinguishes Rust-only-slice unconditional CI test
     (emit_omni_demo_rust_roundtrip at m1_5_emit_omni_demo_test.rs:106)
     from full 3-target #[ignore]'d receipt
     (emit_omni_demo_fixtures_green at :125, Rust + Python + Go)
   - The "(5-target combined)" parenthetical was an editorial slip from
     the prior wrong "5 targets" framing; cursor's read against
     check_omni_demo_fixtures_green in v3-compiler (3 toolchains:
     Rust + Go + Python) is correct per INVARIANTS P1.

2. **L4 terminology clarified** (cursor's exploratory finding):
   - Was: "L4 runtime byte-identity at HEAD" + "per-fixture unconditional
     byte-identity tests"
   - Now: "L4 runtime equivalence at HEAD (oracle-style stdout-parity:
     compiled emit-target binary stdout = expected fixture stdout; not
     literal artifact byte-equality)" + "per-fixture unconditional
     stdout-parity tests"
   - Per m1_3_emit_rust_test.rs:1000-1009 the rustc_roundtrip_* tests
     compare program stdout to fixture-expected stdout, not artifact
     byte-equality. Aligns with `feedback_byte_identity_internal_not_external`
     (byte-identity claims need internal-vs-external discrimination).

Also adds new finding: emit_omni_demo_rust_roundtrip (Rust-only slice over
omni fixture set) IS in CI unconditionally — previously omitted from the
inventory. Strengthens the (b) interpretation evidence-bar accordingly.

— sent from deep-wolf-155

* docs(r3): §3.1 emission — correct overstated L4 in-CI claim (operator BLOCKING on PR #2829 + INVARIANTS P1)

Operator briansrls flagged on `docs/r3-close-interrogation.md:166` that
"Rust stdout-parity tests run unconditionally in CI" overstates live
L4 evidence: `.github/workflows/ci.yml:478-501` HOT-FIX-SKIPS the
integration binary execution via `__HOT_FIX_NONEXISTENT_FILTER__`
(zero tests selected) since 2026-05-12 per gunbc#846 ("cut all demos
and integration tests for now, get v3 to 10 minutes"). Lane2d also
HOT-FIX-SKIPPED at `ci.yml:385`. INVARIANTS P1: Documentation
Describes Live State.

Should have grepped ci.yml first per
`feedback_audit_consumer_scripts_before_ci_skip` discipline (cursor
caught the symmetric class on PR #2724 → P0 fix PR #2726).

Fixes applied:

1. **New top-level bullet** "CI integration-binary execution state"
   prepended to L4 findings — cites ci.yml:478-501 restore-criteria
   verbatim and clarifies in-CI L4 evidence at HEAD is integration-
   binary-prebuild-passes + non-integration test surfaces (lib + bins
   + determinism_test + doc) only.

2. **Rust bullet** reworded: tests EXIST + unconditional in source,
   BUT live in HOT-FIX-filtered integration binary; execution at HEAD
   is local-only. Full-matrix `emit_rust_fixtures_rustc_green` still
   at `#[ignore]`.

3. **Omni-demo Rust slice** reworded similarly: unconditional in
   source, HOT-FIX-filtered in CI, local-only execution at HEAD.

4. **Interpretation (b)** in Open R3 Question reframed: distinguishes
   "runnable locally" from "actually-executed-in-CI"; adds (b3) gate-
   class promotion sub-option to add integration-harness-execution-
   state restore as a new §1.8 R3-close-anchored gate. Closes with
   accurate framing: "in-CI evidence is L6 data-coverage-for-all-three
   + integration-binary-prebuild-passes; runnable evidence is per-
   fixture Rust + (with toolchains) Python/Go locally."

Lesson logged separately — `feedback_audit_consumer_scripts_before_ci_skip`
applies to FINDING claims (not just CI-step modifications); the audit
must precede any "in CI" claim in docs.

— sent from deep-wolf-155
briansrls added a commit that referenced this pull request May 13, 2026
…emission story) per operator follow-up 2026-05-13

Operator framing 2026-05-13: "regarding bugs - what are some of the other
bugs that traditional compilers would have no chance of finding - i'm
thinking of subtle bugs between disparate modules" + "yes please - its
the class of bug i'm most interested in personally - and i think its a
good story regarding omni emission i.e. seeing bugs between javascript
and rust or something"

New §2.5.E with 3 enumeration tiers:

**Cross-module bug shapes** (within same emission target):
- Cross-module effect-leak through "pure" boundary (R3 anchor: #82)
- Cross-module cost-composition emergence (R3 anchor: #70 + #105)
- Cross-module dimensional drift / unit confusion (Time<MS> vs Time<NS>)
- Cross-module ordering / sequencing assumption
- Cross-module callback effect-set drift
- Cross-module aliasing / shadow definition (INVARIANTS P1)
- Cross-module data-flow capability leak (Secret<String>)

**Cross-emission-target bug shapes** (Rust ↔ JavaScript ↔ Python via
shared .dag substrate):
- Cross-target serialization round-trip (field-rename propagation)
- Cross-target numeric width (Rust u32 vs JS number 53-bit safe-int;
  R3 anchor: #18 numeric_width + Q-MachineConstraint-Carrier)
- Cross-target effect divergence (async semantics:
  tokio/Promise/asyncio)
- Cross-target boundary trust (Rust ↔ JS via FFI/WASM/HTTP)
- Cross-target test-claim transferability (R3 anchor: gate #15
  l5_cross_target_consistency)

**Falsification probes**:
- Run same fixture through 3 R3 targets; do outputs agree?
- Cross-language wire scenario (Rust client + JS server from same
  .dag); verify field-rename / type-marshaling / async-cancellation
- Modeling-level cross-target gap (target-specific bug classes
  without substrate representation; "model the missing dimension"
  vs "target-specific gap in extdeps lane")

Plus PM-derived "cross-module / cross-target story" pitch shape:
- Traditional compilers have ZERO visibility (modules linked via
  symbol tables; emission targets are independent compilers; wire
  schemas are external authority files)
- gunbc: substrate-shared / emission-as-projection — module
  boundaries are naming partitions not semantic firewalls; emission
  targets are projections of same Node tree; cross-target
  structural facts flow forward; wire schemas derived FROM substrate

R3 close audit recommendation: demonstrate ONE end-to-end cross-
target scenario (e.g., Rust server + JS client from same .dag with
field-rename propagation + L5 stdout-parity). Closest existing
anchor: gate #28 omni_layers_share_one_node_tree + #15 l5_cross_
target_consistency. Cross-language wire demo would cash the story
viscerally.

— sent from deep-wolf-155
briansrls added a commit that referenced this pull request May 13, 2026
… per operator directive (#2839)

* docs(r3): §2.5 — Impossible bugs by construction (META-promise) interrogation per operator directive 2026-05-13

Operator asked: "regarding the interrogation questions - i have a lot of
questions on impossible bugs - what does it mean that bugs in this
language are impossible - by construction? how can you avoid glue bugs?
what about user error - what about, emergent behavior you didn't intend
for?"

This is a META-promise that ties §1 (dimension promises) + §2.1-§2.4
(substrate promises) together. The claim is sharp on some classes
and softer on others; interrogation needed for honest R3 close.

New §2.5 section with 4 probe sub-areas matching operator's asks:

- **§2.5.A "What 'impossible' actually means"** — probes the
  definitional meaning. Discriminates "(a) impossible to express in
  surface vocabulary" from "(b) caught at compile time by lens";
  asks about compiler-correctness gating; falsification via
  historical "impossible" bug instances.

- **§2.5.B Glue bugs** — 5 glue layers enumerated (substrate→emit
  target, emitter→runtime, lens composition, bootstrap, ExecuteCommand
  PB-Runtime boundary). Each probed for structural enforcement vs.
  convention/comment/runtime-assertion. Falsification: identify glue
  boundaries with NO structural enforcement at HEAD.

- **§2.5.C User error** — intent vs. spec divergence; wrong-contract
  acceptance; empty-program semantics; spec-as-program collapse
  implication. Falsification: enumerate 3 user-error classes the
  architecture can NEVER catch by construction.

- **§2.5.D Emergent behavior** — lens-composition / scale-only /
  time-evolving / lens-set silent-gap probes. Falsification:
  construct a `.dag` program where 4 lens claims pass + program is
  observably wrong; ask whether response is "model the missing
  dimension" or "user error is out-of-scope".

Plus PM-derived "architectural honest answer" naming SHARP vs.
LESS-SHARP claim domains, and recommended R3 close framing:
- Closed-set bug-class impossibility (modeled set enumerated)
- Reduction-to-glue-boundary (glue probes defined)
- User-intent out-of-scope acknowledged
- Emergent-behavior probes as PM-curated R3-close evidence
- Anti-pattern: "all lenses green = bug-free" is silent universal claim

— sent from deep-wolf-155

* docs(r3): §2.5 META — fix INVARIANTS P-citation (P5 → P4 Decidability) per cursor APPROVE_WITH_COMMENTS on PR #2839

cursor flagged that the §2.5 META Promise line cited "INVARIANTS P5
atomic-migration" as authority for "impossible by construction", but:

- INVARIANTS P5 is titled "Progress Is Dissolution" (scaffolds,
  bridges, dissolution progress) — NOT the natural home-of-record
  for the closed-system / impossible-bug-class thesis claim.
- INVARIANTS P4 is "Decidability": "Every accepted program stays
  within a closed, fail-closed system whose correctness questions
  are structurally decidable." THIS is the natural structural
  anchor for the impossible-by-construction META-claim.

Verified by reading INVARIANTS.md:247-261 — P4 explicitly carries
the closed-fail-closed-decidable semantic commitment that makes
bug-class-impossibility a structural property rather than a
case-by-case enforcement.

Fixed Promise line:
- Removed: "INVARIANTS P5 atomic-migration"
- Added: "INVARIANTS P4 Decidability" with verbatim cite + P3
  Fail-Closed as supporting authority
- Added explicit anchor sentence: "The structural anchor is P4
  Decidability: closed-system + structurally-decidable-correctness-
  questions are precisely what makes the bug-class-impossibility
  claim cash structurally rather than rest on case-by-case
  enforcement."

cursor verdict was APPROVE_WITH_COMMENTS — finding was authority-
citation precision, not content rejection. The content of §2.5
(4 probe sub-areas + architectural honest answer + recommended R3
close framing) is unchanged + cursor-approved.

— sent from deep-wolf-155

* docs(r3): §2.5.A — defer impossible-bug class enumeration to THESIS authority (operator BLOCKING on PR #2839:154)

Operator briansrls flagged at `docs/r3-close-interrogation.md:154` that
the §2.5.A probe hard-coded "5" candidate impossible-bug classes
(annotation-rot / escape-hatch-leak / complexity-contract-violation /
effect-leak-across-pure-boundary / second-source-of-truth) that
DO NOT MATCH THESIS.md's Enumerable impossible-bug classes or
ROADMAP T-Demo's R1/R2+ split — so the close audit could verify the
wrong promise set.

Canonical authority verified at HEAD:

- **THESIS.md:370-413** "Enumerable impossible-bug classes":
  - **[R1]** Suboptimal-complexity contract violation
  - **[R1]** Idempotency-contract violation
  - **[R1]** Transport/type drift
  - **[R2+]** Nested-optional flatten
  - **[R2+]** Unenumerated effects (Tier 1 impossible-by-construction
    per §Q5.5 OperationEffect-taxonomy retirement)
  - **[R2+]** Unhandled diagnostic paths
- **ROADMAP.md:35** "Impossible-bugs demo suite. Enumerated bug classes
  with compile-time proofs (see THESIS Enumerable impossible-bug
  classes). Lane T-Demo."
- **ROADMAP.md:93** T-Demo R1 scope:
  `impossible_bug_class_suite_r1` — idempotency-violation
  (compose_effects + breaking AppendEffect under IsIdempotent →
  ResolveError) + transport/type-drift (TypeMismatch). Remaining
  three are tagged [R2+].

Fix replaces hard-coded "5 candidates" with deferral to THESIS
authority + R1/R2+ split per ROADMAP T-Demo. Includes explicit
audit discipline:
- For [R1] classes: cite substrate fact + demo fixture per ROADMAP
  T-Demo
- For [R2+] classes: confirm R4-DEFERRED disposition with operator-
  recorded acceptance per §0 vocabulary
- Anti-pattern called out: hard-coding a candidate list at audit-
  author time rather than deferring to THESIS authority is a
  `feedback_thesis_gate_state_drift`-class miss

cursor APPROVE_WITH_COMMENTS verdict from prior review unaffected
(content of §2.5.A is improved, not contradicted).

— sent from deep-wolf-155

* docs(r3): §2.5.E — cross-module + cross-target subtle bugs (the omni-emission story) per operator follow-up 2026-05-13

Operator framing 2026-05-13: "regarding bugs - what are some of the other
bugs that traditional compilers would have no chance of finding - i'm
thinking of subtle bugs between disparate modules" + "yes please - its
the class of bug i'm most interested in personally - and i think its a
good story regarding omni emission i.e. seeing bugs between javascript
and rust or something"

New §2.5.E with 3 enumeration tiers:

**Cross-module bug shapes** (within same emission target):
- Cross-module effect-leak through "pure" boundary (R3 anchor: #82)
- Cross-module cost-composition emergence (R3 anchor: #70 + #105)
- Cross-module dimensional drift / unit confusion (Time<MS> vs Time<NS>)
- Cross-module ordering / sequencing assumption
- Cross-module callback effect-set drift
- Cross-module aliasing / shadow definition (INVARIANTS P1)
- Cross-module data-flow capability leak (Secret<String>)

**Cross-emission-target bug shapes** (Rust ↔ JavaScript ↔ Python via
shared .dag substrate):
- Cross-target serialization round-trip (field-rename propagation)
- Cross-target numeric width (Rust u32 vs JS number 53-bit safe-int;
  R3 anchor: #18 numeric_width + Q-MachineConstraint-Carrier)
- Cross-target effect divergence (async semantics:
  tokio/Promise/asyncio)
- Cross-target boundary trust (Rust ↔ JS via FFI/WASM/HTTP)
- Cross-target test-claim transferability (R3 anchor: gate #15
  l5_cross_target_consistency)

**Falsification probes**:
- Run same fixture through 3 R3 targets; do outputs agree?
- Cross-language wire scenario (Rust client + JS server from same
  .dag); verify field-rename / type-marshaling / async-cancellation
- Modeling-level cross-target gap (target-specific bug classes
  without substrate representation; "model the missing dimension"
  vs "target-specific gap in extdeps lane")

Plus PM-derived "cross-module / cross-target story" pitch shape:
- Traditional compilers have ZERO visibility (modules linked via
  symbol tables; emission targets are independent compilers; wire
  schemas are external authority files)
- gunbc: substrate-shared / emission-as-projection — module
  boundaries are naming partitions not semantic firewalls; emission
  targets are projections of same Node tree; cross-target
  structural facts flow forward; wire schemas derived FROM substrate

R3 close audit recommendation: demonstrate ONE end-to-end cross-
target scenario (e.g., Rust server + JS client from same .dag with
field-rename propagation + L5 stdout-parity). Closest existing
anchor: gate #28 omni_layers_share_one_node_tree + #15 l5_cross_
target_consistency. Cross-language wire demo would cash the story
viscerally.

— sent from deep-wolf-155
briansrls added a commit that referenced this pull request May 13, 2026
…ncing (DRAFT) (#3013)

* docs(r3): R3 actual-close plan — 10 adversarial gaps with disposition + dispatch sequencing (DRAFT pending Director + operator ratification)

Operator directive 2026-05-13 verbatim: "can we start on the planning docs to get to ACTUAL r3 close? like all of our adversarial questions answered positively? i feel like the planning for this stuff has been continuously dropped".

PM-authored planning doc replacing "viz-as-SoT closed_at + DECLARED-strings-are-drift" framing with explicit per-gap disposition for the 10 substantive counterfactuals surfaced by today's adversarial audit:

1. PB-0 zero hand-Rust (177+ entries in EXPECTED_HAND_AUTHORED_NON_TEST; gate #8 DECLARED)
2. L5 cross-target consistency (gate #15 DECLARED; no Python/Go executable emission on main)
3. Self-host fixed point R3-strong (gate #16 R1-horizon only; 4 joint preconditions deferred)
4. Lens behavioral parity (3 of 4 lenses NOT behaviorally complete; gates #79/#81/#82/#83)
5. Tests-as-data completeness (gate #84 Cluster M Phase 3 bulk-port pending; load-bearing-blocking)
6. v2 retirement terminal (gate #97 coherence-only; src/v2/ exists at HEAD)
7. T-WAD FULL R3 (gates #98-#103 all DECLARED; ci.yml still hand-edited)
8. Bootstrap-seed Rust survivors (folded into Gap 1)
9. Show-the-correct-code (no §1.8 gate exists for THESIS:103-105)
10. Close-audit doc absent (interrogation §8 self-check has no execution log on main)

For each gap: promise verbatim + HEAD evidence + what's missing + plan to cash (owner, sub-program, effort estimate) + close criterion predicate.

§2 dispatch sequencing: 6 phases A-F mapped to Substrate Mgr / Verification Mgr / Debt-Paydown Mgr / Director-tier coordination / PM-direct.

§3 total time-to-actual-close: 8-12 weeks optimistic; 12-20 realistic; 6+ months if PB-0 retirement is the longest tail and can't parallelize aggressively.

§4 operator decision points: 4 binary IN-R3 / R4-defer choices that determine actual R3 scope (PB-0, L5 cross-target, self-host R3-strong, show-correct-code).

§5 process discipline (preventing future drop): single authoritative plan doc, weekly PM closure-cadence message, per-gap closure-PR template, Gap 10 (close-audit doc) authored FIRST as receipt mechanism.

Authority:
- Operator directive 2026-05-13 (planning request)
- Today's adversarial audit findings (counterfactual evidence against viz-as-SoT closure claim)
- THESIS.md promise enumeration + r3-close-interrogation.md §-by-§ adversarial structure
- §1.8 closure-authority ledger gate state at HEAD

Status: DRAFT pending Director ratification + operator scope-decision approval before dispatch.

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

* docs(r3): Gap 4 — cite closed PR #2860 as content-source for parallelism cementing-receipt re-launch (Director msg_b3324a05 flag)

Director (msg_b3324a05) flagged PR #2860 (G87-C parallelism cementing receipt + ratchet repair, closed 2026-05-13T16:45:44Z under operator cleanup directive) as load-bearing for counterfactual #4 / Gap 4 parallelism behavioral parity. The PR content is retrievable via `gh pr view 2860 --json body` so the Gap 4 cementing-receipt re-launch doesn't author from scratch.

Adds PR #2860 reference to Gap 4 sub-program as step 2 (between F-α and F-β.1), with concrete artifact paths + dissolution-trigger naming + relationship-to-F-α clarification (cementing-receipt is gate-#87 ratchet-discipline level, distinct from F-α Stage 2e walker port which is substrate work).

Both are required for full Gap 4 closure. Cementing-receipt re-launch is cheaper (PR #2860 substance ready); F-α walker port is the larger substrate scope.

Authority:
- Director msg_b3324a05 flag (2026-05-13)
- PR #2860 substance per gh API retrieval
- §1.8 row #87 lens_cementing_test_discipline_complete (CONSUMER_LANDED + PASSING; ratchet fires on inventory mismatch)

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

* docs(r3): integrate Director msg_cd2d8d7d 8 substantive feedback items into close plan

Director (zesty-bear-812) ratified PR #3013 structure + dispatch sequencing + §5 process discipline. 8 substantive items applied:

1. **§4 R4-carve framing collision** — Per `project_no_r4_carves_directive` (Brian 2026-05-08), R4-carve is NOT freely available as default. §4 reframed: 4 decisions default to IN-R3; explicit override required with stated structural-unblockable reason. §5 process-discipline note added.

2. **Gap 3 R2-Evaluator audit** — Director-tier deliverable picked up by zesty-bear-812 (this week per msg_cd2d8d7d). §6 deliverables list tracks.

3. **Gap 4 sequential cadence as Mgr-bandwidth lever** — Effort estimate split: single-Mgr sequential 4-8wk vs parallelized-via-2nd-Substrate-Mgr ~2-4wk. Surfaced as tightening lever, not foreclosed.

4. **Gap 5 close-criterion header-marker filter** — Predicate amended to `xargs grep -L "// AUTO-GENERATED FROM .dag" | wc -l == 0` so generated-from-.dag tests are filterable. Substrate prereq: code-gen emits header line; if not present at HEAD, lands in Gap 5 Phase 3 ratchet.

5. **Gap 6 transitive-dependency depth** — Explicit 5+ deep chain call-out: Gap 6 ← Gap 3 ← {Gap 1, R2-Evaluator, R2-Grounding, Row-B}. Gap 6 framed as close-ceremony terminal gate (last 2 weeks of R3 close).

6. **Gap 9 threshold = operator decision** — ≥80% pragmatic relaxation is operator-decision-shaped, not Director-decision. §4 now surfaces (a) IN-R3 vs not-R3-promised choice + (b) if IN-R3, threshold = 100% (THESIS-correct) or ≥X% pragmatic with named-residual list. Per `project_no_r4_carves_directive`, the not-R3-promised reframe is structurally an R4-carve requiring operator override.

7. **Gap 10 timeline calibrated** — Skeleton 1-2 days (PM-direct, unblocked, immediate); execution 1-2 weeks (Verification Mgr serial) or 3-5 days (ctrl-build parallel). Overall ~1-2 weeks for full landing.

8. **Phase F bookkeeping downstream of close-audit-doc verdict** — §2 Phase F reworded: §1.8 manifest strings sync to close-audit-doc predicate-execution outcome (View-4-authoritative per `feedback_r3_close_three_views_drift`), NOT to procedural `closed_at` markers. Sequencing: close-audit-doc lands first; bookkeeping PR consumes that doc as authority. Avoids procedural-closure trap.

§6 pending-decisions list updated:
- Director ratification: checked ✓
- Operator §4 confirmations: 4 sub-items per gap
- Director-tier deliverables in-flight per msg_cd2d8d7d (4 items)
- Operator Phase A authorization

Authority:
- Director ratification msg_cd2d8d7d (2026-05-13) — substance verdict + 8 feedback items
- `project_no_r4_carves_directive` (Brian 2026-05-08, 5d-old memory but still presumptively in force; surfaced for operator confirmation)
- `feedback_r3_close_three_views_drift` View 4 authoritative (Director memory update post-msg_b3324a05)

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

* docs(r3): claude review 11247 exploratory observations integrated (PM recs explicit per gap + Gap 9 canvas-promotion note + §3 velocity-citation discipline)

3 non-blocking exploratory observations from claude APPROVE review on PR #3013 sha a4d1608 at 2026-05-13T18:03:26Z:

1. **§4 PM-recommendation explicitness across all 4 gaps** — previously only Gap 1 stated "do not defer." Added explicit PM-recommended IN-R3 + reasoning for Gaps 2/3/9 with each R4-carve's specific dilution impact (omni-emission falsifier loss, self-host thesis dilution, THESIS:103-105 absolute promise drop). §4 preamble now states cross-gap PM view + per-gap recommendation.

2. **Gap 9 substrate-shape canvas-promotion** — `correction: Option<Witness>` field commitment is buried in planning-doc prose; promoted to Substrate-Mgr-canvas-before-worker-dispatch step. Canvas authoring + Director ratification gates worker dispatch.

3. **§3 velocity-citation discipline** — most estimates were unsourced beyond Gap 1's `feedback_pre_authored_brief_queue` reference. Added explicit caveat: Gaps 2/3/5/6/7/9 are PM-prior-cycle-experience-based; final ratified version cites per-gap velocity reference + first weekly closure-cadence message calibrates against actual landing-date data.

Authority:
- claude APPROVE review 11247 on PR #3013 sha a4d1608 at 2026-05-13T18:03:26Z
- All 3 observations non-blocking; addressing pre-operator-review for cleaner ratification

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

* docs(r3-close): retract Gap 5 boundary carve-out + Gap 9 pragmatic-relaxation per codex BLOCKING PR #3013

Two substantive close-criteria fixes per codex BLOCKING 2026-05-13T18:19:56Z:

**Finding 1 — Gap 5 boundary carve-out violates 0-residual** (TESTING.md L212-217 +
docs/design-pure-bootstrap-zero.md:41,138):
- Removed `-not -path "*/boundary/*"` from gate #84 close predicate
- Added authority citation: TESTING.md "🔄 RETRACTED 2026-04-25" + 0-floor target
- Boundary tests ARE counted; migrate to ExecuteCommand-based .dag TestClaim per cascade

**Finding 2 — Gap 9 pragmatic-relaxation dilutes THESIS absolute** (THESIS.md
"show the correct code" reads as absolute promise):
- Removed "Pragmatic relaxation (≥X%)" alternative from Gap 9 close criterion
- Removed §4 operator sub-decision (b) threshold negotiation
- Close criterion is 100% absolute; non-100% requires R4-carve override of
  project_no_r4_carves_directive (NOT within-R3 threshold negotiation)

**Additional: Phase F adversarial re-pass discipline** (operator directive
2026-05-13 — final closeout will be adversarial analysis):
- Phase F now explicitly includes operator+PM adversarial re-pass against
  interrogation doc + close plan + §1.8 row statuses
- Bookkeeping PR sequencing updated: depends on adversarial-re-pass verdict,
  not just predicate execution outcome
- Symmetric to 2026-05-13 adversarial sweep that surfaced 10 counterfactuals;
  applied at close ceremony to confirm none survived

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

* docs(r3-close): retract fabricated Tier-2 R4-deferral authority per briansrls BLOCKING PR #3013

briansrls BLOCKING 2026-05-13T18:22:57Z at docs/r3-actual-close-plan.md:48:

> "The PB-0 alternative disposition cites design-pure-bootstrap-zero.md as
> allowing Tier-2 R4 deferral for grounding submodules, but that authority
> sets a 0 hand-authored in-tree Rust floor, so this creates an unauthorized
> escape hatch against the Pure Bootstrap target."

**Verified**: grep -nE "tier[- ]2|grounding|R4|defer|carve" against
docs/design-pure-bootstrap-zero.md returns ONLY one hit (L131: historical
TESTING.md carve-out which the doc explicitly retracts under 0-floor target).
Zero references to "Tier-2", "grounding submodules deferred", or any
R4-deferral carve-out mechanism. The "Tier-2 R4-deferred per
design-pure-bootstrap-zero.md" citation in Gap 1 alternative-disposition was
fabricated authority — an unauthorized escape hatch against the absolute
0-floor target.

**Fix**:
- Removed the fabricated citation
- Explicit statement: PB-0 design doc admits no internal escape hatch
- R4-carve of PB-0 subsets requires explicit operator override of
  project_no_r4_carves_directive (2026-05-08), naming specific subset +
  structural-unblockable reason — not citation of an unauthorized escape
- PM-recommendation preserved (do NOT R4-defer; standing directive applies)

Symmetric to the Gap 9 pragmatic-relaxation fix at commit 870f6ce — both
findings reflect the same anti-pattern of converting absolute thesis claims
into negotiable thresholds via fabricated/imputed authority.

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

* docs(r3-close): replace textual AUTO-GENERATED marker with structural EXPECTED_HAND_AUTHORED_TEST list-emptied predicate per briansrls BLOCKING PR #3013

briansrls BLOCKING 2026-05-13T18:22:57Z at docs/r3-actual-close-plan.md:183:

> "The gate #84 close predicate uses the `// AUTO-GENERATED FROM .dag`
> comment as the authority for generated tests, which can pass with
> hand-authored Rust carrying the marker and does not prove the THESIS
> tests-as-data claim."

**Verified**: this is exactly the feedback_no_textual_enforcement_bridges
anti-pattern — "never propose grep/regex as interim enforcement; text-gating
'be structural' defeats itself." A textual comment is gameable; a developer
could add `// AUTO-GENERATED FROM .dag` to a hand-authored file to bypass
the ratchet. The THESIS claim ("every Rust test ports to .dag or is
generated") is structural and requires a structural predicate.

**Fix**: replaced the textual-marker predicate with the structural
EXPECTED_HAND_AUTHORED_TEST list-emptied authority — the same ratchet Gap 1
uses for EXPECTED_HAND_AUTHORED_NON_TEST. Every hand-authored test entry
must be named on the list (PR-template enforcement); migrations remove
entries; close fires when list empties. The list discriminates structurally,
not textually.

Preserved the no-boundary-carve-out authority citations (separate codex
BLOCKING) — boundary entries are named on EXPECTED_HAND_AUTHORED_TEST and
dissolve through migration like any other entry, no separate carve-out.

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

* docs(r3-close): retract Option<Witness> shape per briansrls BLOCKING PR #3013 — Practice-2 carrier refinement

briansrls BLOCKING 2026-05-13T18:22:57Z at docs/r3-actual-close-plan.md:277:

> "The proposed correction: Option<Witness> shape leaves 'diagnostic
> without correction' representable even though the THESIS-correct path
> requires diagnostics to point to the structurally correct program."

**Verified** against three converging memory authorities:
- feedback_state_space_vs_behavioral_invariants — "check if the type admits
  illegal state combinations; type enforcement > API enforcement"
- feedback_optional_models_recovery_as_exception — "T? where absence is the
  norm conceals plurality"
- feedback_practice_2_vs_4_same_variant_vs_cross_variant — Practice-2 carrier
  refinement when the redundant/illegal state crosses variant boundaries

Option<Witness> admits None which structurally represents "diagnostic without
correction" — exactly the state THESIS.md "show the correct code" forbids
absolutely. The type itself admits the illegal state; behavioral checks
("did this fired diagnostic produce a correction?") are API-tier enforcement
that the carrier-tier should subsume.

**Fix**: substrate-shape constraint added to Gap 9 sub-program step 4: canvas
authors MUST commit `correction: Witness` (non-optional) — Practice-2 carrier
refinement makes diagnostic-without-correction unrepresentable by construction.
Anti-pattern symmetric to Gap 9 pragmatic-relaxation fix at 870f6ce (both
findings convert absolute THESIS claim into expressible-but-forbidden state).

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

* docs(r3-close): address 3 codex BLOCKING + 1 non-blocking on PR #3013

codex BLOCKING 2026-05-13T18:22:57Z (sha f05359f) — 3 root-causes + 1 improvement:

**B1 — Tier-2 feature-deferral example removed entirely** (Gap 1 alternative-disposition):
Prior fix at a973064 retained the fabricated example in retraction-framing.
Codex stronger ask: "remove the example OR require operator-approved amendment
to PB-zero authority". Reframed: no Tier-2 example survives this section; any
R4-carve requires BOTH (1) override of project_no_r4_carves_directive AND
(2) amendment to docs/design-pure-bootstrap-zero.md authority text adding a
per-subset deferral carrier. Neither alone is sufficient.

**B2 — Generator-manifest positive structural authority** (Gap 5 close criterion):
Prior fix at 29684a0 gave negative authority (list-emptied) but codex asks
positive form. Added dual predicate: (a) EXPECTED_HAND_AUTHORED_TEST = empty
[negative] + (b) generator-manifest maps each surviving test → its .dag source
+ regeneration-byte-equality fail-close on drift [positive]. Catches orphan
generated files that negative form alone misses. Substrate prereq: manifest
carrier authored as Cluster M Phase 3 expansion.

**B3 — Deferral carrier with named reason** (Gap 9 substrate-shape):
Prior fix at 5872dae had correction: Witness covering only the 100% path.
Codex asks separation of absolute-thesis vs pragmatic-residual into named
carrier variants. Reshaped to sum Correction = LiveCorrection { witness } |
DeferredCorrection { reason, retirement_plan }. Diagnostic.correction is
mandatory Correction (not Option). Residual is structurally named with
retirement-plan accountability; gate #84/#106 close requires every
DeferredCorrection ratchetable to zero per its own retirement plan.

**NB1 — Ledger-derived row-count** (Gap 10 close criterion):
Hard-coded "ALL 105 rows" rotted as soon as Gap 9 proposed row #106. Per
feedback_no_snapshot_integers_in_briefs: derive count from §1.8 ledger at
execution time via grep enumeration; Gap 9 row #106 + subsequent additions
automatically included.

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

* docs(r3-close): close §6/§4 INVARIANTS P2 violation + footer drift per cursor APPROVE_WITH_COMMENTS PR #3013

cursor/composer-2 APPROVE_WITH_COMMENTS 2026-05-13T18:35:17Z:

**Finding 1 — INVARIANTS P2 violation (§6 vs §4 duplicate Gap 9 authority)**:
§6 operator checklist still offered "ratify threshold = 100% (THESIS-correct) OR
≥X% (pragmatic, X TBD); (b) override with not-R3-promised reframe" — exactly the
within-R3 threshold negotiation that §4 retracted in the prior fix at 870f6ce.
Two "authoritative" asks for the same Gap 9 decision = INVARIANTS P2 single-place-
for-the-fact violation.

**Fix**: rewrote §6 Gap 9 bullet to match §4 — single binary decision (IN-R3 at
100% absolute OR R4-carve via explicit operator override of
project_no_r4_carves_directive). No threshold negotiation; no sub-decision (b)
since §4 removed it. §4 is now the single authority for the Gap 9 disposition.

**Finding 2 (exploratory) — §6 vs footer drift**:
§6 line 453 marks "Director ratifies this plan structure — APPROVED 2026-05-13"
✓ but footer at line 471 still said "DRAFT pending Director ratification +
operator scope approval". Director already ratified structure per msg_cd2d8d7d;
only operator scope approval is pending.

**Fix**: tightened footer to "Director structure-ratified 2026-05-13; DRAFT
pending operator scope approval (§4 IN-R3 confirmations + Phase A dispatch
authorization)" — preserves the actual gating state without contradicting §6
checklist.

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

* docs(r3-close): align Gap 9 close criterion to sum-variant Correction carrier per codex BLOCKING #11273 PR #3013

Prior fix at 9d763dd ratified `sum Correction { LiveCorrection | DeferredCorrection }` substrate-shape canvas (Practice-2 carrier refinement: nullable `Option<Witness>` admits illegal "diagnostic without correction" state). But the close criterion still read `correction: Witness` + `Some(_)` — the retracted Option shape it was meant to replace. P2 single-authority violation: two incompatible carrier shapes for the same Diagnostic.correction field in adjacent text.

Rewrote close criterion as:
- Structural (compiler-enforced): every Diagnostic carries mandatory `correction: Correction` field (sum-variant, no Option-wrapping)
- Variant-tally (zero-DeferredCorrection): every fired Diagnostic in test corpus is LiveCorrection variant; count of DeferredCorrection = 0
- Substrate ratchet: every DeferredCorrection entry ratchetable to zero per its own retirement_plan field

Preserved both retraction citations (codex BLOCKING #11254 pragmatic-relaxation + briansrls Option<Witness>) as audit trail. Close criterion now matches the canvas substrate-shape commitment by construction.

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

* docs(r3-close): absorb Director R2-Evaluator audit msg_82b9c4bb — Gap 3 expansion + §4 sub-item 5 (Mgr dispatch) + r3-program-plan thesis-state drift reframe

Director-tier R2-Evaluator audit (PR #3013 Gap 3 precondition deliverable from msg_cd2d8d7d) surfaced 3 structural findings:

(a) R2 closed-with-residuals 2026-04-29 16:34Z (#1275; ROADMAP.md:512) with 5 sub-lanes carried as r3-continuation: runtime_value_model_structural (in-flight #1197/#1228/#1231), body_evaluator_structural (not-started), lens_application_complete_reflection (in-flight #1191), witness_construction_structural (not-started), cross_target_equivalence_harness_structural (not-started). Closure-ledger row stale @ #1191-#1231 era (HEAD is #3013+).

(b) R3 Evaluator Mgr merry-gull-128 (#1743) ABSENT from current subtree at HEAD. Authority dispersed across 3 R3 Mgrs without single owner — r2-structure.md:73 anti-pattern reincarnation under R3-tier-slice procedural wrapper.

(c) Brief surface comprehensive (r2-evaluator-manager.md + 4 sub-briefs + 10+ PR-A-E + R3-tier per-slice briefs); not the gap.

(d) Director recommends re-spawn evaluator Mgr as 4th R3 Mgr lane.

PM execution (bundled per feedback_bundle_workstreams_per_pr):

1. r3-actual-close-plan.md Gap 3 expansion: cite all 5 sub-lanes explicitly; reframe R2-Evaluator HEAD evidence from "landed" to "closed-with-residuals with 5 sub-lane debt"; note merry-gull-128 absence; close-criterion now requires (i) 5 sub-lanes ratchet-to-PASSING OR per-sub-lane R4-carve carrier with named retirement plan (substrate-shape symmetry with Gap 9 DeferredCorrection discipline), AND (ii) §4 sub-item 5 Mgr-dispatch disposition ratified.

2. r3-actual-close-plan.md §4 sub-item 5 (subtree-shape decision): R3 Evaluator Mgr dispatch with 3 operator sub-options — (a) re-spawn 4th lane PM+Director recommended, (b) fold into existing R3 Mgrs with named risk, (c) Director-direct ad-hoc PM-does-not-recommend per r2-structure.md:73 retraction. §6 checklist updated to track.

3. r3-program-plan.md lines 429/435 reframe: strike "R2-Evaluator (interpreter-as-data; LANDED)" / "R2-Evaluator landed" → "R2-Evaluator closed-with-residuals 2026-04-29 16:34Z per ROADMAP.md:512 — sub-lane completion partial via R3-tier slices, see Gap 3 in r3-actual-close-plan.md". Catches feedback_thesis_gate_state_drift class.

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

* docs(r3-close): split Gap 3 close criterion from dispatch staffing prereq + use r2-closure-ledger authority for sub-lanes per Director notes msg_f0a54769 PR #3013

Director note msg_f0a54769 surfaced 3 substantive shape issues on the 85c230b Director-audit absorption:

Note 1 (sub-lane name authority): the 5 R2-Evaluator sub-lane names (runtime_value_model_structural / body_evaluator_structural / lens_application_complete_reflection / witness_construction_structural / cross_target_equivalence_harness_structural) live in `docs/r2-closure-ledger.md:250-263`, NOT as §1.8 row IDs in `docs/r3-program-plan.md`. Prior draft conflated authorities ("PASSING in §1.8" mismatches the actual artifact). PM-selected path (α): use sub-lane names as predicate authority per `feedback_parallel_representation_debt` — don't introduce 5 new §1.8 rows for already-named ledger content. Predicate is cell-level check of `docs/r2-closure-ledger.md` (each sub-lane row status=green at HEAD); closure-ledger row stale @ #1191-#1231 era requires refresh first.

Note 2 (staffing-as-criterion vs precondition): staffing/dispatch shape is a PRECONDITION for execution, not a close criterion for the substrate-debt itself. If a Mgr exists but doesn't close the 5 sub-lanes, Gap 3 isn't closed; if alternative dispatch (fold/ad-hoc) closes them, Gap 3 IS closed. Moved "(ii) R3 Evaluator Mgr lane owner identified" from close criterion to new "Dispatch staffing prereq" section. Close criterion now purely substrate-debt-shaped.

Note 3 (sequencing): re-spawn AFTER operator §4 sub-item 5 ratification, NOT before. Sequence explicit in Dispatch staffing prereq section per `feedback_construction_over_ratchets` adjacent class — don't author the Mgr until the operator-decision substrate cashes.

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

* docs(r3-close): operator-ratification recorded — all 4 IN-R3 + §4 sub-item 5 re-spawn (a) + Phase A authorized PR #3013

Operator (briansrls) ratification 2026-05-13 via direct PM dispatch:

- Items 1-4 (R3 scope decisions): ALL IN-R3 confirmed per project_no_r4_carves_directive default. No R4-carves.
  - Gap 1 (PB-0): full 177-entry retirement
  - Gap 2 (L5 cross-target): full 3-target Python+Go
  - Gap 3 (self-host R3-strong): 4-joint-precondition cascade
  - Gap 9 (show-correct-code): 100% absolute (zero DeferredCorrection per sum-variant carrier)

- Item 5 (R3 Evaluator Mgr dispatch subtree-shape decision): (a) re-spawn as 4th R3 Mgr lane confirmed. Director (zesty-bear-812) executes per pre-authorization at msg_d456b60d.

- Phase A immediate dispatch authorized (implicit in ratification). Close-audit doc skeleton + §1.8 row #106 authoring proceeds PM-direct post-merge.

§6 checklist updated: all operator-decision boxes checked. Director-tier deliverable R2-Evaluator audit also marked complete (msg_82b9c4bb 2026-05-13; absorbed at 85c230b + 97cfb9d). Footer status updated from "DRAFT pending operator scope approval" to "operator fully ratified 2026-05-13; READY FOR DISPATCH post-merge".

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

* docs(r3-close): absorb codex BLOCKING #11284 + reframe alternative-disposition class per operator §4 ratification PR #3013

Codex BLOCKING #11284 (2 findings on 97cfb9d):

F1 — `docs/r3-actual-close-plan.md:11` closure target generically allowed any adversarial gap to be "explicitly R4-deferred", semantically reintroducing a carve-out path the design-pure-bootstrap-zero.md + r3-program-plan.md authorities explicitly forbid. PM-intent dilution.

F2 — `docs/r3-actual-close-plan.md:89` Gap 2 alternative-disposition authored Rust-only-Shape-A scope-narrow as an explicit fallback, semantically weakening the §3.1 3-target promise without prior authority reconciliation.

Both findings are an instance of a broader class: alternative-disposition language across §0 + Gaps 1/2/3/9 was authored pre-ratification when operator hadn't yet foreclosed those paths. Post-operator-§4 ratification 2026-05-13 (ALL IN-R3, no R4-carves), they are stale-against-ratification.

Consistent reframe applied to all 4 alternative-disposition instances:
- Line 11 (§0 closure target): R4-defer / THESIS-reframe paths STRUCTURALLY FORECLOSED per operator §4 IN-R3 ratification; legacy alt-disposition sections retained as audit-trail not as available paths.
- Line 48 (Gap 1 alt disposition): operator §4 Item 1 IN-R3 ratification supersedes; dual-amendment authority chain preserved as closure-rule discipline for any future re-opening.
- Line 89 (Gap 2 alt disposition): operator §4 Item 2 IN-R3 ratification forecloses Rust-only-narrow.
- Line 133 (Gap 3 alt disposition): operator §4 Item 3 IN-R3 ratification forecloses R1-horizon-narrow + 5-sub-lane R4-carve.
- Line 342 (Gap 9 alt disposition): operator §4 Item 4 IN-R3 ratification forecloses THESIS-aspirational-not-R3-promised reframe.

Also propagated ratification state into §4 header (request-for-ratification → RATIFIED 2026-05-13) + line 3 Status line (DRAFT → FULLY RATIFIED).

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
… + Python/Go emitter completion (gate #15 close): N>0 corpus, 3-target Rust+Python+Go stdout-parity (#3039)

* WIP: R3 Gap 2 L5 cross-target consistency — certification corpus build-out +

* WIP: R3 Gap 2 L5 cross-target consistency — certification corpus build-out +

* WIP: R3 Gap 2 L5 cross-target consistency — certification corpus build-out +

* docs(INVARIANTS): SG-0 receipt row for L5 boundary harness; clarify SG-0 pairing line

P5(b): register tests/boundary/l5_cross_target_consistency.rs in the SG-0
integration-test receipts table alongside the census line.

Amend CI prepend pairing so class-(a) removed path is explicitly PR-only
retirement (path never existed on main), addressing composer-2 exploratory.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 14, 2026
…#33 promotion

Codex BLOCKING review on PR #3094: the audit ledger header still reflected
the pre-#33 totals (47/59, 44 PASSING, 21 CONSUMER_LANDED). Update them in
the same PR per the §"Row-count parity" discipline:

- Verdict line: 47 → 48 HARNESS_NAMED, 59 → 58 non-PASSING.
- PASSING bucket: 44 → 45.
- CONSUMER_LANDED bucket: 21 → 20.
- Ledger-snapshot anchor narrative + status-bucket header record the
  row #33 delta (CONSUMER_LANDED → CONSUMER_LANDED + PASSING) alongside the
  prior row #15 delta.

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

* WIP: R3 gate #33: bridge_canonical_lens_name_dispatch_retired (T-Bridge-Retir

* docs(r3): promote gate #33 bridge_canonical_lens_name_dispatch_retired to PASSING

R3 §1.8 row #33 (`bridge_canonical_lens_name_dispatch_retired`,
T-Bridge-Retirement) promoted from CONSUMER_LANDED to
**CONSUMER_LANDED + PASSING** in `docs/r3-program-plan.md` (carried by the
prior WIP commit on this branch) and the §8 close-predicate-execution audit
row updated from N/A_NOT_PASSING to HARNESS_NAMED with the canonical
`canonical_lens_bridge_ratchet_test` harness named.

Full §Acceptance receipt at HEAD:
  (a) `src/v3/compiler/tests/integration/canonical_lens_bridge_ratchet_test.rs`
      pins zero residual across all four categories — A (R1_CANONICAL_*_LENS
      include_str! const bridges), B (lens_decl.name.as_deref() == Some("…")
      dispatch arms), C (generic if let Some(name) = lens_decl.name.as_deref()
      name-keyed lookups), D (DeclarationRef-to-name dispatch helpers).
  (b) `bridge_retirement_demonstration` runs the `lens_output_equals_gate`
      fixture end-to-end via `apply_lens_declaration(self.dag, lens_id, …)`
      with `lens_id` resolved as a fixture `DeclarationRef`, not via canonical
      lens byte authority or name dispatch.
  (c) `src/v3/std/bridge_ledger.dag` row
      `bridge_canonical_lens_name_patching_residual` is `Retired` with the
      closure brief
      `docs/briefs/r3-pb-bridge-canonical-lens-name-dispatch-closure.md` as
      authority (Status: CLOSED).

No production code change required — the bridge surface was already retired
on main; this commit lands the §1.8 / §8 ledger promotion that makes the
predicate load-bearing for the §10 close-ceremony workspace re-sweep.

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

* docs(r3-audit): update bucket counts + ledger-snapshot anchor for gate #33 promotion

Codex BLOCKING review on PR #3094: the audit ledger header still reflected
the pre-#33 totals (47/59, 44 PASSING, 21 CONSUMER_LANDED). Update them in
the same PR per the §"Row-count parity" discipline:

- Verdict line: 47 → 48 HARNESS_NAMED, 59 → 58 non-PASSING.
- PASSING bucket: 44 → 45.
- CONSUMER_LANDED bucket: 21 → 20.
- Ledger-snapshot anchor narrative + status-bucket header record the
  row #33 delta (CONSUMER_LANDED → CONSUMER_LANDED + PASSING) alongside the
  prior row #15 delta.

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 14, 2026
…precondition) (#3095)

* docs(r3-v-l5): canvas — L5 corpus-policy substrate (gate #15 CONSUMER_LANDED → PASSING precondition)

Research-only canvas that enumerates the four Corpus Policy facts
(docs/design-cross-target-equivalence.md §"Corpus Policy") missing
from the HEAD L5 corpus rows landed via PR #3060 + #3039, and routes
the carrier shape to Director per INVARIANTS §P1 before any
src/v3/std/verification.dag edit.

Five Q's (effect class / numeric policy / coverage reason / expected
observation+oracle / per-row attachment shape) with structurally
distinct options + named disqualifiers + canvas-preliminary
recommendations. No substrate edits, no new TestPredicate variants;
dispatch sequence + post-ratification PR plan included.

Closes worker-side authoring for adhoc-6e83e29b-200 (R3 gate #15
T-V-L5-Corpus).

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

* docs(r3-v-l5): fix Corpus Policy cardinality six → seven (cursor BLOCKING)

* docs(r3-v-l5): fix INVARIANTS anchor P5 → P2/P3 on Q2-B3 disqualifier (cursor APPROVE_WITH_COMMENTS)

* docs(r3-v-l5): correct ForAllTargets field summary — input_ref exists; ProgramOutputBind is a doc-comment, not a field (cursor BLOCKING)

* docs(r3-v-l5): L5CorpusRowPolicy uses typed TestClaim edge, not String name key (briansrls BLOCKING P2)

* docs(r3-v-l5): CoverageReason — add C4 with typed per-arm payload edges; drop coverage_description prose slot (briansrls BLOCKING P2)

* docs(r3-v-l5): reconcile carrier (single L5CorpusRow in std.r3_l5_corpus) + recommendation summary C3 → C4 (openai-pro REQUEST_CHANGES)

Two slips in the substrate handoff:

1. §5 recommendation summary said "A1 + B1 + C3 + D2 + E2" but C3 was
   disqualified earlier; the canvas recommends C4 (typed per-arm
   coverage payload). Updated to "A1 + B1 + C4 + D2 + E2".

2. Q5-E2 said `L5CorpusRow { claim, policy: L5CorpusRowPolicy }` (a
   two-record wrapper in `std.r3_l5_corpus`), but §5 declared a flat
   `L5CorpusRowPolicy { claim, ... }` placed in `verification.dag`.
   Reconciled to a single flat `L5CorpusRow` carrier in a new
   `src/v3/std/r3_l5_corpus.dag` module — Q5-E2 module placement, no
   parallel authority.

PR-3 / PR-4 dispatch-sequence references updated; boundary-consumer
ratchet refers to `L5CorpusRow` throughout.

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

* docs(r3-v-l5): Q1 disqualify A1/A3 — EffectShape axis mismatch with locked Corpus Policy taxonomy (codex BLOCKING)

EffectShape's IsIdempotent|IsBreaking partition classifies along
idempotency, not along the locked design-cross-target-equivalence.md
§"Side-effect Policy" axis Pure|ControlledStdout|TypedFailure|
DeferredEffectful. Reusing it would narrow a locked policy taxonomy
into a different one (INVARIANTS §P1 faithfulness violation).

- Q1: disqualify A1 + A3 on axis mismatch; recommend A2 (new
  CorpusEffectClass) — orthogonal to EffectShape, not parallel.
- §2 facts table row 24 + summary paragraph: state that EffectShape
  exists but along a different axis.
- §5 substrate delta: add `type CorpusEffectClass`; L5CorpusRow.effect
  field type CorpusEffectClass; recommendation summary A1 → A2.
- §5 boundary-consumer ratchet: reference CorpusEffectClass.

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

* docs(r3-v-l5): align §1 + §6 PR-2 landing surface with §5 (new r3_l5_corpus.dag module; no verification.dag substrate edit) (cursor BLOCKING)

* docs(r3-v-l5): tighten §5 — import line lives in L5 fixture, not verification.dag (cursor BLOCKING)

* docs(r3-v-l5): Q2 — split NumericPolicy into two independent axes (int + float); B1 disqualified for forced mutual exclusivity (briansrls BLOCKING P2)

`NumericPolicy = Int64OverflowFree | NamedOverflowSemantics |
FloatExcluded | FloatPolicyDeferred` collapsed two orthogonal axes
into one sum, so a row mixing Int and Float observables could not
state both at once. New B4 option = two-axis record carrying both
`IntOverflowPolicy` and `FloatPolicy` simultaneously.

- Q2: B1 disqualified on forced mutual exclusivity; B4 added +
  recommended (carries both axes per row).
- §5 substrate delta: NumericPolicy now record `{int, float}` with
  two closed-sum types.
- Summary recommendation: A2 + B1 + C4 + D2 + E2 → A2 + B4 + C4 + D2 + E2.

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 deleted the claude/llm-code-review-pipeline-lJVXe branch June 1, 2026 18:41
briansrls pushed a commit that referenced this pull request Jul 25, 2026
CI red on b2411f0, batch 3, and the failure is mine: both wall arms hit
"hermetic mode: no mock_response for operation Run — refusing to fabricate
Unit". The wall spawns claim_batch as a CHILD PROCESS to read a passing
corpus's own stderr, so it is Wet by construction, and I let filename
convention enroll it into the hermetic discovery corpus.

The refusal is correct and worth stating rather than routing around: a
mocked child emits no real observation stream, so a hermetic version of this
witness could only ever pass VACUOUSLY — which is precisely the defect class
the wall was built to end. ci_layer_roots' install_media_real_execution_wet_note
already described this exact failure ("no mock_response for operation Dir"),
so the lane and its idiom existed; I simply did not declare into it.

Fixed the way the corpus already does it: a WitnessExclusionRow carves the
file out of per-PR hermetic discovery with a typed reason, and two bin_wet
rows enroll both arms on the wet lane beside the other real-execution
witnesses. Not a mock, not a skip — the same mechanism, declared.

The dissolve_on says no dissolution is expected, deliberately. Reading a real
run's rendered stream is the irreducible content of this check, so it stays
Wet while the glyph wall exists; it deletes only if a structural lens over
the effect graph supersedes it (task #15).

I FLAGGED THIS ONE TURN EARLY AND MISREAD IT. I wrote that the wall's cost
was unmeasured and it "may need enrolling on the bin-wet lane" — right lane,
wrong reason. It is not a budget question at all: a Wet witness cannot live
in hermetic discovery at any cost, because the mode refuses it. Naming a risk
is not the same as classifying it, and I shipped on the weaker read.

Verified: ci_floor_plan_witnesses green, witness_exclusion_frontier_
reconciliation_holds green (the exclusion is reconciled, not orphaned), and
both wall arms still green locally.

ALSO CONFIRMED THIS TURN, by perturbation: re-hardwiring dispatch_shell's
binding back to ExpectSuccess and rebuilding all three bins REDS the wall.
So the wall is already an executing consumer for the threading — task #12's
core regression case is covered, and a separate Rust wiring test would have
been redundant. Its remaining residue is narrower than filed: the
ExpectFailure x ObservedSuccess divergence corner has no live site, and the
OutcomeIsData-consumer-disappears case still needs one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013GELyMsZrGgZRrxte2TCsk
briansrls pushed a commit that referenced this pull request Jul 25, 2026
… calls

Traced all three remaining "untraced" census entries to their ISSUING fn
rather than counting occurrences in the witness file, per the srv3 lesson.
Two of the three turned out to be helper-mediated, not direct.

CONVERTED — grep.Grep.MatchesFixedString in
install_media_remaster_ensure_grub_cmdline. grep exits non-zero when the
pattern is ABSENT, and absence is exactly the question: it is the idempotence
probe deciding whether to substitute or leave the file alone. Fresh image =
missing, insert; re-run = present, no-op. Both answers ordinary. Guard holds
on the belt_program_available shape — the Bool is the branch discriminator,
never discarded.

LEFT LOUD, deliberately, as the same class the operator ratified for cargo:

  claim_executor.Executor.VerifyBuildArtifacts (verify_artifacts_typed ->
  Bool). Its non-zero exit means the build artifact is CORRUPT. In the
  corruption probe that is the expected answer, but on the production path
  it is a genuine fault someone wants shouted — the sccache-truncation
  class this very check exists to catch. Same shape as the cargo build:
  guard's letter admits it, spirit does not.

  shell.Exec.Run in host_build_cache_provision's read-back. The witness doc
  says the modeled binary answers non-zero BY DESIGN so the reconcile must
  be NotConverged — so that call is a genuine observation. But the SAME
  operation is used two lines up for chmod, where failure is a real fault.
  One operation, two roles, and they are not separable by an annotation on
  the shared op — this is task #15's call-node-versus-enclosing-fn problem
  showing up a second time, now on a single op rather than a single fn.

Both need an operator call, and both have their trace recorded rather than
being silently converted to make a count reach zero. Zeroing them would be
the disease this arc exists to cure: trading a fake anomaly for a hidden
real one.

Verified: the srv3_seeded witness still true with no glyph.

Running total 19 of ~24. Genuinely remaining: host_effect_plan_apply (the
option-(a) site) plus the three deliberate loud ones (cargo, verify, chmod).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013GELyMsZrGgZRrxte2TCsk
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.

2 participants