Skip to content

Test parser runtime harness#69

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

Test parser runtime harness#69
TraderSamwise merged 1 commit into
masterfrom
test/chat-parser-dummy-harness

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a reusable dummy live-pane harness for agent output parsing
  • exercise the runtime readAgentOutput path with fake tmux targets for Claude and Codex sessions
  • verify mutable dummy pane snapshots so future live-agent parser scenarios can be added without spawning real agents in CI

Verification

  • /Users/sam/cs/aimux/node_modules/.bin/vitest run src/agent-output-parser-harness.test.ts src/agent-output-parser-fuzz.test.ts src/agent-output-parser-fixtures.test.ts src/agent-output-parser.test.ts src/context/context-bridge.test.ts
  • /Users/sam/cs/aimux/node_modules/.bin/tsc --noEmit
  • PATH=/Users/sam/cs/aimux/node_modules/.bin:/Users/sam/.local/volta-shims:/Users/sam/.local/bin:/Users/sam/.bun/bin:/Users/sam/.codex/tmp/arg0/codex-arg0MLlwy8:/Users/sam/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path:/opt/homebrew/opt/mysql-client/bin:/Users/sam/opt/anaconda3/envs/py39/bin:/Users/sam/.npm-global/bin:/Users/sam/pathother:/Users/sam/apache-ant/bin:/usr/local/mysql/bin:/Users/sam/.codex/tmp/arg0/codex-arg0FiIdYh:/Applications/cmux.app/Contents/Resources/bin:/Users/sam/.nvm/versions/node/v24.16.0/bin:/Users/sam/opt/anaconda3/condabin:/Users/Sam/.npm-global/bin:/Users/Sam/pathother:/Users/Sam/apache-ant/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:/Users/sam/.cargo/bin:/Users/sam/bin yarn lint
  • PATH=/Users/sam/cs/aimux/node_modules/.bin:/Users/sam/.local/volta-shims:/Users/sam/.local/bin:/Users/sam/.bun/bin:/Users/sam/.codex/tmp/arg0/codex-arg0MLlwy8:/Users/sam/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path:/opt/homebrew/opt/mysql-client/bin:/Users/sam/opt/anaconda3/envs/py39/bin:/Users/sam/.npm-global/bin:/Users/sam/pathother:/Users/sam/apache-ant/bin:/usr/local/mysql/bin:/Users/sam/.codex/tmp/arg0/codex-arg0FiIdYh:/Applications/cmux.app/Contents/Resources/bin:/Users/sam/.nvm/versions/node/v24.16.0/bin:/Users/sam/opt/anaconda3/condabin:/Users/Sam/.npm-global/bin:/Users/Sam/pathother:/Users/Sam/apache-ant/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:/Users/sam/.cargo/bin:/Users/sam/bin yarn build
  • PATH=/Users/sam/cs/aimux/node_modules/.bin:/Users/sam/.local/volta-shims:/Users/sam/.local/bin:/Users/sam/.bun/bin:/Users/sam/.codex/tmp/arg0/codex-arg0MLlwy8:/Users/sam/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path:/opt/homebrew/opt/mysql-client/bin:/Users/sam/opt/anaconda3/envs/py39/bin:/Users/sam/.npm-global/bin:/Users/sam/pathother:/Users/sam/apache-ant/bin:/usr/local/mysql/bin:/Users/sam/.codex/tmp/arg0/codex-arg0FiIdYh:/Applications/cmux.app/Contents/Resources/bin:/Users/sam/.nvm/versions/node/v24.16.0/bin:/Users/sam/opt/anaconda3/condabin:/Users/Sam/.npm-global/bin:/Users/Sam/pathother:/Users/Sam/apache-ant/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:/Users/sam/.cargo/bin:/Users/sam/bin yarn test

Summary by CodeRabbit

Release Notes

  • New Features

    • Added agent output parser harness for in-memory parsing and management of agent outputs across multiple sessions.
  • Tests

    • Added comprehensive test suite validating parser harness functionality including session handling, output parsing, and error scenarios.

@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 8:44am

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Need an answer fast? Review this PR in Change Stack to ask focused questions about the PR or a changed range.

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: 0c8beb25-3d57-45fa-9fd9-1e8594b478fa

📥 Commits

Reviewing files that changed from the base of the PR and between ccdd306 and 1b0494e.

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

📝 Walkthrough

Walkthrough

Adds an in-memory test harness for parsing agent output. Exports interfaces defining session inputs, read results, and harness methods. Implements createAgentOutputParserHarness to store per-session outputs, create tmux-like targets, and delegate parsing to readAgentOutput. Includes three tests covering multi-session reads, output updates, and error handling.

Changes

Agent Output Parser Harness

Layer / File(s) Summary
Harness contract and factory implementation
src/agent-output-parser-harness.ts
Defines AgentOutputParserHarnessSession, AgentOutputParserHarnessRead, and AgentOutputParserHarness interfaces. Implements createAgentOutputParserHarness to store session outputs in a Map, construct a host object with a captureTarget implementation that retrieves stored output, and return an API exposing read, readAll, and setOutput methods that delegate to readAgentOutput or update tracked outputs.
Harness test suite
src/agent-output-parser-harness.test.ts
Adds a fixture helper to locate parser fixtures from AGENT_OUTPUT_PARSER_FIXTURES. Tests verify that readAll parses Claude and Codex dummy sessions with expected session IDs and block sequences, that setOutput updates output and changes subsequent read results without recreating the harness, and that setOutput throws when given an unknown session ID.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • TraderSamwise/aimux#66: The main PR's new createAgentOutputParserHarness tests directly consume the AGENT_OUTPUT_PARSER_FIXTURES exported by the retrieved PR to validate parsing outputs.

Poem

A harness springs forth, in-memory and bright,
Tracking sessions with output in flight,
Tests verify reads and updates galore,
Parsing agent outputs, now so much more! 🐰✨

🚥 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 accurately describes the main addition: a test harness (factory function and test suite) for the agent output parser.
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-dummy-harness

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

@TraderSamwise
TraderSamwise merged commit 5056420 into master Jun 6, 2026
3 checks passed
@TraderSamwise
TraderSamwise deleted the test/chat-parser-dummy-harness branch June 6, 2026 08:53
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