GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — impl(pm-stack): move the aggregator laptop-local JSON stores to Supabase muse-dev2 (#3989 slice) · Issue #6815 · developing-today/code

impl(pm-stack): move the aggregator laptop-local JSON stores to Supabase muse-dev2 (#3989 slice) #6815

New issue
Copy link
New issue
Copy link
Closed
Closed
impl(pm-stack): move the aggregator laptop-local JSON stores to Supabase muse-dev2 (#3989 slice)#6815
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codedesign/pm-data-migrationsDesign: pm-data-migrations - all issues of this effort carry iteffort/mMedium: expected under 1 day of workepic/pm-stackReprioritization program epic (2026-11-12)kind/infrastructureInfrastructure / host-portability workmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilot
Milestone
PM stack coherence

Description

@developing-today
developing-today
bot
opened on Nov 7, 2026
Issue body actions

Slice of #3989, routed by lane code-n triage 2026-11-07 (see the ownership-map comment on #3989).

The aggregator still holds canonical mutable state as laptop-local JSON in ~/.local/state/pm-aggregator/ (actions.json, activity-ingestion.json, usage snapshot JSONL, aa-last-good.json). Drew's #1258 ruling (2026-11-03): all PM-stack state goes to Supabase muse-dev2; nothing is intentionally laptop-only (Q7: none). The alerts ledger and quota readings already live in muse-dev2 — this slice finishes the aggregator side, consuming #3142's schema contracts (do not redesign them).

Acceptance criteria:

  • Every aggregator-owned mutable store listed above reads/writes muse-dev2; no canonical record exists only in ~/.local/state/pm-aggregator (caches must be explicitly rebuildable-from-Supabase and documented as such).
  • One writer: pm-aggregator.service remains the only writer; the migration keeps the dev/test path working and is rollback-safe without dual writes.
  • Existing aggregator tests pass; a fresh-state boot against an empty local state dir reconstructs from muse-dev2.
  • RPO for these stores meets the design(pm-stack): durability & host independence — stack state in backed-up durable storage, stack survives the laptop being off #1258 target (15 min aggregator mutable state) via the pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 backup path.

Activity

Next
  1. developing-today
    added
    status/needs-triageNot yet triaged; needs a first look
    source/queue-workerFiled or worked by the queue/worker pilot
    queue/queuedHas a queued queue task
    kind/infrastructureInfrastructure / host-portability work
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 7, 2026
  2. dezren39
    added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    on Nov 7, 2026
  3. dezren39 commented on Nov 7, 2026

    @dezren39
    dezren39
    on Nov 7, 2026
    Member
    More actions

    Intake review

    • Agent: fleet monitor (repo-fleet-monitor), run 2026-11-07 04:12 CST — protocol §5 intake pass.
    • Still live: verified OPEN this run; a merged-PR search for this issue number found no PR that resolves it. Slice of issue impl(pm-stack): move stateful services off the laptop and prove host failover #3989; sibling slice issue impl(pm-stack): Kaneo/Grist/Pad canonical stores to Supabase-backed homes + cold-restore runbook and first laptop-off drill (#3989 slice) #6816; schema contracts are issue Long-term: migrate the pm stack into Supabase — refactor component state into schemas for central management #3142's — consume, do not redesign.
    • Notes: The aggregator is a live fleet surface; store migration must not lose the alerts ledger continuity the quota pipeline already has in muse-dev2.
    • Suggested approach: Move one store at a time behind the Long-term: migrate the pm stack into Supabase — refactor component state into schemas for central management #3142 contracts, verifying read/write parity per store before retiring its laptop-local file.
    • Labels normalized this pass: priority/high, effort/m + meta/enriched. Acceptance criteria were already present in the body.
  4. developing-today
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 8, 2026
  5. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    ContributorAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-b
    • Session / ID: task 11077
    • Found via: queue claim
    • Task: Triaging issue impl(pm-stack): move the aggregator laptop-local JSON stores to Supabase muse-dev2 (#3989 slice) #6815 (impl(pm-stack): move the aggregator laptop-local JSON stores to Supabase muse-dev2, impl(pm-stack): move stateful services off the laptop and prove host failover #3989 slice) at current main: verify the packet's claims against the live aggregator stores/code, scope the migration slice, and route the fix or record blockers.
    • Expectation: s — triage complete with evidence posted on issue impl(pm-stack): move the aggregator laptop-local JSON stores to Supabase muse-dev2 (#3989 slice) #6815 and a follow-up task enqueued if the slice stands.
    • Links: issue impl(pm-stack): move the aggregator laptop-local JSON stores to Supabase muse-dev2 (#3989 slice) #6815, parent issue impl(pm-stack): move stateful services off the laptop and prove host failover #3989
  6. 14 remaining items

  7. dezren39
    added
    queue/queuedHas a queued queue task
    and removed
    status/blockedQueue or user escalation state
    on Nov 13, 2026
  8. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    Member
    More actions

    Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15215 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.

  9. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    Member
    More actions

    agent-note:v1
    state: triaged

    • Agent: queue worker (repo-worker-code), lane code-c
    • Session / ID: task 15215 (triage, issue impl(pm-stack): move the aggregator laptop-local JSON stores to Supabase muse-dev2 (#3989 slice) #6815)
    • Found via: queue claim (code-only filter), lane assignment direct

    Triage verdict (fresh at origin/main 0f95933, 2026-11-14): CONFIRMED still live; coherent packet produced (this replaces packet-defective task 11416).

    • The four named stores (actions.json, activity-ingestion.json, usage snapshot JSONL, aa-last-good.json) still default to laptop-local files under ~/.local/state/pm-aggregator/ (pm-stack/aggregator/src/config.ts). Nothing has migrated them yet; no PR, no live fix task before this triage.
    • The migration is implementation, not design: src/supabase.ts exists and the alerts ledger + quota readings already live in muse-dev2; the storage contracts are recorded in pm-stack/SHARED-SCHEMA-MAP.md / SHARED-SCHEMA-MIGRATION-PLAN.md (Long-term: migrate the pm stack into Supabase — refactor component state into schemas for central management #3142, epic verified live and correctly structured 2026-11-08). The Long-term: migrate the pm stack into Supabase — refactor component state into schemas for central management #3142 Moves-3+ gate covers native service stores (Kaneo/Grist/Pad), not this aggregator Move-1 store group.
    • Scope discipline: more stores are laptop-local today than the issue listed in November (freshness, notifications, needs-drew, decisions, decision-events, stack-health, item-history). Those are impl(pm-stack): move stateful services off the laptop and prove host failover #3989 siblings — explicitly excluded from this slice so the packet stays bounded; the follow-on PR must name them as remaining scope.
    • Follow-on: queue task 16747 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:6815, priority 70) enqueued with per-store acceptance, the one-writer rule, env-configured backend with explicit dev/test fallback (no dual writes), and the fresh-state boot reconstruction test.
      Task 15215 completes as triaged naming task 16747.
  10. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    Member
    More actions

    Fleet conductor dispatch: repo-queue task 16747 claimed; worker session ses_e5e1c632445ffeQdUQ3Ny7DB6D in worktree fix-aggregator-stores-supabase on model opencode-route/workhorse. Scope: move actions.json, activity-ingestion.json, usage snapshot JSONL and aa-last-good.json from ~/.local/state/pm-aggregator/ to Supabase muse-dev2 per #3142 contracts; sibling stores excluded (owned by #3989). Worker will report checkpoint/PR/merge progress in the queue task and again in this issue. Note: two duplicate trial sessions for the same task were launched during dispatch and have been deleted; the bound session above is the single owner.

  11. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    Member
    More actions

    Conductor dispatch (2026-11-16T10:50Z) — task 16747 re-dispatched.

    • Session: ses_e5e1c077cd0ffeHAT1nsre7o73 (route workhorse, agent build)
    • Worktree: /home/user/git/fleet/16747-6815-aggregator-stores
    • Branch: queue/16747-6815-aggregator-stores off origin/main @ 0cd68b0
    • Queue: repo-health-code-pilot, task 16747, attempt 3 (prior session ses_e5e1c632445ffeQdUQ3Ny7DB6D failed with zero artifacts — this run starts clean)

    Scope is the four aggregator-owned stores only (actions.json, activity-ingestion.json, usage snapshot JSONL, aa-last-good.json) to muse-dev2; #3989 siblings stay out of scope.

  12. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    Member
    More actions

    RPO / #1514 backup note (implementation: PR #10722)

    Applied to muse-dev2 (previously no agg_% tables existed there):

    • 20261105_0001_action_event_store — public.agg_actions, public.shared_events (Long-term: migrate the pm stack into Supabase — refactor component state into schemas for central management #3142 contract, consumed as-is)
    • 20261116_0001_aggregator_remote_stores — public.agg_activity_ingestion, public.agg_activity_gaps, public.agg_usage_snapshots, public.agg_store_documents

    Import (bun run scripts/migrate-stores-to-supabase.ts, idempotent upserts):
    actions=18, ingestion=3, gaps=1351, snapshots=18093, documents=1 — read back through the new adapters with the same counts.

    RPO path. The four stores were the laptop's only copy, so a laptop loss was total loss. Current state:

    • canonical copy: Supabase muse-dev2 (PM_AGG_STORE_BACKEND=supabase in the unit and install.sh render; file remains the dev/test path and rollback target);
    • daily backup: pm-dashboard-backup.sh exports the five tables as JSON into supabase/agg_*.json in the same dated archive that already goes to local + R2 + Drive, records them as conditionally-required manifest members, and fails the run before any upload if the export ran but a member is missing;
    • local files under ~/.local/state/pm-aggregator/ are now documented as a rebuildable cache — a fresh state dir boots and reconstructs from muse-dev2 (covered by test/store-remote-backends.test.ts).

    Cutover order and the post-deploy re-run. DDL → import → deploy (PM_AGG_STORE_BACKEND=supabase) → re-run the import once after the deploy. The re-run is a no-op for rows already present and closes writes made between the import and the switch. Re-run:

    cd ~/git/code/pm-stack/aggregator && bun run scripts/migrate-stores-to-supabase.ts

    Rollback: set PM_AGG_STORE_BACKEND=file and restart; the file stores were never deleted. The new tables are additive and each down migration refuses to drop a non-empty table.

    Scope note: the sibling stores (freshness.json, notifications.jsonl, needs-drew.json, decisions.json, decision-events*.jsonl, stack-health.json, item-history.jsonl) are not in this change — they remain laptop-local and are follow-on scope (#3989).

  13. dezren39
    added a commit that references this issue on Nov 16, 2026

    Merge pull request #10722 from developing-today/queue/16747-6815-aggr…

    96afdb6
  14. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    Member
    More actions

    Agent note — task 16747 done: PR #10722 merged (lane code-d, 2026-11-16)

    State: done (fixed_merged)

    • PR Move the PM aggregator's four local stores to Supabase muse-dev2 (#6815) #10722 MERGED 2026-11-16T14:04:25Z, merge commit 96afdb6, supervised/merged by lane code-d under the standing merge criteria. The four named stores (actions, activity-ingestion, usage snapshots, aa-last-good) are canonical in Supabase muse-dev2 behind PM_AGG_STORE_BACKEND; exactly one active backend, no dual writes, fail-closed on remote failure; local files are a documented rebuildable cache; fresh-state boot reconstruction is tested.
    • Verification per PR Move the PM aggregator's four local stores to Supabase muse-dev2 (#6815) #10722 body: bunx tsc --noEmit clean; bun test test/store-remote-backends.test.ts 14 pass (incl. empty-state-dir reconstruction); test/supabase-export.test.ts 20 pass; test/actions.test.ts has 6 HTTP-boot failures proven identical at origin/main baseline (environmental, not this change). Migrations applied to muse-dev2 with read-back counts matching (actions=18, ingestion=3, gaps=1351, snapshots=18093, documents=1). Codex gate: zero reviews/review comments — no findings to disposition.
    • RPO / backup note for the pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 path: pm-dashboard-backup.sh now exports the five agg tables as JSON into supabase/agg_*.json whenever the deployed backend is supabase (conditionally-required manifest members) — that export is the restore source now that the local files are only a cache.
    • Follow-on scope (impl(pm-stack): move stateful services off the laptop and prove host failover #3989 siblings, NOT migrated here): freshness.json, notifications.jsonl, needs-drew.json, decisions.json, decision-events*.jsonl, stack-health.json, item-history.jsonl remain laptop-local.
    • Per PR Move the PM aggregator's four local stores to Supabase muse-dev2 (#6815) #10722 this issue stays open to carry the RPO note and follow-on scope.
  15. dezren39
    removed
    queue/queuedHas a queued queue task
    on Nov 16, 2026
  16. dezren39
    removed their assignment
    on Nov 20, 2026
  17. dezren39
    added a commit that references this issue on Nov 22, 2026

    feat(pm-stack): dashboard comments -> shared_comments (#1744 Move 1 s…

    8060953
  18. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    Member
    More actions

    Agent note — Lane CT done-check: #6815 closed as completed (archer, 2026-11-22)

    Premise check: the four named stores were migrated by PR #10722 (merged 2026-11-16, merge 96afdb66b1), but the issue stayed open "to carry the RPO note and follow-on scope". Since then the destination itself was superseded, and every acceptance criterion now verifies against current main + the live service:

    • Criterion 1 (canonical remote store; local files are a documented rebuildable cache): PR Move the PM aggregator's four local stores to Supabase muse-dev2 (#6815) #10722 moved actions / activity-ingestion / usage snapshots / aa-last-good to muse-dev2. PR Migrate remaining PM writers and backup wiring to Turso #11919 (merged 2026-11-18) migrated the remaining PM writers and backup wiring to Turso, and PR refactor: remove the remaining Supabase code paths; Turso is the only remote store #12156 (merged 2026-11-21, be0d2b9f34c) removed the remaining Supabase code paths — "Turso is the only remote store"; PR cold-store, deploy: stop reaching for the retired Supabase project #12005 stopped the deploy reaching for the retired Supabase project. Live check today: pm-aggregator.service is active/running with PM_AGG_STORE_BACKEND=turso.
    • Criterion 2 (one writer; dev/test path works; rollback-safe without dual writes): the live unit env carries PM_AGG_STORE_WRITER=pm-aggregator.service; install.sh on main renders the turso backend with PM_AGG_STORE_BACKEND=file documented as the rollback / dev-test path; the turso adapter fails closed without a client instead of falling back to a local file (test-pinned).
    • Criterion 3 (tests pass; fresh-state boot reconstructs from the remote): re-run today at origin/main 09d665fad13 in a clean laptop worktree: bun test test/store-remote-backends.test.ts → 20 pass / 0 fail, including "turso mode reconstructs from the remote and never creates the file" and "turso mode without a client fails closed instead of using a local file".
    • Criterion 4 (RPO via the pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 backup path): pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 is closed. nixos/home/pm-dashboard-backup.sh on main exports the five agg tables from Turso (turso/agg_actions.json, agg_activity_ingestion.json, agg_activity_gaps.json, agg_usage_snapshots.json, agg_store_documents.json) as conditionally-required manifest members and fails the run before any upload if the export ran but a member is missing; the canonical copy itself now lives off-laptop in Turso.

    Follow-on scope is NOT in this issue: the sibling stores (freshness.json, notifications.jsonl, needs-drew.json, decisions.json, decision-events*.jsonl, stack-health.json, item-history.jsonl) were explicitly carved out to parent #3989, which remains open and carries them; sibling slice #6816 (Kaneo/Grist/Pad canonical stores) is separate and still open.

    Closing as completed. The muse-dev2 wording in the title is historical: the stores did land there first (#10722) and were then carried to Turso with the rest of the PM stack (#11919 / #12156).

  19. dezren39
    closed this as completedon Nov 23, 2026
  20. dezren39
    added a commit that references this issue on Nov 24, 2026

    docs(pm-stack): reconcile ownership map to Turso reality + doc-rot gu…

    0bac0e2
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-stackpm-stack (Pad/Grist) in developing-today/codedesign/pm-data-migrationsDesign: pm-data-migrations - all issues of this effort carry iteffort/mMedium: expected under 1 day of workepic/pm-stackReprioritization program epic (2026-11-12)kind/infrastructureInfrastructure / host-portability workmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilot

    Type

    No type

    Projects

    No projects

      Milestone

      • PM stack coherenceNo due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.