Skip to content

Revert iteration checks and custom Vitest selection - #34834

Merged
OrcaWin merged 2 commits into
mainfrom
revert/check-iteration-scope
Oct 28, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
revert/check-iteration-scope

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Remove the complexity introduced by #34700 and use Vitest's built-in affected-test selection.

What Changed

  • Remove check:iteration, custom selection patches, dependency recording, and the added cache/task-runner machinery.
  • Revert the process-host runtime changes; retain the mechanical typed test-fixture cleanup.
  • Reduce the local-test docs to commands and a short explanation of static-graph limits.
  • Preserve the unrelated, pre-existing EISDIR stack-frame fix.

Why

The iteration tooling added too much maintenance burden and changed dependency internals. Explicit suites and the existing check:changed command cover local verification.

Linked Issue

Reverts #34700.

Visual Proof

N/A — developer tooling rollback.

Testing

  • Two independent adversarial reviews; the package-boundary finding is fixed.
  • Frozen offline install passed; installed Vitest selection code verified.
  • ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2 passed all 36 selected checks on Linux.
  • The full PR workflow and PR checks passed aggregate passed.
  • A separate Windows SSH job hit an interrupted Node download (UND_ERR_SOCKET). GitHub rejected its failed-jobs retry while that workflow was still running.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source copied.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The changes revise Vitest affected-test selection and dependency recording, simplify the branch-based local check gate and its pass cache, and remove related scripts and tests. The process-host API drops the stdout callback and unverified-termination flag. The synchronous process implementation moves into the main process module, and the asynchronous process flow changes.

Priority: Normal

Merge Risk: Moderate · up to f5a2c

Processes that time out while tree termination fails may leave the parent hanging because the stream and unref cleanup was removed. The local check gate can also silently use a different base than the one requested. Restore the cleanup before merging; the base fallback is lower impact.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description follows the template's ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, and Agent skill upstream boundary sections, and it explains the rollback of #34700 clearly. Gaps: t… Add a linked issue in the form the template requires, or explain why the revert of #34700 satisfies the outside-contributor rule. Fill in or tick the manual-testing checkbox and state which platforms were tested beyond Linux. Report the sta…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main changes: reverting iteration checks and custom Vitest test selection.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 6 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description follows the template's ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, and Agent skill upstream boundary sections, and it explains the rollback of #34700 clearly. Gaps: the Linked Issue section names only "Reverts #34700." and has no "Fixes #" issue link, which the template requires for outside contributors. The Testing section lists automated checks but leaves the "I manually tested these changes locally" box unchecked or unaddressed. It also reports a Windows SSH job that failed from a download interruption, and it does not state whether that job was re-run. The Review, Notes, and Checklist sections are absent or unaddressed, and the AI Disclosure section is missing. The description does not say which platforms were tested beyond Linux.

Resolution

Add a linked issue in the form the template requires, or explain why the revert of #34700 satisfies the outside-contributor rule. Fill in or tick the manual-testing checkbox and state which platforms were tested beyond Linux. Report the status of the Windows SSH job, either as a passing re-run or with a clear note on what remains unverified. Complete the AI Disclosure section, which the template asks for, and state the model used if AI tools were involved. Address the Notes and Checklist items, including the pnpm lint, typecheck, test, and build status, which the description does not report.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Commits

Reviewing files that changed from the base of the PR and between 56d66f0 and f5a2ccd.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 18
  • .github/CONTRIBUTING.md
  • AGENTS.md
  • config/patches/[email protected]
  • config/scripts/check-changed-dependency-evidence.mjs
  • config/scripts/check-changed-lifecycle.test.mjs
  • config/scripts/check-changed-pass-cache.mjs
  • config/scripts/check-changed-pass-cache.test.mjs
  • config/scripts/check-changed-task-runner.mjs
  • config/scripts/check-changed-task-runner.test.mjs
  • config/scripts/check-changed.mjs
  • config/scripts/check-changed.test.mjs
  • config/scripts/vitest-affected-tests.test.mjs
  • config/vitest.config.ts
  • package.json
  • src/packages/process-host/src/process-spec.ts
  • src/packages/process-host/src/run-process-sync.ts
  • src/packages/process-host/src/run-process-termination-failure.test.ts
  • src/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']) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

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 ref name 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 change
for (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()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Stability & Availability · Quick win

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)

@OrcaWin
OrcaWin merged commit 7cdfebd into main Oct 28, 2026
83 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant