Skip to content

Fix parser malformed runtime noise - #78

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

Fix parser malformed runtime noise#78
TraderSamwise merged 1 commit into
masterfrom
test/chat-parser-next-audit

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • classify malformed Claude spinner/action animation captures as status instead of assistant responses
  • add a minimized regression from historical runtime noise
  • keep existing activity/action wording contract intact

Verification

  • vitest run src/agent-output-parser.test.ts
  • tsc --noEmit
  • eslint src/ --max-warnings=0
  • yarn build
  • vitest run

Summary by CodeRabbit

  • Tests

    • Added test coverage for malformed agent output with runtime status markers.
  • Bug Fixes

    • Improved handling of runtime status messages in the agent output parser to correctly categorize them as status blocks rather than chat content.
    • Enhanced detection of progress indicators and thinking markers for improved message classification accuracy.

@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 11:06am

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Wondering what really moved? Review this PR in Change Stack to inspect semantic changes, definitions, and references.

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: ff0a01aa-b5fb-4bb8-802b-46a67128a663

📥 Commits

Reviewing files that changed from the base of the PR and between 0add3c3 and 62d7b26.

📒 Files selected for processing (2)
  • src/agent-output-parser.test.ts
  • src/agent-output-parser.ts

📝 Walkthrough

Walkthrough

The PR enhances the agent output parser to detect and properly classify runtime noise fragments. A new looksLikeRuntimeNoiseText helper identifies raw blocks containing runtime markers (special bullet characters, (thinking), terminal-notifier) and reclassifies them as status blocks. A corresponding test validates this behavior with malformed Claude animation fragments.

Changes

Runtime Noise Detection in Agent Output Parser

Layer / File(s) Summary
Runtime noise detection logic
src/agent-output-parser.ts
A new looksLikeRuntimeNoiseText helper detects runtime-like markers (special bullets, (thinking), terminal-notifier) in raw blocks and triggers reclassification to status type during transcript normalization.
Runtime noise detection test
src/agent-output-parser.test.ts
New test case validates that malformed Claude animation fragments with Brewing…, (thinking), and terminal-notifier are parsed into meta and status blocks with expected substrings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • TraderSamwise/aimux#73: Both PRs involve parseAgentOutput block typing—this PR adds runtime-noise→status reclassification while the retrieved PR tests that parsed block types/content are preserved in metadata-server endpoints.
  • TraderSamwise/aimux#77: Both PRs extend src/agent-output-parser.test.ts coverage for Claude animation/spinner fragments being classified as status (non-chat) blocks.
  • TraderSamwise/aimux#71: Both PRs modify normalizeTranscriptBlocks to reclassify runtime-noise and tool-action fragments from raw/chat into status with matching test coverage.

Poem

🐰 Noisy transcripts scatter far and wide,
But clever parsing sorts them with pride.
Runtime clutter becomes clean status text,
Agent output flows, what comes next?
Hop-hop, tests confirm the way!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the PR's main objective: fixing the parser to properly classify malformed runtime noise (Claude animation/progress footers) as status blocks instead of assistant responses.
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-next-audit

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

@TraderSamwise
TraderSamwise merged commit d209e5f into master Jun 6, 2026
3 checks passed
@TraderSamwise
TraderSamwise deleted the test/chat-parser-next-audit branch June 6, 2026 11:09
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