Fix docs-only gate for binary files#20
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bda7921ef0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ), | ||
| ] | ||
| ] | ||
| paths_literal = repr(json.dumps(normalized)) |
There was a problem hiding this comment.
Preserve colons in local docs paths
When a changed doc path itself contains a colon (valid in git paths on POSIX, e.g. docs/foo:bar.md from backend changed_paths), the normalization above treats it like a repo:path key and this new targeted list serializes only bar.md. The generated gate then sees bar.md missing and continues, so the actual mutated doc is never UTF-8 checked; a non-UTF-8 docs/foo:bar.md now passes even though the previous rglob scan failed. Please only strip repo prefixes for repo-scoped mutation keys, not arbitrary colon-containing paths.
Useful? React with 👍 / 👎.
Summary
Why
A production Engineering Loop canary on
loopcreated the requested docs change, but the generic docs gate scanned every file in the repo and failed on an unrelated binary file. This blocked draft PR publication even though the changed doc was valid.Validation
uvx ruff check src testsuv run mypy --strict srcuv run pytest