Skip to content

Test agent output parser API contract - #73

Merged
TraderSamwise merged 1 commit into
masterfrom
test/chat-parser-api-contract
Jun 6, 2026
Merged

Test agent output parser API contract#73
TraderSamwise merged 1 commit into
masterfrom
test/chat-parser-api-contract

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add REST coverage that preserves mined parser blocks from /agents/output.
  • Add SSE coverage that preserves mined parser blocks from /agents/output/stream.
  • Lock no-false-prompt behavior for Codex startup suggestions and action/status preservation for Claude tool rows at the metadata API boundary.

Verification

  • /Users/sam/cs/aimux/node_modules/.bin/vitest run src/metadata-server.test.ts
  • /Users/sam/cs/aimux/node_modules/.bin/tsc --noEmit
  • PATH=/Users/sam/cs/aimux/node_modules/.bin:$PATH yarn lint
  • PATH=/Users/sam/cs/aimux/node_modules/.bin:$PATH yarn test

Summary by CodeRabbit

  • Tests
    • Enhanced test coverage for agent output parsing functionality to ensure parsed data is correctly preserved in API responses and streaming events.

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 6, 2026 9:48am

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Need the big picture first? Review this PR in Change Stack to see what changed before going file by file.

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 91a347ad-dafb-4e36-b1b0-f9dfbc550d27

📥 Commits

Reviewing files that changed from the base of the PR and between b3097e9 and f44e43f.

📒 Files selected for processing (1)
  • src/metadata-server.test.ts

📝 Walkthrough

Walkthrough

This PR adds three related test blocks to src/metadata-server.test.ts that verify fixture-driven agent output parsing. It imports fixture utilities, then tests that both HTTP and SSE endpoints correctly preserve parsed mined blocks from fixture data.

Changes

Fixture-driven parsed block preservation in metadata-server

Layer / File(s) Summary
Fixture-based HTTP and SSE parsing tests
src/metadata-server.test.ts
Imports parseAgentOutput and getParserFixture utilities, then adds an HTTP test for /agents/output endpoint that asserts parsed mined blocks and their types using fixture data, and an SSE streaming test for /agents/output/stream that validates emitted parsed blocks and specific block text content from fixture output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • TraderSamwise/aimux#66: Introduces the reusable agent-output parser fixtures and contracts that this PR's HTTP/SSE assertions directly depend on.
  • TraderSamwise/aimux#67: Updates parseAgentOutput status/activity row detection and parser fixtures that these new tests validate are correctly preserved in metadata-server responses.
  • TraderSamwise/aimux#71: Extends parseAgentOutput with tool-action and status parsing via fixtures, directly complementing these tests' fixture-based assertions.

Poem

🐰 A rabbit hops through fixtures fine,
Parse blocks flow through endpoints' line,
HTTP streams and SSE dance,
Assertions green—a testing prance!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Test agent output parser API contract' directly aligns with the PR's primary objective of adding test coverage for parser block preservation in agent output endpoints.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/chat-parser-api-contract

Comment @coderabbitai help to get the list of available commands and usage tips.

@TraderSamwise
TraderSamwise merged commit ae047dd into master Jun 6, 2026
3 checks passed
@TraderSamwise
TraderSamwise deleted the test/chat-parser-api-contract branch June 6, 2026 09:52
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