Skip to content

Validate Markdown links and headings from parsed documents. - #139

Merged
jon merged 1 commit into
mainfrom
work/audit-r51-parse-markdown-once-and-validate-rendered-semant
Nov 2, 2026
Merged

jon merged 1 commit into
mainfrom
work/audit-r51-parse-markdown-once-and-validate-rendered-semant

Conversation

@jon

@jon jon commented Nov 2, 2026

Copy link
Copy Markdown
Owner

The PR checker uses one retained GitHub-flavored Markdown document for each committed file’s links and heading anchors. Linked images, nested or wrapped link text, parentheses in destinations, footnotes and long lines follow the parser’s structure. Comments, code spans and fenced or indented code do not become links or headings.

Repository-root paths resolve within the committed tree. Destinations use the renderer’s Markdown punctuation and entity decoding before URL escapes are decoded once. Links to the repository root are valid. Non-Markdown files accept GitHub line fragments such as #L10-L20; the checker validates their syntax without claiming those lines exist. Malformed local URLs and unsupported source-file fragments produce attributable findings.

Why

The old regular expressions truncated destinations, skipped rendered links and stopped silently at a long line. A separate line scan counted headings hidden in comments or code and dropped inline-code text from slugs. Links and Markdown headings now come from the same parsed tree, and heading slugs use rendered text, including code, emphasis, entities and link text. The parser configuration also matches the PR section checker’s GFM and footnote handling.

The required PR sections still need visible explanatory content. Ruby fallback text and math-only text do not satisfy that requirement; ordinary prose alongside a formula does. Math is recognized across inline formatting, including GitHub’s dollar/backtick delimiters and fenced math. Ordinary literal code and explicit dollar-sign spans remain visible. The command, flags and finding severities are unchanged. External network availability is not checked, and explicit HTML anchor support is unchanged.

Documentation

The contribution guide describes parsed link and heading checks, root paths, escape handling, source-file fragments and visible prose requirements. Regression cases use committed temporary repositories and independently assert destinations, anchors and reported failures.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T03:45:59.955259Z 4921dcb Manual request
🔒 Security Review ⚠️ Failed 2026-11-02T03:24:59.353114Z
We couldn’t complete this review. Comment @codex security review to try again.
1ec740a PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@jon

jon commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@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: 1ec740a042

ℹ️ 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 internal/ci/checkpr/metadata.go Resolved
Line scans missed rendered links and invented headings inside comments
or code. Share the GFM and footnote parser across link, heading and PR
section checks, retaining each committed document for repeated links.

Resolve repository-root paths and URL escapes once, accept source-file
line fragments, and derive slugs from rendered heading text. Require
visible prose alongside math-only or ruby fallback section content.
@jon
jon force-pushed the work/audit-r51-parse-markdown-once-and-validate-rendered-semant branch from 1ec740a to 4921dcb Compare November 2, 2026 03:43
@jon

jon commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 4921dcb69a

ℹ️ 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".

@jon
jon merged commit 73688b5 into main Nov 2, 2026
9 checks passed
@jon
jon deleted the work/audit-r51-parse-markdown-once-and-validate-rendered-semant branch November 2, 2026 03:50
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