Repository navigation
fix(app): bound the quit drain so a stalled subsystem cannot strand updates - #139
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…re pending Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… forever Co-authored-by: Cursor <cursoragent@cursor.com>
…after an update Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.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.
Outcome
Quitting Utter can no longer hang forever on a stalled subsystem. After 5 seconds the process replies "terminate" and exits, and the persisted system log names the plugin that held it up. This stops an update from stranding the app: on 2026-10-26 a 0.0.58 process never finished quitting when Sparkle asked it to, so 0.0.59 never installed and reopening Utter only re-activated the stranded process.
No GitHub incident issue has been filed; the incident evidence is in the intent.
SDLC bundle and risk
docs/sdlc/changes/2026-10-26-shutdown-drain-deadline/(intent, spec, plan and verification approved 2026-10-26)ApproveDone 2026-10-26 (accepts the unmeasured items below).verification.mdverification.mdadded by hand.What changed
UtterRuntime/BoundedWait: awaits an operation for at most a limit, then abandons it. A task group is deliberately not used because it would wait for a stalled child too.PluginRuntime:disposingPluginIDandpendingDisposalPluginIDs.stop()semantics are unchanged.UtterBuiltins/ApplicationShutdown: 5 s bound over startup wait plusstop(). Timeout or a thrown error logs withLog.error(ids and error type names only) and still exits. This supersedes the "nothing is force-killed" line of the 2026-10-17 auto-update spec for a drain that does not end; that spec is not edited.AppDelegate: always repliestrueafter the bounded drain. The alert-and-cancel branch is removed.Verification
Evidence is committed in
verification.md.bash scripts/sdlc-checks.sh(the template'sscripts/sdlc.pydoes not exist in this repository)bash scripts/ci-basic-checks.shswift test: exit 0, 579 XCTest tests, 24 skipped (env-gated model tests), 0 failures; 11 new testsscripts/build-app.sh --app-only, ad-hoc signed, not a release artifact)Shutdown exceeded 5s; disposing: verify.stall; pending: [...]. Control build exits in 0.43 s, release-style build with models loaded in 0.16 s, no error log in either.verification.md).Residual risk and rollback
com.opentype.voiceinput) forShutdown exceeded; the first hit starts a separate root-cause intent.Reviewer focus
BoundedWait: the one-shot race (worker vs timer), and that a late worker completion after the timeout is inert.PluginRuntime.stop(), not inside it, so the runtime's deliberate patience for non-cooperative work (and its test) is preserved.