Fix parser action status leaks - #88
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds an ChangesAction-status-leak audit detection
Sequence DiagramsequenceDiagram
participant Input as Input response block
participant Parser as isStatusLine & looksLikeToolActionText
participant Patterns as ACTION_STATUS_LEAK_PATTERNS
participant Audit as auditAgentOutputParserCorpus
participant Findings as Findings array
Input->>Parser: classification checks (Ran <cmd>, tool-header, ⏺ terminal-notifier)
Parser-->>Audit: classification result (status/response)
Input->>Patterns: test response text against patterns
Patterns-->>Audit: match detected?
Audit->>Findings: record "action-status-leak"
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/agent-output-parser.ts`:
- Around line 34-40: The helper looksLikeToolActionText is too broad and is
being applied to every non-empty line (causing normal assistant prose to be
misclassified); restrict its use by narrowing the regex and its application:
update looksLikeToolActionText to only match explicit tool-action prefixes at
the start of a line (e.g., require a verb like "Ran", "Searched", "Read"
followed by a command token or numeric file/count pattern and anchor to ^), and
change the call site that currently applies it to all non-empty lines (in
src/agent-output-parser.ts) so it only runs against short single-line status
candidates (e.g., lines under a small length threshold or lines composed mostly
of a verb + token), thereby avoiding reclassifying ordinary prose. Ensure you
modify the function name references unchanged and keep behavior for genuine
tool-action lines intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cbb724ff-5890-411a-9e68-205c06c69a7f
📒 Files selected for processing (5)
scripts/audit-agent-output-parser.mjssrc/agent-output-parser-audit.test.tssrc/agent-output-parser-audit.tssrc/agent-output-parser.test.tssrc/agent-output-parser.ts
Summary
Ran git worktree list --porcelainas status instead of assistant textaction-status-leakparser corpus audit flag for action/activity rows leaking into response blocksVerification
Note: src/daemon.test.ts remains excluded locally because a live aimux-dev project service owns its fixed test port in this environment.
Summary by CodeRabbit
New Features
Bug Fixes
Tests