Repository navigation
Conversation
The coordinator's recording number and OutputMuteController's arm counter read the same way: next() when new work starts, isCurrent(_:) when the old work wakes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kers' restore chain has a test ARCHITECTURE gains "Superseded work": the rule, every place that keeps it, and the test convention for detached tasks. The one detached task without a supersede test, the speakers' restore waiting for the one before it, gets aSecondRecordingsRestoreWaitsForTheFirst. 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.
Part of #73, point 3. Stacked on #80 (
core/recording-engine-session), because the site list names itsRecordingEngineSession.What
docs/ARCHITECTURE.md, new section "Superseded work" (a stable name;Generation.swiftpoints at it). It holds:recordingUtteranceSlotRecordingEngineSessionOutputMuteController'sgenerationandlatestSessionClipboardKeeper'srestoreID, read-waiter IDs,TranscriptPromiseidentity andchangeCountPasteboardOutput.owedReturnHotkeyMonitorLifecycle.generation, which feedsCarbonHotkeySession's IDsHotkeyRecordingSlottokensObservationLoop.generationEngineLoader'sengine === self.engineModelFiles.isCurrent(file, id)S1MiniPolisher.generationOnDeviceLanguageModel.leftoverManualClockwhere it sleeps on a clock, on aGatewhere it waits on other work. A table maps each detached task to its test. The exempt fire-and-forget idempotent ones are named:refiner.prepare(),S1MiniPolisher.warmUpRuntime,session.prewarm()andCorrectionLearner.pasted.The gap the table showed.
restoreOutputDevicechains each restore ontoprevious?.value, and nothing tested that. The newaSecondRecordingsRestoreWaitsForTheFirstholds the first recording'srecordingEndedon aGateand dictates a second time. Nothing may have ended before the gate opens; after it opens, the order must be[1, 2]. With the chain removed, the test failed 5 of 5 runs.Generation(as decided, Core only).public struct Generation: Sendable, Equatablewithcurrent,next()andisCurrent(_:), plus two small tests. It is adopted in:recordingIDbecomesrecording, andisCurrentreadsrecording.isCurrent(id);OutputMuteController.generation.The other sites are left as they are.
Deviation. The plan listed 15 sites. The table also names
OverlayPanel.generationin the app: the pill's show and hide completions check it.Tests and checks
swift build(no warnings) andswift test(622) are green.GenerationTests,OutputMuteControllerTestsandCoordinatorHandOverTestspassed 20 runs in a row.check-doc-pointers.sh, run over this tree: 33 pointers checked, all resolve.Benchmark
The
Generationchange is rename-level, but it is in the coordinator and the recording number is read on the press path, so here isbench-coordinator --runs 101. Apple M1, macOS 27.0, back to back.Before,
core/recording-engine-session(621023c), load 2.33 → 1.58:After, this branch (9b27e4c), load 1.53 → 1.40:
Merge note
#78 (
tests/no-ordering-sleeps) injects a clock intoOutputMuteController. This PR touches the neighbouring lines (generation), so whichever merges second has a small conflict there: keep both the clock andGeneration.For the developer
recordingStoppedandinsertedchanged: a few live dictations on an installed build, comparingrelease-to-pastelines.🤖 Generated with Claude Code