Skip to content

Commit 8ed32a6

Browse files
The sandbox's /tmp is separate from the host's, not fresh each time (#17)
⚠️ The head of this file said `--sandbox' gives "a fresh /tmp". Measured 2026-08-27: two invocations of the same environment, and the second found the directory the first had made; the host's `/tmp' had neither. Both halves matter and they are different claims. SEPARATE is what makes staging from outside impossible, which is why the sandbox is used at all. FRESH is what a check that must not read its own last answer would need, and it is not true --- so the project directory is removed before it is written, which this script already did and now says why. Co-authored-by: speak-agent <x.d2learn.org@gmail.com>
1 parent 55dd342 commit 8ed32a6

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

tools/sandbox-closure.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@
2424
#
2525
# WHY A SANDBOX. A machine that has been developing these packages has every one
2626
# of them installed, and would answer for its own state rather than for the
27-
# index. `xlings subos <name> --sandbox --cmd` gives a fresh environment, and a
28-
# fresh `/tmp` with it --- so nothing may be staged outside.
27+
# index. `xlings subos <name> --sandbox --cmd` gives an environment of its own,
28+
# and a `/tmp` of its own with it --- so nothing may be staged from outside.
29+
#
30+
# ⚠️ SEPARATE IS NOT FRESH, AND THIS COMMENT SAID FRESH. Measured 2026-08-27:
31+
# two invocations of the same environment, and the second found the directory
32+
# the first had made; the host's `/tmp` had neither. So the `/tmp` is not the
33+
# host's --- which is what matters for staging --- and it is not new each time,
34+
# which is what matters for a check that must not read its own last answer.
35+
# That is why the project directory below is REMOVED before it is written.
2936
#
3037
# It asks two questions, because they fail independently:
3138
#
@@ -116,6 +123,10 @@ got="$(mcpp --version | awk '{print $2}')"
116123
echo " mcpp is $got"
117124
118125
say "a project that names only published versions"
126+
# Removed rather than merely created: see the note about `/tmp' at the head of
127+
# this file. A directory left by the previous run would be built again, and a
128+
# build that succeeded against the previous release would look exactly like one
129+
# that succeeded against this one.
119130
rm -rf /tmp/closure && mkdir -p /tmp/closure/src && cd /tmp/closure
120131
cat > mcpp.toml <<TOML
121132
[package]

0 commit comments

Comments
 (0)