GeezerVison is showing github.com — github-backup: mirror contract remainder (#3238, #3270, #3240, #3283) by developing-today[bot] · Pull Request #7723 · developing-today/code
Conversation
developing-today
Bot
commented
Nov 8, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Closes #3238, closes #3270, closes #3240, closes #3283 — the four open children of design #3282 ("a mirror is what it can prove"), driven by queue task 12622. The other phase children (#3233, #3250, #3219, #3257, #3229) are already closed, so this PR completes the design's acceptance: no surface of the system can report coverage, success, or health the underlying mirrors, records, or inventory do not support.
#3238 — validity is resolvability (design rule 1–2)
#3270 — a missing mirror reaches the alarm (design rule 5)
#3240 — state written atomically, loaded tolerantly, only through ghb_common (design rule 6)
- New helpers in
ghb_common: atomic_write_text (temp file in the same directory + fsync + os.replace + last-good copy), save_json, load_json_tolerant (torn file → last-good copy, else empty, always with a loud named problem), and state_lock (shared flock).
load_plan / load_state route through the tolerant loader — a torn plan.json/state.json no longer wedges fetch, drainer, clone pass, manifest, or reconcile at startup.
- All generated-state writers migrated: fetch + drain state.json saves, reconcile plan.json, manifest MANIFEST.json, FAMILIES.md, and the dated reconcile report. Both state.json writers hold
state_lock across their whole load→modify→save cycle, closing the lost-update window.
#3283 — closing audit
Tests
- New
tests/test_mirror_contract.py: skeleton invalid + complete mirror valid (real git repos), skeleton confirmed-partial vs complete preserved, manifest reports a skeleton missing, missing-day streak accumulation + chronic exit 1 through main() + clear-on-ok, atomic roundtrip/last-good fallback/torn-without-backup/intact-on-failed-replace, state lock.
- One existing expectation updated:
test_plan_state_shape.py::test_main_survives_state_top_level_list — the saved state now also carries the github-backup(fetch): a missing mirror can never trip the chronic alarm — 'missing' returns before any fail_days record, so the daily run exits 0 forever #3270 missing-day record for the (patched-invalid) repo; the github-backup(fetch): a valid-JSON but wrong-shape plan/state entry crashes the whole daily fetch — one poison entry in plan.json or state.json wedges every repo, every day #6637 wrong-shape contract it guards is unchanged.
- Three existing fixture helpers updated (
test_clone_all_partial.py, test_reconcile_clone_pass.py, test_reconcile_retention.py): their "valid mirror" fixtures were git init --bare skeletons — the exact shape github-backup(valid_mirror): a bare skeleton with zero refs passes as a verified mirror — clone_all records it ok and MANIFEST.json reports it 'mirrored' #3238 makes invalid — so they now seed one real commit. The behaviours those suites guard (github-backup(clone_all): a clone killed mid-flight leaves a partial destination every rerun rejects — the 'resumable' driver never resumes that repo #3233 partial clearance, github-backup(reconcile): a failed clone pass exits 0 and is absent from the dated report — clone_all's verdict is dropped by its only scheduled caller #3300 clone-pass propagation, github-backup(inventory): a null repositoryOwner is silently read as 'this owner has no repos' — reconcile drops the owner's mirrors from plan.json and MANIFEST.json and exits 0 #3229 retention) are unchanged.
- Full github-backup suite run on the laptop before merge; all suites pass.
🤖 Queue worker lane code-g, task 12622.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
490508f8-48c1-4ae0-8b7a-8a21ebca83a4
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 25, 2026
Reviewers
dezren39
Awaiting requested review from dezren39
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|