Skip to content

Controls batch 15a: replace an unadopted candidate plan (#1310), prepare across a withdrawn one (#1344), capacities for a superseding candidate (#1398) - #1700

Merged
tamashi095 merged 30 commits into
mainfrom
codex/controls-batch-15a
Oct 16, 2026
Merged

tamashi095 merged 30 commits into
mainfrom
codex/controls-batch-15a

Conversation

@tamashi095

@tamashi095 tamashi095 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Controls batch 15a: a structural edit is never refused because a replacement plan is waiting. It supersedes the unadopted candidate, keeping every acked edit, queued observation record, source chunk and held seek that the new plan still uses. The C ABI's plan capacities and resource admission count every plan held at once. The batch also carries the batch 15 spec checks and root rulings for the source and latency chain.

Closes #1344
Closes #1398
Closes #1310

What changed

Evidence

  • The full local CI-equivalent set (batch-gates.sh) passes on the integrated tree at 5fb2d33: fmt, bench and realtime policy (150 marked regions in 32 files), host-core feature matrix and loom, workspace clippy, the workspace tests, the doc job (cargo doc -D warnings), all 15 shell gates, the web build and check, check-sdk-headless (564 of 564), the 7 Python gates and the fuzz check. The last commit, 5ea0698, changes only C header comments; check-capi-abi passes on it.
  • Browser qualification passes at 5fb2d33 on Chromium 151.0.7922.34, Firefox 153.0 and WebKit 26.5 (--check-matrix --self-test-mutations); render-locked allocations are 0 in every scenario.
  • audit capi: pcm_digest bf7dcedd1d92621f (unchanged), 0 allocations, locks and syscalls.
  • Supersede an unadopted candidate plan by compare-and-swap #1310 gate 5: back-to-back structural edits race render (64 edits: about half withdrawn, half taken). None is refused as backpressure. The settled output is bit-identical to a fresh plan of the final model, and render allocates nothing.
  • Parity rows in hosts/host-web/tests/control_parity.rs: eight structural edits on a paused host commit alike on both hosts (48 and 96 kHz).
  • No acked chunk is dropped by a supersession. If A created a source's ring (A added the source or redeclared it) and the host has fed that ring since (a chunk, a seek or an end of region), and the donation does not move the ring to B, B is refused with BACKPRESSURE before it commits (host_core::drops_acked_fresh_source, called in the core's rebuild right after the donation check). This covers four cases: B puts the source back in its P0 form, B redeclares it a third way, B removes it, and A added it and B removes or redeclares it. Nothing changes: the reservation is dropped, A stays published, no event is queued and the revision does not move. Once render adopts A, the retry commits on A. A host that does not render keeps getting BACKPRESSURE until it renders (accepted by root). Both hosts refuse alike: parity row control_parity::a_supersession_that_would_drop_acked_pcm_is_backpressure_alike_on_both_hosts covers the reverted, third-way and removed cases at 48 and 96 kHz (same code, same revision, retry commits alike, bit-equal output, and the acked chunk is heard once the plan latency has passed, against a control run that never fed it). C ABI test supersede_tests::a_supersession_that_would_drop_acked_pcm_on_a_fresh_source_is_backpressure (five cases) and host-core withdrawn_successor::the_guard_refuses_exactly_a_fed_fresh_ring_the_donation_leaves_behind (refused and not-refused cases). With the fold-2 guard (reverted case only), the other four capi cases commit and the chunk is lost.
  • A known gap, recorded in the header, the Supersede an unadopted candidate plan by compare-and-swap #1310 and Prepare a successor across a withdrawn candidate plan #1344 records, and placeholder Carry an owner a superseding candidate keeps unchanged from P0 from P0's state #1698: a source or owner that A restarted or removed, and that B puts back in its P0 form, starts fresh in B. Carry an owner a superseding candidate keeps unchanged from P0 from P0's state #1698 (the first K slice of batch 15b) carries it from P0 and lifts the refusal for the reverted case only. The other cases stay refused until an issue gives B a way to read those chunks, or the owner rules that a removed source's chunks may drop.
  • A source that the caller's own edit removes discards its queued audio (a direct P0 -> B removal, or B removing a source that A carried unchanged from P0). The caller asked for the removal, so this is not an unintended drop. The header and CONTROL_PROTOCOL_SEMANTICS.md say so. No counter reports the discarded frames yet: placeholder Count the frames a caller's own source removal discards #1699.
  • Fold 2 also fixes a C ABI wedge (two Taken withdrawals while render lagged its retirements, then a published adoption, answered INTERNAL forever) and charges a plan render displaced until the service step reclaims it. The browser keeps a waiting candidate's spectrum hand-over until render adopts it (before, any service step or command between the commit and the adoption dropped it, for every capture kind).

Re-pins (each from a measurement)

Review

