fix(ci): pass the pwsh-less self-hosted Linux runners

The self-hosted Linux runners ship no pwsh, and the pwshAvailable probes used spawnSync('where.exe'), which reports a missing binary as status null instead of throwing — the suites never skipped and failed with spawn pwsh ENOENT. Probe with resolvePwshPath() status instead, the same gate the coverage exemption uses. Exempt pwsh-sandbox src from coverage on pwsh-less hosts (its remaining helpers branch and the invariant companion ride the executor suites' real pwsh runs); pwsh-ful hosts keep the full 100% bar. Cover the windows-acl probe case and the runner-entry resolution in sandbox-local on Linux (chain-seam tests plus a windowsAclRunnerEntry seam) — the package's POSIX-only suites are Linux's only chance to cover the new lines. Static gate fixes: declare dsh-pwsh-sandbox in the base bundle, register the runner files entry in constraints, knip entries for the e2e suite and where.exe, regenerate the module graph. Verified in WSL (no-pwsh Linux): pwsh-sandbox 5 pass/13 skip with the exemption active, sandbox-local coverage 100%.
This commit is contained in:
Huanqi Cao
2026-08-08 11:46:05 +08:00
parent aa790346e4
commit d8acd2b656
12 changed files with 113 additions and 30 deletions

7
pnpm-lock.yaml generated
View File

@@ -773,9 +773,6 @@ importers:
'@deepseek-ai/dsh-sandbox-policy':
specifier: workspace:^
version: link:../../sandbox/sandbox-policy
'@deepseek-ai/dsh-sandbox-windows-acl':
specifier: workspace:^
version: link:../../sandbox/sandbox-windows-acl
'@deepseek-ai/dsh-subprocess-local':
specifier: workspace:^
version: link:../../subprocess/subprocess-local
@@ -973,9 +970,9 @@ importers:
'@deepseek-ai/dsh-plan-mode':
specifier: workspace:^
version: link:../../plan/plan-mode
'@deepseek-ai/dsh-pwsh-local':
'@deepseek-ai/dsh-pwsh-sandbox':
specifier: workspace:^
version: link:../../bash/pwsh-local
version: link:../../bash/pwsh-sandbox
'@deepseek-ai/dsh-repeat-tool-guard':
specifier: workspace:^
version: link:../../guard/repeat-tool-guard