Repository navigation
fix(update): swap back to the previous app when an updated InkFlow does not start - #350
Conversation
…es not start Refs #343
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…he checked process exits Refs #343
Orchestrator review: acceptedOn
Own checks: Ran the helper as root with a scratch app (own bundle ID and folder) through launchctl asuser. On main, a build that exits, hangs or crashes after 2 s is reported as installed and stays. On f483bee all three end with the previous build installed and running (7 s, 22 s, 8 s), the staging folder gone and no process of the new copy left. A healthy build is installed in 6 s, also while the app is opened again every 50 ms. An independent read-only security review of 625efbf found no new way to gain root or install another app. Its points on several sessions, the launch race and the kill loop became the rework, as spec changes and not implementer defects. Deviations: None. Open for the user:
|
Summary
Closes #343
When an updated InkFlow starts in none of the sessions, the root helper swaps the previous app back, kills the new copy and starts the previous app again. One session that starts keeps the update.
--startlooks once more at another process at the target path if the checked one fails, and waits forisFinishedLaunchingand then 5 s of life. 「设置 → 更新」 shows the update as not installed when a sent update did not take.Acceptance (final commit, after rework round 1)
bash macOS/scripts/test.sh updater: pass (ok session outcomes,ok processes,PASS 1 units: updater).First new case (first round) on the old
replace(the kill closure existed,replaceunchanged):bash macOS/scripts/test.sh input-source-lifecycle: pass (PASS verify started: ...,PASS 1 units: input-source-lifecycle).bash macOS/scripts/test.sh settings: pass (PASS update sent: ...,PASS update problem store: ...,PASS 1 units: settings).bash macOS/scripts/build.sh: exit 0.python3 -B scripts/docs-lint.py,comment-lint.py --base origin/main,style-lint.py --base origin/main: no output, pass.git status --porcelain: empty after the commit.Deviations and open issues
startAndVerifysecond look (tested with an injectedlaunchclosure; the lifecycle test fails without the second look withexited after it started),kill(running:)repeats and re-checks the path, docs rewrapped.kill staged build N, with N the installed build, to check the order.sudo, the installed InkFlow, the Settings UI. Whether a real InkFlow reachesisFinishedLaunchingwithin 15 s is from the issue's measurement (about 0.45 s).proc_pidpathof a running new copy is assumed to report the staging path; the system kill test covers only a process started at that path.sessionOutcomesno longer asserts that a failed start keeps the new app.Delivery record