Repository navigation
test(ui): give the whole-tree comment-mask process case a measured budget - #34572
Conversation
…dget The "exits 0 as a process" case spawns check-hand-rolled-comment-mask.mjs over the live tree and ran under the 15 s default testTimeout; queue runners measured it at 15.1 s and 19.1 s and timed it out. The case now carries a 60 s budget, and the spawn's own timeout (50 s) sits below it so a hung sweep fails the assertion as status null instead of on vitest's timer. Claude-Session: https://claude.ai/code/session_01ADHkmRH4UCX1tvddXMS7cq Co-authored-by: Claude <noreply@anthropic.com>
…mment-mask-process-budget
|
repo:objectstack#2 · os-steve · session_01ADHkmQtnGcx7hYEL11ptVs 席位核对L1 first review: ACCEPT · PR #34572 · card #34523 (p0 queue-flake anchor) · area o2-C · L1-a2 · 2026-11-17T02:12Z Head-sha: Checklist
Deviation accepted: the dev's open question 1
Accepted as read (option A). Option B, a fixture tree, would change what the case proves. Open question 2 ( Out of scope, noted, not filed: the usage-error case shares the 50 s spawn timeout under the 15 s default case budget. It exits on argument parsing in about 140 ms, so this is not a reachable failure. L2 and landing
|
|
repo:objectstack#2 · os-steve · session_01ADHkmRH4UCX1tvddXMS7cq Landing · p0 · 2026-11-17T02:13ZHead
It goes ready and auto-merge through the ordinary queue. This is the fix for the p0 queue-flake anchor #34523, which the merge closes ( |
Fixes #34523
Clause-②: no
Metadata-protocol: none
维护者速读
check-hand-rolled-comment-mask测试里「整棵树跑一遍、进程退出码为 0」这一条用例,给了自己的 60 秒时限;它启动的子进程时限从 300 秒降到 50 秒。只改这一个测试文件。ui/scripts/__tests__/check-hand-rolled-comment-mask.test.ts第 67–74 行(两个常量)和该用例末尾的}, WHOLE_TREE_CASE_MS);。pnpm --dir ui exec vitest run --project unit scripts/__tests__/check-hand-rolled-comment-mask.test.ts,预期 22 个用例全绿。What changes
ui/scripts/__tests__/check-hand-rolled-comment-mask.test.ts, test-only:check-hand-rolled-comment-mask.mjsover the live tree and had no per-case budget, soui/vitest.config.mtstestTimeout: 15000applied. It now carriesWHOLE_TREE_CASE_MS = 60_000, matching how sibling gate tests inui/scripts/__tests__/budget their spawns (}, 60_000)/}, 120_000)).timeoutdrops from300_000toSPAWN_TIMEOUT_MS = 50_000, below the case budget, so a hung sweep fails the assertion asstatus: nullrather than on vitest's timer.What the case proves is unchanged: it still spawns the real checker over the real tree and reads the process exit as a number. No skip, no quarantine, no retry, no global
testTimeoutchange, no fixture swap.Other whole-tree work in the file:
sweep({ root: REPO_ROOT })at thedescribelevel runs at collection time, not inside a timed case. The only otherrun(...)call is the usage-error case (run(['--all-of-them'])), which exits on argument parsing (143 ms in the red run) and does not sweep the tree.Tests
Diagnosis, from the red queue run 43980731814, job Test UI (3/16), id 133698990223:
The same log reads the case at 19146 ms, the self-test line
OK check-hand-rolled-comment-mask self-test: 13 cases pass, and the 21 other cases in the file green. The reason is a timeout, not an assertion onstatus.Measured durations of the case:
The post-fix and ablation (budget removed) local readings on this branch are in the os-dev-report comment on #34523; the local box is not loaded like a queue runner, so a green ablation there is expected and is reported as a duration, not as a verdict.
Acceptance notes
ui/AGENTS.md测试纪律 forbids raising timeouts to hide a race. This case is not a race on module loading: its cost is the real work of sweeping the whole tree in a child process, measured above, and the budget is per case, not global. Triage 6934114979 chose this route.scripts/measure-test-shard-timings.mjsreports on (report-only). Notest-budget:header was added here; that is outside this card's file surface.Verification
Gate subset derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat this branch's head; the per-command exits are in the os-dev-report comment on #34523. CI runs the full set.Generated by Claude Code