Issues to file from this batch's specs

Spec bodies to sync after merge

#1285, #1293, #1310, #1316, #1317, #1318, #1319, #1320, #1323, #1324, #1344, #1360, #1386, #1396, #1397, #1398, #1403, #1482, #1522, #1643, #1644, #1654, #1688, #1689, #1690.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

tamashi095 and others added 30 commits October 15, 2026 18:20
…, #1293, #1316, #1317, #1318, #1319, #1320, #1323, #1396)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and #1324, and draft TBD34 (browser plan latency)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and re-brief #1386 under decision 17 C1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he boot bound through the boot staging; control_smoothing on replace)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the non-isolated page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead the master meter on the C ABI), #1683 successors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>


Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ding candidate (#1398)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…surement (12,969 -> ceiling 14,272)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…caller); #1403 adds it with its first caller

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1310)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sole fixture

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e core) and TBD40 (charge the monitor overlays and edit ramps in the retained rows)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-15a

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Remove the specs of 52 closed issues (git history keeps them).
- Batch 15 root rulings are labelled B15-R1..R9, root decisions under owner
  delegation.
- Decision 17 C13 names each direct export batch 15 approved (root,
  2026-10-16).
- #1644 declares a discontinuity before its seek; #1386 is split, and its
  browser transport is placeholder TBD41; placeholder TBD42 carries an owner
  or source B keeps unchanged from P0 from P0's state.
- TBD39, TBD40, #1688, #1689, #1285, #1319, #1323, #1396, TBD38 corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A paused browser page drops superseded candidate shapes from the core's
  held epochs, so every structural edit commits on both hosts (parity row).
- On Taken, or an empty mailbox with a pending list, every pending epoch up
  to the newest is promoted before the rebuild (root ruling).
- A refusal at the three-plan peak is BACKPRESSURE when the edit fits
  against the newest held plan alone, else COMPILE_REJECTED (root ruling).
- Each held epoch's carried rings are counted once.
- Tests for the live-path ramp merge and a republish with a nonzero
  superseded word; header, docs and records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Gate 2 compares key and owner sets, with keys that differ between the two
  plans; gate 1 carries an audible insert.
- A donation takes the donor's producer, refuses a fed successor producer,
  and moves consumers before producers, so no acked PCM is separated from
  its ring.
- Source-crate tests for every unswappable pair and a carried prepared seek.
- Record: the reverted-owner gap goes to TBD42; path amendments listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1310 and its code comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ted-source guard (#1310, #1344)

- B-1: RETIRED_PROVIDERS = RETIREMENT_CAPACITY; synchronize_plan_epochs drains before it
  promotes from the atomic. Test: two_taken_candidates_and_a_published_adoption_never_wedge_the_session.
- M-1: a parked epoch keeps its resource row (ProviderEpoch::parked) and both admissions charge
  it until its plan is reclaimed.
- Root guard (no ack before a drop): a supersession that reverts a source the withdrawn candidate
  redeclared and fed is refused with BACKPRESSURE before the commit
  (host_core::drops_acked_reverted_source), both hosts, parity row. TBD42 lifts it.
- m-1..m-5: header/doc wording, apply_donation re-reads the successor producer is unfed,
  SuccessorFed cases, test doc, spectrum hand-over supersession tests; promote_spectrum keeps an
  unadopted entry's hand-over.
- capi_retained_bytes 165,922 -> 168,810 (measured, x86-64), ceiling 175,296 stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h hosts after the plan latency (#1310)

The adoption block was silent on both hosts because the rig's session has plan
latency (3 blocks at 48 kHz, 7 at 96 kHz). The row now commits A after the output
plays, and asserts the acked chunk is heard lead blocks after adoption and differs
from a control run that never fed A's ring, on both hosts, bit-equal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sh ring; private doc links (#1310, #1344)

- Root ruling M-A (a): host_core::drops_acked_fresh_source replaces the reverted-only guard. A
  ring A created (added or redeclared) that the host fed and the donation does not move to B
  refuses B with BACKPRESSURE before the commit: reverted, redeclared a third way, removed, and
  added then removed or redeclared. Both hosts; capi cases, host-core unit cases, parity row
  for (a)-(c) at 48 and 96 kHz. TBD42 lifts only the reverted case.
- Removal by the caller's own edit discards the source's queued audio (header, semantics);
  a discarded-frames counter is placeholder TBD43.
- B-A: five private intra-doc links in host-core source.rs are plain code spans.
- m-A record, m-B (drain order is defence in depth, untested), m-C (moot: guard reads no kept model).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…raph scopes 'no accepted chunk is dropped' to rings the replacement created, drops a repeated sentence, and rewraps to 100 columns (#1310)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ount the frames a caller's own source removal discards)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tamashi095
tamashi095 merged commit f3f8767 into main Oct 16, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant