Skip to content

Add repo QA and privacy publishing guardrails - #1

Closed
parasdoshicom wants to merge 3 commits into
mainfrom
codex/repo-qa-guardrails
Closed

parasdoshicom wants to merge 3 commits into
mainfrom
codex/repo-qa-guardrails

Conversation

@parasdoshicom

Copy link
Copy Markdown
Owner

Summary

  • add a repo-native public-safety scanner for public publishing guardrails
  • add a Markdown link checker and run both checks in GitHub Actions
  • add a PR template and a short publish workflow doc for the intended branch -> PR -> QA path

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.sh
  • python3 ./scripts/check-markdown-links.py

@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: 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".

Comment thread scripts/check-markdown-links.py Outdated


def normalize_target(raw_target: str) -> str:
target = raw_target.strip().strip("<>").split()[0]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Addressed in 42a633d. normalize_target now handles empty destinations like () and <> without raising, so the checker skips those cleanly instead of crashing.

Comment thread scripts/check-markdown-links.py Outdated
Comment on lines +13 to +14
LINK_RE = re.compile(r"(?<!\!)\[[^\]]+\]\(([^)]+)\)")
IMAGE_RE = re.compile(r"!\[[^\]]*\]\(([^)]+)\)")

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

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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.

@parasdoshicom
parasdoshicom deleted the codex/repo-qa-guardrails branch April 25, 2026 19:52
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