Skip to content

impl(pm-stack): move stateful services off the laptop and prove host failover #3989

In progress

Description

@dezren39

Why

The PM stack still depends on the laptop as the only runtime/data host. Backups reduce data-loss risk but do not make the dashboard available when that host is off. Implement the host-independent deployment and verified cold-failover shape from #1258. Preserve each service's canonical store and the one-writer rule; this is not a big-bang shared-database rewrite.

Scope

Acceptance criteria

  • A documented deployment target and ownership map exists for aggregator, Kaneo, Grist, and Pad; each service has one named canonical data home and one active writer.
  • The production runtime and persistent data are usable with the laptop powered off; no PM service depends on laptop-only local state to serve or accept durable writes.
  • Moving the public route to the active host keeps the existing Cloudflare Access hostname and policy; the old writer is fenced before failover promotion.
  • A cold restore from an off-machine verified backup succeeds for each service-owned store, and an isolated full-stack laptop-off drill exercises real reads and a safe test write.
  • Measured RTO/RPO are recorded in doc/pm-stack/restore-drills/YYYY-MM.md and meet or explicitly revise the design(pm-stack): durability & host independence — stack state in backed-up durable storage, stack survives the laptop being off #1258 proposals (4h core RTO; 15m aggregator mutable state; 1h Kaneo/usage/link state; 24h Grist/Pad).
  • Backup age, active host, restore point, and failed/empty generations are visible in the existing health/watchdog path; no empty directory is reported as a successful backup.
  • Configuration keeps the development/test path working, and the deployment can be rolled back without losing writes or creating two active writers.

Boundaries

Parent: #1184. Design: #1258.

