Skip to content

fix(setup): stop doctor probe 1 passing an agent it never asked - #1770

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/doctor-probe-1-no-tmp-write
Oct 23, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/doctor-probe-1-no-tmp-write

Conversation

@potiuk

@potiuk potiuk commented Oct 23, 2026

Copy link
Copy Markdown
Member

Summary

  • 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 was, including an unreachable one.
  • The output is now held in a variable, so the probe writes no file at all.
  • Adds the first tests for the doctor's probe scripts (picked up by 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

  • Skill change (plugins/magpie-setup/skills/isolated-setup-doctor/) — no eval fixtures: the change is in a probe script, covered by the new unit tests
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • prek run --files on the three changed files passes
  • python3 -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
  • Ran inside the Claude Code sandbox on macOS: before the fix the probe reported ✓ (agent reachable, no identities configured) while ssh-add -l listed two YubiKey identities; after it, ✓ (2 identities listed)
  • Other:

RFC-AI-0004 compliance

  • Sandbox — no new host access; the probe now works inside the sandbox instead of silently depending on a writable /tmp

Linked issues

None; found while running setup-isolated-setup-doctor in 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 own SSH_AUTH_SOCK; the fake ssh-add never connects to it, since the probe only checks that it is a socket. With neither available they skip.

🤖 Generated with Claude Code

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
@potiuk potiuk added family:setup setup-* skills capability:fix Implement code change to resolve an issue labels Oct 23, 2026
@github-actions github-actions Bot added family:docs Docs, MISSION.md, READMEs capability:reassess Re-run historical issues against current code capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) labels Oct 23, 2026
@potiuk
potiuk merged commit 6ae7930 into apache:main Oct 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:fix Implement code change to resolve an issue capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) capability:reassess Re-run historical issues against current code family:docs Docs, MISSION.md, READMEs family:setup setup-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant