Repository navigation
fix(autofix): clamp gate test load explicitly instead of via RUNNER_NAME #10671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
041d8c4
fix(autofix): clamp gate test load explicitly instead of via RUNNER_NAME
qqqys d8c42f0
Merge branch 'main' into fix/autofix-gate-load-clamps
yiliang114 8f96efe
fix(autofix): clamp the gate's third vitest leg and pin the clamps
qqqys 325bdf4
Merge remote-tracking branch 'origin/fix/autofix-gate-load-clamps' in…
qqqys 63fb0dc
fix(autofix): pin the clamp witnesses and correct the unclamped-leg r…
qqqys a720f12
test(autofix): pin both sides of the gate's AUTOFIX_VITEST_FLAGS tran…
qqqys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declined — the crash as stated does not reproduce on this branch, and the residual risk the finding correctly points at is now pinned by this round's R2-2 fix.
Evidence: round 2 ran the lockfile-pinned vitest 1.6.1 suite under
packages/sdk-typescriptwith the full clamp array (37 files, 1747 tests, exit 0), and R2-2's own three-arm probe confirms the shape: with sdk'spoolOptions.threads.maxThreads: 4shield present the flags pass, without--maxWorkersthey pass, only the shield-less arm crashes. The leg does not exit 1 today, so the deterministic-rejection premise does not hold at this head.The round-2 decline rationale was nevertheless wrong, and this reply corrects it:
--maxWorkersis not "the spelling both majors accept" in any meaningful sense — vitest 1.6.1 accepts the flag NAME but coerces the percent withNumber('25%')-> NaN, and survives only because its pool builder reads a numericpoolOptions.threads.maxThreadsbeforectx.config.maxWorkers. The suggested per-major worker-flag derivation remains a valid future option, but the shield is what keeps the current shape alive, so this round pins THAT instead of trusting it: the new shield case inscripts/tests/unit-vitest-configs.test.tsasserts every vitest-1.x workspace the gate can drive keeps a numeric threadsmaxThreads(and nopool: 'forks'), and goes red whenmaxThreadsis removed frompackages/sdk-typescript/vitest.config.ts(mutation-verified). The cli/core legs stay on the repo's exact ECS calibration and thestrip_runner_channels npm run testpin is untouched. Thread left open for maintainer visibility of the corrected rationale.中文说明
拒绝(Declined)——按原文陈述的崩溃在本分支上无法复现;该发现正确指出的残余风险已由本轮 R2-2 修复钉住。
证据:第 2 轮曾用完整降载数组在
packages/sdk-typescript锁定的 vitest 1.6.1 下跑完整个套件(37 文件、1747 用例、exit 0),R2-2 自己的三臂探针也证实同一形态:有 sdk 的poolOptions.threads.maxThreads: 4屏障时参数通过,去掉--maxWorkers时通过,只有无屏障的一臂崩溃。该测试腿今天不会 exit 1,因此"确定性拒绝"的前提在当前 head 上不成立。但第 2 轮拒绝时给出的理由是错的,本回复予以更正:
--maxWorkers并不是任何有意义层面的"两个主版本都接受的写法"——vitest 1.6.1 接受该参数名,却会把百分值用Number('25%')强转成 NaN,其之所以幸存,仅因池构建器先读数值型poolOptions.threads.maxThreads再读ctx.config.maxWorkers。按主版本派生 worker 参数的建议仍是合理的未来选项,但当前形态靠的是这个屏障,因此本轮选择钉住屏障而不是依赖它:scripts/tests/unit-vitest-configs.test.ts新增的屏障用例会断言 gate 能驱动的每个 vitest-1.x 工作区都保留数值型 threadsmaxThreads(且不是pool: 'forks'),并在从packages/sdk-typescript/vitest.config.ts移除maxThreads时变红(已变异验证)。cli/core 腿保持仓库现有的 ECS 校准,strip_runner_channels npm run test结构钉不受影响。线程保持打开,以便维护者看到更正后的理由。