Skip to content

Fix updater relaunch deadlock - #50

Merged
bifrost-proxy merged 2 commits into
mainfrom
codex/fix-update-relaunch
Aug 22, 2026
Merged

bifrost-proxy merged 2 commits into
mainfrom
codex/fix-update-relaunch

Conversation

@bifrost-proxy

Copy link
Copy Markdown
Owner

Summary

  • complete the termination persistence flush without depending on the blocked MainActor
  • defer updater-triggered termination until the installer task returns
  • add an isolated process-exit regression and run it in CI/release workflows

Validation

  • swift build
  • swift run Pesty --verify-localization
  • swift run Pesty --verify-history-settings
  • swift run Pesty --verify-updater
  • scripts/test_update_termination.sh .build/debug/Pesty
  • isolated seed + two restart UI regression
  • scripts/test_deletion_sync.sh .build/debug/Pesty
  • git diff --check
  • git diff --cached --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee8dccdccc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/test_update_termination.sh Outdated

timed_out=1
for _ in {1..150}; do
state="$(ps -o state= -p "$test_pid" 2>/dev/null | tr -d ' ')"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Tolerate ps failure after the child exits

When Pesty exits normally and Bash reaps it before this poll, ps -p "$test_pid" finds no process and returns nonzero; because pipefail and errexit are enabled, the assignment terminates the script before the empty-state check, wait, and result assertion. This makes the newly mandatory CI and release checks fail precisely when termination succeeds; tolerate the expected ps failure before examining state. This prevents reliable verification of the updater's required old-PID exit behavior.

AGENTS.md reference: AGENTS.md:L468-L470

Useful? React with 👍 / 👎.

@bifrost-proxy
bifrost-proxy merged commit 95c6c88 into main Aug 22, 2026
1 check passed
@bifrost-proxy
bifrost-proxy deleted the codex/fix-update-relaunch branch August 22, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant