Skip to content

test: update worktree setup and enforce cleanup results - #24552

Merged
nwparker merged 1 commit into
mainfrom
nwparker/test-audit-worktree-fixtures
Oct 2, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/test-audit-worktree-fixtures

Conversation

@nwparker

@nwparker nwparker commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6
Prod 0 0 0 0

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

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

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

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and 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

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 5f40e03c-ea05-4b6e-9201-6afeb43d1796

📥 Commits

Reviewing files that changed from the base of the PR and between 34ae093 and c60e0b2.

📒 Files selected for processing (5)
  • tests/e2e/activity-agent-pane-isolation.spec.ts
  • tests/e2e/golden-worktree-create-switch.spec.ts
  • tests/e2e/helpers/dead-terminal.ts
  • tests/e2e/worktree-lineage-agent-expansion.spec.ts
  • tests/e2e/worktree-lineage-state.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@nwparker
nwparker merged commit b666d07 into main Oct 2, 2026
4 of 5 checks passed
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Low risk] Updates test helpers and test setup code.

The PR appears safe to merge, though the golden test should preserve its original failure when cleanup also fails.

Findings

  1. P2 Cleanup can hide test failures ▶

Summary

The PR updates E2E card setup to use the current setter and changes worktree cleanup to pass a host-qualified target and surface removal failures.

  • The split-pane test now starts without inline agent cards before enabling them.
  • The golden worktree-switch test reuses the shared cleanup helper.
  • Cleanup failures can obscure an earlier golden-test assertion failure.

Reviews (1) · Last reviewed commit: "test: update worktree setup and enforce ..."

.catch(() => undefined)
}
await removeCreatedWorktree(orcaPage, childWorktreeId).catch(() => undefined)
await removeWorktreeViaStore(orcaPage, childWorktreeId)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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!

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