Open
Description
Outcome: no test process can reach this machine's real host tools or carry a real GitHub token, by design. Today that depends on each test putting the right stand-ins on its own PATH.
Why (measured by #819's round-4 review, issuecomment-6277904282):
- Tests that set their own PATH to include
/usr/binor/binrun the real binaries:gh70 times,loginctl26 times across 36 test files, and, on a base without Wizard: the Claude step matches the login to agent_runtime and offers an API key (#738) [PROTECTED: owner merges] #819's fix,systemctl --user show-environmentandis-active20 times each. A recorder at the front of the caller's PATH doesn't help, because the test replaces PATH. test/isolate.tsstrips inheritedWORKLANE_*variables (lines 22-24), but notGH_TOKEN,GITHUB_TOKENorGH_ENTERPRISE_TOKEN. A token exported in the shell would reach thoseghcalls (inferred; unset in the measured run).lingerEnabled,src/os/stats.ts(systemctl show), macOSserviceRunning, and install/uninstall have no test-run guard (inferred from the code). Wizard: the Claude step matches the login to agent_runtime and offers an API key (#738) [PROTECTED: owner merges] #819 guards onlyserviceManagerEnvandunitActive.
Do (by design, per the owner's durability rule: a runtime refusal, not a lint):
test/isolate.tsremoves GitHub token variables (and other credential variables the engine reads) from the test process environment.- In a test run (the existing test-run sign), the OS adapter's exec of host tools (
systemctl,launchctl,loginctl,ghand similar) refuses unless the resolved binary is inside the test's own fake dir. Fail closed with a message naming the tool. - A test proves it: with the real binaries on PATH, each guarded call refuses, and nothing execs outside the test's dirs (strace or an exec recorder).
Constraints: a real (non-test) install behaves exactly as today. No exemption list without independent review (principle 9).
Metadata
Metadata
Assignees
Labels
No labels
Activity
docs-guardrails: a test cited in any other form fails, hold kinds com…