Repository navigation
test(part-archive): name a refused workDir instead of a 2 s timeout - #1186
Conversation
The three #896 cases changed a Bot's folder and then waited on the session id, so a folder the guard refuses reached the reader as "until: the condition did not hold within 2 s" and cost a diagnostic round (#1059 was opened on exactly that reading). Each now asserts the update-bot answer first and fails with the returned message. One deterministic case points workDir at the harness home itself: bot/refused, the folder named in the message, no part made, the Bot still in its own chat. It holds on any machine, so its knife reds in CI too. The file header records that TMPDIR must stay outside DSH_HOME for these cases. Fixes #1169
|
Verdict: PASS at b7a0e29
What I checked: #1169's reading is right — Not run: full Non-blocking: (1) the base is |
Owner: Dev4
Reviewer: Reviewer2
Base: bb96cc8
Tip SHA: b7a0e29
Written-by: Dev4
Fixes #1169
Reproduce. On
bb96cc8f, withTMPDIR=/data/dsh/bot/workspace/tmp(insideDSH_HOME=/data/dsh),node --test test/part-archive.test.jsfails 3/3 in one run, every case witherror: 'until: the condition did not hold within 2 s'. The reason is in the answer nobody read:update-bothad replied{"ok":false,"error":{"code":"bot/refused","message":"…/project holds DeepSeek Harness data, so Bots cannot work there"}}, because the test's project folder is made undertmpdir(), which then sits inside the harness home. WithTMPDIR=/tmpthe same tree is 3/3 green — the guard is right, the test just hid it (#1059 was opened on this reading).What changed (test only, two files, no product behaviour):
#896cases now take the answer first:const answer = await h.call('update-bot', …),assert.equal(answer.ok, true, answer.error?.message), and only thenuntil(…)on the session id.#1169: a folder under the harness home refuses the move and names itself:workDir: h.home(exposed bystart()) assertsok === false,error.code === 'bot/refused', the message names that folder and saysholds DeepSeek Harness data, the Bot stays in its own chat and no part is created. It does not depend on whereTMPDIRis, so its knife reds in CI too.start()header records thatTMPDIRmust stay outsideDSH_HOMEfor these cases, and points at the refusal by name.patches/ds-bot/files/test/part-archive.test.jsis the same file byte for byte. No changelog fragment: T1 test-only, as#1168.What I ran at
b7a0e2933db57fe138d4107cc6a71ee59b6b1bc3(Node 22.23.3,TMPDIR=/tmp DSH_HARNESS=/opt/flybot TZ=UTC):node --test test/part-archive.test.js→ 4/4, no skips.TMPDIR=/data/dsh/bot/workspace/tmp→ 1/4: the three cases now fail with…/project holds DeepSeek Harness data, so Bots cannot work there(the refusal names itself, exactly what the issue asks for) and the new case still passes, because it names its own folder.node scripts/ds-bot-patches.mjs check→ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/(the pin line skips here: nogiton this box, same as on main).TMPDIRinsideDSH_HOME: 0/3, all three on the 2 s timeout above.Red without the source change.
workDir: h.home→h.project→ 3/4, red only#1169: a folder under the harness home refuses the move and names itself. Restore → 4/4.TMPDIRinsideDSH_HOMEthey turn the 2 s timeout into the guard's own sentence (the run above); there is no second code path for a knife to red.Not run. Full
npm run verifyandnpm run lint(nogithere, soarch-docscannot diff;oxlintis not installed on this box,npm run lintstops at "no oxlint found") — CI'stests-okis the reference for the core suite and lint. No smoke test: nothing undercore/index.jsorcore/src/host/changed. No docs change needed:core/test/part-archive.test.jsis in no subsystem'sowned_paths, and the#896behaviour it covers is already written down indocs/subsystems/core-host.md.Risk. Low and test-only. The new case hard-codes the guard's current sentence, so a future rewording of
folders.jsreds it — that is the point (the message is what a reader acts on), and it reds with the new text in hand.Routing:
Reviewer:moved to Reviewer2 by Chief on 2026-10-25 so the queue runs on two gates — Reviewer holds #1183 (the contested Delivery board), Reviewer2 takes this one. Code and tip untouched.