Skip to content

fix: synchronize status pipe shutdown - #11

Merged
RomainROCH merged 1 commit into
mainfrom
fix/status-shutdown-wakeup
Oct 14, 2026
Merged

RomainROCH merged 1 commit into
mainfrom
fix/status-shutdown-wakeup

Conversation

@RomainROCH

Copy link
Copy Markdown
Owner

What this PR does

Synchronizes the status worker's final shutdown check and pipe-instance creation with the shutdown request. The mutex is released before ConnectNamedPipe; shutdown sets its flag under the same mutex and wakes afterward. Failed-startup cleanup also wakes status when its ready ACK is still queued.

Adds a process-isolated regression that observes actual mutex contention, verifies worker/UI joins and endpoint cleanup, and preserves failure after any rescue connection. Test hooks compile only under cfg(test).

Base: main at 1b95562. Local head: f639b56. Two files changed. PR10 remains a separate draft diagnostic.

Why

Shutdown could attempt its only wake while no status instance existed, then join a worker that created its next pipe and waited indefinitely for a client. The exact final regression fails on the old main worker with ERROR_FILE_NOT_FOUND, requires an owned-fixture rescue, verifies cleanup and returns exit101. The corrected worker finishes without rescue. This reproduces a real defect; the historical CI stall's cause remains unproven.

How it was tested

  • Same final fixture on old and corrected workers, unique inert endpoints and no protection runtime.

  • Safe Rust aggregate: 85 successful executions including one nested child; native Power Request acquisition test explicitly skipped.

  • Formatting check, strict Clippy all-targets/all-features and release MSVC build: offline/locked, passed.

  • Docs: 26 Markdown files passed; local anchors are not checked.

  • Smoke safety: seven preflight fixtures and cleanup checks passed with fake processes/tasks.

  • Release binary --help/--version passed with empty stderr and unchanged SHA256. No state-changing runtime smoke or physical/elevated acceptance was run locally.

  • scripts/check.ps1 -Mode Full passes for Rust changes (or -Mode Docs for docs only). Full was not run locally because it includes a real Power Request test; its safe components above passed.

  • tests/developer_checks.ps1 if developer tooling changed: not applicable; tooling unchanged.

  • tests/smoke_safety.ps1 passes.

  • Relevant smoke/manual checks run in an isolated environment, or skips explained above.

  • Docs updated if behavior changed: existing contract restored, no contract change.

Checklist

  • Base branch stated; main is the requested integration target.
  • Existing IPC architecture retained: control/status separation, same-user/elevation checks, request bounds and pipe modes preserved. Existing connected-response waits and control startup cleanup paths remain separate scope.
  • Business-model changes: not applicable.

@RomainROCH
RomainROCH merged commit a443a74 into main Oct 14, 2026
1 check 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