Repository navigation
Conversation
This branch has not been deployed
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.
Problem
The DSH process runner and browser-eval process helper decode each stdout/stderr Buffer independently. A UTF-8 character split across pipe chunks is replaced with U+FFFD characters, silently corrupting page text and CLI diagnostics passed to the agent or evaluation oracle. A child that writes the bytes of
中文🙂separately reproduces this on current main.Change
Use a separate streaming UTF-8 decoder for each DSH output stream, flush unfinished sequences when collection settles, and use Node's readable-stream UTF-8 decoding in the eval helper. Add regression tests for split multibyte output on stdout/stderr and incomplete trailing sequences. No new dependencies.
Validation
Environment: Windows x64, Node.js 24.15.0.
node --test evals/browser/tests/*.test.mjs: baseline 23 passed; with the patch 25 passed.settles after the kill grace when neither exit nor close ever fires,settles killAll and killFor children that never report back).src/runner.tspassed;git diff --checkpassed.Related work
Open PRs #404 and #379 also touch the DSH runner, but their changes are confined to rendering command errors; they do not change stream decoding. This patch changes output collection and the eval helper.
AI assistance
OpenAI Codex assisted with source inspection, implementation, regression tests, and the listed validation.