Repository navigation
Drop the engine's caller-convenience defaults; spell them out at every call site - #429
Conversation
…y call site The engine's seams carried default implementations so a conformer could skip a requirement, and a few signatures carried default arguments so a caller could skip a parameter. Nothing outside this repo uses the engine, so every conformer and caller now says what it means instead: - InjectorProtocol.insertAtFocus, TranscriberProtocol.warmUp, MicCaptureProtocol.levels/warmUp/cancelCapture, VoiceCommandPerforming.settle/commandStarting/commandEnded and PCMSink.currentLevel/bufferedSeconds lose their protocol-extension defaults. The test stubs, the Mac UI-test doubles, the iPhone audio sources, FakeListeningSource and KeyboardRelayInjector implement them. MicCaptureProtocolDefaultsTests, which only covered the defaults, goes. - KeyInjector.insert, KeyboardRelayInjector.insert and FocusedFieldContext.init no longer default `security` (or, for KeyInjector, `after`/`windowTitle`); the tests pass them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Tq4varbQwVo1ke2RD
FocusedFieldContext.empty still leaned on the dropped security default, which broke every build. The stubs' new levels/settle properties sat among their methods, tripping SwiftLint's type_contents_order and let_var_whitespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Tq4varbQwVo1ke2RD
The protocol's throwing default used to make the bring-up test's try? valid; with it gone the call resolves to MicCapture's non-throwing method and the compiler rejects the try. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Tq4varbQwVo1ke2RD
PipelinePressContextTests' field and SystemVoiceCommandPerformerFrontTests' NeverForwardPerformer arrived on main after this PR branched and leaned on the security default and the VoiceCommandPerforming defaults it removes, which failed the merge-queue run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Tq4varbQwVo1ke2RD
main gave TranscriberProtocol a new requirement, contextPrompt(for:), with a protocol-extension default beside the warmUp default this PR removes. Resolve the conflict the PR's way: no extension, and every stub transcriber states its empty prompt. DictationSessionPromptLogTests, also new on main, now passes its field's security and implements warmUp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Tq4varbQwVo1ke2RD
|
The latest merge-queue run (45728466951) failed only on the #427 removes the committed project and this check, so the fix is to land #427 first and then re-queue this PR. Re-queuing it as it stands passes only if the queue runner happens to get xcodegen 2.46. Generated by Claude Code |
#429 dropped PCMSink's protocol-extension defaults, so the new unplayedAudioSeconds requirement is spelled out in RecordingSink, LevelSink and QueuedSink rather than defaulted. Also: rename the paste helper to pasteResult(of:) so it can't collide with the session's phase property, and avoid shadowing in ClipRecordingSink's locks (variable_shadowing); WAVWriter's header length sits with the other stored members (type_contents_order). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1TigD3UJirWY4XngbB
The engine's seams carried default implementations so a conformer could
skip a requirement, and a few signatures carried default arguments so a
caller could skip a parameter. Nothing outside this repo uses the engine,
so every conformer and caller now says what it means instead:
MicCaptureProtocol.levels/warmUp/cancelCapture,
VoiceCommandPerforming.settle/commandStarting/commandEnded and
PCMSink.currentLevel/bufferedSeconds lose their protocol-extension
defaults. The test stubs, the Mac UI-test doubles, the iPhone audio
sources, FakeListeningSource and KeyboardRelayInjector implement them.
MicCaptureProtocolDefaultsTests, which only covered the defaults, goes.
FocusedFieldContext.init no longer default
security(or, forKeyInjector,
after/windowTitle); the tests pass them.Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01DS5B1Tq4varbQwVo1ke2RD