Repository navigation
test: update worktree setup and enforce cleanup results - #24552
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 seconds. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
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 |
|
| .catch(() => undefined) | ||
| } | ||
| await removeCreatedWorktree(orcaPage, childWorktreeId).catch(() => undefined) | ||
| await removeWorktreeViaStore(orcaPage, childWorktreeId) |
There was a problem hiding this comment.
Cleanup can hide test failures If a test assertion and worktree removal both fail, this call in
finally replaces the assertion error with the cleanup error. That makes the original regression harder to diagnose. Preserve both failures so cleanup still reports its result without hiding the test failure.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
ELI5
Some tests passed because their broken setup was skipped by default settings, or because they ignored cleanup errors. Make those tests use the current worktree actions and report failed cleanup.
What Changed
Replace three retired card-toggle calls with the existing card-properties setter. Exercise the disabled-card starting state in the split-pane test. Update the existing terminal-test cleanup helper to pass the worktree's declared execution host and reject failed removals. Reuse that helper in the worktree-switch golden instead of silently ignoring its outdated removal call.
Why
The original 12 workflows passed, but disabling inline cards reproduced a missing-method error and checking cleanup exposed the old unqualified removal call. Both cases now pass. Reusing the existing actions and cleanup helper keeps the fixtures aligned with production behavior; swallowing errors or asserting only the happy-path workflow would keep hiding the problem.
Linked Issue
N/A — maintainer test audit.
Visual Proof
N/A — test setup and cleanup only; application rendering is unchanged.
Testing
macOS background Electron: two explicitly exercised cases failed before the fix, then all 12 activity, lineage, expansion and worktree-switch tests passed with two workers. Targeted lint, formatting, changed-code quality and diff checks passed. The E2E typecheck no longer reports errors in these five files; the separate project's pre-existing errors elsewhere remain. Standard repository typecheck passed during the audit; full E2E CI is queued.
Review
Self-reviewed fixture reuse, disabled-card coverage, cleanup failures and execution-host qualification. Missing worktrees are already cleaned up; missing stores and rejected removals now produce actionable failures.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Host qualification uses the known worktree's host rather than assuming local execution. No production wire, UI, mobile or platform behavior changes.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)