Activity

  1. added
    source/queue-worker
    priority/high
    effort/l
    kind/infrastructure
    app/pm-stack
    on Nov 1, 2026
  2. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  3. added
    queue/queued
    status/needs-triage
    task/triage
    on Nov 3, 2026
  4. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7423 (triage, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

  5. added
    work/assigned
    and removed
    status/needs-triage
    queue/queued
    on Nov 4, 2026
  6. 122 remaining items

  7. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    0937-B (alpha DRIVE landings): Slice C6 evidence PR #16834 merged — merge commit 7fc278d, mergedAt 2026-11-29T16:01:34Z. The landed doc (doc/pm-stack/slice-c6-health-visibility.md) pins criterion 6 (backup age / active host / restore point / failed-or-empty generations visible in health/watchdog; empty dir never a successful backup) to implementation + tests on main, spot-verified by the landing lane. Next slice per the doc: C4/C5 combined evidence. This issue stays open — criteria 2, 3, 7 unchecked, 1/4/5 partial.

  8. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Lane 0640-BD claim — #3989 slice C4/C5 (bounded evidence slice).

    Drawn via fleet agent next (priority rung). I concur with the standing stand-downs on the live-ops remainder: criteria 2/3 belong to #15008 (blocked; live cutover + laptop-off drill = production operations, not lane work).

    The startable slice is the one named in doc/pm-stack/slice-c6-health-visibility.md ("Next slice"): C4/C5 combined evidence — one command that shows one measured number for off-machine restore source selection / freshness verification. Concretely: a restore-source selector that, per service-owned store, picks the newest verified off-machine backup generation (failing closed on missing/empty/unverified generations, per the C6 contract) and reports its measured age against the #1258 RPO targets (aggregator 15m; Kaneo 1h; Grist/Pad 24h), with tests. No cutover, no restore execution, no writer fencing, no backup-job behavior change.

    Priority validation 2026-11-29 (Felix): priority/high confirmed correct — PM stack single-host failure mode; important and time-sensitive. No change.

  9. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Progress (slice C4/C5): opened PR #16917 for the restore-freshness reporter named as the next slice in the C6 evidence doc.

    • Command: 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 design(pm-stack): durability & host independence — stack state in backed-up durable storage, stack survives the laptop being off #1258 RPO target (aggregator 15m / kaneo 1h / grist 24h / pad 24h), WITHIN/EXCEEDS per store. Verification composes restore-point-check.py's own definition — the promotion gates are untouched and this reporter is not a gate.
    • Oracle: the 2026-11-23 drill record. Replaying its generation (finished 2026-11-22T10:41:20Z) at its declare time (2026-11-23T07:10:27Z) reproduces the drill's four verdicts exactly (aggregator MISS, kaneo MISS, grist met, pad met). 21 tests; wired into pm-stack-tests.yml + the test-suite registry; runbook step 7 names the command; evidence doc doc/pm-stack/slice-c4c5-restore-freshness.md.
    • Verification: local quick check 21/21; remote run 46291362199 queued in the executor backlog — verdict to be read from its job log before merge. PR left unmerged for Felix.
    • Explicitly not claimed: no restore, no drill, no cutover, no fencing, no backup-job change. Criteria 2/3 remain ops(pm-stack): provision replacement canonical-store target + execute #6816 live cutover and first laptop-off drill #15008's; criterion 7 untouched (the evidence doc names a rollback-verification slice as the smallest next code-shaped move).
  10. added a commit that references this issue on Nov 29, 2026
  11. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Stand-down — Felix lane 0640-BX, 2026-11-29. Drew #3989 via fleet agent next (priority rung) and premise-checked it: slice C6 landed (PR #16834 merged), slice C4/C5 is lane 0640-BD's PR #16917 with its verification run in flight, and criteria 2/3 are the live-ops remainder under #15008 (live cutover + laptop-off drill — production operations, a genuine stop for lane work). No unclaimed bounded slice remains; standing down without changes to avoid duplicating BD's in-flight slice.

  12. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Claim — Felix lane 0640-CA, 2026-11-29. Collecting the verdict of run 46291362199 (PR #16917's verification of record: the new restore-freshness suite + kaneo-recovery suite + fence-check suite + registry JSON parse): the run has completed with conclusion failure. Reading its job log firsthand — checking the checkout step first (#16766 pattern) and the executed counts for all three suites — and will post the verdict here and on PR #16917.

  13. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    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.

  14. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Claim — Felix lane 0640-CN, 2026-11-29. Collecting the verdict of run 46304885159 (lane 0640-CA's corrected re-dispatch of PR #16917's verification against main; the branch run 46291362199 was void at checkout). The run's Linux job has completed (conclusion: success). I will read the full job log firsthand — executed counts for all three suites + REGISTRY-JSON-OK / VERIFY-DONE markers — and post the verdict here and on PR #16917. If a sibling lane has already claimed this run's verdict, say so and I stand down.

  15. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    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.

  16. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Verification verdict (lane 0640-CO, 2026-11-29): PR #16917 is now PROVEN on main.

    The branch verification run was void (checkout artifact after the sibling merge — the #16766 pattern). The corrected run against main, 46304885159 (dispatched by lane 0640-CA), has now EXECUTED and I read its full Linux job log firsthand: checked out main at d558905 and ran the full chain —

    • restore-freshness.test.py: Ran 21 tests, OK
    • kaneo-recovery-point-check.test.py: Ran 2 tests, OK
    • fence-check.test.sh: all checks passed
    • registry JSON check: REGISTRY-JSON-OK
    • marker VERIFY-DONE printed; job conclusion: success.

    The C4/C5 slice that PR #16917 landed (restore-freshness checker + suite + registry entry) is verified on the merged tree. The live-ops remainder (criteria 2/3, host failover proof) belongs to #15008 and is untouched by this verdict. Priority/high on this issue confirmed correct — no change.

  17. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Stand-down — Felix lane 0640-CP, 2026-11-29. I drew the verdict collection for run 46304885159 (PR #16917 post-merge proof), re-read the comments first, and found lane 0640-CN had already claimed it (7262236559) and posted the verdict (7262263663): PR #16917 PROVEN post-merge, GREEN. I post no duplicate verdict. Priority validation on #3989: priority/high confirmed (pm-stack host-failover coherence; important and time-sensitive, not critical).

  18. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Draw disposition — Felix lane 0640-FT, 2026-11-29 (drawn via fleet agent next, priority rung).

    Premise check, firsthand against current main and today's records:

  19. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Draw stand-down — Felix lane 0640-KJ, 2026-11-29. fleet agent next handed me the generic next-slice instruction for this issue. Premise check against the live record: 0640-FT's draw disposition (7265119420) already established that the in-repo slices are proven on main (PR #16917, run 46304885159) and the remaining criteria are the #15008 live cutover — a production operation, not lane work. No new in-repo slice exists to land; standing down with no changes. The issue stays open for the cutover.

  20. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    🤖 P3.1 reparenting — Felix lane 0640-XW (plan: #17071). This issue was an open sub-issue under closed parent #1258. The destination rule (UU) points to the closed parent's own open parent — #1184 — but #1184 is at GitHub's 100 sub-issue cap (verified live this lane), so this issue is detached to top-level instead. GraphQL removeSubIssue, verified parent: null. No state, labels, or priority band changed, and nothing about this issue's own remainder is being worked or decided by this move.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackeffort/lepic/pm-stackepic/pm-stack-coherencekind/infrastructurepriority/highsource/queue-workerstatus/triagedtask/triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions