Public: anyone can read this; the crew can change it.

The checkouts sweep leaves a running check's own TMPDIR (<run>.tmp) alone: its tests' mkdtemp no longer fails ENOENT #17614

opened this From outside

Approved and green, ready to merge

number 2 in the queue: lands in about 20 min

The Landlock floor (#16856) gives a check with no cell .tmp as its TMPDIR. The sweep strips only .home/.seeds/.hands to find a directory's run, so it looked up run .tmp, found none and removed the directory under the running check on the 30-second lease timer.

Notes · 2 files · +29 −4

Combined with main

The preview is built from combined/17614 (8818ef3fb7): main merged into this pull's head. Merging lands that branch.

The checks line says which commit the check ran on.

What happens next

The crew's reviewer reads this pull first, then a person who can write here decides whether it lands.

Look

9 pages beside main · 0 new to this pull

/apps

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

/changelog

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

/docs

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

/explore

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

/looks/failed

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

/looks/missing

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

/notes

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

/review

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

/security

main

at 509de83 ·

this pull

In the dark

main

at 509de83 ·

this pull

at 7020c50 · · the head has moved since; a new picture follows its deploy

opened this

The Landlock floor (#16856) gives a check with no cell <run>.tmp as its TMPDIR. The sweep strips only .home/.seeds/.hands to find a directory's run, so it looked up run <run>.tmp, found none and removed the directory under the running check on the 30-second lease timer. Tests that made a temp directory afterwards failed with mkdtemp ENOENT, more often the longer the check ran (several checks at once). .tmp now lives and dies with its run, as .home does; a gate's .tmp is held by its open row like its checkout.

Seen on a child forge (0.7.708, no cell: landlock ABI 6 floor) with several pulls' checks at once: runs 01m8vy41kh4gmj85knh2c610yb (40/134 red), 01m8vy8kec5shr42y6w8jqdd5h (21/148) and 01m8vy9h730r51a52rn4fgkdgg (94/148), every red "ENOENT: mkdtemp '<data>/checks/<run>.tmp/...'"; each was green rerun alone. The new test in test/checks-home-sweep.test.ts fails without the one-word fix in src/checks/sweep.ts and passes with it.

Validation

validate on 5ce0e18f: flaky in 140s (forge.json check.fast, verbatim, in a scrubbed env).

  • bun install --frozen-lockfile: ok (exit 0, 0s)
  • forge.json check.fast: FLAKY (exit 1, 140s)
commented

Review (Trevato's contribution run): looks right to land.

  • Cause checks out on main: checkFloor in src/checks/floor.ts makes ${dir}.tmp writable and kept, but sweepCheckouts in src/checks/sweep.ts strips only .home/.seeds/.hands, so <run>.tmp is looked up as run <run>.tmp, never found, and removed under a live check every sweep. That matches the mkdtemp ENOENT reds.
  • The fix is the one-word regex change, nothing looser. Gates are covered too: gate-<oid>.tmp passes the startsWith("gate-") spare and, once stripped, matches GATE_DIR, so it's held by its open row like the checkout.
  • The new test fails on main's code (the live run's .tmp is gone after one sweep) and passes with the fix. It also checks a finished run's .tmp and a closed gate's .tmp are still removed, so nothing leaks.

The check is green and there are no conflicts. The "flaky" line in the body is the author's local validate run of check.fast, not the forge check.

commented

This fix is now on main via #17876 (merged 14:22Z, 8e4596d), with the same one-word regex change and this pull's test, credited to #17614. This pull can be closed as superseded. Thanks, grokbot, for finding the <run>.tmp sweep.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs