Skip to content

test(retired-bot-paths): wait for both reviews instead of fixed settles (#1833) - #1834

Merged
Birfy merged 1 commit into
mainfrom
dev/1833-retired-bot-timing
Oct 30, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/1833-retired-bot-timing

Conversation

@Birfy

@Birfy Birfy commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Claim

Fixes #1833
Owner: Chief
Reviewer: Reviewer
Tip SHA: 1b1bd68
Base: 7d21690
Docs-not-needed: test-only change to one timing assertion and its patch mirror; no subsystem behaviour or docs page changes.

What changed

The #1786 assertion (#1786: a retired Bot is not brought along by a lagging review, while a live member is) waited for m1's memory file, then made two fixed settle() calls, and read whatever requests had arrived. On a busy CI runner the second review (b3) lands after those ticks, so the assertion saw ["m1"] (#1832's red tests-ok, #1832, expected ["b3","m1"]).

It now waits for the deterministic condition: both reviews are recorded (requests.length >= 2) and m1's memory file exists, then makes the same assertions. The fixed settle() calls are gone. The semantic being protected is unchanged: a retired Bot (b2) must not appear in requests.

Files: core/test/retired-bot-paths.test.js and its whole-file mirror patches/ds-bot/files/test/retired-bot-paths.test.js (kept byte-identical).

Ran (at 1b1bd68)

  • for i in $(seq 10); do node --test core/test/retired-bot-paths.test.js; done — 10/10 green, 22/22 tests each run.
  • Red-first on the base tree: removing the wait entirely made the same assertion read [] and fail (not ok 21); with only the fixed settles removed it still passed locally, which is exactly why the CI-only race needed a condition, not more ticks.
  • node scripts/ds-bot-patches.mjs check — ok 10 patches apply cleanly in order, ok core/ equals ds-bot/ + patches/ds-bot/ (pin check skipped: generate needs git, absent on this box; the mirror was updated by hand as that message instructs).

Not run

  • npm run verify (full suite) — not run at this tip; only the one test file plus the patch check were run.
  • CI tests-ok — not yet observed; it must be green at this tip before queueing.

Checkpoint

{
"pr": 1834,
"claim": "Chief",
"issue": 1833,
"summary": "The #1786 retired-Bot review assertion no longer waits a fixed number of event-loop ticks. It waits until both reviews have been recorded (requests.length >= 2) and m1's memory file exists, then asserts the same set. The retired Bot b2 still must not appear. Ten consecutive local runs of the file are green; the same assertion goes red when the wait is removed.",
"files": [
"core/test/retired-bot-paths.test.js",
"patches/ds-bot/files/test/retired-bot-paths.test.js"
],
"checks": {
"ran": "for i in $(seq 10); do node --test core/test/retired-bot-paths.test.js; done && node scripts/ds-bot-patches.mjs check",
"result": "green",
"at": "1b1bd68e1be9d82f45a562cf518f263624cc1b95"
},
"next": "Wait for tests-ok at this tip, then Reviewer PASS before queueing."
}

…es (#1833)

The #1786 assertion waited for m1's memory file, then two fixed settle()
ticks, and read whatever requests had arrived. On a busy CI runner the
second review (b3) landed after those ticks, so the assertion saw ['m1']
and failed. Wait for the deterministic condition instead: both reviews
recorded and m1's memory written. The retired Bot (b2) must still stay
out of requests.

Docs-not-needed: test-only change to one timing assertion and its patch mirror.
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 30, 2026
@Birfy Birfy self-assigned this Oct 30, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 30, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit f245520 Oct 30, 2026
14 of 15 checks passed
@Birfy
Birfy deleted the dev/1833-retired-bot-timing branch October 30, 2026 13:12
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retired-bot-paths.test.js:591 断言依赖时序,CI 上间歇性红

1 participant