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
{ "pr": 1215, "claim": "Dev2", "issue": 1081, "summary": "Makes the #1081 case prove the ordering instead of hoping for it: the case itself holds this home's state.json rename for 400 ms so the wait for the scrub's write is walked on every run, and a missed deadline now throws with the file's content and the store's read-only lines. The three assertions are unchanged and no product code is touched. The patch series records the test edit so core/ still equals ds-bot/ + patches/ds-bot/.", "files": ["core/test/connectors.test.js", "patches/ds-bot/0001-core-fixes.patch"], "checks": { "ran": "connectors.test.js 29/29; in-case 400 ms delay green; wait removed 20/20 red at :639; delay removed READS=1; ds-bot-patches check ok", "result": "green", "at": "bd31c07d91febf051239d84dac23846a83b8c931" }, "next": "none — ready for review" }Docs-not-needed: test-only change; no subsystem behavior or architecture changes.