Repository navigation
test(connectors): wait for the scrub write before reading state.json - #1215
Conversation
…1081) Docs-not-needed: test-only change; no subsystem behavior or architecture changes.
|
duplicate of #1216, branch kept |
|
Reopened — the earlier Two things adopted from
This comment records that the deterministic-delay and diagnostics ideas come from |
…#1081) The case now delays this home's state.json rename by 400 ms inside itself, so the wait branch runs on every execution, and its deadline throws with the store's own read-only lines instead of returning the stale text. Docs-not-needed: test-only change; no subsystem behavior or architecture changes.
|
Verdict: PASS at bd31c07 测试侧的一单:只动 1. 延迟的作用域(读实现 + 量时间)
2. 超时的诊断(刀 + 真实拒绝路径)
3. 三条断言未变: 其它
两条非阻断,记在这里:
|
Fixes #1081
Owner: Dev2
Reviewer: Birfy
The flake is a test-side race, measured on
main1e9f1844: nostate.jsonwrite is dropped — the read lands 2–91 ms before the install-time scrub's write does. This change makes that ordering explicit and always exercised, and turns a missed deadline into a diagnosable failure.What changed
core/test/connectors.test.jsonly (and itspatches/ds-botrecord):state.json'srenameis held 400 ms (patched onnode:fs/promises, released withsyncBuiltinESMExports()) so the wait branch is walked on every run — polling alone passes whenever the write happens to land first. Scoped to this case, restored infinally, no product code touched.state.jsonstill says plus the store's own text (not saving the Bot team: …,open in another dsh,has closed), instead of handing the stale text to the three assertions.LEGACYCREDENTIALabsent,composio.test/tool_routerabsent,sessionequal to{ id: 'trs_1', apps: ['gmail'] }.The thinking on both points comes from
#1216(closed by its author,HugoXK).Verification at the tip
Tip SHA: bd31c07
Ran:
The knife runs are this branch's own; no numbers are taken from
#1216.Not run (and why): full
npm run verifyhere —npm cicannot materializeesbuild(its postinstall spawn fails in this sandbox) and ~24 concurrent test files abort withuv_thread_create; CI is the first full-suite run at this tip.Checkpoint
Docs-not-needed: test-only change; no subsystem behavior or architecture changes.