Skip to content

Drop the engine's caller-convenience defaults; spell them out at every call site - #429

Merged
alexkroman merged 6 commits into
mainfrom
claude/gifted-faraday-r6lrd7
Nov 26, 2026
Merged

alexkroman merged 6 commits into
mainfrom
claude/gifted-faraday-r6lrd7

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

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

…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
@alexkroman
alexkroman enabled auto-merge November 25, 2026 21:49
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
@alexkroman
alexkroman added this pull request to the merge queue Nov 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 25, 2026
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
@alexkroman
alexkroman added this pull request to the merge queue Nov 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 26, 2026
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
@alexkroman
alexkroman enabled auto-merge November 26, 2026 00:05
@alexkroman
alexkroman added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

The latest merge-queue run (45728466951) failed only on the macos job's xcodegen drift check, which isn't this PR's change. That runner's xcodegen 2.48.0 writes LastUpgradeCheck = 1600 where the committed App/Blurt/Blurt.xcodeproj/project.pbxproj has 1430. This PR doesn't touch project.yml or the project file, and the same check passed in this PR's own CI on c6ff05f. The result depends on which xcodegen version Homebrew installs on the runner. Every other job passed (compile, live-tests, the iOS jobs, the UI tests, and the swift test runs, plain and under the address sanitizer).

#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

@alexkroman
alexkroman added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 2547470 Nov 26, 2026
22 checks passed
@alexkroman
alexkroman deleted the claude/gifted-faraday-r6lrd7 branch November 26, 2026 02:09
alexkroman pushed a commit that referenced this pull request Nov 26, 2026
#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants