You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(gh): devops gh api breaks a binary response #5015
uv run devops gh api repos/<owner>/<repo>/actions/artifacts/<id>/zip > shard.zip writes a file that is not a valid zip. Each byte that is not valid UTF-8 becomes the replacement character U+FFFD (bytes 357 277 275 in od -c). The artifact coverage-shard-1 of run 43191263934 has 2,420,029 bytes on GitHub, and the written file has 4,456,457 bytes. devops gh has no other command that downloads a run artifact (devops gh run has only list and view), and AGENTS.md rule 7 forbids bare gh. So an agent cannot read a CI artifact.
Expected Behavior
devops gh can write a binary response or a run artifact to a file with no change to its bytes, for example with an --output <file> option of devops gh api, or with devops gh run download <run> --name <artifact> like gh run download.
Steps to Reproduce
uv run devops gh api repos/dan-petty/devops-cli/actions/artifacts/13930239167/zip > shard.zip
head -c 64 shard.zip | od -c shows 357 277 275 after the PK header, and a zip reader refuses the file.
Evidence
Found while building #4673 on 2026-11-12. #4673 makes each test shard upload a JUnit XML report in its artifact coverage-shard-<n>, and the split by measured time (#4250) reads these reports. Thus #4250 needs an artifact download through devops gh.
This issue is closed as not planned, because #5223 supersedes it.
The owner asked on 2026-11-12 that devops commands that run a CLI tool take the names of the tool and pass its arguments through. #5223 does two things that cover this issue:
It adds devops gh run download as a pass-through to gh run download. gh writes the artifact files, and devops never reads their bytes.
It reads the output of each pass-through command with the surrogateescape handler and masks it. So devops gh api <route> > file keeps each byte.
The acceptance criteria of #5223 hold the reproduction of this issue: artifact coverage-shard-1 of run 43191263934, 2,420,029 bytes.
Activity
dan-petty commentedon Nov 12, 2026
Both fix devops gh api output corruption, but #2569 fixes token masking in JSON while this fixes binary bytes becoming U+FFFD.dan-petty commentedon Nov 12, 2026
This issue is closed as not planned, because #5223 supersedes it.
The owner asked on 2026-11-12 that devops commands that run a CLI tool take the names of the tool and pass its arguments through. #5223 does two things that cover this issue:
devops gh run downloadas a pass-through togh run download. gh writes the artifact files, and devops never reads their bytes.surrogateescapehandler and masks it. Sodevops gh api <route> > filekeeps each byte.The acceptance criteria of #5223 hold the reproduction of this issue: artifact
coverage-shard-1of run 43191263934, 2,420,029 bytes.