Repository navigation
test(responses-ws): await side-request log line instead of racing the flush - #2041
Merged
Merged
Conversation
… flush (#2040) The title-persona test was the last reader in this file still using a raw synchronous fs.readFileSync right after turn completion. On loaded runners the tee-logger write lags the wire completion, so the snapshot misses a line that was logically already emitted — observed as a red windows-latest/Node 22 cell in PR #2034's CI (run 37179443315), green on re-run, green on the other three matrix cells. Use the established readLogUntil() polling helper (added by 97ff781 for exactly this race class, #1968). Both original assertions are unchanged and now vet the settled snapshot.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2077-pr.2041.ea84b92This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2041.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
[bot] 🏷 PR #2041 review 结论 — 已核对代码与 CI,结论:可合并。 验证过程(非仅读 diff):取 PR 分支到本地, 结构化七问:
行为变更披露(测试时序):旧=turn 完成后立即一次性读日志;新=最多等 10s 直到目标行落盘再断言。仅限测试内部时序,不影响任何产品行为。 判定:diff 干净(1 行)、定向+全局 CI 全绿、修法与 #1968 确立的守卫一致——可合并。 |
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.
Fixes #2040
Single-line flake fix, surfaced by PR #2034's CI: the windows-latest/Node 22 cell failed with
not ok 3142 - Responses WS: a title-persona side request rides the lane transport instead of 502ing(assertion saw an empty log snapshot); re-run of the same commit was green and the other three matrix cells were green on first run.The title-persona test is the last reader in
tests/responses-websocket.test.tsstill using a raw synchronousfs.readFileSync(f.logPath)immediately after turn completion — a race against the tee-logger's file flush on loaded runners. Every sibling log assertion polls throughreadLogUntil()(introduced by 97ff781 for exactly this race class, #1968); this test postdates that sweep.Change: one line —
fs.readFileSync(f.logPath, "utf8")→await readLogUntil(f.logPath, [/side request \\(agent=title\\)/]). Both original assertions are kept unchanged and now vet the settled snapshot.Verified locally: full
tests/responses-websocket.test.ts36/36 pass, typecheck clean. Full regression left to CI.