Repository navigation
fix(publish): handle non-UTF-8 bytes in repository diffs - #50
Merged
Merged
Conversation
Capture gh output as bytes and decode at the call boundary, allowing replacement only for PR diffs while keeping API/JSON strict. Small binary blobs can appear as text hunks; preserve Unicode and inline placement rather than dropping the review. Close running steps and the gate on unexpected worker crashes, just as for classified failures. Add real-subprocess and worker publication regressions for the binary fixture behind dashpay/platform#5515. Co-Authored-By: Claude Code <noreply@anthropic.com>
Owner
Author
|
Validation follow-up: both GitHub Actions |
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.
What and why
Fix the repeatable publishing crash affecting dashpay/platform#5515.
The saved run-6316 traceback leads through
_build_review→github.pr_diff→Gh.run→_default_runner→ Python subprocess text decoding. A read-only fetch of the current head (c15b778f8a1779fb62632098d12134fe8b4d4a98) reproduces byte0xa1at offset 933869 in a 1,060,023-byte diff. It belongs topackages/rs-drive-proof-verifier/tests/vectors/identity-discovery/key-hash.bin: Git emits this small binary blob as a text hunk, not aBinary files … differmarker.ghstdout/stderr as bytes and decode at the call boundary. Only PR diffs opt into replacing undecodable bytes; ordinary API/JSON remains strict UTF-8. Valid Unicode is preserved. Diff bodies are used for hunk/path mapping, not published as review prose.publish: running. Completed verifier steps/findings are untouched.Proof and validation
REQUEST_CHANGES, correct head and inline location, Unicode finding text, and full body fallback for an unmappable binary finding.verify2: ok, and replace the progress gate with failure.UnicodeDecodeErrorand stale running publish step).make check: 625 passed, Ruff lint/format clean, strict mypy clean.Deployment and recovery (not performed)
After merge and a green
check, an operator can usedeploy/deploy.sh main(or the merged green commit SHA). This installs the package and restarts the Reviewsys daemon, not OpenClaw.Then, on the deployment host, if #5515 still has the failed current head and no queued/running head:
Verified
cmd_retryand existing CLI tests: this resets attempts and queues a new full run, not a publish-only resume. If the head moved, use the supportedenqueue dashpay/platform 5515path for the live head instead. There is no supported publish-only resume command. No production DB/artifacts were changed, no saved verifier findings were edited or reinterpreted, and no production deploy/requeue was performed. Historical failed runs remain historical evidence.Requested by shumkov via PastaClaw. Source: publishing failure on dashpay/platform#5515.
🤖 Generated with Claude Code