#!/usr/bin/env python3 """The nightly check for clone drift, public releases and stale backups on every configured host. Why (11-13): an audit found 8 stale public repos, 7 stale or missing retros, and live code that differed from the repo it came from. Nothing had failed; each had simply aged, and nobody runs an audit by hand every night. This lists every public repo, says how it reaches the public (its kind), and checks each kind the way it can drift: pushed the public repo is the working clone. Drift includes a local branch that tracks the public default branch but carries commits not on it, so a plain push publishes them (`private-commits`). published the public repo is a release of a private working repo through a PUBLISH whitelist (publish-public). Drift: what a publish would export now (the whitelisted files committed at the source's HEAD, agent working files dropped) differs from the public default branch (`unpublished`). The private repo being ahead of or behind the public one is not drift; only the export is compared. archived read-only on GitHub; listed, not checked. declared a public repo with no clone on purpose (config `declared`, with a reason). unknown a public repo that is none of these: a FAILURE. Every public repo must have one way in. Clones with an owned remote (public or private), plus explicit `local_only` paths, are checked for `behind`, `no-upstream`, stale `dirty` files and aged `unpushed` commits. Without configured owners, any remote qualifies. Dirty counts tracked changes at all depths and top-level untracked files. Fetch is opt-in; otherwise cached tracking refs are used. A fetch failure suppresses stale-ref comparisons. Detached HEADs must be declared in `detached` to suppress no-upstream. Also, on whichever host each entry names: README auto-blocks that differ from a fresh render (`readme-blocks check`, in every clone or source whose README has `