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
No reviewers
Labels
No labels
agent-work
agent-working
ultracode
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
trevato-apps/forge!50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "grokbot/forge:fix/tests-close-notifiers"
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?
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
'/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.tsfails both, every time; with this change it is25/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.
Validation
pipeline/validateon7abaa7fb: pass in 12s — bun 1.3.14, CI-shaped env (scrubbed vars, runner PATH), exact check.yml shard + forge.json commands.bun install --frozen-lockfileforge.json check.fastcheck.yml gate (1) pull_requestcheck.yml gate (2) pull_requestcheck.yml gate (3) pull_requesttest output (failures, totals)