feat(ci): surface archive-sync failures in PR body#275
Open
ronaldtse wants to merge 1 commit into
Open
Conversation
The archive-sync workflow creates automated PRs when it adds archive.org mirrors to formulas. Previously the PR body said only 'Chunks processed: N' with no detail about WHICH URLs succeeded or failed. Same pattern as the formula-health reporting fix (PR #270): Layer 1: archive_fonts.rb archive subcommand gains --json-output (appends JSONL records per URL) Layer 2: new archive_fonts.rb report subcommand aggregates JSONL into the unified results schema Layer 3: collect job in archive-sync.yml runs render_report.rb and embeds the formatted markdown in the PR body The PR body now shows a summary table (total/passed/failed/skipped) and a failure section listing each broken URL + its formula + the error message — same quality as the formula-health issue body. Smoke-tested locally with sample JSONL: 3 URLs (1 newly archived, 1 already archived as warning, 1 failed) produces correct summary and rendered markdown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
archive-syncworkflow runs weekly (Wed 2am UTC) and creates automated PRs when it adds archive.org mirrors to formulas. The PR body previously said only:No detail about WHICH URLs succeeded or failed. Same failure mode as issue #225 had with formula-health.
Solution
Applies the same 3-layer pattern from PR #270 (formula-health reports):
Before / After
Before — PR body:
After — PR body includes the formatted report:
Files
Modified:
process/archive_fonts.rb—archivesubcommand gains--json-output; newreportsubcommand aggregates JSONL.github/workflows/archive-sync.yml— each chunk writes JSONL, collect job runsreport+render_report.rb, PR body includes formatted outputTest coverage
Smoke-tested locally with 3-record JSONL fixture:
Output verified:
render_report.rbconsumes the JSON and produces correct pr-comment.md with summary table + failure details.Depends on
PR #270 (merged) —
render_report.rbin.github/scripts/and the unified JSON schema.