Skip to content

Stabilize dev app launch verification#938

Closed
robinebers wants to merge 1 commit into
mainfrom
codex/stabilize-dev-launch
Closed

Stabilize dev app launch verification#938
robinebers wants to merge 1 commit into
mainfrom
codex/stabilize-dev-launch

Conversation

@robinebers

@robinebers robinebers commented Jul 10, 2026

Copy link
Copy Markdown
Owner

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

  • The script sent pkill and immediately began rebuilding without confirming that the prior menu-bar process had exited.
  • verify slept for a fixed second and checked once, so process teardown or launch timing could produce a false failure.

What this changes

  • Waits up to five seconds for the prior process to exit after requesting termination.
  • Polls the new process for up to five seconds and reports lifecycle timeouts loudly.
  • Documents the bounded lifecycle checks in the debugging guide.

Tests

  • bash -n script/build_and_run.sh
  • git diff --check
  • Three consecutive ./script/build_and_run.sh verify cycles, 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.sh now blocks on app lifecycle instead of firing pkill and rebuilding immediately. Every run waits up to five seconds for the prior OpenUsage process to exit (fails with a clear error on timeout), and verify polls for up to five seconds after launch instead of a fixed one-second sleep plus a single pgrep.

docs/debugging.md documents 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.

@github-actions github-actions Bot added the docs label Jul 10, 2026
@robinebers robinebers force-pushed the codex/stabilize-dev-launch branch from 85ac845 to 1ccc5a9 Compare July 10, 2026 01:00
@robinebers robinebers added the gate-passed Passed the automated PR gatekeeper checks (gatekeeper skips it on later runs) label Jul 10, 2026 — with Cursor
@robinebers

Copy link
Copy Markdown
Owner Author

Superseded by #949, which combines deterministic process lifecycle verification with the warning-free build gate in one cohesive quality-tooling PR. #949 preserves this script/docs fix, is fully green, and is substantially easier to review. This branch remains preserved; nothing was merged.

@robinebers robinebers closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs gate-passed Passed the automated PR gatekeeper checks (gatekeeper skips it on later runs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant