Skip to content

fix(P1.1): hold flasher COM lease until timed-out OS process exits - #353

Merged
masarray merged 1 commit into
mainfrom
fix/p1-espflash-process-retirement-gate
Nov 3, 2026
Merged

masarray merged 1 commit into
mainfrom
fix/p1-espflash-process-retirement-gate

Conversation

@masarray

@masarray masarray commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Production safety milestone — P1.1 real process retirement

Root cause: FirmwareWorker called QProcess::kill() and immediately emitted operationTimedOut / operationLaunchTimedOut, even though kill is asynchronous. FirmwareManager could then clear busy and the supervisor could release firmware COM ownership while an external flasher process was still alive. This race risks overlapping serial owners and misclassifying a partial flash attempt.

Change: Worker now records the timeout termination cause, keeps the operation/generation active while the OS process terminates, and publishes a single timeout result only after finished or a FailedToStart acknowledgement has confirmed QProcess::NotRunning. A post-timeout late started is killed without restarting timers. Worker state is reset before terminal signals. Existing absolute supervisor deadline and failsafe retirement owner remain unchanged.

Evidence: Adds a real subprocess timeout/reuse regression to the existing S8 deterministic session harness. Runs a hung copy of the harness, verifies QProcess is already NotRunning when timeout arrives, then proves a clean second launch using a new generation. No extra CI workflow and no firmware engine rewrites.

Safety: No implicit flash/retry, SV/PTP restart, forced firmware update, unverified READY, or change to stable M3.H.3. No overlap with open M4 roster #350 or autonomous LAN #330. Hardware qualification still pending.

Merge gate: exact-head Qt/S8, Windows, C++, Security and other applicable CI green; do not count cancelled/skipped as pass.

… exits

Defer launch and operation timeout results until QProcess confirms termination, including FailedToStart races, rather than treating asynchronous kill() as an exit acknowledgement. Clear worker generation before publishing one terminal result. Exercise a real hung subprocess and clean worker reuse in the native S8 harness.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T18:47:22.363656Z
We couldn’t complete this review. Comment @codex review to try again.
7272053 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@masarray
masarray merged commit 3edcf71 into main Nov 3, 2026
9 checks passed
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