Repository navigation
Wait for the MAX_TOKENS diagnostic in the cut-off follow-through tests - #1951
Merged
Merged
Conversation
The diagnostics log is written in the background. Two tests read it with no wanted entry, so the first read could return before the MAX_TOKENS line landed and fail with 0 !== 1 on a slow runner. Wait for that entry, as the watched-turn test already does.
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Fei2411
commented
Nov 21, 2026
Fei2411
left a comment
Owner
Author
There was a problem hiding this comment.
Code Reaper review at df197b46 — pass.
- The two cut-off tests now pass a
MAX_TOKENSpredicate toreadDiagnostics, which waits for the background write instead of reading once. This matches the sibling test at line 464 and is the same change as40679da2from #1750. Test-only. follow-through.test.jspassed 11/11 runs locally (36/36 tests each time, real harness).- PR body follows the template and has the
Agent: Devin (Cognition)line. Base isdevand it merges cleanly. - Overlaps: no other open PR touches
ds-bot/test/follow-through.test.js.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
No issue. This fixes a flaky CI test:
follow-through.test.js:396, "a turn that ended on the token limit gives what it said, marked as not complete", failed once on ubuntu · Node 24 with "expected 1 MAX_TOKENS diagnostic, got 0". It first showed up on the now-closed #1750.What changed / 改了什么
The
MAX_TOKENSrecord inlogs/diagnostics.jsonlis written in the background. Two cut-off tests read the file once, so a slow runner could read it before the record was there. They now callreadDiagnostics(home, list => list.some(entry => entry.code === 'MAX_TOKENS')), which waits up to 3 s for the record, the same way a sibling test in the file already does. This is a test-only change; product code is unchanged.Changelog
none
How I checked it / 怎么验证的
npm test(inds-bot/): 3602 passed, 0 failed, 4 skippednode scripts/build-client.mjs --checknpm run lintindex.jsorsrc/host/: not needed (test-only)Checklist / 检查
src/client/changed →npm run buildran andclient.jsis committed: not applicableCo-authored-by. / 没有把 AI 工具写成作者或Co-authored-by。Agent: Devin (Cognition)
Implemented in session Fix Telegram replies dropped with time-context message
Review with Devin · Open in Devin Desktop