Repository navigation
fix(cli): let akou start wait out a new bundle's slow first launch instead of failing at 3 s - #360
Merged
Merged
Conversation
… up at 3 s The first open of a newly installed bundle takes longer than 3 s: Gatekeeper assesses it, and the wrapper unpacks the app over itself and opens it again. `akou start` gave up at 3 s while the app was about to answer, and the wrapper stayed behind, idle, so every later `open -a` took it for the running app. The CLI now waits up to 20 s while the launch is still in progress (the program it ran, a process holding the app lock, or a process of the bundle is alive), fails within half a second once none is, and once the app answers stops the bundle's launchers that have nothing below them, never the app's. APP_LOCK moves to app-info.ts so the client reads the lock without loading the app. Closes #356
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…es no process behind
GeiserX
added a commit
that referenced
this pull request
Oct 9, 2026
…aker and akou start and akou quit finish (#374) ## Problem On 0.6.4, with the Nemotron diarizer on, every call line waited about 2 s for its speaker before it reached the transcript. The first `akou start` after an install gave up at 3 s while the app was still coming up. `akou quit` on Linux could hang after a call. All three are fixed on main and no release carries them yet. ## What 0.6.5 ships - A call line is written when its segment closes, and its speaker follows as a correction to the same line (#359). - `akou start` waits up to 20 s for a slow first launch and stops the idle launcher afterwards (#360). - `akou quit` always finishes on Linux (#367). - A search hit names the speaker who said the matched word (#365). - A file job without speaker labels fetches, and is admitted for, only the models it runs (#364). - Three messages no longer point at a command that cannot help (#366). - Behind the scenes: G1 and G3 pass, G4, G6 and G7 stay Partial (#354, #357, #358, #362, #363, #371, #372), the dictation audio tests wait for the write (#361), and `glama.json` (#373). The Known limitations list in CHANGELOG.md names what the reviews left open: late first lines after a cold start, the four-core x64 line latency, a launcher left by an earlier failed launch, the silent wait in `akou quit`, and two search citation cases. ## The bump - `scripts/stamp-version.ts --set 0.6.5` wrote the 11 stamped places. - By hand: the install line in README.md, the image tags and the `--branch` line in docs/server.md and docs/server-hardware.md, and the "Known in" line in docs/troubleshooting.md. The menu bar item still moves, since nothing touched it after 0.6.4. - docs/gates and docs/ROADMAP.md keep the versions their evidence ran on. - `stamp-version.ts --check --tag v0.6.5` passes, and `--tag v0.6.6` fails as the control. The tag is pushed after the merge.
GeiserX
added a commit
that referenced
this pull request
Oct 10, 2026
…er the watchdog reopens it (#384) Last night the watchdog ended a hung 0.6.5 and opened akou again, and nothing came up. The app stayed down for eight hours. A launcher with no app under it had been alive since the install, and `open -a` activated that instead of starting the app. The same leftover launcher showed up after installing 0.6.2, 0.6.4 and 0.6.5. Where it comes from: the release wrapper unpacks the app, opens it, then shows an "Installation complete" panel and waits for a click on Close. Until someone clicks, it is that launcher. ElectroBun's wrapper exits by itself when `ELECTROBUN_INSTALLER_UI_AUTOCLOSE=1` is set. What changes: - The build writes that variable into the wrapper's `Info.plist`, so the wrapper exits after the first open however it was opened. - The watchdog's reopen stops leftover launchers of the bundle, opens with `open -n -a`, waits for the new app to answer, tries once more, and writes the outcome to `app.log`. - The app stops leftover launchers of its own bundle when it starts. That covers wrappers from 0.6.5 and older. - The cleanup `akou start` got in #360 never stopped a real wrapper. The wrapper keeps an exited, unreaped `open` child, and any child counted as "has an app". The test wrapper now has that child too. - The release job opens the built zip for the first time and fails if a launcher is left. Measured on GitHub's macOS runner with the signed 0.6.5. Without the variable the wrapper stays and a second open starts nothing; with it the wrapper is gone within 10 s: https://github.com/GeiserX/akou/actions/runs/38039278420 The new first-open check fails on 0.6.5, as it should: https://github.com/GeiserX/akou/actions/runs/38041558121 Not covered: `akou start` with a leftover launcher and no app still waits 20 s and fails (akou-an0).
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.
Problem
The first
akou startafter installing a new build failed with "akou did not answer within 3 s of launching", whileapp.logshowed the app starting a moment later (#356). The first open of a new bundle is slow: Gatekeeper assesses it, and the wrapper unpacks the app over itself and opens it again. The CLI gave up at 3 s. The wrapper then stayed behind, idle and with no child. While it ran, every lateropen -atook it for the running app and started nothing, so the CLI could not start akou until that process was stopped.Fix
launch.logandapp.log, and now says how the launched program ended.APP_LOCKmoves toapp-info.ts, so the client reads the lock without loading the app. The design's 3 s cold target is unchanged. Only the point where the CLI gives up moves.Tests
Red before the fix, green after, in
tests/cli-launch.e2e.test.ts:open. Afterwards the wrapper is gone, and the app and its launcher are still running.openthat starts nothing. Both fail in under 2 s, naming both logs.Also added:
strayLaunchersunit cases intests/cli-heal.e2e.test.ts, including the process asking and its ancestors.The two bundle tests need
psand skip on Windows.check:win32maxSkipgoes from 92 to 94.Not verified: a real first open of a freshly installed signed DMG bundle. The wrapper's behaviour is modelled on the process table recorded in
docs/gates/dc-k1-accessibility-grant.mdand the G3 and G7 notes.Closes #356