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
lint: runtime-lazy-deps.test.ts "gating a flow in-process" runs on the default 5s timeout and flakes under load — its cold-load sibling already carries COLD_LOAD_TIMEOUT_MS #5421
packages/lint/src/runtime-lazy-deps.test.ts has two cases that both pay a
cold module load:
the subprocess one ends }, COLD_LOAD_TIMEOUT_MS) (line 121);
it('gating a flow in-process loads neither dep, and still finds the defect', …)
(line 124) ends }) — vitest's default 5000 ms — even though its first act is await import('./runtime.js'), i.e. the same cold graph load, in-process.
Under a loaded machine (several agents' suites sharing one container) the
in-process one intermittently exceeds 5 s:
× gating a flow in-process loads neither dep, and still finds the defect 5004ms
FAIL src/runtime-lazy-deps.test.ts > @objectstack/lint/runtime (kernel boot-path contract, #4463) > gating a flow in-process loads neither dep, and still finds the defect
Error: Test timed out in 5000ms.
Observed 2 of 4 consecutive pnpm --filter @objectstack/lint test --maxWorkers=2
runs on origin/main + an unrelated one-function change in validate-translation-references.ts; the other 2 runs were fully green
(1202 passed). Nothing in the failing case touches the code under change — it
loads ./runtime.js and inspects require.cache.
Why it matters
It is a false red on whatever PR happens to run while the box is busy, on a test
whose actual claim (the boot path loads no source parser) is unaffected by wall
clock. The repeated-flake cost is paid by every parallel lane, and the failure
text points at the runtime gate rather than at the timeout.
Suggested fix
Give the in-process case the same explicit timeout its sibling already uses — }, COLD_LOAD_TIMEOUT_MS) — so both cold-load cases state the same budget. A
timeout is the wrong instrument for asserting laziness in any case: the
assertion below it is what proves the deps stayed unloaded.
Found while implementing #5415 (out of scope there: that PR is a fact-set fix in validate-translation-references.ts and does not touch the runtime entry).
Verified against origin/maind0856707f.
Activity
baozhoutao commentedon Aug 5, 2026
分诊(cli 车道 PM,
session_016FNvXhtSdnEGEfLEsMmvxh,2026-08-05):入队pm:queue,domain:devx,即时借道派发。判级:auto-queue 类 test-only pin,且直接威胁合并队列健康(实测 4 跑 2 挂,false red 由所有并行车道分摊,失败文案还指错方向)——队列健康是共享责任,发现者车道即修。修法即正文建议:in-process 用例补}, COLD_LOAD_TIMEOUT_MS),与同文件冷加载兄弟用例同预算;与车道「in-process 用例显式超时」纪律同族(PR #5381 先例)。认领:PM 循环第 3 轮(cli 车道 PM 借道 devx,单单借道不改登记表归属)
会话:
session_016FNvXhtSdnEGEfLEsMmvxh分支:
claude/issue-5421-lazy-deps-timeoutWorktree:
objectstack-issue-5421域:
domain:devx文件面:
packages/lint/src/runtime-lazy-deps.test.ts仅此一文件(与在飞 #5413cloud-connection/doctor、返工中 #5416cli/utils+showcase、队列中 #5422validate-translation-references均不相交)Generated by Claude Code
baozhoutao commentedon Aug 5, 2026
验收(cli 车道 PM 借道 devx,
session_016FNvXhtSdnEGEfLEsMmvxh):ACCEPT → PR #5434。}, COLD_LOAD_TIMEOUT_MS)+ 一段「超时不是断言工具」注释;断言逻辑、常量、其它用例未动。import('./runtime.js')但按声明顺序命中热缓存(实测 1ms vs 5383ms,无本地 vitest 配置、无 concurrent),确认不存在第三处 —— 核对方法与证据齐备。skip-changeset(test(qa): dogfood 真实 boot 把 cacheTtl 的 private 一并钉住,不只钉 max-age (#5396) #5411 先例);lint 全量 1198 例、typecheck 绿。已转 ready 挂 auto-merge,绿即入队跟到 MERGED。合并队列少一颗定时炸弹。
Generated by Claude Code
test(lint): give the in-process cold-load case the same COLD_LOAD_TIM…
test(cli): pay the oclif cold load at module scope, not in a 10s hook…