Add repo QA and privacy publishing guardrails - #1
parasdoshicom wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3222e4140e
ℹ️ 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".
|
|
||
|
|
||
| def normalize_target(raw_target: str) -> str: | ||
| target = raw_target.strip().strip("<>").split()[0] |
There was a problem hiding this comment.
Handle empty Markdown destinations safely
The link normalizer unconditionally indexes split()[0], which raises IndexError for valid-but-empty destinations such as [placeholder]() or [](<>). In those cases the QA script crashes before reporting link results, so CI fails due to the checker itself rather than an actual broken link. Returning an empty string here (and letting should_skip handle it) avoids this hard failure mode.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 42a633d. normalize_target now handles empty destinations like () and <> without raising, so the checker skips those cleanly instead of crashing.
| LINK_RE = re.compile(r"(?<!\!)\[[^\]]+\]\(([^)]+)\)") | ||
| IMAGE_RE = re.compile(r"!\[[^\]]*\]\(([^)]+)\)") |
There was a problem hiding this comment.
Parse link targets with parentheses correctly
The current regex captures link/image targets only up to the first ), so valid Markdown like [notes](docs/Plan (v2).md) is parsed as docs/Plan (v2 and then reported as missing. That creates false negatives in the repository QA gate and can block merges when docs include common parenthesized filenames. Consider using a Markdown parser or a target extractor that handles balanced/escaped parentheses.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 42a633d. I replaced the regex-only target extraction with a small balanced parser so inline links and images with parentheses in the destination are handled correctly.
Summary
Why
Telegram/runtime push permissions are an infrastructure boundary, but this repo still needs its own QA and privacy gate. This PR makes the repo enforce a public-safe review path instead of relying on manual memory.
Verification
./scripts/check-public-safety.shpython3 ./scripts/check-markdown-links.py