fix(cloud-connection): align the marketplace seed test's timeout with its sibling (#3785) - #4217
Merged
Merged
Conversation
… its sibling (#3785) marketplace-install-local-state-machine-exempt.test.ts failed under a full-repo `pnpm test` at 30s while passing every time the package ran alone. Both marketplace seed tests drive MarketplaceInstallLocalPlugin, whose seeding path dynamically imports the real @objectstack/runtime (unmocked on purpose, in both recordSeedSummary and mergeSeedDatasetsIntoKernel). That cold import costs seconds by itself and multiples of that under a fully parallel turbo run, and it is charged to whichever test triggers it first. The sibling marketplace-install-local-seed-lookup.test.ts was diagnosed as exactly this — "an import stall, not a hang" — and raised to 120s. This file was left at 30s and kept flaking the same way. The budget is now aligned, with the rationale stated locally instead of only in the sibling. The flaky set is exactly the intersection of "does not mock @objectstack/runtime" and "actually drives seeding": conflict, bundle no mock, but never reach the import default reseed, heal mock the module default seed-lookup no mock, seeds 120s (already) state-machine-exempt no mock, seeds 120s (here) So the two tests #3785 recorded are the only two that can hit this, and no other file needs the same treatment. Evidence this is a budget shortfall and not a race: the assertion passes (no missing seed rows), and under the same full-parallel load that produced the 30076ms failure the test now completes in 15696ms. Note that single pass alone does not prove the fix — 15.7s would have fit the old budget too. The argument is the ratio: a cost whose typical value is ~15s under load, and which has been observed above 30s, cannot live inside a 30s budget. 120s matches the sibling and leaves a genuine hang detectable, just later. Refs #3785 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014DQuJBNpwStpJvo3owBw2B
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
收尾 #3785 的后一半(前一半 plugin-audit 已由 #4193 修复)。
诊断
marketplace-install-local-state-machine-exempt.test.ts在整仓pnpm test下失败(30076ms 超时),单独跑该包必过(12 文件 / 64 用例)。根因与兄弟用例同源:两个用例都驱动
MarketplaceInstallLocalPlugin,而它的播种路径上有两处await import('@objectstack/runtime')(recordSeedSummary与mergeSeedDatasetsIntoKernel,故意不 mock)。这笔冷导入本身就要数秒,在全并行 turbo 下要吃掉数倍,且会被记到第一个触发它的用例头上。兄弟用例
marketplace-install-local-seed-lookup.test.ts早就被诊断过并修好了,注释原文:"an import stall, not a hang",预算提到 120s。本文件被落下,仍是 30s,于是继续以同样方式 flaky。本 PR 把预算对齐,并把理由写在本地,而不是只存在于兄弟文件里。为什么恰好是这两个用例
flaky 集合正好等于 {不 mock runtime} ∩ {真正驱动播种}:
conflict、bundlereseed、healseed-lookupstate-machine-exempt所以 #3785 记录的那两个用例,正是全仓仅有的两个会撞上这条路径的;其余四个各有各的免疫理由,没有第三处需要同样处理。
为什么判定是预算不足而非竞态
验证
pnpm test:132/132 任务成功,退出码 0(退出码直接捕获,未走管道)。🤖 Generated with Claude Code
https://claude.ai/code/session_014DQuJBNpwStpJvo3owBw2B
Generated by Claude Code