G0.9: nightly timer + the first rehearsed restore in the ecosystem
All checks were successful
check / gate (push) Successful in 18s
canary / probe (push) Successful in 23s

Timer installed with Persistent=true — Grant's workstation is not always on at
04:17, and without that a missed window is silently skipped and the backup
simply never runs.

RESTORE DRILL PASSED, which is the part that matters: pulled a bundle back out
of R2, cloned from it, and the restored HEAD (ffce529) matches live origin/main
exactly — 40 commits, all branches, 50 files.

The August audits found no rehearsed restore anywhere in the ecosystem, for
anything. This is one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Grant Whitmer
2026-08-12 21:49:11 -04:00
parent ffce529344
commit 2c292c501c

View File

@@ -609,3 +609,27 @@ def test_g76_canary_survives_an_unwritable_state_path():
src = (ROOT / "scripts" / "canary.py").read_text()
save = src[src.index("def save_state") : src.index("def send_alert")]
assert "except OSError" in save
# --------------------------------------------------------------------------
# G0.9 — backups, the prerequisite for being the daily driver
# --------------------------------------------------------------------------
def test_g09_backup_bundles_all_refs_not_just_the_default_branch():
"""A single-branch bundle loses every other branch and every tag silently,
and you find out during the restore."""
src = (ROOT / "scripts" / "backup.sh").read_text()
assert "bundle create" in src and "--all" in src
def test_g09_backup_verifies_before_trusting():
"""An unverified bundle is a belief, not a backup."""
src = (ROOT / "scripts" / "backup.sh").read_text()
assert "git bundle verify" in src
def test_g09_backup_fails_loudly():
"""A backup script that swallows errors is worse than none — it
manufactures confidence."""
src = (ROOT / "scripts" / "backup.sh").read_text()
assert "COMPLETED WITH FAILURES" in src
assert "refusing to report a backup that did not happen" in src