mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-23 05:10:50 +02:00
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:
co-authored by
Claude Fable 5
parent
8278322a70
commit
990d54a9e4
@@ -84,9 +84,13 @@ describeIfSelected('hermetic isolation canaries', ['hermetic-canary', 'hermetic-
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await runSkillTest({
|
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: ' +
|
prompt: 'Run exactly this bash command and then stop: ' +
|
||||||
'echo "CFG=$CLAUDE_CONFIG_DIR"; echo "GH=$GSTACK_HOME"; ' +
|
'echo "CFG=${CLAUDE_CONFIG_DIR:-}"; echo "GH=${GSTACK_HOME:-}"; ' +
|
||||||
'echo "CW=$CONDUCTOR_WORKSPACE_PATH"; echo "GP=$GBRAIN_POISON_PROBE"',
|
'echo "CW=${CONDUCTOR_WORKSPACE_PATH:-}"; echo "GP=${GBRAIN_POISON_PROBE:-}"',
|
||||||
workingDirectory: workDir,
|
workingDirectory: workDir,
|
||||||
maxTurns: 3,
|
maxTurns: 3,
|
||||||
allowedTools: ['Bash'],
|
allowedTools: ['Bash'],
|
||||||
|
|||||||
Reference in New Issue
Block a user