Skip to content

test(claude): accept dispatch metadata after stopping a turn - #31229

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-claude-stop-test-metadata
Oct 20, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-claude-stop-test-metadata

Conversation

@nwparker

@nwparker nwparker commented Oct 20, 2026 •

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

ELI5

The real-Claude test for sending after Stop failed when a successful dispatch included extra metadata. It now checks the admitted state while accepting that metadata.

What Changed

Replace the exact-object assertion with toMatchObject({ state: 'admitted' }). Keep the subsequent check that the follow-up reply succeeds.

Why

Dispatch now returns ranOptions alongside its state. A partial-object assertion matches the existing tests and keeps the test focused on whether the next message was admitted and answered.

Linked Issue

Fixes STA-11421.

Visual Proof

N/A — test assertion only; no product UI or behavior changes.

Testing

On macOS, with ORCA_BACKGROUND_LAUNCH=1:

  • ORCA_REAL_CLAUDE_CLI_TEST=1 pnpm test src/main/claude/claude-structured-real-cli.test.ts src/main/claude/claude-structured-real-cli-fold.test.ts src/main/claude/claude-structured-real-cli-rewind.test.ts — 16 tests passed in the combined local fix workspace.
  • pnpm tc:node and pnpm run check:code-quality:changed passed.
  • Manual product testing (test-only change)
  • Automated test updated

Review

The assertion still requires admission, and the following reply must still succeed. No runtime code changes.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source is copied or translated.

Notes

No platform, SSH, persistence, or wire-format changes. Full checks are for CI.

Checklist

  • This PR is small and focused
  • Explained what changed and why
  • Visual proof marked N/A with reason
  • Self-reviewed correctness
  • Cross-platform and remote impact considered (test-only)
  • Full checks pass in CI

@coderabbitai

coderabbitai Bot commented Oct 20, 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 32 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: 743144de-2405-4bf4-b75d-d59b4fd3c1e8
📥 Commits

Reviewing files that changed from the base of the PR and between 3be5039 and 5c6b28c.

📒 Files selected for processing: 1
  • src/main/claude/claude-structured-real-cli.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 23cab6a into main Oct 20, 2026
32 checks passed
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