Gate RSS live publication on complete fetches - #38
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review🚫 Merge blocked: 2 serious issue(s) found in high-risk files 🚫 Blocking IssuesThese issues must be fixed before this PR can be merged: 1. 🔴 [CRITICAL] Logic in
|
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0748fe27b
ℹ️ 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".
| path: data/output/rss_source_pipeline/ | ||
| if-no-files-found: error | ||
| - name: Validate feed completeness | ||
| run: python scripts/validate_fetch_status.py --status data/output/rss_source_pipeline/source_fetch_status.json |
There was a problem hiding this comment.
Fix the known failing canonical feed before gating
In scheduled/main runs that use the canonical config/free_rss_feeds.csv, this new unconditional completeness gate will block publication whenever any configured feed fails; the repository’s last committed data/live/source_fetch_status.json already records cisa-news from config/free_rss_feeds.csv:10 as HTTP Error 403 with failed_feed_count: 1, so if that source still behaves the same the RSS workflow will keep stopping here and never refresh data/live. Remove or fix the failing feed, or make known non-blocking sources non-fatal, before making failed_feed_count fatal for live publication.
Useful? React with 👍 / 👎.
| git config --local http.https://github.com/.extraheader "AUTHORIZATION: bearer ${GITHUB_TOKEN}" | ||
| cleanup_git_auth() { git config --local --unset-all http.https://github.com/.extraheader >/dev/null 2>&1 || true; } | ||
| trap cleanup_git_auth EXIT | ||
| git push origin HEAD:refs/heads/main |
There was a problem hiding this comment.
Use HTTPS git credentials that pushes accept
When COMMIT_OUTPUTS=true and there are live-output changes, this push now depends on a manually added Authorization: bearer header after checkout credentials were disabled with persist-credentials: false; GitHub’s HTTPS Git docs describe authenticating Git operations by using the token as the password, and the actions/checkout README’s push example relies on its persisted credentials, so this custom Bearer header can leave scheduled live publication unable to push even after a complete fetch. Use checkout’s persisted token or a Basic/credential-helper based Git credential for this scoped push.
Useful? React with 👍 / 👎.
|
PERMANENT_FREEZE/CLOSE_RESLICE: terminal CRITICAL/HIGH review failure after absolute-final closure. Preserve branch, commits, reviews, checks, and tests; no further code action. |
Summary
PR-W0 hardens the existing RSS production workflow only. It does not add the weekly artifact.
data/livemutationHEAD:refs/heads/mainOrdering contract
early guard -> checkout/SHA check -> fetch -> legacy debug artifact upload -> completeness gate -> complete-only live commit/pushA partial debug artifact is evidence only and is not a successful live publication. Weekly artifact generation is deferred to PR-W1 after this PR merges and post-main CI succeeds.
Validation
python3 -m pytest -q— 123 passeduv sync --locked --extra test && uv run pytest -q— 123 passedpython3 -m compileall -q src scripts tests— passedactionlint .github/workflows/rss_source_pipeline.yml— passedgit diff --check— passedruffunavailable in environmentNon-scope
No QAR, Pages, publisher, weekly/monthly artifact, identity/store/registry, new data source, or permission expansion.