Repository navigation
Revert iteration checks and custom Vitest selection - #34834
Conversation
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
fff43597-d973-43b6-a576-46cb41939043
Files ignored due to path filters: 1-
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
Files selected for processing: 18-
.github/CONTRIBUTING.mdAGENTS.mdconfig/patches/[email protected]config/scripts/check-changed-dependency-evidence.mjsconfig/scripts/check-changed-lifecycle.test.mjsconfig/scripts/check-changed-pass-cache.mjsconfig/scripts/check-changed-pass-cache.test.mjsconfig/scripts/check-changed-task-runner.mjsconfig/scripts/check-changed-task-runner.test.mjsconfig/scripts/check-changed.mjsconfig/scripts/check-changed.test.mjsconfig/scripts/vitest-affected-tests.test.mjsconfig/vitest.config.tspackage.jsonsrc/packages/process-host/src/process-spec.tssrc/packages/process-host/src/run-process-sync.tssrc/packages/process-host/src/run-process-termination-failure.test.tssrc/packages/process-host/src/run-process.ts
Files with no reviewable changes: 9-
- config/scripts/check-changed-task-runner.test.mjs
- config/scripts/check-changed.test.mjs
- package.json
- config/scripts/check-changed-lifecycle.test.mjs
- config/scripts/check-changed-task-runner.mjs
- config/scripts/vitest-affected-tests.test.mjs
- src/packages/process-host/src/process-spec.ts
- src/packages/process-host/src/run-process-sync.ts
- config/scripts/check-changed-dependency-evidence.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
-
| ? [requested] | ||
| : [process.env.ORCA_CODE_QUALITY_BASE, 'origin/main', 'main'] | ||
| for (const candidate of candidates) { | ||
| for (const candidate of [requested, process.env.ORCA_CODE_QUALITY_BASE, 'origin/main', 'main']) { |
There was a problem hiding this comment.
Reject an unverifiable --base instead of silently falling back.
Line 47 puts requested first in the candidate list. If git rev-parse --verify fails for requested, the loop moves on to ORCA_CODE_QUALITY_BASE, origin/main or main. The removed branch threw Invalid --base=... in this case.
Here is how it goes wrong:
- A developer passes a mistyped ref or a ref that was never fetched, such as
--base=origin/release. - The gate picks a different merge base and checks a different set of changed files.
- The gate can then report success and call
writePassHash. - The only signal is the
refname inside the summary line.
The user believes the requested base was checked, but it was not. Restore the explicit error when a requested value is present and does not verify.
🐛 Proposed fix
-
--- "a/config/scripts/check-changed.mjs" +++ "b/config/scripts/check-changed.mjs" @@ -43,8 +43,17 @@ return execFileSync('git', args, { cwd: root, encoding: 'utf8' }).trim() } function resolveMergeBase(root, requested) { + if (requested) { + const verified = spawnSync('git', ['rev-parse', '--verify', '--quiet', `${requested}^{commit}`], { + cwd: root, + stdio: 'ignore' + }) + if (verified.status !== 0) { + throw new Error(`Invalid --base=${requested}: fetch that ref or pass an existing commit.`) + } + } for (const candidate of [requested, process.env.ORCA_CODE_QUALITY_BASE, 'origin/main', 'main']) { if (!candidate) { continue }
Committable suggestion
-
IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.Suggested changefor (const candidate of [requested, process.env.ORCA_CODE_QUALITY_BASE, 'origin/main', 'main']) { if (requested) { const verified = spawnSync('git', ['rev-parse', '--verify', '--quiet', `${requested}^{commit}`], { cwd: root, stdio: 'ignore' }) if (verified.status !== 0) { throw new Error(`Invalid --base=${requested}: fetch that ref or pass an existing commit.`) } } for (const candidate of [requested, process.env.ORCA_CODE_QUALITY_BASE, 'origin/main', 'main']) {
| } | ||
| // A fallback releases our wait, not proof that the child or escaped descendants exited. | ||
| child.unref() | ||
| act() |
There was a problem hiding this comment.
Restore cleanup when settlement precedes child close.
If tree termination fails and the barrier deadline expires, settle resolves the promise while the child may still be alive. This change removes the stream destruction and child.unref() that released the parent from that child. The parent can therefore remain running after runProcess reports a timeout. Restore cleanup for settlement without a confirmed close, while retaining the late onChildTerminated callback. (github.com)
ELI5
Remove the complexity introduced by #34700 and use Vitest's built-in affected-test selection.
What Changed
check:iteration, custom selection patches, dependency recording, and the added cache/task-runner machinery.Why
The iteration tooling added too much maintenance burden and changed dependency internals. Explicit suites and the existing
check:changedcommand cover local verification.Linked Issue
Reverts #34700.
Visual Proof
N/A — developer tooling rollback.
Testing
ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2passed all 36 selected checks on Linux.PR checks passedaggregate passed.UND_ERR_SOCKET). GitHub rejected its failed-jobs retry while that workflow was still running.Agent skill upstream boundary