Skip to content

test(agent-runner): update formatter test for dropped <messages> envelope#2596

Merged
gavrielc merged 1 commit into
nanocoai:mainfrom
IamAdamJowett:fix/formatter-test-drop-messages-envelope
May 23, 2026
Merged

test(agent-runner): update formatter test for dropped <messages> envelope#2596
gavrielc merged 1 commit into
nanocoai:mainfrom
IamAdamJowett:fix/formatter-test-drop-messages-envelope

Conversation

@IamAdamJowett
Copy link
Copy Markdown
Contributor

What

Update poll-loop.test.ts so the multi-message formatter test matches the current formatter output.

Why

fe2e881b (#2556) dropped the <messages> envelope from formatChatMessages — multiple chat messages are now emitted as consecutive self-contained <message …> blocks (so the Claude Agent SDK calls the API instead of returning a synthetic "No response requested." stub). The test was never updated and still asserted toContain('<messages>') / '</messages>', so it has failed on every PR built against main since 2026-05-19.

How it works

Assert the current shape instead: no <messages> envelope, and one <message block per message (2 here). Sender assertions are unchanged.

How it was tested

bun test in container/agent-runner/ — full suite now 95 pass / 0 fail (was 94 / 1).

🤖 Generated with Claude Code

…lope

fe2e881 (nanocoai#2556) removed the <messages> wrapper from formatChatMessages
so the Claude Agent SDK calls the API instead of emitting a synthetic
stub, but poll-loop.test.ts still asserted the wrapper. The test has
failed on every PR built against main since. Assert the current shape:
no envelope, one self-contained <message> block per message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gavrielc gavrielc merged commit 4d92b6d into nanocoai:main May 23, 2026
2 checks passed
@gavrielc
Copy link
Copy Markdown
Collaborator

@IamAdamJowett Thanks for the fix!

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.

2 participants