Repository navigation
test(worktree): fix main CI red from #10106 (teardown + watch tests) - #10115
Merged
Merged
Conversation
- orca-runtime: 'stop cannot be proven' now requires the fresh PTY inventory to still show the pty live (empty inventory proves exit post-#10106). - git-common-watch: swap worktrees dir->file synchronously so no poll tick observes the transient ENOENT window and fabricates a delete. Co-authored-by: Orca <[email protected]> (cherry picked from commit e11736d7e170982eeebe09256eb549446a4f4f7b)
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdated two tests for deterministic behavior. The worktree polling test now uses synchronous filesystem operations when replacing the worktrees directory with a file. The PTY-removal test now returns an active PTY from the local provider after a failed stop, preserving the unprovable physical-stop scenario. ✨ Finishing Touches📝 Generate docstrings
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. Comment |
This was referenced Jul 27, 2026
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
stablyai#10115) - orca-runtime: 'stop cannot be proven' now requires the fresh PTY inventory to still show the pty live (empty inventory proves exit post-stablyai#10106). - git-common-watch: swap worktrees dir->file synchronously so no poll tick observes the transient ENOENT window and fabricates a delete. (cherry picked from commit e11736d7e170982eeebe09256eb549446a4f4f7b) Co-authored-by: Orca <[email protected]>
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.
Description
mainwent red after #10106 ("verify exited PTYs before blocking deletion") merged — itsverifyjob left two failing tests it didn't update. This isolates the fixes for both.Fixes
orca-runtime.test.ts→ "does not start Git removal when physical PTY stop cannot be proven" — stale after fix(worktree): verify exited PTYs before blocking deletion #10106. The newkillAllProcessesForWorktreetolerates a failed PTY stop when a freshlistProcessesinventory proves the PTY exited. The test's provider stub returned an empty inventory (= proven exited), so it resolved{}instead of rejecting. Fix keepspty-1live in the inventory so the exit genuinely can't be proven → it rejects as intended.worktree-git-common-watch.test.ts→ "does not fabricate worktree deletions when the readdir fails non-ENOENT (transient)" — a test race exposed under CI load. Betweenawait rm(worktreesDir)andawait writeFile(worktreesDir), a poll tick could observe the dir as ENOENT (a legitimate "all removed" → emits adelete), defeating the non-ENOENT assertion. Swapped to synchronousrmSync/writeFileSyncso no event-loop turn (and thus no poll tick) sees the transient ENOENT window.Evidence
pnpm exec vitest run --config config/vitest.config.ts \ src/main/runtime/orca-runtime.test.ts \ src/main/ipc/worktree-git-common-watch.test.tsBoth pass locally.
Notes
node:fs, works on macOS/Linux/Windows.Made with Orca 🐋