---
name: two-tmp-namespaces-publish-trap
description: "2026-08-21 — python's /tmp and MSYS sh's /tmp are DIFFERENT directories on this box; a release published another project's notes through that gap, and printing back the file I wrote could never have caught it."
metadata: 
  node_type: memory
  type: feedback
  originSessionId: d4b9ffe5-c44f-4d39-898f-a3399266fa85
  modified: 2026-08-22T00:07:59.784Z
---

**On this machine `/tmp` means two different directories**, and nothing warns you:

- python (Windows) resolves a leading `/tmp` **drive-relative** → `C:\tmp`
- MSYS `sh` maps it to `%LOCALAPPDATA%\Temp` (`C:\Users\<u>\AppData\Local\Temp`)

**What it cost (claude-spt v0.28.0):** I sliced the release section out of `CHANGELOG.md` with python
→ `/tmp/notes.md`, then published with `gh release create --notes-file /tmp/notes.md` from bash. gh
read a **stale notes file an unrelated spt-core release had left there**, so a claude-spt release
published spt-core's release notes — every word about a component it does not ship. The operator
caught it by reading the published page.

⭐ **Why my check passed: I printed back the file I WROTE, not the file the tool CONSUMED.** A
verification that re-reads your own output instead of the consumer's input cannot see a substitution
anywhere in between. Same shape as reading a re-render instead of the wire ([[v0262-monic-reveal]]),
reached through a filesystem instead of a renderer.

**How to work now:**
- Never hand a bare `/tmp/...` path between a python step and a sh step. Use the session scratchpad
  absolute path, or keep the whole thing in one shell.
- Prefer a PIPE over a file whenever a tool accepts stdin (`--notes-file -`). No path, no namespace.
- **Verify the artifact the consumer received**: fetch the published body back
  (`ci/publish/verify-release-notes.sh`), read the wire, stat the file the other process opened.

Shipped guard in spt-claude-code: `ci/publish/release-notes.sh` (extract, piped) +
`ci/publish/verify-release-notes.sh` (read-back diff, mandatory last act) +
`tests/release-notes.sh`, REQ-RELEASE-NOTES-FROM-CHANGELOG, KNOWN-HAZARDS 4.3. Audit at the time:
v0.28.0 was the only content-wrong body; two older releases differed only cosmetically.

Sibling instrument traps: [[msys-grep-instrument-traps]] (bash `$'…'` empty pattern; `grep -e A -e B`
core-dumping silently) — all three returned the reassuring answer.
