fix(test): hermetic-canary probes with ${VAR:-} so nounset shells can't fail success

The probe echoed bare $CONDUCTOR_WORKSPACE_PATH — when scrubbing WORKS
the var is unset, and under a nounset shell the echo errors, failing the
canary exactly when isolation succeeds. Defaulted expansions assert
identically under any shell. Fails identically on base; fixed here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan 2026-08-13 10:34:25 -07:00
parent 8278322a70
commit 990d54a9e4
No known key found for this signature in database
GPG Key ID: C1F69E85C74EFE1D
1 changed files with 6 additions and 2 deletions

View File

@ -84,9 +84,13 @@ describeIfSelected('hermetic isolation canaries', ['hermetic-canary', 'hermetic-
try {
const result = await runSkillTest({
// ${VAR:-} expansion, not bare $VAR: when scrubbing WORKS the planted
// vars are unset, and under a nounset shell (set -u in the operator's
// shell snapshot) a bare expansion of an unset var errors the whole
// command — making the canary fail exactly when isolation succeeds.
prompt: 'Run exactly this bash command and then stop: ' +
'echo "CFG=$CLAUDE_CONFIG_DIR"; echo "GH=$GSTACK_HOME"; ' +
'echo "CW=$CONDUCTOR_WORKSPACE_PATH"; echo "GP=$GBRAIN_POISON_PROBE"',
'echo "CFG=${CLAUDE_CONFIG_DIR:-}"; echo "GH=${GSTACK_HOME:-}"; ' +
'echo "CW=${CONDUCTOR_WORKSPACE_PATH:-}"; echo "GP=${GBRAIN_POISON_PROBE:-}"',
workingDirectory: workDir,
maxTurns: 3,
allowedTools: ['Bash'],