test: parity and input oracles#140
Merged
Merged
Conversation
|
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)
📝 WalkthroughWalkthroughAdds Python and JavaScript oracle tests for adversarial bash rendering parity, HTML escaping, malformed JSONL recovery, broken parent links, NUL-byte handling, and orphaned tool-result dispatch. ChangesRendering parity and parser resilience
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
timon0305
approved these changes
Jul 23, 2026
wpak-ai
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #137
We had structural parity checks on dispatch keys but nothing that ran the same nasty tool_result through Python export and the JS renderer and compared what came out. This PR adds that, plus parser tests that expect a specific degraded outcome for bad JSONL instead of only checking that nothing blows up.
The shared payload is a bash tool_result with
in stdout. Python goes through _parse_tool_result and _render_tool_result and checks the output sits in a code fence. JS goes through renderToolResult / renderBashResult and checks the tag is escaped in HTML. Same blob on both sides.
On the parser side we cover a truncated last line (earlier messages still parse), a parentUuid that points nowhere (value kept as-is), a line with NUL bytes (that line drops, the next good line still parses), and a user toolUseResult with no matching tool_use (tool_result_parsed still lands as bash with the stdout you sent).
pytest -q and npm test both pass. If you break escaping on the JS bash path or drop the md code fence on Python, the parity test should fail.
Summary by CodeRabbit
Bug Fixes
Tests