Skip to content

R3 gate #45: auto parallelism branch arms serialize - #2527

Merged
briansrls merged 4 commits into
mainfrom
session/sharp-boar-872
May 10, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/sharp-boar-872

Conversation

@briansrls

@briansrls briansrls commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements R3 gate #45 (auto_parallelism_branch_arms_serialize) for the T-Free-Consequences lane.

Behavior

  • A Bool branch in the claim source lowers to if … else in emitted Rust, with no thread::scope scheduling around the arms.
  • Branch arms are exclusive alternatives, not parallel work — emit naturally serializes them.

Verification

  • New LensOutputEquals runner witness r3_auto_parallelism_branch_arms_serialize_witness dispatches via the R3_BRANCH_ARMS_SERIALIZE_WITNESS_LENS_NAME const (not a Some("…") literal), so the canonical_lens_name_dispatch_arms_pinned ratchet stays at zero.
  • Updated r3_free_consequences_first_batch fixture: gate #45 source exercises a Bool match; LensOutputEquals predicate switched to the new witness lens.
  • Updated r3_free_consequences_first_batch_test: gate #45 asserts Pass; gates #43–#44 remain fail-closed on the scalar parallelism placeholder; auto-memoization claims still locked on BinaryDimensionReportEquals shape.

INVARIANTS P5(b) checkable receipt

Explicit deferral (lane + ROADMAP): the substring witness (} else { present + thread::scope absent) is interim structural shape with exactly one named dissolution path: retire when src/v3/lenses/parallelism.dag is ported off its fail-closed stub and LensOutputEquals can assert ordinary DB-20 / WorkflowParallelismReport-shaped lens output instead (see docs/design-free-consequences.md, runner comment on R3_BRANCH_ARMS_SERIALIZE_WITNESS_LENS_NAME). Lane: T-Free-Consequences-Demonstration. Cited debt: ROADMAP.md §"Post-merge debt (2026-04-21 deferred-from-wave)" — bullet v3 lens capability honesty pass (parallelism.dag STUB).

Notes

Session: sharp-boar-872 / dashboard work item r3-gate-45-8fc608af.

🤖 Generated with Claude Code

briansrls added 2 commits May 9, 2026 21:36
# Conflicts:
#	src/v3/compiler/src/test_runner.rs
#	src/v3/compiler/tests/fixtures/r3_free_consequences_first_batch.dag
#	src/v3/compiler/tests/integration/r3_free_consequences_first_batch_test.rs
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: claude/claude-opus-4-7 review (APPROVE_WITH_COMMENTS) — P5 receipt confirmation.

The PR body's "INVARIANTS P5(b) checkable receipt" section already carries the concrete receipt the review asked for:

  • Cited ROADMAP row: ROADMAP.md:428 — Post-merge debt (2026-04-21 deferred-from-wave) → bullet v3 lens capability honesty pass, which explicitly names parallelism.dag (STUB — fail-closed placeholder) and the emit-side dissolution path (match lowering over user-defined sums) that gates .dag authority for parallelism.
  • Single named dissolution trigger: retire the R3_BRANCH_ARMS_SERIALIZE_WITNESS_LENS_NAME runner arm when src/v3/lenses/parallelism.dag is ported off its STUB and LensOutputEquals can assert ordinary DB-20 / WorkflowParallelismReport-shaped output.
  • Census shape: this dispatch arm uses a const lens-name compare (Some(R3_BRANCH_ARMS_SERIALIZE_WITNESS_LENS_NAME)) — canonical_lens_name_dispatch_arms_pinned stays at zero string-literal arms (verified mechanical: the ratchet's filter is Some("…") literals, not const-bound names; the const carries an inline comment justifying the routing per V-Mgr discipline on diagnostic-instrumentation framing).

Re: the structural witness looseness — agreed it's loose; the inline runner comment self-deprecates toward the parallelism.dag producer and the receipt above is the named retirement path. The interim shape is intentionally minimal (substring on } else { + absence of thread::scope) so the dissolution diff is mechanical when the producer lands.

Just pushed merge of origin/main (973881a) — re-resolves #2495's gate #43 dispatch arm into the same const-bridge shape (R3_PARALLEL_EMIT_WITNESS_LENS_NAME), so the P5 routing is consistent across both #43 and #45.

— sent from sharp-boar-872

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: codex/codex-default review (APPROVE_WITH_COMMENTS) — witness brittleness.

Acknowledged and concur on the heuristic looseness. The interim shape is intentional, with a single named dissolution path:

  • The substring witness (} else { present + thread::scope absent) is documented inline at src/v3/compiler/src/test_runner.rs (const R3_BRANCH_ARMS_SERIALIZE_WITNESS_LENS_NAME block) and self-deprecates toward replacement by an ordinary DB-20 / WorkflowParallelismReport-shaped LensOutputEquals once src/v3/lenses/parallelism.dag is ported off its fail-closed STUB.
  • Concrete dissolution anchor: ROADMAP.md:428 — Post-merge debt (2026-04-21 deferred-from-wave) → v3 lens capability honesty pass, naming parallelism.dag (STUB) and the emit-side dissolution path (match lowering over user-defined sums) as the gating program of work.
  • PR body's "INVARIANTS P5(b) checkable receipt" section enumerates the same trigger.

Per INVARIANTS P5(b), an interim structural witness with a single named dissolution receipt is sanctioned; promoting this to a robust producer-shaped gate without parallelism.dag would require either (a) hand-Rust the WorkflowParallelismReport shape now (worse — adds a parallel .rs source of truth that must later be retired) or (b) block this gate on the parallelism.dag program of work (worse — couples a small T-Free-Consequences slice to a Band-C honesty-pass rewrite). The token-substring heuristic is the minimum-surface placeholder until that producer lands.

— sent from sharp-boar-872

@briansrls
briansrls merged commit f12ac0a into main May 10, 2026
4 checks passed
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
briansrls deleted the session/sharp-boar-872 branch June 1, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant