---
name: secret-env-probe-no-value-expansion
description: "BINDING mechanism rule (doyle ruling 2026-07-22, from the rel-primary-2026 seed exposure): set/unset probes on secrets NEVER use ${VAR:-...} — that arm expands the VALUE; only value-free shapes allowed"
metadata: 
  node_type: memory
  type: feedback
  originSessionId: 6e6b5fd6-f946-49ba-af0a-1ba39274b043
  modified: 2026-07-22T22:07:59.278Z
---

**BINDING (doyle ruling 2026-07-22, all agents).** Probing whether a secret env var is set NEVER uses `${VAR:-...}` — when the var IS set, that expansion emits the RAW VALUE. Deployah's `${SPT_RELEASE_SEED:+yes}${SPT_RELEASE_SEED:-no}` printed the rel-primary-2026 signing seed into session output ([[v0410-published]] incident; third-party API transit = the honest exposure ceiling for anything printed in an agent session).

**Why:** an agent session is not a private terminal — every byte of tool output transits the hosted LLM API and persists in transcripts. A secret printed once is exposed everywhere the session goes. Careful-next-time is not a control; the idiom itself is the defect ([[rule-failed-its-author-needs-a-mechanism]]).

**How to apply:** the ONLY permitted probe shape is one structurally unable to emit the value: `[ -n "${VAR:+x}" ] && echo set || echo unset` (the `:+` arm substitutes the literal `x`, never the value). PowerShell: `[bool]$env:VAR` → prints True/False... NO — `$env:VAR` in any interpolating context can leak; use `($null -ne $env:VAR -and $env:VAR -ne '')`. Never echo, interpolate, or default-expand a secret var; never pass secrets on command lines (process lists leak too).