Repository navigation
Decide the pipeline's press once, when its task is spawned - #420
Merged
Merged
Conversation
performRelease now takes the press's PressContext on the turn that spawns the transcribe-inject task and hands it to runTranscribeInject(press:), which passes it on to awaitUpload, inject and a new setPhase(_:for:). The paste's priorText/windowTitle, the transcript log and the failure log all read that press's context, so nothing after release reads the actor-wide pressContext/capturedContext for it. Before, only the transcript log took a snapshot (97d29ee), partway through the function; inject and setPhase's failure log still read the shared slot a later press overwrites. That was correct only because no suspension point separated those reads from the press that set them, which a comment protected. setPhase(_:) keeps logging against the current press for the press side, where the command queue rules out a newer one. No behaviour change for any sequence the public commands can produce: a press is refused until the phase is terminal, and the cancel that makes it terminal also cancels the pipeline before it pastes or logs. The new tests install a second PressContext mid-pipeline directly and check that the first press's paste context and failure log survive it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
The two tests ran the same seven-step dictation across a later press; jscpd counted them as a clone. One helper now runs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
… CI run Recent multi-commit PRs (#410, #413, #414, #416, #420, #422, #423, #425, #426) mostly spent their extra ~37-minute runs on things nothing caught before CI: - scripts/check-swift-lint-lite.sh: a toolchain-free text match for the opt-in SwiftLint/swift-format rules it can see (modifier_order, no_empty_block, NoBlockComments, swift-format's `catch where`). Run by check.sh (so --portable and --lint-only) and the swift-budgets edit hook; would have flagged the pre-fix files of #414, #422 and #425. - .claude/hooks/push-gate.sh: a PreToolUse hook that runs `check.sh --portable` (~20 s) before any `git push` and blocks a red one — jscpd clones (#420, #422) and post-merge size overruns (#363, #378) were pushes that skipped the documented portable run. - AGENTS.md / CLAUDE.md: a "Rules only CI catches" list for the rest (variable_shadowing, one_declaration_per_file, type_contents_order, multiline_function_chains, MemberImportVisibility, one argument per line), and the new hook and script in the hooks table and permissions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1UDUZXyuF6g7GUmmNu
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 25, 2026
One conflict, in DictationSession+Pipeline.swift: #418 renamed the password verdict to one targetSecurity value in two comments this PR had rewritten around the press it now threads through. Kept this PR's change with #418's names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
alexkroman
enabled auto-merge
November 25, 2026 21:33
One conflict, in DictationSession+Pipeline.swift: #398 renamed the too-short check's error to the provider-neutral TranscriberError on the line this PR made log against its own press. Kept both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
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 & why
performReleasenow takes the press'sPressContexton the turn that spawns the transcribe→inject task and passes it intorunTranscribeInject(press:). From there it goes toawaitUpload(press:), toinject(_:security:press:)and to a newsetPhase(_:for:). Every pipeline-tasksetPhasepasses it, so the failure log uses this press'spress?.resolved. The paste'spriorText/windowTitle, the remember decision, the transcript log and the failure log now all read the press the pipeline was started for.Before, 97d29ee took
let press = pressContextpartway throughrunTranscribeInject, but only the transcript log used it.injectstill read the sharedcapturedContextfor the separator and window title, andsetPhaselogged failures againstcapturedContext. A later press overwrites that slot: a cancel during the paste ends the phase without waiting for the task. Those reads were correct only because no suspension point sat between them and the press that set them, and only a comment protected that.setPhase(_:)stays as the press-side form and forwardspressContext; on that side the command queue rules out a newer press.capturedContextstays too:stopAndCancel's failure log and existing tests read it.Behaviour change: none for any sequence the public commands can produce. A press is refused until the phase is terminal, and the cancel that makes it terminal also cancels the pipeline. The difference only shows if another press's context is installed while the pipeline is still live: the earlier press's paste spacing context, failure-log context and transcript-log context then stay its own.
How it was tested
Written in a Linux sandbox with no Swift toolchain:
scripts/check.sh --portablepasses, as docheck-swift-size.shandcheck-test-clock.sh. CI on macOS verifies the build, tests, swiftlint and swift-format.New
Tests/BlurtEngineTests/PipelinePressContextTests.swift(usesTestClock, no wall-clock waits). A gated transcriber holds the pipeline after release while a test-only extension installs a second, settledPressContext; then the transcript is let through.priorText/windowTitle.The test installs the second context directly, because the public commands can't reach that state while a pipeline is live.
DictationSession.swiftis now at 391/400 lines.scripts/check.shpasses (or CI will, if I'm not on a Mac)I read AGENTS.md and this doesn't reintroduce anything
deliberately removed
Docs updated if behavior changed
Generated by Claude Code