Skip to content

ci: opt-in PR source evidence advisory (read-only) - #43

Open
runesleo wants to merge 1 commit into
mainfrom
feat/github-pr-source-evidence-advisory-20261015
Open

runesleo wants to merge 1 commit into
mainfrom
feat/github-pr-source-evidence-advisory-20261015

Conversation

@runesleo

Copy link
Copy Markdown
Owner

Purpose

Validate a small, GitHub-native PR source-evidence report without needing a Cursor Origin account or a second control plane.

Changes

  • Adds an opt-in, read-only GitHub Actions job on pull_request.
  • Uses the existing x-reader CLI and its canonical build_receipt evidence states.
  • Reads at most 3 explicitly marked HTTPS references in the PR description.
  • Reports coverage to the Actions job summary (no PR comments, GitHub Checks API writes, branch-protection changes, or required merge gate).
  • Uses contents: read and checkout with no persisted credentials. No Secrets or hosted service.
  • Does not fact-check claims or scan changed Markdown files.

Local verification

  • Full x-reader suite: 357 tests passed, 2 skipped in a clean disposable environment with the same pip install -e .[mcp] dependencies as CI.
  • Isolated advisory tests: 10/10 passed.
  • One real public X-read preflight returned PARTIAL / attached_media_unread as expected.

Controlled opt-in check

This block is deliberately present only to exercise the new advisory workflow against a public source. A PARTIAL result is expected and must not be upgraded to PASS.

No production deployment or new account authorization is in scope.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-10-15T09:40:17.719299Z a40aa9f 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 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: a40aa9fb1b

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

raise ValueError("SOURCE_SECTION_TOO_LARGE")
refs = []
for match in _REFS.findall(_FENCES.sub("", markdown)):
url = match.rstrip(".,;:!?)]}")

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 valid closing delimiters in source URLs

When a source URL legitimately ends in ), ], or }, this unconditional rstrip removes part of the URL rather than only surrounding Markdown punctuation. For example, [source](https://en.wikipedia.org/wiki/Function_(mathematics)) is fetched as .../Function_(mathematics, so the advisory can assess the wrong page or report a false failure; trim only delimiters proven to belong to the Markdown syntax.

Useful? React with 👍 / 👎.

Comment on lines +66 to +69
start, end = body.index(OPEN) + len(OPEN), body.index(CLOSE)
if end <= start:
raise ValueError("SOURCE_MARKERS_OUT_OF_ORDER")
urls = extract_pr_body_urls(body[start:end])

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 Ignore opt-in markers inside fenced examples

When a PR description contains the marker block as a fenced documentation example, this selects the markers before extract_pr_body_urls strips fences, leaving only the URL between them and treating the example as a real opt-in. The workflow predicate likewise sees the marker, so documentation-only PRs can unexpectedly trigger external source reads and publish a coverage report; remove fenced regions before locating the opt-in block.

Useful? React with 👍 / 👎.

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