Skip to content

fix(windows): avoid idle WSL wakeups and preserve project identity - #1453

Merged
yyjeqhc merged 5 commits into
mainfrom
fix/1448-wsl-idle-probes
Nov 28, 2026
Merged

yyjeqhc merged 5 commits into
mainfrom
fix/1448-wsl-idle-probes

Conversation

@yyjeqhc

@yyjeqhc yyjeqhc commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Closes #1448.

Changes

  • Skip unsolicited WSL UNC path probes during passive project inventory and unrelated local Windows tasks. Keep explicit filesystem resolution and authorization checks.
  • Preserve a deferred root separately from the verified canonical path and fingerprint. Explicit project access re-observes the exact registration, checks the Runner instance, revision and incarnation, and does not silently retarget an existing project reference or Workflow Session. Passive discovery never needs to wake WSL.
  • Allow removal of legacy oversized Desktop root lists, retain shared authorization on unregister, and distinguish active jobs, changed registrations and pending inventory synchronization.
  • Publish the updated Runner file-access policy after hot reload, with stale connection and generation guards.

Validation

  • Independent review: 734 tests passed across runner-config, runner-registry and environment; the new Runner read-only identity/policy test passed.
  • Desktop: 829 tests passed; TypeScript and CSS contract checks passed.
  • Added registry, Runner and Server project-reference regressions, plus extended native Windows/WSL smoke coverage for Session continuity.
  • Final Server regression passed on the pushed head (736 Rust tests passed in the final focused validation chain); formatting and diff checks passed. CI is pending. The native Windows + WSL2 idle smoke has not yet been executed; this PR does not claim native reproduction or validation.
  • The original implementation's Linux WebSocket/polling integration checks were reported by its author.

…pgrades

Negotiate deferred root inventory with older Servers, retain authorized history through existing Project Refs, and reuse the verified request target for Session checks and process execution. Handle Windows waking the selected WSL share on a failed first open before starting the task.
Keep the already authorized target on normal dispatch and defer the direct shell lookup until the command and execution budget pass validation. Exercise both Windows execution entry points in the cold WSL smoke.
…f passive

Treat deferred inventory as a registration property throughout its lifetime. Pass the observed target to explicit Handoff workspace and checkpoint reads, and exercise directory replacement and dormant WSL handoff on the existing regression paths.

@swjnxyf swjnxyf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 752e092 in the exact clean special checkout. Both prior findings are addressed: deferred-root classification is again a registration property, not a cached-fingerprint freshness heuristic; explicit live resolution re-observes the root, and default Handoff stays passive even after prior observation. Explicit Handoff workspace capture and checkpoint listing reuse the already-authorized resolved target through existing helpers. The regressions now exercise a real Unix directory-to-symlink replacement with unchanged revision, denial of stale Session and Ref, default Handoff after an observation, and single-probe explicit workspace/shell execution. The native WSL script includes stopping the previously accessed distribution before default Handoff. No new state machine, persistence domain, or user-facing recovery steps. Exact-head CI run 46115316369 succeeded; diff check passed. Native WSL and complete local test results are author-reported, not independently rerun in this review. No blocking findings. Please refresh the stale PR description to record the final validation and mixed-version limitation (legacy Server retains root checks until upgraded). Approved for merge.

@yyjeqhc
yyjeqhc merged commit 13e4e18 into main Nov 28, 2026
19 checks passed
@yyjeqhc
yyjeqhc deleted the fix/1448-wsl-idle-probes branch November 28, 2026 06:38
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.

[Bug / Windows] v0.5.1 空闲时反复唤醒 WSL2:取消注册后残留的 allowed_roots 仍可能触发路径访问

2 participants