Commit f3ae91e
committed
fix(dev): stop the session reaper deleting shared binaries
make refuses a session id whose `ze-<sid>` collides with a shared binary
name
(mk/session.mk, the ZE_BIN_NAMES filter). reap_binaries had no matching
guard,
so `session-scratch.sh --clean` with the session id `test` matched
bin/ze-test
on its `bin/*-$sid` glob and deleted the shared test runner that humans
and CI
build. Same for `ze-chaos`, `ze-perf`, `ze-analyze` and the rest.
rm -f is irreversible, which is why the guard belongs on the side that
DELETES
and not only on the side that creates names. An earlier Review Gate
noted the
reaper half was "narrower" than make and stopped at the observation.
The shared list is derived from mk/session.mk rather than repeated here,
so the
two cannot drift -- the drift is what caused this.
Proven rather than asserted: with sid `test` and bin/ holding ze-test,
ze-chaos,
ze-mysession-test and other-test, the reaper now leaves the two shared
binaries
and still removes the two session-suffixed ones.
Found by an independent closure review of
spec-session-scoped-build-artifacts.
That review also measured bin/ at 2.3 GB with orphaned binaries outside
any
sweeper, because reap_binaries only runs for an id that still has a
tmp/s/<sid>/
directory. That is a separate defect and
plan/spec-session-bin-directory.md
already owns it.1 parent 3007298 commit f3ae91e
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
93 | 104 | | |
94 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
95 | 109 | | |
96 | 110 | | |
97 | 111 | | |
| |||
0 commit comments