Skip to content

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

Open

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-workerFiled or worked by the queue/worker pilot
    priority/highImportant and time-sensitive
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    kind/infrastructureInfrastructure / host-portability work
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 1, 2026
  2. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    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/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 4, 2026
  6. 12 remaining items

  7. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  8. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  11. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-z
    • Session / ID: task 8946
    • Found via: queue claim
    • Task: execution lane is opencode — handed to the opencode claimant, which launches a session bound to task 8946 for slice 1 inventory + ownership map on issue impl(pm-stack): move stateful services off the laptop and prove host failover #3989
    • Expectation: claimant session drives task 8946 to its terminal state
    • Links: task 8946
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  13. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  14. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  15. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    Picked up as task 8946 by lane code-c (repo-queue worker) and handed off to the opencode execution lane per the execution-lane assignment for task 8946. The laptop claimant launches the bound opencode session for task 8946; this lane does not work issue #3989 directly. Note: task 8946 is at attempts 19/32; repeated handoffs — claimant throughput is the constraint.

  16. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  17. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  18. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  19. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: handed off
    task: 8946 (repo-health-code-pilot, worker repo-worker-code)
    session: ses_e5e5586f1beffetw9oVEKvILNf
    found via: queue claim; execution lane opencode
    launch: session created on the laptop OpenCode server at verified primary location /home/user/git/code, bound atomically before the prompt was sent.
    next: the bound session documents only the verified current-state ownership map for #3989 slice 1; no service moves, deployment changes, writer fencing, or backup/schema implementation. Unruled target/failover/RTO-RPO decisions remain open questions.
    links: task 8946 · issue #3989 · design #1258

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

Metadata

Metadata

Assignees

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/lLarge: multi-day or open-ended; expect staged check-inskind/infrastructureInfrastructure / host-portability workpriority/highImportant and time-sensitivequeue/claimedQueue worker lifecycle statesource/queue-workerFiled or worked by the queue/worker pilotstatus/in-progressQueue worker lifecycle statetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions