Public: anyone can read this; nobody can change it.

Tests that start a notifier close it, so its pager does not outlive the test and log errors into the next file's counts #50

Merged opened this view on origin

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

startNotifier's stop() ends telling but, on purpose, leaves the drain pager running (main.ts stops the notifier when a drain starts and the drain must still be paged; notify-drain.test.ts holds that). Only close() clears the pager. Four test files ended their notifier with stop(), so its pager kept firing for the life of the bun test process.

shipped merged

opened this view on origin

startNotifier's stop() ends telling but, on purpose, leaves the drain pager running (main.ts stops the notifier when a drain starts and the drain must still be paged; notify-drain.test.ts holds that). Only close() clears the pager. Four test files ended their notifier with stop(), so its pager kept firing for the life of the bun test process.

test/drill-board-line.test.ts starts one with clockMs: 10: after its afterAll removes the data directory, the pager logs "notify failed ... ENOENT: statfs '<tmp>/forge-drill-line-…'" every 10 ms into the process-wide error ring. Any later file in the same process that counts errors goes red: vitals' "errors are counted, bounded, redacted, and a burst is said" (lastHour is not 1) and tui-sentinel's "an admin has it, and it says what the board says" (the hunt files an error-rate finding). That is what the forge's parallel check, which runs many files per process, saw on pulls that never touched either.

On main, bun test test/drill-board-line.test.ts test/vitals.test.ts test/tui-sentinel.test.ts fails both, every time; with this change it is 25/25 green. accounts, watches and snapshot-mirror had the same stop(); they are not red today but leak the same interval, so they close too.

<!-- pipeline:validation -->

Validation

pipeline/validate on 7abaa7fb: pass in 12s — bun 1.3.14, CI-shaped env (scrubbed vars, runner PATH), exact check.yml shard + forge.json commands.

stepresulttime
bun install --frozen-lockfileok (exit 0)0s
forge.json check.fastok (exit 0)3s
check.yml gate (1) pull_requestok (exit 0)2s
check.yml gate (2) pull_requestok (exit 0)2s
check.yml gate (3) pull_requestok (exit 0)5s
  • ⚠️ node v20.19.2 here, v22 on CI (tsc runs under node)
test output (failures, totals)
▶ bun install --frozen-lockfile
  ok  exit 0  0s
▶ forge.json check.fast
Ran 129 tests across 11 files in 2.0s (8 shards).
  ok  exit 0  3s
▶ check.yml gate (1) pull_request
Ran 33 tests across 3 files in 1.7s (3 shards).
  ok  exit 0  2s
▶ check.yml gate (2) pull_request
Ran 20 tests across 4 files in 1.2s (4 shards).
  ok  exit 0  2s
▶ check.yml gate (3) pull_request
Ran 76 tests across 4 files in 5.3s (4 shards).
  ok  exit 0  5s
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs