a stuck file ends with its run's signal, and a directory that names everything is refused (martha#195) #201

Manually merged
terra merged 4 commits from pallas/195-signal-end into main 2026-11-25 23:10:04 +00:00
Member

Purpose (defect): a test file is ended by the signal that ends its run, even when it is stuck in a loop, and what the file started still ends with it.

Refs #195.

  • The run's end (the wrapper) now ends the run on SIGINT, SIGTERM and SIGHUP itself: it ends what names the run's roots, removes them, ends the command and exits 128 plus the signal's number.
  • Every script that runs the tests goes through it: the installer's own test script and the three bites runs, beside the repository's stage 3.
  • Items 1-3 of the issue: "", "/" and a relative directory are refused by name and never searched for; the match checks its left edge as well as its right; the last find-stop-kill pass says what it could not clear. The finder and the line-writer are injectable, so a test never reaches a real kill.
  • Item 4: SIGHUP is held by the wrapper. Item 5: there is no unwrapped run left to sweep.

Red first: five mutants, each named in the handoff. No new check.

Purpose (defect): a test file is ended by the signal that ends its run, even when it is stuck in a loop, and what the file started still ends with it. Refs #195. - The run's end (the wrapper) now ends the run on SIGINT, SIGTERM and SIGHUP itself: it ends what names the run's roots, removes them, ends the command and exits 128 plus the signal's number. - Every script that runs the tests goes through it: the installer's own test script and the three bites runs, beside the repository's stage 3. - Items 1-3 of the issue: `""`, `"/"` and a relative directory are refused by name and never searched for; the match checks its left edge as well as its right; the last find-stop-kill pass says what it could not clear. The finder and the line-writer are injectable, so a test never reaches a real kill. - Item 4: SIGHUP is held by the wrapper. Item 5: there is no unwrapped run left to sweep. Red first: five mutants, each named in the handoff. No new check.
a stuck file ends with its run's signal, and a directory that names everything is refused (martha#195)
Some checks failed
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 7s
CI / structural floor (pull_request) Successful in 34s
CI / Martha's names are its own (pull_request) Successful in 31s
CI / no import cycle (pull_request) Successful in 34s
CI / the host drift check bites (pull_request) Successful in 1m22s
CI / the posted text check bites (pull_request) Successful in 15s
CI / the engine drift check bites (pull_request) Successful in 1m11s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 35s
CI / workflows are valid (pull_request) Successful in 37s
CI / nothing private (pull_request) Has been cancelled
CI / no test the base passed goes missing (pull_request) Has been cancelled
CI / the pictures change only with the version (pull_request) Has been cancelled
CI / no literal restates a defined value (pull_request) Has been cancelled
CI / every check runs in a job (pull_request) Has been cancelled
CI / every job has a timeout (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / gate coverage (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
engine drift / the recording says what the engine says (pull_request) Has been cancelled
host drift / the recording is of the host members run (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
becbabd255
A test file's guard holds SIGTERM, SIGINT and SIGHUP, and a JS listener runs only when the event loop turns. A file
stuck in a sync loop never turns it, so it ignored all three until its 20-minute wall clock killed it, and what it
started in a session of its own outlived even that (martha#195, from the r=1 review of PR 189).

The run's end is the one process in the group that is never stuck and holds the run's roots: on SIGINT, SIGTERM or
SIGHUP it now ends what names the roots, removes them, ends the command and exits 128 plus the signal's number. Every
script that starts a run of the tests goes through that wrapper, so no run of the suite is left unwrapped: the
installer's own test script and the three bites runs join the repository's.

Also in the same code, each from the same review:
1. endWhatNamesTheDirectories refuses "" , "/" and any relative directory by name and never searches for it, and a run
   root that is not absolute is no root at all — the shape that ended every process of the user on 2026-11-25 at
   20:19:59Z and 20:24:47Z, twice. The finder and the line-writer are injectable, so no test reaches a real kill.
2. namesTheDirectory checks the left edge as well as the right, so /var/tmp/f1234 is not /tmp/f1234.
3. The last find-stop-kill pass says what it could not clear instead of returning as if it were clean.
4. The wrapper ends the run on SIGHUP as it does on SIGINT and SIGTERM.
5. Runs without the wrapper are swept, because there are none left.

Red first: each item's test fails by name with its fix removed (five mutants, shown in the handoff). No new check.
r=1 folds: the signaller is a seam too, and four restated values become their definitions (martha#195)
Some checks failed
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Has been cancelled
dependency advisories / node in installer (pull_request) Has been cancelled
dependency advisories / node in . (container) (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been cancelled
dependency advisories / node in installer (container) (pull_request) Has been cancelled
c4 model / c4-model (pull_request) Has been cancelled
c4 model / c4-model-1 (pull_request) Has been cancelled
CI / links resolve (pull_request) Has been cancelled
CI / gate coverage (pull_request) Has been cancelled
CI / structural floor (pull_request) Has been cancelled
CI / Martha's names are its own (pull_request) Has been cancelled
CI / no import cycle (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the host drift check bites (pull_request) Has been cancelled
CI / the engine drift check bites (pull_request) Has been cancelled
CI / the posted text check bites (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
CI / the ring reaches the owner on the live run's tmux (pull_request) Has been cancelled
CI / workflows are valid (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
CI / nothing private (pull_request) Has been cancelled
CI / no test the base passed goes missing (pull_request) Has been cancelled
CI / the pictures change only with the version (pull_request) Has been cancelled
CI / no literal restates a defined value (pull_request) Has been cancelled
CI / every check runs in a job (pull_request) Has been cancelled
CI / every job has a timeout (pull_request) Has been cancelled
engine drift / the recording says what the engine says (pull_request) Has been cancelled
host drift / the recording is of the host members run (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
23a4b3de72
Neptunus r=1, one item of real harm: the pass-limit test's finder returned 999999 and the real signaller stopped and
killed it 20 passes over; pid_max is 4194304 and live pids pass 2041300, so that pid can be any process of the user.
endWhatNamesTheDirectories takes the signaller as a third seam, the test records the 20 stop-kill pairs, and a second
test proves the seam by holding its own child unsignalled.

Restated values replaced by their definitions: SIGNAL_EXIT_BASE, the two RUN_*_ROOT_VARIABLE names, PASSES (now
exported), and THE_WRAPPER by its basename. The seams' doc block sits above the export again.
r=2 fold: a base a run's root is made under must be an absolute path, refused by name (martha#195)
Some checks failed
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 12s
c4 model / c4-model-1 (pull_request) Successful in 6s
CI / links resolve (pull_request) Successful in 7s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model (pull_request) Successful in 0s
CI / structural floor (pull_request) Successful in 34s
CI / Martha's names are its own (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 32s
CI / the host drift check bites (pull_request) Successful in 1m14s
CI / the engine drift check bites (pull_request) Successful in 49s
CI / the posted text check bites (pull_request) Successful in 13s
CI / gate coverage (pull_request) Failing after 9m49s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 14s
CI / workflows are valid (pull_request) Successful in 12s
CI / installer (pull_request) Successful in 2m27s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 39s
CI / the pictures change only with the version (pull_request) Successful in 22s
CI / no literal restates a defined value (pull_request) Successful in 1m9s
CI / every check runs in a job (pull_request) Successful in 16s
CI / every job has a timeout (pull_request) Successful in 16s
engine drift / the recording says what the engine says (pull_request) Successful in 42s
host drift / the recording is of the host members run (pull_request) Successful in 2m2s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 34s
CI / the relay loads in the recorded host (pull_request) Successful in 15m23s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 19s
CI / the clean-install proof removes its container (pull_request) Has been cancelled
47c247bc28
the gate's two reds: the test removes through the retry, and the installer's script keeps the runner alone (martha#195)
All checks were successful
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 13s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 3s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 7s
CI / structural floor (pull_request) Successful in 28s
CI / Martha's names are its own (pull_request) Successful in 31s
CI / no import cycle (pull_request) Successful in 29s
CI / the host drift check bites (pull_request) Successful in 1m26s
CI / the engine drift check bites (pull_request) Successful in 49s
CI / the posted text check bites (pull_request) Successful in 12s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / workflows are valid (pull_request) Successful in 14s
CI / installer (pull_request) Successful in 3m46s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 36s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / no literal restates a defined value (pull_request) Successful in 1m13s
CI / every check runs in a job (pull_request) Successful in 14s
CI / every job has a timeout (pull_request) Successful in 14s
engine drift / the recording says what the engine says (pull_request) Successful in 51s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 42s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 21s
host drift / the recording is of the host members run (pull_request) Successful in 1m56s
CI / the relay loads in the recorded host (pull_request) Successful in 15m6s
CI / the clean-install proof removes its container (pull_request) Successful in 19m50s
CI / gate coverage (pull_request) Successful in 17m16s
772b398b79
terra manually merged commit 6957a0e277 into main 2026-11-25 23:10:04 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha!201
No description provided.