fix(test): the symlink escape test has been skipping itself since the partition hash #290
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!290
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/symlink-test-skips-itself"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
TestScratchRefusesSymlinkEscapehas not run since06be30blanded.What happened
That commit hashed the partition name so two requesters cannot share one, and updated the literal
"111"toscratchPartitionName("111")everywhere it appeared — except inside this test'sos.Symlinkguard, where the error went tot.Skipfinstead oft.Fatalf.So the door is planted at
root/111, which no longer exists.os.Symlinkreturns ENOENT, and the test skips itself reporting "symlinks unavailable" on platforms where symlinks work fine. Measured:Every other stale site would have failed loudly. Only this one was wrapped in a skip.
What that cost
Defeating the containment check on the resolved path — the line that makes a symlink not work as a door — leaves the entire suite green. With the path derived, the test fails, and the failure is the escape itself rather than a proxy for it:
nois the seeded contents of the file outside the partition. The guard is correct today; nothing was guarding it.The change
Two things, both in the test.
The partition is derived rather than spelled, so a future change to the naming reddens this test instead of silencing it.
Only
errors.ErrUnsupportedskips. Every other error is fatal, because a door that was never planted makes the escape assertions below pass without being attempted — which is exactly the failure mode this had.Related
This is the same class as #288, where a deny-list test skips on an unset
AOS_CATALOG. Both are tests that reportokwhile asserting nothing. Those two were the only silent skips in the suite; the third,TestCapabilityDocIsRightThatTheBuildCarriesNoRevision, skips on a condition it states and checks a claim the doc no longer makes.Tests only. No production code changes.
Refs #270
CLAIM — Angie (ENG) · 2026-08-13T07:08Z · 20 min · review-and-land
Reviewing and landing this one together with #285 and #288.
I will confirm the test actually runs after the change rather than trusting a green suite, since a suite that was green while this test skipped itself is precisely the failure being fixed here. Concretely:
-run TestScratchRefusesSymlinkEscape -vshould show RUN and PASS, not SKIP, and the containment mutation should redden it.Author: shout if you want to land it yourself and I will drop the claim.
REVIEW (independent reproduction) — Angie (ENG) · claim released
This landed as
1be2527while I was verifying it, so my merge was a no-op. Posting the verification anyway, because the value here is that someone reproduced the claim rather than trusted the write-up, and that evidence is worth having on the record whoever pressed the button.Verdict: the description is accurate in every particular I checked.
1. The test really was skipping itself
Same code, two versions of the test file:
Nothing about the environment changed between those two runs. Symlinks work fine on this host, which is exactly the point:
"symlinks unavailable"was a false explanation for an ENOENT caused by the hashed partition name.2. It now guards what it claims to guard
Forced
scratchWithinRoottoreturn true, defeating containment on the resolved path, and ran the full suite with-count=1:That is the predicted failure verbatim, including
noas the seeded outside-file contents. One test in the whole suite notices, and it is this one. Before the change that same mutation left everything green, necessarily, since a skipped test cannot fail.3. The two-line skip is correctly narrow
Restricting the skip to
errors.ErrUnsupportedis the right call and not merely tidier. The old form swallowed every error class, so a door that was never planted made the assertions below pass without being attempted.t.Fatalfnaming the partition path means the next time the naming scheme moves, this reddens with the path in the message instead of going quiet.One observation, not a request for change
scratchPartitionName("111")now appears three times in this file (lines 150, 154 region, and 237). That is fine and I would not hold a merge for it. Noting it only because the failure being fixed here was a literal that fell out of step with a derivation, and three call sites is the point where a helper starts paying for itself. Entirely the author's call, and no follow-up ticket from me.Nothing further from me on this one. Also released: my claims stand on #285 and #288, which I am still working.