Repository navigation
Controls batch 16a: the session timeline, carried like a source; the browser's anchored seek and seek report - #1705
Merged
Merged
Conversation
R1: seven seek exports join decision 17 C13's approved list. R2: the session seek's publish fence (#1642 paths and concurrency gate 1b). R3: the timeline's readiness is the non-PCM test (#1641, #1355). R4: #1641 D6 deferred to placeholder TBD45. R5: the SDK chooses the generation (#1643). R6: #1643 parity row. R7 is recorded in #1293's decision record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…engine module (#1293) D5 miso_engine_web_v1_source_seek_at calls SessionState::seek_at, never prepare_source_seek. D6 miso_engine_web_v1_source_seek_report and its record pointer copy SessionState::seek_report into a 64-byte record with the C miso_engine_v1_seek_report layout (root ruling R7). Both refuse a host with no control half. D7 mirrors: EXPORTS 105 -> 108, the ABI layout document gains the seekReport structure, the SDK mirrors are regenerated, and the self-tests catch an omitted export. The parity row compares the browser record with the C struct per block for plain, late and future seeks at 48 and 96 kHz. check-session-map-shape.py skips the record pointer by name: it takes only the handle like a source-map count query but is not one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
D1 factors the seek rules once: a private SeekState (active generation, held seek, one observe for the Now, At and Hold clocks) shared by the PCM source consumer and the timeline consumer, and a private SeekProducer (check_seek, try_seek) shared by the PCM producer and the timeline producer. PcmSourceProducer and HostChunkProvider gain check_seek. D2-D5: TimelineConsumer (begin_block_at, timeline_at, timeline_block, copy_history_from), TimelineProducer, TIMELINE_SAMPLE_LIMIT = 2^53 with SourceSeekError::FrameOutOfRange (source.seek.frame_out_of_range), and TimelineResourceReport. No plan holds the timeline yet (#1641); no rendered bit moves. Realtime-policy region floor 151 -> 153 for the two new marked regions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
D1: every host-core plan's source set holds one TimelineConsumer with K = ceil(A_max / q) + 1 from the floored input arrivals; the driver advances it at block entry before the sources, from the source-read sample. D2: SourceControlSet owns the TimelineProducer and adopt_persisting moves it. D3/D4: a successor builds a vacant timeline with its own history; GraphCarryProgram gains timeline: bool, and the swap moves the seek state, command consumer and position and copies the newest history entries, allocating nothing. D5 (B16-R3): the timeline's readiness is the shared non-PCM test (SeekState::prime_window_clear), also used by PcmSourceConsumer::prime_ready; its prime advances k blocks. No production prime caller until #1355. D6 deferred to TBD45 (B16-R4). D7: the timeline's fixed bytes join the source overhead. D8: graph::test_only_timeline_at with a host-core test-support re-export. Re-pins, each for the timeline consumer's fixed bytes (#1641 D7), measured: capi source_overhead 4,174 -> 4,654 (ceiling 4,352 -> 5,120); host-web source_overhead 2,658 -> 3,138 (2,688 -> 3,456) and source_total 3,682 -> 4,162 (3,840 -> 4,608); wasm32 expected.json sourceOverheadBytes 2,474 -> 2,922 (2,496 -> 3,264) and sourceTotalBytes 3,498 -> 3,946 (3,648 -> 4,352). audit capi pcm_digest unchanged (4f52089e4a8cf83c). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
M1: timeline_block reports the first sample where the timeline is not the previous sample plus one, so a source-read step-back at a declared discontinuity is a step (test red on the old reader). M2: a rebuild that carries no source still carries the timeline (red without either flag clause). M3: the timeline no longer blocks the other lanes' carry; it is adopted only from an occupied predecessor into a vacant successor. M4: #1297 D3 sends anchored seeks through the message handler only, and #1294 D1 applies through control_request_ptr / control_command. Minors: adopt_persisting doc states the vacant-timeline exception; two byte guards no longer pass on the timeline queue alone; tests for the rate/quantum guard, a never-adopted timeline, a seek queued at the swap block and the reader's search order; unread TimelineResourceReport rows removed (no charged byte moves); offset_timeline inside its policy region; the seek report pointer export has a behavioural test; the ABI self-test swaps seekReport field names; check-session-map-shape.py excludes _ptr exports as a rule; install_carry_program refuses a timeline carry on a plan with no source set; three tests with no unique catch deleted; private intra-doc links fixed. pcm_digest unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
M1 completed: where no held entry starts at or before s - 1, step_at also reports a step when timeline_at(s - 1) + 1 != timeline_at(s), so a source-read step-back that leaves the oldest held entry above the lowest sample is a step. Tests: the K=3 and K=2 cases and a sweep over K 1..5 and five step-backs (red on the fold-1 reader). Read bound 6K^2 + 10K + 1. #1294/#1297 amendment cites re-anchored to 90b76cf; the publisher of an anchored seek also posts it to the control half as miso.seek-at.v1. #1641 record wording; two rewraps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Controls batch 16a: the session timeline. The source crate gains the session's playhead, a timeline consumer and producer that share one written copy of the seek rules with the PCM sources. Every prepared plan, on both hosts, holds one timeline and carries it to a successor exactly as it carries an unchanged source. The browser engine module also exports the anchored source seek and the per-source seek report, through the same core calls as the C ABI. Nothing in render reads the timeline yet (the first reader is #1647). The session seek that moves it lands in batch 16b (#1642, #1643).
Closes #1640
Closes #1641
Closes #1293
What changed
35ac17545(eab696d). Root rulings B16-R1 to B16-R7 are recorded (ee5322e):SeekStateholds the active generation and the held seek, with one observe step for theNow,AtandHoldclocks. A privateSeekProducerhascheck_seekandtry_seek. The PCM source and the timeline both use them.PcmSourceProducerandHostChunkProvidergaincheck_seek, which Seek the timeline and every source in one C ABI call #1642 calls on every producer before it pushes to any.TimelineConsumer(withbegin_block_at,timeline_at,timeline_block,copy_history_from),TimelineProducer,TIMELINE_SAMPLE_LIMIT = 2^53withSourceSeekError::FrameOutOfRange(source.seek.frame_out_of_range), andTimelineResourceReport.consumer.seek.*).SourceControlSetowns the producer, andadopt_persistingmoves it at all three control-plane call sites.GraphCarryProgramgainstimeline: bool. The swap block moves the seek state, the command consumer and the position, and copies the newest history entries, with no allocation. The flag is set when the successor's rate and quantum equal the predecessor's, which both hosts require of every successor (#1290a).SeekState::prime_window_clear, B16-R3) andPcmSourceConsumer::prime_readynow uses it.graph::test_only_timeline_at, re-exported by host-core undertest-support.miso_engine_web_v1_source_seek_atcallsSessionState::seek_at; it never callsprepare_source_seek.miso_engine_web_v1_source_seek_reportand_source_seek_report_ptrcopySessionState::seek_report, the same call asmiso_engine_v1_source_seek_report, into a 64-byte record with the C struct's layout and the reserved words zero.RESULT_REFUSED_LIFECYCLE. Host-web holds no seek logic.EXPORTSgoes 105 -> 108. The ABI layout document gainsseekReport, the SDK mirrors are regenerated, and the self-tests catch an omitted export (36 mutations).check-session-map-shape.pyskips the record pointer by name. It takes only the handle, like a source-map count query, but it is not one.TimelineProducer's seek andcheck_seek, andFrameOutOfRange: Seek the timeline and every source in one C ABI call #1642 (batch 16b).timeline_block: Render moving stored fader automation, seeks and latency #1647.graph::test_only_timeline_at: test only.source_seek_atand seek report exports have no SDK caller until Send a session transaction to the browser control plane #1294 and Feed and retire the sources a browser edit adds or removes #1297.Evidence
The full local CI-equivalent set (
batch-gates.sh) passes at the 16a head 35a125e. It covers:--all-targets --all-features -D warnings) and the workspace tests;cargo doc -D warnings);check-web-audioworklet,check-sdk-headless(564 of 564), the 7 Python gates and the fuzz check.An earlier run at 454d656 (before the folds) failed only the doc job, on three private intra-doc links. The fold fixed them.
Browser qualification passes at 35a125e on Chromium 151.0.7922.34, Firefox 153.0 and WebKit 26.5 (
--check-matrix --self-test-mutations). Render-locked allocations are 0 on all three (render and SDK rows).audit capi:pcm_digest4f52089e4a8cf83c, unchanged from main. 0 violations.Realtime policy: 153 marked regions in 33 files (+2, Build the timeline consumer and producer in the source crate #1640's timeline regions; floor 151 -> 153).
Built artifact
miso-engine-v1-audio-worklet.simd128.wasmat the 16a head: 4,203,669 bytes, sha256ad535e83943d2bcaed785a743c5424e0a80cef0d3bf7fd3851b424638196c5b1(the committed release pin is not re-pinned).Export transaction apply and anchored seek from the browser engine module #1293 gate 7 asks for workspace clippy. The implementer ran clippy on two packages only. The batch gates' workspace clippy (
--workspace --all-targets --all-features -D warnings) covers it at the 16a head.Re-pins (each measured; reason: the timeline consumer's fixed bytes, #1641 D7)
The step is 480 B native (command queue 320, history 16 per entry, inline consumer 144) and 448 B on wasm32. The consumer is charged once, in the driver's allocation row. Each new ceiling is the measured value plus 10 %, rounded up to 64 B.
source_overhead_bytes(x86-64)source_overhead_bytes(x86-64)source_total_bytes(x86-64)expected.jsonsourceOverheadBytes(wasm32)expected.jsonsourceTotalBytes(wasm32)These stay inside their ceilings with no re-pin: capi
source_total_bytes12,366 -> 12,846, andcapi_retained_bytes167,754 -> 168,378 (ceiling 175,296). The identitysource_overhead + carried_source_overhead == freshholds. Browser boot high-water growth: 19,857,408 bytes, unchanged, within the 20 MiB pin (20,971,520).Review
timeline_blockreported no step where a declared discontinuity steps the source-read clock back.source_seek_at, which runs the service step, and Send a session transaction to the browser control plane #1294 D1 named exports Export transaction apply and anchored seek from the browser engine module #1293 dropped. Both specs are amended: anchored seeks go through the message handler only, and Send a session transaction to the browser control plane #1294 applies throughcontrol_request_ptr/control_command.check-session-map-shape.pyexcluding_ptrexports by rule;install_carry_programrefusing a timeline carry with no source set; three tests with no unique catch deleted; private intra-doc links that failed the doc job.miso.seek-at.v1) in Send a session transaction to the browser control plane #1294/Feed and retire the sources a browser edit adds or removes #1297, and record wording.Issues to file from this batch's specs
report-the-timeline-seek-position-to-hosts(B16-R4; holds Give every plan a timeline that carries like a source #1641 D6).Spec bodies to sync after merge
#1640, #1641, #1642 (batch 16 check, B16-R1, B16-R2), #1293 (batch 16 check, decision record), #1643 (batch 16 check, B16-R1, R5, R6), #1355 (B16-R3), #1294 and #1297 (batch 16a review amendments; the
miso.seek-at.v1wake is coordinator wording for their re-brief to confirm), #1704. Decision 17 ruling doc: C13 list (B16-R1).🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.