-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Changes from 4 commits
041d8c4
d8c42f0
8f96efe
325bdf4
63fb0dc
a720f12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8944,6 +8944,22 @@ exit 1 | |||||||||||||||||||
| expect(reviewVerificationRunner).toContain( | ||||||||||||||||||||
| 'strip_runner_channels npm run test', | ||||||||||||||||||||
| ); | ||||||||||||||||||||
| // The load clamps must actually reach every vitest the gate launches. | ||||||||||||||||||||
| // Dropping the expansion from any of the three legs is silent — | ||||||||||||||||||||
| // `set -eo pipefail` without `-u` swallows an empty array — and the | ||||||||||||||||||||
| // gate reverts to 15s timeouts, unbounded workers and coverage on, | ||||||||||||||||||||
| // which is the incident this script's clamps exist to prevent. | ||||||||||||||||||||
| // Pinned on reviewVerificationRunner only: the inline issue-fix gate | ||||||||||||||||||||
| // runs where RUNNER_NAME is present and stays deliberately unclamped. | ||||||||||||||||||||
| expect(reviewVerificationRunner).toContain( | ||||||||||||||||||||
| '--changed origin/main --passWithNoTests "${VITEST_LOAD_CLAMPS[@]}"', | ||||||||||||||||||||
| ); | ||||||||||||||||||||
| expect(reviewVerificationRunner).toContain( | ||||||||||||||||||||
| 'strip_runner_channels npm run test --workspace "${ws}" --if-present -- "${VITEST_LOAD_CLAMPS[@]}" "$@"', | ||||||||||||||||||||
| ); | ||||||||||||||||||||
| expect(reviewVerificationRunner).toContain( | ||||||||||||||||||||
| 'AUTOFIX_VITEST_FLAGS="${VITEST_LOAD_CLAMPS[*]}"', | ||||||||||||||||||||
| ); | ||||||||||||||||||||
| // The check sits BEFORE the no-commit/no-op exits: a no-op audit round | ||||||||||||||||||||
| // whose verdict is sound with nothing left to fix still needs the artifact. | ||||||||||||||||||||
| const verdictGateAt = reviewVerificationRunner.indexOf( | ||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R3-1: nothing pins the Witness:
Suggested change
The pin must be an explicit ordering check rather than reliance on any shell error: the gate script runs 中文说明R3-1:没有任何测试钉住 (证据见英文区 Witness 代码块:完整树与"数组移到消费者下方"的变异体均 254/254 全绿;bash 探针确认未定义数组的 修复约束:结构钉必须是显式的顺序断言,不能依赖任何 shell 报错——gate 脚本以不带 — qwen3.8-max via Qwen Code /review (v0.22.3) |
||||||||||||||||||||
|
|
@@ -11987,6 +12003,22 @@ exit 1 | |||||||||||||||||||
| 'run test --workspace packages/web-shell -- client/components/messages/toolFormatting.drift.test.ts', | ||||||||||||||||||||
| ]); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| // The review gate runs this inside an env -i child that drops | ||||||||||||||||||||
| // RUNNER_NAME, so the ECS clamps in the vitest configs deactivate and | ||||||||||||||||||||
| // the drift test would fall back to vitest's 5s default on a | ||||||||||||||||||||
| // saturating shared host. It hands its clamps down through this | ||||||||||||||||||||
| // variable; the issue-fix gate leaves it unset (the case above). | ||||||||||||||||||||
| writeFileSync(npmLog, ''); | ||||||||||||||||||||
| expect( | ||||||||||||||||||||
| run('packages/core/src/tools/tool-names.ts\n', { | ||||||||||||||||||||
| AUTOFIX_VITEST_FLAGS: '--maxWorkers=25% --testTimeout=60000', | ||||||||||||||||||||
| }).status, | ||||||||||||||||||||
| ).toBe(0); | ||||||||||||||||||||
| expect(readFileSync(npmLog, 'utf8').trim().split('\n')).toEqual([ | ||||||||||||||||||||
| 'run check-i18n', | ||||||||||||||||||||
| 'run test --workspace packages/web-shell -- --maxWorkers=25% --testTimeout=60000 client/components/messages/toolFormatting.drift.test.ts', | ||||||||||||||||||||
|
qwen-code-dev-bot marked this conversation as resolved.
Outdated
|
||||||||||||||||||||
| ]); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| writeFileSync(npmLog, ''); | ||||||||||||||||||||
| const output = join(dir, 'output'); | ||||||||||||||||||||
| expect( | ||||||||||||||||||||
|
|
||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.