Stabilize dev app launch verification#938
Closed
robinebers wants to merge 1 commit into
Closed
Conversation
85ac845 to
1ccc5a9
Compare
1ccc5a9 to
4c95f05
Compare
Owner
Author
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.
TL;DR
Make the local build-and-run script wait for the previous app process to finish and poll the replacement launch, eliminating a teardown race that could make a successful release verification look like a failure.
What was happening
pkilland immediately began rebuilding without confirming that the prior menu-bar process had exited.verifyslept for a fixed second and checked once, so process teardown or launch timing could produce a false failure.What this changes
Tests
bash -n script/build_and_run.shgit diff --check./script/build_and_run.sh verifycycles, including one clean release build and two cached rebuilds; every cycle built, signed, launched, and printed==> running.Note
Low Risk
Changes are limited to the local dev shell script and debugging docs; no runtime app or auth logic is modified.
Overview
build_and_run.shnow blocks on app lifecycle instead of firingpkilland rebuilding immediately. Every run waits up to five seconds for the priorOpenUsageprocess to exit (fails with a clear error on timeout), andverifypolls for up to five seconds after launch instead of a fixed one-second sleep plus a singlepgrep.docs/debugging.mddocuments those bounded waits and tightens how the dev bundle differs from release: app preferences and single-instance state stay on the dev bundle id, while provider credentials, databases, keychain, and API-key files remain shared on purpose.Reviewed by Cursor Bugbot for commit 4c95f05. Bugbot is set up for automated code reviews on this repo. Configure here.