Skip to content

test(runtime): complete terminal cwd store double#8365

Open
beiyonder wants to merge 1 commit into
stablyai:mainfrom
beiyonder:fix/runtime-terminal-cwd-store-double
Open

test(runtime): complete terminal cwd store double#8365
beiyonder wants to merge 1 commit into
stablyai:mainfrom
beiyonder:fix/runtime-terminal-cwd-store-double

Conversation

@beiyonder

@beiyonder beiyonder commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Add the required getRepo method to the narrow store double used by terminal startup cwd coverage.

Fixes #8363

Screenshots

No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test (2,713 files and 28,580 tests passed; 6 files and 40 tests skipped.)
  • pnpm build (not rerun because this changes one test double only.)
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

Verified red-to-green evidence:

  • On origin/main at 3090ff0ed, the focused file reported one failure and three passes with TypeError: this.store?.getRepo is not a function.
  • The full suite reproduced the same sole failure with 2,712 files and 28,581 tests passing.
  • After this one-line fix, all four focused tests and the complete suite pass.
  • git diff --check passes.

AI Review Report

Independent review traced the first bad main commit, checked all production constructor paths, and verified the real store signature. It confirmed this is an incomplete test double, not a production crash. Making the production call optional would weaken the required contract, so the patch remains one test line.

Cross-platform review covered macOS, Linux, Windows, WSL, and SSH. This is test setup only and does not change paths, shells, shortcuts, labels, Git commands, or Electron behavior.

Security Audit

Reviewed whether the failure represented a reachable malformed-store path, input validation gap, auth issue, secret exposure, command execution, dependency, or IPC risk. The only production constructor path passes the real store, whose required getRepo method returns undefined when missing. No runtime or security behavior changes.

Notes

  • The broader store as never fixture style is existing cleanup and is intentionally out of scope.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The restored headless mobile tabs test adds a getRepo method to its mocked persisted store, returning undefined. The test continues to materialize restored tabs using startupCwd and verifies that terminal spawning uses that working directory.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change matches #8363 by adding getRepo to the narrow store double so the terminal cwd test can pass.
Out of Scope Changes check ✅ Passed The diff is narrowly scoped to the test double fix and introduces no unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title is concise and accurately summarizes the test-only fix to complete the terminal cwd store double.
Description check ✅ Passed The description follows the template and includes summary, screenshots, testing, AI review report, security audit, and notes.

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.

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.

[Test]: current main fails terminal startup cwd coverage

2 participants