Skip to content

Fix docs-only gate for binary files#20

Merged
Svaag merged 1 commit into
mainfrom
fix/docs-gate-mutated-paths
Jun 21, 2026
Merged

Fix docs-only gate for binary files#20
Svaag merged 1 commit into
mainfrom
fix/docs-gate-mutated-paths

Conversation

@Svaag

@Svaag Svaag commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • change the docs/text validation gate to read only mutated text paths instead of every file in the worktree
  • keep the gate strict for non-UTF-8 mutated docs
  • add focused gate-runner tests

Why

A production Engineering Loop canary on loop created 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 tests
  • uv run mypy --strict src
  • uv run pytest

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Svaag Svaag merged commit d4781ed into main Jun 21, 2026
4 checks passed
@Svaag Svaag deleted the fix/docs-gate-mutated-paths branch June 21, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant