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
fix(cli): 宿主无 Claude Code 凭证时 warn-skip 而不是硬抛错 (#360)
* fix(sandbox): skip Claude Code when host creds missing
- Replace assertClaudeCredentialsAvailable with prepareClaudeCredentials
returning {OK|SKIPPED|NOT_APPLICABLE}; only inspect MISSING degrades,
while STALE_ACCESS / KEYCHAIN_LOCKED / KEYCHAIN_ERROR still throw with
state-specific guidance.
- In create(), filter claude-code from resolvedTools on SKIPPED so its
config/credential mount is skipped, while tools (image build + version
check) stays intact; emit a prominent warning before ensureDocker so
the message is visible even without Docker.
- Cover the new outcome matrix with unit + integration tests; preserve
the zero-temp-Dockerfile leak assertion.
Closes#357
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
* fix(test): short-circuit create test at ensureDocker
The integration test added in e3e95fe used DOCKER_EXIT_FOR_RUN so the CLI
would walk the full create flow (image build, worktree setup, tool state
preparation) before failing at "docker run". On slow runners (Windows CI,
overlay-fs sandboxes) those preliminary steps take >30s, blowing past
spawnSync's timeout and leaving result.signal as 'SIGTERM'.
The test only needs to prove the credential gate emits the warning and
the CLI exits non-zero — none of the work after ensureDocker matters.
- Add DOCKER_EXIT_FOR_INFO support to the fake docker fixture so the
first call ensureDocker makes ("docker info") can be made to exit
non-zero on demand, mirroring the existing DOCKER_EXIT_FOR_RUN switch.
- Switch the test to DOCKER_EXIT_FOR_INFO so the CLI exits immediately
after p.log.warn(), before any worktree/fs work. Local runtime drops
from ~30s to ~150ms; Windows CI passes.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Codex <noreply@openai.com>
0 commit comments