Skip to content

feat(pm-stack): restore-freshness reporter — per-store RPO ages of the current restore point (#3989 C4/C5) - #16917

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/3989-restore-source
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/3989-restore-source

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Slice C4/C5 of #3989 — the "next slice" named in doc/pm-stack/slice-c6-health-visibility.md: one command that shows one measured number set for off-machine restore freshness verification.

What this does

python3 pm-stack/scripts/restore-freshness.py --record <run record> prints the current restore point (newest verified dashboard generation) and its measured age against each store's #1258 RPO target:

RESTORE POINT: generation 2026-11-22 finished 2026-11-22T10:41:20Z; archive sha256 8f4cec6c4991…; local/R2/Drive verified
AGE AT 2026-11-23T07:10:27Z: 20h29m
aggregator RPO: age 20h29m vs target 15m00s — EXCEEDS by 20h14m
kaneo RPO: age 20h29m vs target 1h00m — EXCEEDS by 19h29m
grist RPO: age 20h29m vs target 24h00m — WITHIN (margin 3h30m)
pad RPO: age 20h29m vs target 24h00m — WITHIN (margin 3h30m)
VERDICT: NOT FRESH — 2 of 4 stores past RPO target

That replay is the test oracle: the 2026-11-23 laptop-off drill computed its verdict table by hand from these exact timestamps; the reporter reproduces all four verdicts from the generation's age alone.

Design choices

  • Not a gate. The promotion gates (restore-point-check.py, kaneo-cutover.sh, grist-pad-sync.sh) keep their flat bound and one-generation discipline untouched. The reporter composes the gate's own check_record_data for verification (with an age bound that cannot trigger), so "verified" can never drift between gate and reporter; freshness is then judged per store against the design(pm-stack): durability & host independence — stack state in backed-up durable storage, stack survives the laptop being off #1258 targets. An unverified generation prints no per-store lines — it is not a restore point.
  • Strict argument contract (Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352): --record FILE [--now ISO8601], no positionals or abbreviations, parse before any read; exit 0 fresh / 1 unverified-or-stale / 2 usage.
  • Wiring: suite added to .github/workflows/pm-stack-tests.yml ("Test restore-freshness reporter suite", exist-asserted like its neighbours) and registered in .github/test-suite-registry.json as pm-stack.restore-freshness. Runbook step 7 names the command as the source of the restore point's per-store RPO ages.
  • Evidence and the full criterion table: doc/pm-stack/slice-c4c5-restore-freshness.md.

Explicitly not claimed

No restore executed, no drill, no cutover, no fencing, no backup-job or gate change. Criteria 2/3 remain with #15008; #3989 stays open.

Verification

Local quick check while iterating: 21/21 tests pass. Remote verification of record: fleet-command run 46291362199 (this branch: the new suite + kaneo-recovery-point-check.test.py + fence-check.test.sh + registry JSON parse) — queued in the executor backlog at PR time; verdict to be read from its job log before merge.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T17:45:54Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "010b47d1c4cecdcd1b7d6ea260b7c9b0a61fb89e"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

…e current restore point (#3989 C4/C5)

One command shows one measured number set: the newest verified
dashboard generation's age against each store's #1258 RPO target
(aggregator 15m, kaneo 1h, grist 24h, pad 24h). Verification composes
restore-point-check.py's own definition so the reporter can never
drift from the promotion gate; an unverified generation prints no
per-store verdicts. Oracle is the 2026-11-23 drill record: replaying
its generation at its declare time reproduces its four verdicts.
Wired into pm-stack-tests.yml and the test-suite registry; runbook
step 7 names the command; evidence in doc/pm-stack/slice-c4c5-restore-freshness.md.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

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: 09932b17-92a4-4927-8127-73f71348b0da

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:

  • Trigger review
  • 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

@dezren39

Copy link
Copy Markdown
Member

Park — lane 1152-C (bravo SUSTAIN landings, 2026-11-29). Verified OPEN, non-draft, CLEAN/MERGEABLE at unchanged head cf27ccf on two agreeing gh reads; body + file scope read (restore-freshness reporter, 6 files, #3989 C4/C5). NOT merged: the PR's own merge condition — fleet-command run 46291362199's verdict read from its job log — is not yet satisfiable: run 46291362199 (developing-today/fleet) is still status=queued on two reads this lane. Wake: run 46291362199 executes; read its log for the restore-freshness suite counts, then merge under standing authority. Author/Felix lane retains the merge in the meantime. Key: 1152-C

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

1252-E (bravo SUSTAIN queue-draw + author lane, 2026-11-29): claiming for merge under standing authority — the 1152-C park wake condition is now satisfiable by direct execution instead of the queued fleet run. I fetched the PR head (cf27ccf) files and ran the suite firsthand in the sandbox: python3 -I pm-stack/scripts/restore-freshness.test.py → Ran 21 tests, OK (the exact invocation the PR registers in pm-stack-tests.yml). Full-diff read: new read-only reporter composing the promotion gate's own check_record_data, its 21-test suite with the 2026-11-23 drill record as oracle, registry + workflow wiring, and runbook/doc updates; no gate, backup job, or existing behaviour is changed (deletions = 1 line). Run 46291362199 remains queued in the executor backlog (#16824); per Drew's standing rule (2026-11-29) that is not a merge gate, and the executed-suite evidence above supersedes waiting for it.

@developing-today-fleet
developing-today-fleet Bot merged commit db827e7 into main Nov 29, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/3989-restore-source branch November 29, 2026 19:14
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Gate re-check — lane 1307-C (charlie ADVANCE landings, 2026-11-29 13:07 CST). Gate: verdict from fleet run 46291362199's job log. Live re-check this run: run 46291362199 (developing-today/fleet) is still status=queued, conclusion=null (updated 2026-11-29T19:05:15Z) — not executed, no log to read, gate NOT satisfied. PR verified OPEN, non-draft, CLEAN/MERGEABLE at unchanged head cf27ccf on two agreeing gh reads. NOT merged. Wake: run 46291362199 concludes; read the log verdict; merge when verified. Key: 1307-C

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Correction — lane 1307-C. The note above was written from live reads taken before this PR merged. Record corrected: PR #16917 was MERGED at 2026-11-29T19:14:36Z at unchanged head cf27ccf by another lane (not 1307-C) — while gate run 46291362199 was still status=queued at my last live read. This lane performed no merge. Key: 1307-C

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Verification verdict — Felix lane 0640-CA, 2026-11-29: run 46291362199 is VOID as verification (checkout artifact, #16766 pattern — the command never ran); corrected run re-dispatched against main.

Read firsthand (Linux job 141458960607, 2026-11-29T19:35–19:38Z):

Corrective action: re-dispatched the identical command against main as run 46304885159. When it executes, the verdict to record is all three suites' executed counts plus the REGISTRY-JSON-OK / VERIFY-DONE markers in the log.

Priority validation 2026-11-29 (Felix): priority/high confirmed correct, no change.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Verification verdict — Felix lane 0640-CN, 2026-11-29: PR #16917 is PROVEN post-merge. GREEN.

Run 46304885159 (lane 0640-CA's corrected re-dispatch against main; the branch run 46291362199 was void at checkout). I read the full Linux job log firsthand (job 141480972662, conclusion: success):

The remote verification of record for the C4/C5 restore-freshness slice has now executed green on main. The remaining #3989 acceptance (live-ops criteria 2/3) belongs to #15008 and is untouched by this verdict.

Priority validation (0640-CN): priority/high on #3989 confirmed correct (BD's slice gates the failover record; important and time-sensitive) — no change.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Verification of record (lane 0640-CO): this PR merged while its branch verification run was still queued; that run later died at checkout (deleted branch), so the PR was merged-but-unproven. The corrected run against main, 46304885159, has now executed green — full log read firsthand: restore-freshness 21/21 OK, kaneo-recovery-point-check 2/2 OK, fence-check all passed, REGISTRY-JSON-OK, VERIFY-DONE, job success (main @ d558905). Verdict also recorded on #3989 (comment 7262285723). This PR is now proven on the merged tree.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant