Skip to content

fix: share status fallback connection budget - #8

Merged
RomainROCH merged 3 commits into
mainfrom
fix/status-fallback-latency
Oct 7, 2026
Merged

RomainROCH merged 3 commits into
mainfrom
fix/status-fallback-latency

Conversation

@RomainROCH

@RomainROCH RomainROCH commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

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, --status no 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: main at 32027eeb6959ab848cf74a1b174bb981ec5e8ed1. This correction was prepared from that explicit base. Targeting the older dev branch would include unrelated changes already present on main; the diff against main is limited to the two IPC/CLI modules, one regression test and their owning docs.

How it was tested

  • scripts/check.ps1 -Mode Full passes for Rust changes (PR and merged-main Windows CI passed)
  • Relevant smoke/manual checks run in an isolated environment, or skips explained
  • Docs updated if behavior changed

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/--version checks and its embedded manifest remains asInvoker. 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

  • Base branch stated; the explicit main-based integration target is explained above
  • Intentional architecture changes include rationale; unrelated drift is reported
  • Business-model changes reflect an explicit maintainer decision (no business-model changes)

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 commit b63c2e9da1f6112ecd602a2f40310421bfd041bc. 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 into main, and the merged tree is identical to the tested head. No release or deployment is part of this PR.

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.
@RomainROCH
RomainROCH merged commit b63c2e9 into main Oct 7, 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