You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(wsl): background repo probes, PR refresh and worktree scans never start a stopped distro (E9) - #34632
If you stop a WSL distro (for example with wsl --terminate), Orca shouldn't quietly start it again behind your back. Some of Orca's background work still read the distro's files or ran Git or gh in it while it was stopped, and any of those wakes the distro. These paths now check whether the distro is running and wait until it is, instead of starting it.
User risk: for projects on a running distro, and for projects that aren't WSL at all, nothing changes. A host path never even asks the running check; for those the code takes the same path as before. The only change is that while a WSL distro is stopped, background refreshes for its projects pause and keep what they already know. Opening something in the distro, or anything else that starts it, lets them resume.
What Changed
I audited every background (non-user) path that can touch \\wsl.localhost / \\wsl$, or run Git/gh for a WSL project, against the stopped-distro gate from #34222/#34231. The paths below didn't ask it. Each now calls blockedWslDistroForPath first and skips the work if the distro is stopped or unverifiable.
scanRootShared read <repo>/.agents/skills and the provider skill folders over UNC; plugin discovery read the cwd
Roots on a blocked distro are left out (not reported missing, so the next scan picks them up), and plugin discovery is skipped for such a cwd
skills/skill-discovery-target.ts (WSL target)
The same passive UI, for projects whose agents run in WSL
getWslHomeAsync (wsl.exe), then the in-distro scan (runWslProcess)
Refused before the home probe; discovery answers no skills and no sources, so nothing reads as missing and the next scan retries. Delete and share still resolve normally
User acts settle cleanly. When an act settles, by succeeding or throwing, it marks its distro woken inside its own scope. A follow-up read is then never answered by a "stopped" result taken before the act.
User-act scope leak. The allowance for a user act lived in an AsyncLocalStorage store. Any timer, listener or queue created during a user act, such as opening a workspace, a wake read or the first git status, kept that context forever. Its later callbacks passed the gate for that distro and could start it after a terminate. runAsWslUserAct now marks its scope inactive when the act settles, so only the act's own in-flight work may start the distro. After a wake, the running lease lets later work through anyway.
Work a user act starts runs inside the act and is awaited there: the wake reads (authorization, readdir and file reads, including a roots rebuild after an authorization miss) and the first git status (the status run and the upstream probe). Nothing an act starts is left running once it settles. A successful wake calls noteWslDistroWoken and marks the distro running, so later background work passes the gate on the running lease. No legitimate work is refused while the distro runs.
A skipped background PR refresh doesn't touch the PR cache's fetchedAt or any main-side retry state. The renderer records a settled skipped state, which doesn't gate re-requests. So the first refresh after a wake follows the normal visibility cadence, with no added wait.
The wslDistroForPath check is synchronous and runs first. Host paths therefore don't pick up an extra await, and their timing is unchanged; existing tests that depend on that timing still pass.
Checked and already gated: fs read IPC and chunk reads; the filesystem watcher install and its retry, including the "cannot stat root" path; git status, compare, sync and upstream-ref watch; registered-root probes; the detected worktree scan; the allowed-roots home probe; Codex and Claude rate-limit and usage polling; Kimi home; Claude profile publish; the Codex legacy auth drain; hook relay restart and resume; WSL CLI registration; history tombstones; fish history cleanup; orcad liveness; the sleep-time cwd read; the AI Vault session scan; the native-chat transcript watch.
Checked, and they never touch UNC: the worktree base-directory poller and watch targets, the folder-to-Git upgrade poll, WSL usage telemetry, and the Codex state-DB backfill.
Left as they are, because each follows from something the user did. I'm listing them here so a reviewer can disagree:
Automation prechecks (automations/precheck-runner.ts): the user scheduled the run.
Resuming an interrupted worktree removal at startup (runtime-interrupted-local-worktree-removal.ts): it continues a delete the user asked for.
The cold-restore cwd probe on PTY spawn (daemon-pty-session-spawn.ts): the PTY it prepares starts the distro anyway.
Worktree-name retirement: runs from a renderer request.
Why
These background passes run often (on every repo-list call, on sidebar polls, on timers), so any one of them can undo a terminate within seconds. Reusing the shared gate keeps a single source of truth for "running": the 60 s lease, the stop signals, and the unverifiable state. I chose that over adding a separate check per caller. Each skip keeps existing data rather than recording a failure, so nothing in the UI flips to an error just because the distro is stopped.
On the verify-15c run that prompted this: the hook relay started its relaunch only after the distro was already running again, so the relay didn't boot it. The harness made no UNC access in that window, and nothing in Orca's logs or traces points to which access did. The best fit is the bridge-PTY exit path. Runtime onPtyExit refreshes the workspace's sidebar facts. That re-resolves its worktrees, whose scan read the Git admin dir over UNC: no wsl.exe and no log line. A leaked user-act scope is the other candidate. Both are closed here, but neither is proven to be the trigger. A re-run with file-access tracing would confirm.
Linked Issue
Internal E9 gate (no background boots); no issue.
Visual Proof
N/A — this is background behaviour with no UI change. Data stays as it was while a distro is stopped.
Testing
orca-runtime-tests/wsl-stopped-distro-worktree-scan.spec.ts: while the distro is stopped, there are no admin reads and no Git, and the rows are unchanged. Once it runs, the scan goes to Git again. A host repo never asks the gate.
repo-git-enrichment-wsl-stopped-distro.test.ts: with the distro stopped, identity and username probes don't run; once it's running they do on the next pass. A host repo behaves exactly as before.
runtime-repository-fork-backfill-wsl-stopped.test.ts: stopped means no gh/Git and upstream stays unset. A running distro and a host repo backfill as before.
local-repo-ref-maintenance-wsl-stopped.test.ts: stopped means no Git and no maintenance phases. A retry runs once the distro is up, and a running distro is maintained as before.
wsl/wsl-user-act-scope.test.ts: covers work inside the act, other distros, outsideWslUserAct, and a timer created inside the act firing after it, including when the act throws. Both timer cases fail against the old scope.
A queued background refresh is skipped without running gh, then refreshed once the distro runs.
An automatic refreshPRNow (visible, active, post-push) is skipped.
An unverifiable distro is treated as blocked.
A manual refresh still runs, and a host repo never asks the gate.
skills/discovery-wsl-stopped-distro.test.ts: a stopped or unverifiable distro's repo folders are never read (every fs call is recorded) and are absent from the result. One gate check is made per distro. A running distro is scanned, and host repos are unchanged.
Worktree scan: with no cache, a stopped or unverifiable distro answers from stored rows, with no reads and no Git.
Ref maintenance: unverifiable is blocked, and a host repo never asks the gate.
The runtime test harness now treats every distro as running by default, because fake-win32 tests have no wsl.exe. One timing-sensitive scan-cache test now waits for the WSL-runtime scan instead of assuming a single microtask.
Checks: pnpm tc and typecheck:ci pass. The touched suites pass, 20 files including the full orca-runtime.test.ts. check:code-quality:changed, the anti-slop oxlint (after the plugin sync), lint:ast-grep, test:ast-grep and check-test-file-runners all pass.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
SSH: unaffected. SSH repos are skipped before the gate, and the gate only maps \\wsl.localhost paths, or the WSL runtime of a drive-path project, to a distro.
Off Windows, wslDistroForPath returns null, so none of this runs.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
… start a stopped distro (E9)
Any Windows touch of a \\wsl.localhost path, or Git/gh run for it, boots a
stopped distro. These background paths ran without asking the stopped-distro
gate: the worktree scan refresh (Git-admin fingerprint reads plus git worktree
list), the remote-identity and username enrichment sweeps, the startup
upstream backfill, the quiet-period ref maintenance, and queued PR refreshes.
Each now asks blockedWslDistroForPath first and skips, keeping known data,
until the distro runs; a host path never asks the gate.
The allowance lived in an AsyncLocalStorage store, so any timer, listener or
queue created during a user act (opening a workspace, a wake read, the first
git status) kept it forever and could start the distro later, after a
terminate. The scope now carries an active flag cleared when the act settles.
The change adds WSL distro availability checks before Git maintenance, repository enrichment, queued background PR refreshes, worktree scans, and upstream backfill. Blocked WSL operations are skipped or return cached scan data when available. Skill discovery reports blocked WSL sources as unavailable and separates passive discovery from user-triggered discovery. WSL user-act scopes now end when the act settles. Tests cover stopped and running distros, retries, manual refreshes, and host repositories.
Priority: Normal
Merge Risk: Moderate · up to 19a36
The change generally keeps background work from waking a stopped WSL distro. However, some WSL repositories may not get fork metadata or ref maintenance after the distro starts, and stopped-distro worktree listings can hide known worktrees or still touch WSL paths. These are bounded and recoverable gaps, but they should be addressed or explicitly accepted before merge.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title names the main change: background repo probes, PR refresh, and worktree scans no longer start a stopped WSL distro. The changeset matches this. The title is long (97 characters) and includes…
Description check
The description follows the repository template. It has ELI5, What Changed (with a path-by-path table), Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Notes, and Checklist sections. …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: background repo probes, PR refresh, and worktree scans no longer start a stopped WSL distro. The changeset matches this. The title is long (97 characters) and includes an internal tag "(E9)" that a teammate may not recognize, but it is specific and related to the main change.
Full details: Description check
Explanation
The description follows the repository template. It has ELI5, What Changed (with a path-by-path table), Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Notes, and Checklist sections. The Linked Issue section says 'Internal E9 gate (no background boots); no issue.' The template requires an actual linked issue for outside contributors. The author is apparently a maintainer, so this may be acceptable, but it does not contain a 'Fixes #' reference. The Testing section says manual testing was not done (the box is unchecked), and the 'pnpm lint, typecheck, test, build' checklist item is unchecked. The AI Disclosure section is empty. The description is thorough and specific, so the check passes, but the missing AI Disclosure entry and the unlinked issue should be reviewed.
Full details: Docstring Coverage
Explanation
Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 15 functions across 29 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Keep stopped-distro maintenance scheduled.
A stopped distro consumes the scheduler’s failed-probe budget. After six deferrals, the scheduler drops the attempt, so maintenance does not resume when the distro starts unless another repo write re-arms it. Handle this refusal separately from counted probe failures. (raw.githubusercontent.com)
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Quick win
Use a fixed timestamp in the mock outcome.
Line 35 calls Date.now() in the new test. The supplied pipeline log reports a test-no-wall-clock violation that blocks static analysis. The shared test setup already fixes system time at 1_000; use that value for fetchedAt. (raw.githubusercontent.com)
IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Do not let blocked repos exhaust the refresh budget.
Four due, resolved WSL repos can occupy every refresh slot on every sweep. This return leaves their deadlines due, so later repos—including host repos—never refresh their identities while the distro remains stopped. Exclude blocked repos from the budget or rotate candidates fairly. (raw.githubusercontent.com)
RuntimeRepositoryForkBackfill.start() runs only from setNotifier(). A repository skipped for a stopped WSL distro is therefore not revisited when the distro starts. Register deferred work with deferUntilWslDistroRunning so fork metadata and the fork-sync offer become available without an application restart.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Quick win
Use stored rows when the cached scan failed.
A failed local Git scan is cached with ok: false and an empty worktree list. If the distro then stops, this branch reuses that empty result instead of the stored rows, so known worktrees remain hidden until a successful scan runs. Use stored rows when cached.result.ok is false. (raw.githubusercontent.com)
The reason will be displayed to describe this comment to others. Learn more.
Major · Stability & Availability · Quick win
Do not treat a blocked scan as successful.
If a pending or failed removal is absent from the cached rows, listRepoWorktreesForListing calls withUnregisteredRemovalCheckouts, which performs lstat on the removal path. A WSL path can therefore start the stopped distro despite this gate. Return a non-authoritative result while preserving the cached rows, so the listing skips those probes. (raw.githubusercontent.com)
…opped distro (E9)
- Skill discovery (mounted by passive UI) leaves out roots on a stopped or
unverifiable distro, and skips plugin discovery for such a cwd, instead of
reading \\wsl.localhost; they are not reported missing, so the next scan
picks them up.
- refreshPRNow skips automatic reasons (visible, active, post-push) on a
blocked distro like the drainer does; only a manual refresh may start it.
- Ref maintenance's opt-out probe takes the same sync wslDistroForPath
early-out as the other paths.
- Tests: stopped-with-no-cache worktree scans answer from stored rows, and
'unverifiable' is treated as blocked.
…tro (E9)
Passive UI discovers skills for projects whose agents run in WSL. The target
resolution probed the distro home (wsl.exe) and the scan ran in the distro,
so either booted a stopped one. Discovery now refuses a stopped or
unverifiable WSL target before the home probe and answers no skills and no
sources, so nothing reads as missing and the next scan retries. Delete and
share keep resolving without the gate.
… never await the gate
- runAsWslUserAct (the gate's wrapper) notes the distro woken inside the act
when it settles, success or throw, so a follow-up is never answered by a
'stopped' read taken before the act.
- Skill discovery takes sync early-outs: a host-only root set and a host cwd
never await the WSL gate.
…ad as unknown, not absent
- skills:prepareShare (and the skills.share RPC) discover as a user act on the
target's distro, so an explicit Share on a stopped distro finds its skills.
- A blocked WSL target answers an 'unavailable' source per requested kind, and
roots (or a workspace plugin folder) on a stopped distro are reported
'unavailable' instead of dropped, so the installed-skill verdict says the
status may be incomplete rather than offering Install.
… a target
The desktop Share dialog sends no target, so the user-act scope had no distro
and the gated scan reported a stopped distro's repo folders unavailable; Share
then failed with skill-share-source-not-found. discoverSkills takes
gateStoppedWslDistros: false for both share paths (IPC and RPC), skipping the
stopped-root split and the plugin-cwd check; passive discovery keeps the gate.
Gated and ungated scans of one target no longer share a coalesced answer.
186-186: Major · Functional Correctness · Heavy lift
⚠️Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Check the distro state at maintenance access.
If a distro stops without a stop notification, this check can reuse a running observation for up to 60 seconds and then start Git in the stopped distro. (raw.githubusercontent.com) Git can also wait for admission after this check, so the distro can stop before the command starts. (raw.githubusercontent.com)
Use a fresh running-state check after Git admission and before subsequent WSL accesses.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: a94b1847-26be-4039-9326-65c8c14aeaa0
Commits
Reviewing files that changed from the base of the PR and between 60dc28f and 19a36c6.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
…skills (#35659)
#34632 let Share read every stopped WSL distro's skill folders. The Share
dialog now sends the chosen skills' folders, and discovery reads only the
stopped roots (and workspace plugin folder) that hold them; every other
stopped root stays unread and unavailable. The skills.share RPC names skills,
not folders, so it scans gated first and reads stopped roots only when a
selector is missing and a folder went unread.
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
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.
ELI5
If you stop a WSL distro (for example with
wsl --terminate), Orca shouldn't quietly start it again behind your back. Some of Orca's background work still read the distro's files or ran Git orghin it while it was stopped, and any of those wakes the distro. These paths now check whether the distro is running and wait until it is, instead of starting it.User risk: for projects on a running distro, and for projects that aren't WSL at all, nothing changes. A host path never even asks the running check; for those the code takes the same path as before. The only change is that while a WSL distro is stopped, background refreshes for its projects pause and keep what they already know. Opening something in the distro, or anything else that starts it, lets them resume.
What Changed
I audited every background (non-user) path that can touch
\\wsl.localhost/\\wsl$, or run Git/ghfor a WSL project, against the stopped-distro gate from #34222/#34231. The paths below didn't ask it. Each now callsblockedWslDistroForPathfirst and skips the work if the distro is stopped or unverifiable.runtime/workspaces/workspace-repo-scan-refresh.tsrefreshRepoWorktreeScangit worktree listrepo-git-remote-identity-enrichment.tsrepos:list/projects:list, plus 5 min / 6 h re-probesgit remote -vin the UNC reporepo-git-username-enrichment.tsrepos:listgit configin the UNC reporuntime/runtime-repository-fork-backfill.tsgh/Git for the upstream and the avatar icongit/local-repo-ref-maintenance.tsgit configandpack-refsgithub/pr-refresh-queue-drainer.tsghwith the UNC repo as cwdfresh, so the current status stays; manual refresh still runsgithub/pr-refresh-coordinator.tsrefreshPRNowvisible,active,post-push)ghwith the UNC repo as cwdfresh; returns an upstream error, so local callers keep their cached PR. Onlymanualpassesskills/discovery.ts(skills:discover)scanRootSharedread<repo>/.agents/skillsand the provider skill folders over UNC; plugin discovery read the cwdskills/skill-discovery-target.ts(WSL target)getWslHomeAsync(wsl.exe), then the in-distro scan (runWslProcess)User acts settle cleanly. When an act settles, by succeeding or throwing, it marks its distro woken inside its own scope. A follow-up read is then never answered by a "stopped" result taken before the act.
User-act scope leak. The allowance for a user act lived in an
AsyncLocalStoragestore. Any timer, listener or queue created during a user act, such as opening a workspace, a wake read or the first git status, kept that context forever. Its later callbacks passed the gate for that distro and could start it after a terminate.runAsWslUserActnow marks its scope inactive when the act settles, so only the act's own in-flight work may start the distro. After a wake, the running lease lets later work through anyway.Work a user act starts runs inside the act and is awaited there: the wake reads (authorization, readdir and file reads, including a roots rebuild after an authorization miss) and the first git status (the status run and the upstream probe). Nothing an act starts is left running once it settles. A successful wake calls
noteWslDistroWokenand marks the distro running, so later background work passes the gate on the running lease. No legitimate work is refused while the distro runs.A skipped background PR refresh doesn't touch the PR cache's
fetchedAtor any main-side retry state. The renderer records a settledskippedstate, which doesn't gate re-requests. So the first refresh after a wake follows the normal visibility cadence, with no added wait.The
wslDistroForPathcheck is synchronous and runs first. Host paths therefore don't pick up an extra await, and their timing is unchanged; existing tests that depend on that timing still pass.Checked and already gated: fs read IPC and chunk reads; the filesystem watcher install and its retry, including the "cannot stat root" path; git status, compare, sync and upstream-ref watch; registered-root probes; the detected worktree scan; the allowed-roots home probe; Codex and Claude rate-limit and usage polling; Kimi home; Claude profile publish; the Codex legacy auth drain; hook relay restart and resume; WSL CLI registration; history tombstones; fish history cleanup; orcad liveness; the sleep-time cwd read; the AI Vault session scan; the native-chat transcript watch.
Checked, and they never touch UNC: the worktree base-directory poller and watch targets, the folder-to-Git upgrade poll, WSL usage telemetry, and the Codex state-DB backfill.
Left as they are, because each follows from something the user did. I'm listing them here so a reviewer can disagree:
automations/precheck-runner.ts): the user scheduled the run.runtime-interrupted-local-worktree-removal.ts): it continues a delete the user asked for.daemon-pty-session-spawn.ts): the PTY it prepares starts the distro anyway.Why
These background passes run often (on every repo-list call, on sidebar polls, on timers), so any one of them can undo a terminate within seconds. Reusing the shared gate keeps a single source of truth for "running": the 60 s lease, the stop signals, and the unverifiable state. I chose that over adding a separate check per caller. Each skip keeps existing data rather than recording a failure, so nothing in the UI flips to an error just because the distro is stopped.
On the verify-15c run that prompted this: the hook relay started its relaunch only after the distro was already running again, so the relay didn't boot it. The harness made no UNC access in that window, and nothing in Orca's logs or traces points to which access did. The best fit is the bridge-PTY exit path. Runtime
onPtyExitrefreshes the workspace's sidebar facts. That re-resolves its worktrees, whose scan read the Git admin dir over UNC: nowsl.exeand no log line. A leaked user-act scope is the other candidate. Both are closed here, but neither is proven to be the trigger. A re-run with file-access tracing would confirm.Linked Issue
Internal E9 gate (no background boots); no issue.
Visual Proof
N/A — this is background behaviour with no UI change. Data stays as it was while a distro is stopped.
Testing
orca-runtime-tests/wsl-stopped-distro-worktree-scan.spec.ts: while the distro is stopped, there are no admin reads and no Git, and the rows are unchanged. Once it runs, the scan goes to Git again. A host repo never asks the gate.repo-git-enrichment-wsl-stopped-distro.test.ts: with the distro stopped, identity and username probes don't run; once it's running they do on the next pass. A host repo behaves exactly as before.runtime-repository-fork-backfill-wsl-stopped.test.ts: stopped means nogh/Git and upstream stays unset. A running distro and a host repo backfill as before.local-repo-ref-maintenance-wsl-stopped.test.ts: stopped means no Git and no maintenance phases. A retry runs once the distro is up, and a running distro is maintained as before.wsl/wsl-user-act-scope.test.ts: covers work inside the act, other distros,outsideWslUserAct, and a timer created inside the act firing after it, including when the act throws. Both timer cases fail against the old scope.pr-refresh-coordinator-wsl-stopped-distro.test.ts:gh, then refreshed once the distro runs.refreshPRNow(visible,active,post-push) is skipped.unverifiabledistro is treated as blocked.skills/discovery-wsl-stopped-distro.test.ts: astoppedorunverifiabledistro's repo folders are never read (every fs call is recorded) and are absent from the result. One gate check is made per distro. A running distro is scanned, and host repos are unchanged.Worktree scan: with no cache, a
stoppedorunverifiabledistro answers from stored rows, with no reads and no Git.Ref maintenance:
unverifiableis blocked, and a host repo never asks the gate.The runtime test harness now treats every distro as running by default, because fake-win32 tests have no
wsl.exe. One timing-sensitive scan-cache test now waits for the WSL-runtime scan instead of assuming a single microtask.Checks:
pnpm tcandtypecheck:cipass. The touched suites pass, 20 files including the fullorca-runtime.test.ts.check:code-quality:changed, the anti-slop oxlint (after the plugin sync),lint:ast-grep,test:ast-grepandcheck-test-file-runnersall pass.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
\\wsl.localhostpaths, or the WSL runtime of a drive-path project, to a distro.wslDistroForPathreturns null, so none of this runs.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)