You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky test: tasks.test.js 'an untagged hold stamps the latest working task' #549
Seen while verifying #544 (2026-10-20, Node 24.21, box): core/test/tasks.test.js "an untagged hold stamps the latest working task so two tasks do not share one card" failed once in npm run verify and 1 of 6 isolated runs (expected 'working', actual 'blocked' for the first task at line ~401). The PR does not touch tasks or holds.
Likely cause (not confirmed): the two tasks start in the same millisecond, so "latest working task" ties and the hold can stamp the first one.
Expected: the test is deterministic (e.g. an explicit ordering key or a mocked clock). Scope: core/src/host/tasks.js hold stamping and/or the test.
Triage (Birfy, 2026-10-20 22:06 Asia/Shanghai). Test-stability fix, no product behavior. Proposed scope: make core/test/tasks.test.js 'an untagged hold stamps the latest working task' deterministic by giving the two tasks distinct start times in the test (injected clock or an explicit ordering), and only if the tie can also happen in real use, break ties in core/src/host/tasks.js by creation order. Test that fails first: run the case with both tasks forced into the same millisecond. Waiting for the owner's go-ahead (needs-human).
Owner decision (2026-10-20 22:07 Asia/Shanghai): option a — give the two tasks fixed different start times in the test; if ties can happen in real use, break ties by creation order in tasks.js.
Claimed for this maintenance round. Branch: fix/549-task-order (from main at 7ebe054).
Plan: make task updatedAt strictly increasing so two starts in the same millisecond still order, add a regression test that freezes the clock (it fails on the current tip), then regenerate patches/ds-bot/ and run the tasks suite, lint and the patch check.
Activity
Birfy commentedon Oct 20, 2026
Triage (Birfy, 2026-10-20 22:06 Asia/Shanghai). Test-stability fix, no product behavior. Proposed scope: make
core/test/tasks.test.js'an untagged hold stamps the latest working task' deterministic by giving the two tasks distinct start times in the test (injected clock or an explicit ordering), and only if the tie can also happen in real use, break ties incore/src/host/tasks.jsby creation order. Test that fails first: run the case with both tasks forced into the same millisecond. Waiting for the owner's go-ahead (needs-human).Birfy commentedon Oct 20, 2026
Owner decision (2026-10-20 22:07 Asia/Shanghai): option a — give the two tasks fixed different start times in the test; if ties can happen in real use, break ties by creation order in tasks.js.
Birfy commentedon Oct 20, 2026
Claimed for this maintenance round. Branch:
fix/549-task-order(frommainat 7ebe054).Plan: make task
updatedAtstrictly increasing so two starts in the same millisecond still order, add a regression test that freezes the clock (it fails on the current tip), then regeneratepatches/ds-bot/and run the tasks suite, lint and the patch check.Stamp task updates in strictly increasing order (ThinkFlowLab#556)