Skip to content

fix(github-backup): reconcile propagates clone pass failure and records it in the dated report (#3300) - #4385

Merged
dezren39 merged 1 commit into
mainfrom
queue/5889-3300-reconcile-clone-pass
Nov 2, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/5889-3300-reconcile-clone-pass

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Fixes #3300 (task 5889).

reconcile.py discarded clone_all.py's non-zero exit and wrote its dated report before the clone pass, so a failed mirror creation exited 0 and left no trace in the report.

Changes (infra/github-backup/bin/reconcile.py):

  • The clone pass now runs before the report is written, and its outcome is recorded in the dated report: succeeded (with the attempted-mirror count), FAILED (with the clone_all exit code), or not run.
  • On failure, the report names the failing repos parsed from the clone-status.jsonl entries the pass appended.
  • main() returns non-zero when the clone pass fails, while preserving the existing inventory-error exit behavior. Module docstring updated to match.

Tests (infra/github-backup/tests/test_reconcile_clone_pass.py, new):

  • Stub clone rc=1 → reconcile exits 1; report records the failure and names the failing repo.
  • Stub clone rc=0 with clean inventory → reconcile exits 0; report records success.
  • Inventory-error control → still exits non-zero; clone pass not run.

Verified locally: test_reconcile_clone_pass.py 9/9 pass; existing test_reconcile_retention.py still 9/9 pass.

Scope exclusions honored: no change to fetch_mirrors.py (#3270) or clone_all.py internals (#3233).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 14:08
@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-02T14:10:02.993455Z 711d47b 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant