Repository navigation
test(runtime): guard both halves of the headless hydrate repo gate - #10443
Merged
brennanb2025 merged 1 commit intoJul 24, 2026
Merged
Conversation
#9343 broke two contracts at once and #10437 fixed both, but neither is asserted: #10429 repaired the failing tests by deleting the poll assertion and by handing the retirement store a live repo, so a revert would land silently. Restore `expect(getRepos).not.toHaveBeenCalled()` on the floating-tab poll, and add a hydrate case for a store that cannot report repos. Verified both fail against the pre-#10437 code: the poll assertion reports getRepos "called 2 times", and the hydrate case returns [] instead of the persisted tab.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughExpanded 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
5 tasks done
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…tablyai#10443) stablyai#9343 broke two contracts at once and stablyai#10437 fixed both, but neither is asserted: stablyai#10429 repaired the failing tests by deleting the poll assertion and by handing the retirement store a live repo, so a revert would land silently. Restore `expect(getRepos).not.toHaveBeenCalled()` on the floating-tab poll, and add a hydrate case for a store that cannot report repos. Verified both fail against the pre-stablyai#10437 code: the poll assertion reports getRepos "called 2 times", and the hydrate case returns [] instead of the persisted tab.
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.
Summary
No user-visible change — test-only. #10437 fixed two real behaviors, but neither is asserted on
maintoday, so a revert of either would land silently. This adds a guard for each.#9343 broke two contracts at once:
this.store?.getRepos?.() ?? [], so a store that cannot report repos yielded an empty set — indistinguishable from "every repo is gone" — and hydrated zero tabs.getReposeagerly on every hydrate, including the hot poll path that is contractually free of repo/provider inventory work.#10437 fixed both. But the way the failing tests were repaired in
772081577e(#10429) left both unguarded:expect(getRepos).not.toHaveBeenCalled()was deleted and replaced with a comment saying hydrate "may consult getRepos".orca-runtime-terminal-retirement.test.tswas givengetRepos: () => [LIVE_REPO], so its store always reports a live repo and never exercises the unavailable case.Screenshots
No visual change.
Testing
pnpm typecheck— passespnpm test—src/main/runtime/= 2623 passed, 1 skippedpnpm lint— oxlint clean on the touched file (via lint-staged)pnpm build— not run; this PR touches one.test.tsfile, no production code.Both guards verified to fail against the pre-fix(runtime): stop the headless hydration repo gate from dropping every tab #10437 code, not just to pass against the current code:
new Set((getRepos?.() ?? []).map(...))expected "vi.fn()" to not be called at all, but actually been called 2 timesnew Set((knownRepos ?? []).map(...))— laziness kept,nullcollapsedexpected [] to deeply equal [ ObjectContaining{…} ]The production file is byte-identical to
mainin this PR; the reverts above were local scratch edits, used only to confirm each assertion has teeth.Note on the first attempt
My initial fail-open test lived in
orca-runtime-terminal-retirement.test.tsand passed even with the regression reintroduced —syncSplit()populates the tabs in memory, so hydration never ran and the assertion proved nothing. It's rewritten here againstmakeWorkspaceSessionWithHeadlessTerminal(), which reaches the gate for real. Flagging it because a green test that cannot fail is worse than no test.AI Review Report
Self-reviewed. Checks run:
repoId, sosplitWorktreeIdForFilesystem(...)?.repoIdis undefined and the lazy resolve is never triggered for it. Verified by the passing run.Security Audit
No input handling, command execution, path handling, auth, secrets, dependency, or IPC surface touched — two test cases against an in-memory store mock. Nothing to follow up.
Notes
772081577e(Fix fork PR/MR worktree creation race via durable review-head refs #10429) and fix(runtime): stop the headless hydration repo gate from dropping every tab #10437 both touchedorca-runtime.ts, and the merge kept Fix fork PR/MR worktree creation race via durable review-head refs #10429's relaxed test alongside fix(runtime): stop the headless hydration repo gate from dropping every tab #10437's fix. The behavior is correct onmaintoday; only the coverage was missing.