Repository navigation
fix: share status fallback connection budget - #8
Merged
Merged
Conversation
Keep the initial status discovery grace and let the legacy control fallback use only the remaining absolute two-second connection retry budget. Preserve ordinary control retries, protocol and access checks. Local checkpoint: formatting and documentation checks passed. Offline compilation is blocked by missing Cargo archives; Rust tests and before/after CLI measurements have not run. Do not treat this checkpoint as runtime verified.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Share one two-second connection-retry deadline between the read-only status pipe and its legacy control fallback. When the session mutex is occupied but both endpoints are absent,
--statusno longer starts two full retry windows.Why
The initial status startup grace remains available. The fallback still attempts to open an available legacy control pipe even after the deadline, and ordinary control commands retain their existing retry policy. Malformed replies, busy pipes and access failures keep their existing error classification. Protocol, same-user/elevation checks and independent status handling are unchanged. Connected reply reads remain outside this budget, so this is not an end-to-end command timeout.
Base:
mainat32027eeb6959ab848cf74a1b174bb981ec5e8ed1. This correction was prepared from that explicit base. Targeting the olderdevbranch would include unrelated changes already present onmain; the diff againstmainis limited to the two IPC/CLI modules, one regression test and their owning docs.How it was tested
scripts/check.ps1 -Mode Fullpasses for Rust changes (PR and merged-main Windows CI passed)Local Windows MSVC checks passed: formatting, locked compilation, strict Clippy for all targets/features, documentation checks and release build. The safe Rust suite passed 74 test executions with no failures; the one native PowerRequest activation test was excluded. The focused status-budget target passed eight executions, also included in the full safe suite.
The isolated IPC regression covers absent endpoints, delayed status startup, initial opens after deadline expiry, available legacy fallback, malformed replies and busy-pipe error classification, subsequent valid requests and orderly shutdown. Test endpoints are unique and use an inert command consumer.
Before/after CLI fixtures were built from exact Git archives with only three endpoint-name constants substituted. Across three occupied-mutex/absent-pipe launches per version, median elapsed time fell from 3881.792 ms to 2109.8638 ms (45.647%). All twelve CLI samples retained the same exit codes and output, normalizing only log timestamps. First-launch timing outliers are retained; this is evidence for the isolated case, not a universal total-duration guarantee.
The release binary passed read-only
--help/--versionchecks and its embedded manifest remainsasInvoker. No local Block/Allow smoke, real suspend, Task Scheduler or security-setting changes were performed. Previous VM power acceptance is separate from physical hardware validation.Developer tooling and smoke setup/cleanup are unchanged.
Checklist
Independent implementation and compatibility review found no remaining blocker, and publication-content gates passed. PR CI 37674996303 passed for head
c06309c9e3d52b4519d9057766656715b8b9fa3b; main CI 37678633081 passed for merge commitb63c2e9da1f6112ecd602a2f40310421bfd041bc. Both completed Full local checks, developer tooling tests, smoke safety tests, release guard tests and Windows smoke, followed by the checked-binary workflow artifact. The PR is merged intomain, and the merged tree is identical to the tested head. No release or deployment is part of this PR.