Skip to content

fix(setup): terminate stalled preflight once - #72

Merged
Sykezzz merged 1 commit into
district-mainfrom
codex/windows-setup-single-termination
Aug 13, 2026
Merged

fix(setup): terminate stalled preflight once#72
Sykezzz merged 1 commit into
district-mainfrom
codex/windows-setup-single-termination

Conversation

@Sykezzz

@Sykezzz Sykezzz commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • prevent the timeout cleanup path from running a second time in finally
  • keep one bounded taskkill/force-stop path and exit code 2
  • preserve exact signer, trust, and backend verification gates

Verification

  • uv run --locked python -m pytest tests/test_build_profiles.py -q (11 passed)
  • git diff --check

Immediate blocker

Exact-SHA run 31738514446 showed the outer 10-second test timing out after two consecutive five-second cleanup attempts. The process object was not refreshed before finally; clearing handled ownership makes the bounded path execute once.

Clear timeout ownership after bounded process termination so the finally block cannot repeat the five-second cleanup path. Preserve the same fail-closed exit code and signer integrity checks.
@Sykezzz
Sykezzz enabled auto-merge August 13, 2026 20:11
@Sykezzz
Sykezzz merged commit 3808736 into district-main Aug 13, 2026
17 checks passed
@Sykezzz
Sykezzz deleted the codex/windows-setup-single-termination branch August 13, 2026 20:13

@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: 8fe395e428

ℹ️ 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".

-WindowStyle Hidden -PassThru
if (-not $process.WaitForExit($TimeoutSeconds * 1000)) {
Stop-PreflightProcess $process
$process = $null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Confirm termination before clearing the process handle

When Windows signer inspection times out and taskkill itself exceeds five seconds, Stop-PreflightProcess kills taskkill and issues a silenced Stop-Process request but never waits for or rechecks the target's exit. Unconditionally clearing $process then prevents finally from retaining cleanup ownership, so a failed or asynchronous force-stop can leave the signer/provider running after Setup reports the timeout and can keep the redirected temporary files open. Only clear the handle after termination has been confirmed within the bounded cleanup period.

Useful? React with 👍 / 👎.

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