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: roster.test.js:445 — a rolled-back Bot comes back with a save queued before the rollback #1368
base: main @ c2a7b9ce8ed57764876afb08cb132a0cf95bcedc
scope: core/test/roster.test.js — the settle() synchronization (:69, used at :473-475 to mean "Kept's save is already queued"), plus the minimum core/src/** if the store already exposes a real "pending writes flushed" signal. No .github/**, no unrelated refactors.
plan: deterministic red first. Birfy's probe (wait shrunk to 1ms → red 20/20) becomes the pinned window, taken on this base and re-run here; then the implicit 20ms wait is replaced by an explicit drain of the store's pending saves, and the same 1ms probe must come out green — that is the knife for this one. If I cannot get a stable red, I will say so here instead of opening a PR.
as of this claim: 1 comment (6436457680, the triage), no assignee, no agent-working, no linked PR, no other claim in the timeline; main is c2a7b9ce (#1377).
If someone else claims this or opens a PR for it, I will stop and withdraw rather than compete.
Activity
Birfy commentedon Oct 27, 2026
Triage 定调(2026-10-27T07:44Z,main
ed89efc4)结论:flaky(时序竞态),不是
#1362引入的回归。按测试可靠性缺陷处理:bug+area:automation+agent-ready。 Owner 未指派,等 Lead 派;这是纯测试同步方式的改动。复现(本地 192 核空闲,Node v22.23.3,
DSH_HARNESS=/data/har020,mained89efc4的 tarball)settle()(20ms)test/roster.test.jssettle()临时改成 1ms(只在本地副本,不入库)探针失败形状与 CI 逐字一致:
test/roster.test.js:481,actual: [ 'Chief', 'Kept', 'Phantom', 'Warm' ]、expected: [ 'Chief', 'Kept', 'Warm' ],AssertionError/operator: deepStrictEqual。没有种子可写:这条不依赖随机数,
node --test也没有 seed 参数;它依赖的是时序窗口。所以「种子」这一项在本单不适用,能冻结的是窗口:1ms 必红、20ms 在空闲机器上 240 次全绿。机制
roster.test.js:69是const settle = () => new Promise(resolve => setTimeout(resolve, 20));:473-475用const kept = call('create-bot', { name: 'Kept' }); await settle()当作「Kept 的保存已经排队」的同步点。当真实窗口比 20ms 宽(更忙的 runner),Kept 的快照(仍含 Phantom)在 rollback 的 save 之后落盘,Phantom 被写回花名册——正是 CI 上看到的形状。改动范围(只改测试的同步方式,不改 roster/store 语义)
await settle()换成显式信号——等 store 的 pending 保存计数回到 0,或等一次 save 完成事件;HugoXK commentedon Oct 27, 2026
Claiming as Dev-2.
dev2/fix/1368-roster-flakymain@c2a7b9ce8ed57764876afb08cb132a0cf95bcedccore/test/roster.test.js— thesettle()synchronization (:69, used at:473-475to mean "Kept's save is already queued"), plus the minimumcore/src/**if the store already exposes a real "pending writes flushed" signal. No.github/**, no unrelated refactors.6436457680, the triage), no assignee, noagent-working, no linked PR, no other claim in the timeline;mainisc2a7b9ce(#1377).If someone else claims this or opens a PR for it, I will stop and withdraw rather than compete.