lab: Milestone 3 dext bring-up — ZTS timer chain, activation host, bench runbook#24
Merged
Merged
Conversation
…real pacing Implements the Milestone 3 dext clock model per the lab README: - IOTimerDispatchSource on the work queue fires once per ZTS period (512 frames @ 48k) in kIOTimerClockMachAbsoluteTime; each fire anchors UpdateCurrentZeroTimestamp(n*period, fire_time) with raw values — the deadline chain is nominal (derived from the period index via mach_timebase_info, drift-free), host times are actual fire times, the host smooths via the clock algorithm. No driver-side extrapolation. - The same fire exposes the next period's packets through the controller (the lab analog of an IT-ring refill interrupt): hardware requests data on its interrupt; WriteEnd only fills PCM into already-exposed packets. - Step 6 Verifying(Fake) + StickyCounterSink run for the whole IO session; StopIO dumps verifier counters, payload miss buckets, and the O/C instrumentation via IOLog (ADKLab[dump] prefix, never from the IO path). - O/C instrumentation: anchors before first WriteEnd (C1), WriteEnd shape stats — min/max io size, sample-time continuity, first-callback tuple (C3), io/timer fires after StopIO counted not crashed (O2, logged at free), other-op counter, prepare-failure counter. - SetTransportType(FireWire) — the contract ASFW will live under. - Output ring widened to 8 ZTS periods (4096 frames, matches the host scenario pump); a 1-period ring left the HAL zero headroom (C4 stays observable by varying kRingPeriods). - Info.plist: match on IOUserResources + IOResourceMatch IOKit (a hardware-free dext cannot match IOUserService as provider — it would never start); non-empty OSBundleUsageDescription. All APIs verified against the DriverKit 25.2 SDK headers (IOLib.h mach_timebase_info/mach_absolute_time, IOTimerDispatchSource.iig, IOUserAudioClockDevice.iig). Dext + host tool targets build; host suite 17440 checks, 0 failures. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ADKLabHost: minimal SwiftUI host that embeds the dext (xcodegen embeds driver-extension dependencies into Contents/Library/SystemExtensions) and submits OSSystemExtensionRequest activate/deactivate. The dext identifier is discovered from the embedded bundle at launch so signing lanes that override bundle ids need no code edits. - Entitlements files for both targets (system-extension install; driverkit + family.audio) — referenced by the signing lanes, signing itself stays OFF by default exactly as before. - BENCH.md: the M3 procedure — both signing lanes (ad-hoc SIP-off bench / provisioned SIP-on), activation, driving audio, reading the ADKLab[dump] output, and the counter -> O1-O3/C1-C4 mapping with the M3 exit criteria. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mrmidi
added a commit
that referenced
this pull request
Jun 10, 2026
lab: Milestone 2 — SYT realism: TxTimingModel, simulated timeline, P5 verification (stacked on #24)
mrmidi
added a commit
that referenced
this pull request
Jun 12, 2026
lab: Milestone 3 dext bring-up — ZTS timer chain, activation host, bench runbook
mrmidi
added a commit
that referenced
this pull request
Jun 12, 2026
lab: Milestone 2 — SYT realism: TxTimingModel, simulated timeline, P5 verification (stacked on #24)
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.
What
Milestone 3 per the lab README: the dext becomes loadable and answers O1–O3 / C1–C4 with counters, not docs. Stacked on #23 (Step 6) — review the top two commits; the base commit is the Step 6 verifier this work runs under.
The dext clock model (commit 1)
IOTimerDispatchSourceon the work queue,kIOTimerClockMachAbsoluteTime(the clock CoreAudio host times use). Each fire anchorsUpdateCurrentZeroTimestamp(n × period, fire_time)with raw values — nominal drift-free deadline chain (derived from the period index viamach_timebase_info, never from the previous jittered fire), actual fire times, host smooths via the clock algorithm. No driver-side extrapolation — the reference model from the README.StickyCounterSinkrun for the whole IO session;StopIOdumps everything viaIOLog(ADKLab[dump]prefix — never from the IO callback).in_io_buffer_frame_size, sample-time continuity breaks, first-callback tuple (C3), callbacks/timer fires after StopIO counted-not-crashed and logged atfree(O2), prepare-failure and other-op counters.SetTransportType(FireWire)— the contract ASFW will live under.kRingPeriodskeeps C4 observable.Info.plist matching fix — please audit
IOProviderClasswasIOUserService; a hardware-free dext matchesIOUserResources(+IOResourceMatch: IOKit) — with the old value the personality should never match and the dext never starts. Flagging explicitly since it's your file; revert if it was intentional.Bring-up harness (commit 2)
Contents/Library/SystemExtensions; the dext identifier is discovered from the embedded bundle at launch so bundle-id-overriding signing lanes need no code edits.Verification
Every API claim verified against the DriverKit 25.2 SDK headers (
IOLib.hshipsmach_timebase_info/mach_absolute_time;IOTimerDispatchSource.iig;IOUserAudioClockDevice.iig) — no invented surfaces.Runtime bring-up (activate + play + read dump) happens next on Chris's SIP-on machine with his DriverKit entitlements; results will be reported back so the README's O/C answers can be recorded.
🤖 Generated with Claude Code