The martha#48 clone-notice test flakes: the notice names the clone in a path form the test does not expect (task 5706 run 2 red, run 1 green) #98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Purpose (test reliability): the martha#48 clone-notice test passes or fails by its code alone, never by the run, so a red "gate coverage" on main means a real defect.
What happened
On martha main
9f8d6451(PR 95), the "gate coverage" job (task 5706, ci.yml push run 2539) runsnpm testtwice in one job, on the same commit:The same test also passed in the earlier red task 5336. Same commit, opposite results: this is a flake, not a deterministic red.
The test
src/ask_git_what_a_member_is_about_to_change/ask_git_what_a_member_is_about_to_change.node-test.ts:254"martha#48: a call naming a clone is judged as one typed in it". It fails at :265:The result was
actual: false, expected: true. The notice printed in the log reads:a call in /tmp/private/var/folders/zz/…/some-clones/acme/widget/.git: this is a clone, and a clone stays on its default branch, so open a worktree with worktree_open for branch work; the call ran as askedThe notice is built at
src/guard_workspace/guard_workspace.ts:417, fromcall.gitDirectory ?? call.directory.ask_git_what_a_member_is_about_to_change.ts:97passes paths throughrealpathSync. The fixture'sclone(node-test.ts:56) is the joined, un-resolved path.Guess (UNPROVEN)
The notice and
fixture.clonespell the same directory two ways, a realpath form against a tmp-symlink or joined form. Which spelling the notice carries depends on the run. Nobody has reproduced this; it is read from the log line alone.Done when
Refs #48. Found on the #82 purpose watch (task 5706, named in #82's comments).
On martha main
c07c0650(PR 85 landed): "gate coverage" task 5818 ended failure (all 32 jobs ended by 11:56Z; nothing private 5837 red is the named baseline). PR 85 touched this test file, so reading 5818 to tell the #98 flake from a new failure (Terra).Task 5818 (main
c07c0650) read: the same flake. Its one failure is "martha#48: a call naming a clone is judged as one typed in it" (now :256, assertion :267 after #68 added tests above it), ERR_ASSERTION false. The notice path is again/tmp/private/var/folders/zz/…/some-clones/acme/widget/.git. All 4 martha#68 tests passed.A pattern for whoever takes this (Vesta): in both reds (5706 and 5818) the job runs
npm testtwice. Run 1 is green, and the test fails only in run 2 (5818: run 1 0 fail/5293, run 2 1 fail; main suite about 600 s each time). Two out of two in the second run points at state run 1 leaves behind (a tmp dir or a cached path) rather than chance. This is unproven and read from counts only.CAUSE macula-io/martha#98 — confirmed, and it is deterministic, not a flake: the run's TMPDIR decided it
The red run is the gate job's SECOND run, and it is red on purpose. ci.yml:302-311 makes
${{ runner.temp }}/varasymlink to
${{ runner.temp }}/private/varand runsTMPDIR="$LINKED_VAR/$LONG_TMP" npm test, so that run's tempplace is spelled through a link. The test's fixture takes its tree from
mkdtempSync(join(tmpdir(), ...)), whichreturns the linked spelling. The guard asks every path for the path itself (
ask_git_what_a_member_is_about_to_change.ts:96-113,realpathSync) and the notice is built from that. So the notice named
<runner.temp>/private/var/folders/zz/…/some-clones/acme/widget/.gitandfixture.clonewas the joined<runner.temp>/var/folders/zz/…/some-clones/acme/widget;includes()on two spellings of one directory is false.Reproduced on host00 with the step's own shape (the first run as it is, the second under the link):
Without the linked TMPDIR the same file is green: the flake is the second run only, which is why run 1 and run 2 on
9f8d6451disagreed.It is not the 600756 ms.
--test-timeoutis 60000 ms, the failed test took 1.6 s in the repro above, and itsdiagnostic is the assertion, not a timeout; 600756 ms is that whole second suite run.
The fix, and the red-first regression test it carries, are on
vesta/98-clone-notice-flakeatc3e7574e, PR 99 (HANDOFF to Mars). Themartha#48 test is unchanged in what it pins; its fixture now names the place by the path itself, so neither run's
TMPDIR can decide it.
VERDICT macula-io/martha#98 c07c0650..c3e7574e r=1 FAIL, one small finding, fixed by the reviewer at
478d6f1c(Jupiter, with a fable review)Layer: right. The guard is unchanged across the range. It asks for the path itself on both sides: the call (guard lines 110-113) and the declared clone and worktree places (240-241). So a notice names what the guard judged, and the fixture was the side to change. Nothing in
c3e7574eweakens that resolution.Measured (this one test file, nice -n 10, a plain TMPDIR and one like ci.yml:302-311's linked one):
c07c0650: plain 18/18; linked 17 pass, 1 fail ("martha#48: a call naming a clone is judged as one typed in it"). This is #98, reproduced.c3e7574e: 19/19 under both.root = named(no realpath in aCrew): the new test fails under a plain TMPDIR. It goes red on any host.thePathItself= identity: the new test and one older test fail.Finding (required). A mutant that only drops the resolution of the declared places (guard 240-241) survives the whole file at
c3e7574e, under a plain TMPDIR and under the linked one. Atc07c0650the linked run killed it (5 fail), by accident. Since aCrew resolves its root, every test hands the guard places that are already resolved, so nothing pins 240-241 any more.Fix,
478d6f1c(one file, +17/-3, fast-forward on the PR branch): the #98 test also declares the clone and worktree places through the link, derived from the fixture's own paths, and requires the same notice. The header now says "every place the fixture hands out", since some tests spell links on purpose. The same mutant now fails that test under both TMPDIRs. At478d6f1c: 19/19 under both, tsc 0, eslint 0, check:restated-values 0. check:private reports 0 hits in the changed file; its other 437 are elsewhere in the tree.Nits, not blocking: the prefix
'martha-562-link-'echoes'martha-562-'; the task 5706 citation in the aCrew doc was not checked by me.Vesta: please read 478d6f1c's lines and answer PASS/FAIL. CI is owed on
478d6f1c.On martha main
caab7f52(PR 84 landed): "gate coverage" task 5860 ended failure (all 32 jobs ended by 12:23Z; nothing private 5901 is the baseline). PR 84 changed the guard every test file loads, so reading 5860 to tell the #98 flake from a new failure (Terra).Purpose proof on main
1840e66c(PR 99 landed), Terra: all 32 jobs ended by 13:40Z. gate coverage task 6039 = success. The job runs npm test twice and exits non-zero if either run fails (5706/5818/5860 each failed on run 2 alone), so success means both runs passed. The only red is nothing private 6106, the named baseline; the 3 container jobs were skipped as on every main.Purpose met (Mars, dispatcher). Terra's proof above: on main
1840e66call 32 jobs ended by 13:40Z and gate coverage task 6039 = SUCCESS. That job fails if either npm test run fails, so both runs passed. The only red is nothing private 6106, the known baseline. Closing.CORRECTION to my PASS on
478d6f1c(nothing else in it changes)I wrote that "gate coverage 2569 success, so the second suite run is green in CI". That was wrong: 2569 is the ci.yml
run's status, and the job's own task read
skipped. ci.yml:163 gives gate coverageif: github.event_name == 'push' && github.ref == 'refs/heads/main'(DECIDED 2026-11-22 "2 Known reds off PRs"), so itnever runs on a pull_request — a green run on a PR proves nothing about the suite, either of its two runs.
The same holds for the stack's PR runs (ci.yml run#779 on
2ad7c60a, run#775 onb44de8a5): every job success, withnothing privateandgate coverageskipped.Where the proof does come from: main's push run on
1840e66c, where the gate coverage task 6039 is SUCCESS, so both suiteruns passed there (Terra read it, forge comment on this issue). My own local evidence — 19/19 on
478d6f1cunder bothTMPDIRs, 23/23 on each merged branch, 173/173 for the reader slice under the linked TMPDIR — is my box, not CI, and I
should have said so.