You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
home-lock.test.js removes its home before the host is disposed, and the fix cannot be generated without git #2730
core/test/home-lock.test.js leaves two ds-bot-lock-* directories in TMPDIR on every run. The cause is order, not a missing hook: tempHome(t) registers t.after(() => rmSync(home)) when the home is created, while start(t, home) registers t.after(() => ctx.dispose()) later (core/test/home-lock.test.js:14 and :125). node:test runs after-hooks in registration order, so the home is removed first and dispose()'s diagnostics append re-creates it through mkdir(dirname(logPath), { recursive: true }) (core/src/host/diagnostics.js:197).
Measured on main3e90f475 with a private TMPDIR: # tests 14 / # pass 14 / # fail 0, leftovers 2. Same tree with the removal registered after dispose(): leftovers 0, 14/14, and 10 repeat runs stayed at 0. The split-out PR #2729 fixes the other four files of #2726.
Why this is open instead of fixed.test/home-lock.test.js is an upstream file, so its change lives as a hunk inside patches/ds-bot/0001-core-fixes.patch. Writing that hunk needs node scripts/ds-bot-patches.mjs generate, which asks git for the diff, and this host has no git. The gate that would catch a hand-written hunk is canonical (test.yml → package → node scripts/ds-bot-patches.mjs canonical): it re-runs generate into a scratch copy and compares the series byte for byte, so a hunk whose boundaries differ from git's output fails even when it reproduces core/. Reproducing git's hunk layout by hand is a guess, and a wrong guess is a red required check.
What unblocks it, one of:
a workstation (or CI job) that has git, so generate + check + canonical can run — the honest route; or
an owner decision to ship a hand-written hunk and let one CI run confirm it, accepting a red package job if the layout misses.
The fix itself is small and already verified: a tempHome(t, { defer: true }) for the eight host tests, with start() registering t.after(() => ctx.dispose()) first and t.after(() => removeHome(home)) last.
git is on this host now (git --version 2.39.5 under /data/dsh/bot/workspace/tools/bin), so the honest route ran end to end: the patch hunk is node scripts/ds-bot-patches.mjs generate output, check reports 0 problems, and canonical is green — ok patches/ds-bot/ is what generate writes (generate is a no-op). Nothing in the series was hand-written.
The fix is the verified one: tempHome(t, { defer: true }) for the eight host tests, start() registering ctx.dispose() first and the home's removal after it. Measured with a private TMPDIR:
after: 14/14 and leftover 0 on three runs in a row
TZ=UTC npm run verify: green (core 3185 tests, 0 fail, 1 skipped; four plugin suites, .github scripts, interop, live-e2e)
PR: #2794 (branch dev/2730-home-lock-dispose-order, tip e2340c9a6bf7cd89ea6e14cce70d6a9228d7d117), label agent-pr, assignee Birfy. Left the needs-human label alone — that is Triage's call now that the git blocker is gone.
Activity
Birfy commentedon Nov 9, 2026
Written-by: Chief
core/test/home-lock.test.js的修法已经验证过(tempHome(t,{defer:true}):14/14、连跑 10 次残留 0),但它改的是上游文件的 patch 分块——本机没有 git,ds-bot-patches.mjs generate跑不了,canonical 检查又是逐字节比对 generate 的输出,手写 hunk 有较大概率直接红。选一个:
git的环境(哪怕只是临时容器):我跑generate+check+ canonical,然后一条龙开 PR;patches/ds-bot/0001-core-fixes.patch的 hunk,开一个 draft PR 冒一次 CI——canonical 红就关掉,不留痕;回 A、B 或 C 就行。
Birfy commentedon Nov 10, 2026
Written-by: FlyBot 实现线
git is on this host now (
git --version2.39.5 under/data/dsh/bot/workspace/tools/bin), so the honest route ran end to end: the patch hunk isnode scripts/ds-bot-patches.mjs generateoutput,checkreports 0 problems, andcanonicalis green —ok patches/ds-bot/ is what generate writes (generate is a no-op). Nothing in the series was hand-written.The fix is the verified one:
tempHome(t, { defer: true })for the eight host tests,start()registeringctx.dispose()first and the home's removal after it. Measured with a privateTMPDIR:# tests 14 | # pass 14 | # fail 0, leftoverds-bot-lock-*= 2TZ=UTC npm run verify: green (core 3185 tests, 0 fail, 1 skipped; four plugin suites, .github scripts, interop, live-e2e)PR: #2794 (branch
dev/2730-home-lock-dispose-order, tipe2340c9a6bf7cd89ea6e14cce70d6a9228d7d117), labelagent-pr, assignee Birfy. Left theneeds-humanlabel alone — that is Triage's call now that the git blocker is gone.test(home-lock): remove the host test's home after the host disposes (T…