Repository navigation
fix(setup): stop doctor probe 1 passing an agent it never asked - #1770
Merged
Merged
Conversation
probe-1-ssh-agent.sh captured `ssh-add -l` into /tmp/ssh-add.out. /tmp is read-only inside the sandbox, so the redirection failed, ssh-add never ran, and the redirection's exit code of 1 was read as "agent reachable, no identities". The probe passed whatever the agent's real state, including an unreachable one. Hold the output in a variable instead, so the probe writes no file, and add the first tests for the doctor's probe scripts. Generated-by: Claude Opus 5
This was referenced Oct 24, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
probe-1-ssh-agent.shcapturedssh-add -linto/tmp/ssh-add.out./tmpis read-only inside the sandbox, so the redirection failed,ssh-addnever ran, and the redirection's exit code of 1 was read as "agent reachable, no identities". The probe passed whatever the agent's real state was, including an unreachable one.tools/dev/run-skill-script-tests.sh), and a line in the scripts README so new probes do not write files either.Type of change
plugins/magpie-setup/skills/isolated-setup-doctor/) — no eval fixtures: the change is in a probe script, covered by the new unit teststools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
prek run --fileson the three changed files passespython3 -m unittest discover -s plugins/magpie-setup/skills/isolated-setup-doctor/tests: with the old script, 2 of 3 tests fail (an unreachable agent reports✓ agent reachable, no identities configured); with the fix, all 3 pass✓ (agent reachable, no identities configured)whilessh-add -llisted two YubiKey identities; after it,✓ (2 identities listed)RFC-AI-0004 compliance
/tmpLinked issues
None; found while running
setup-isolated-setup-doctorin an adopter checkout.Notes for reviewers (optional)
When the sandbox refuses
bind(2)on a unix socket, the tests fall back to the session's ownSSH_AUTH_SOCK; the fakessh-addnever connects to it, since the probe only checks that it is a socket. With neither available they skip.🤖 Generated with Claude Code