fix(harness, seat): the pi fit check gives one verdict whatever the temp directory is; a scratch under /tmp no longer hides itself (#1873) #2020

Merged
jason.woltje merged 5 commits from pi-fit-tmp into refactor 2026-11-20 19:26:55 +00:00
5 Commits
Author SHA1 Message Date
jason.woltje e035b6dea9 test(harness,conversation): pi-fit-tmp re-check 2 round: smoke.test removes the fixture directory conversation/tests/harness.mjs makes when it loads (after(cleanupAll)); with TMPDIR unset that directory now lands in /var/tmp, which a boot doesn't clear, and smoke was the one importer that never removed it; fixtureDir throws a plain line when the temp directory is under /tmp and /var/tmp is missing or under /tmp too, so a test fails on its fixture, not with the fit check's guard line 2026-11-20 12:51:40 -06:00
jason.woltje 735e828aa2 test(harness,plugins,conversation,cli): pi-fit-tmp re-check round: stand-in pis are built outside /tmp whatever the temp directory is, since the fit check now stays undecided for a pi under /tmp; the new fixtureDir(prefix) in pi-stand-in.mjs makes the directory under tmpdir() unless its real path is under /tmp, else under /var/tmp; every stand-in root in the harness, plugins, conversation and cli tests goes through it (harness-watch's piPackage gets its own root, its watch scratch stays under tmpdir() for the W1 redaction test); with TMPDIR unset pi-fit went 13/75 to 88/0 and claim 9/24 to 33/0; the guard's test gains a pi with only a root under /tmp; sessionCovers' comment sits above it, not above ended's 2026-11-20 12:37:08 -06:00
jason.woltje e698b7d785 fix(harness,seat,conversation): pi-fit-tmp review round: the fit check stays undecided for a pi mounted under /tmp or a node there ("can't be checked: the pi's package sits under the system temp directory, which a session's sandbox covers", or "node sits ..."), since a session's sandbox mounts its private /tmp last and covers it, and no run starts; mountOrder compares targets in plain form (a trailing slash or "." names the same directory), leaves an entry with no absolute target where it is, and its comment states the limit: no bind stays hidden under a later one, so only checkArgv uses it; the conversation controller's comment and README say why a node under /tmp still can't run; tests: the guard's three cases and /tmpx, mountOrder's plain-form, no-target and hidden-bind cases 2026-11-20 12:05:26 -06:00
jason.woltje 8ed3e251be test(harness): pi-fit-tmp: the /tmp test's link to its temp directory sits in the pi's package, which the sandbox mounts, so bwrap follows it; without the scratch under the real path that case fails 2026-11-20 11:44:14 -06:00
jason.woltje 784748347b fix(harness,seat): pi-fit-tmp: the fit check gives one verdict whatever the temp directory is; with the scratch under /tmp, the bind of the scratch's tmp/ over /tmp hid the scratch's own bind and every run failed before pi started ("can't be checked: --help failed"); checkArgv now orders its binds with the new mountOrder (a bind goes before any bind whose target lies under its own, nothing else moves), the scratch goes under the temp directory's real path, and a failed --help line says how the run ended (exit status N, ended by SIGNAL, timed out) with no path; tests: a check with its temp directory in one mkdtemp directory under /tmp, and through a link to it, gives the verdict a temp directory outside /tmp gives and leaves nothing; mountOrder's order; the --help line for an exit status and a signal 2026-11-20 11:42:54 -06:00