Skip to content

test: cover native instance lifecycle and retries - #9

Merged
RomainROCH merged 1 commit into
mainfrom
test/instance-lifecycle
Oct 14, 2026
Merged

RomainROCH merged 1 commit into
mainfrom
test/instance-lifecycle

Conversation

@RomainROCH

Copy link
Copy Markdown
Owner

What this PR does

Adds four native Windows cases around the production instance claim, retry and guard code: primary/secondary lifecycle, retry exhaustion, reclaim after the owner closes at the second probe, and the one-probe minimum for zero attempts. Each case uses a unique local GUID mutex, a fail-closed test-only name provider, and verifies final object removal. The development guide lists the focused target.

Why

The existing classifiers cover return-code decisions. These cases also exercise real Win32 handles and guard cleanup while keeping the protection runtime and production mutex names out of the fixture.

How it was tested

  • Local formatting, cargo check, documentation checks, strict all-targets/all-features Clippy and locked MSVC release build passed. The release binary was not launched.
  • The focused target passed all 9 executions: four native cases and five existing synthetic classifiers.
  • One completed local aggregate invocation passed 83 executions on head ecd92460c65466caf8989601fdc4edc8db49c133, with the native PowerRequest acquisition test explicitly excluded.
  • Full Windows CI must pass for the exact PR head before merge.
  • Documentation updated for the focused target.

An earlier local aggregate invocation reached its watchdog inside the unchanged status IPC test; that target subsequently passed in isolation and the later aggregate passed. The historical cause remains unknown. This patch changes neither production IPC nor its tests and claims no fix for that timeout. Live elevated relaunch, cross-token/process interactions and physical power transitions were not validated locally.

Checklist

  • This prepared lot starts from published main at b63c2e9da1f6112ecd602a2f40310421bfd041bc and targets main so its diff contains only the native mutex test and seven documentation lines. The older dev tip would include unrelated published changes.
  • No production, dependency, CI, release or business-model change.
  • Existing concurrent work is preserved.

@RomainROCH
RomainROCH marked this pull request as ready for review October 14, 2026 18:58
@RomainROCH
RomainROCH merged commit 1b95562 into main Oct 14, 2026
1 check passed
@RomainROCH RomainROCH mentioned this pull request Oct 14, 2026
8 of 11 tasks
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