Pular para o conteúdo

Overnight Receipts Verifier (verify-overnight-receipts.sh)

Overnight receipts verifier

scripts/verify-overnight-receipts.sh is the morning-arrival checklist (handoff E §2.1, HANDOFF-REVENUE-RECOVERY-2026-11-04D.md §1, issue #233 procedure step 1) as an executable gate: every artifact the 03:05 automation gates on is re-verified independently — trust nothing, read the receipts.

Terminal window
scripts/verify-overnight-receipts.sh # full check, today
scripts/verify-overnight-receipts.sh --skip-slow # file checks only
scripts/verify-overnight-receipts.sh --remote # + live R2 spot-check
scripts/verify-overnight-receipts.sh --date 20261105 # explicit run date
scripts/verify-overnight-receipts.sh --gsc <export> # pin the GSC export

Read-only by construction: no public/ writes, no deploys, no cache mutations. The two slow checks (serper-cache-census --missing, audit-metadata) only read the estate.

Checks

#CheckVerdict
1Artifacts present (overnight log, batch-1 TSV+log, daily-build log, last-diff.json)hard
2Overnight log abort scan + tailwarn
303:00 determinism: total mutations ≤4 (5–20 warn, >20 fail)hard
4Batch-1 TSV: 0 FAIL, no unknown status; OK = 314 (mismatch warns — a pass-2 re-run truncates the TSV; check 7 reconciles)hard/warn
5Building pages for ≥ 314 in the batch-1 log (silent no-op landmine)hard
6last-diff.json: created on run date, mutation_count within the documented composition band (7×TSV-OK + hub/sitemap/agent-status slack — the #198-accepted batch-1 arithmetic, not the old flat 330–2,200 estimate), deletions ≤10, prefixes ⊆ the 7 documented families {estado, casas, casa-casas, jardim, condominios, casa-jardim, casa-condominios} + sitemap-*.xml/root/admin artifacts, gate approvedhard
7serper-cache-census --missing ≤ 15 (newest GSC export under site/cache/gsc/inbox/)hard, slow
8audit-metadata exit 0hard, slow
9Estate freeze offhard
10Tree clean on main (untracked tolerated, like the automation’s Step 0)hard
11A batch-1 record comment dated the run date exists on #198 (any position — later comments such as the #240 code-fix record do not invalidate it)hard, network
12--remote: rclone cat the live Lucélia page — zero rightrep, og: filled, imobiliariasCount > 0hard, opt-in

Exit codes

  • 0 — G1 preconditions MET (launch scripts/rebase-state-group.sh G1; its deploy still needs the operator checkpoint)
  • 1 — NOT MET, with the failing checks listed; diagnose from the artifacts, never re-run a driver blindly
  • 2 — INCOMPLETE: a hard check was skipped (--skip-slow / --skip-gh); rerun without the skip flags before launching a group

The R2 spot-check path uses state slugs (estado/sao-paulo/lucelia), not UF codes — the disk and R2 layouts are slug-based.