Repository navigation
Open
1 / 41 of 4 issues completedOpen
1 / 41 of 4 issues completed
Copy link
Labels
design/pm-data-migrationsDesign: pm-data-migrations - all issues of this effort carry itepicMeta-issue grouping multiple items (org Project Type=Epic)epic/pm-stackReprioritization program epic (2026-11-12)kind/trackerTracking issue: closed when its children close, never triaged by coveragepriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus/triagedTriaged and routed (see agent note)task/triageQueue packet kind: verify, reproduce, and route this item
Description
Long-term tracker: migrate the pm stack into Supabase and refactor its parts into schemas for central management
Drew asked for this as the long-term tracking issue (2026-10-31). The pm stack (aggregator, fleet feed, dashboard, orchestration, dispatch, usage hub) grew up as local files and laptop-local stores. The direction, proven piece by piece on 2026-10-31, is: state lives in Supabase (muse-dev2) in domain-appropriate schemas, components read/write the database, and local files become caches or exports — never the only copy.
Where things stand (verified 2026-10-31)
Already Supabase-backed:
- Repo-queue backend (recovered onto muse-dev2 in the 2026-10-30 cutover; see Fleet queue unreachable: Supabase PostgREST 503 PGRST002 (schema cache) + 522, 2026-10-30 ~09:19 CDT #2767/fleet(queue): queue control plane down - PostgREST 400 then 503 PGRST002 / 521, verbs after claim blocked #2768).
- Session mirror (agent schema mirror tables).
- Usage snapshots / usage hub collectors (feat(usage-hub): v2 Supabase usage collector — Management API scope + muse-dev metrics #1050, feat(usage-hub): v2 collectors — Modal credits (monthly read) + Bitwarden SM counts #1111).
- Domain event streams: ainventory, engineering, finance, research, automation, home — tasks append typed events; orchestration-pass began appending material changes to automation.events on 2026-10-31.
Still local-only:
- Orchestrator working state: orchestration.json / orchestrator-state.json / orchestrator-log.md (goal workspace hidden_files) — the dashboard reads these files.
- Aggregator actions store + comments store (laptop-local) — Drew's dashboard triage actions and comments.
- Fleet-feed JSON pipeline (collector -> scp -> laptop aggregator serving JSON files).
- Backlog markdown files the orchestrator reads (backlog-*.md in the goal workspace).
Scope (phased, each phase its own implementation issue)
- Orchestration state: move tier/classification state + run log to Supabase tables (automation schema or a dedicated pm schema); orchestration.json becomes a generated export for the dashboard contract (impl(aggregator): slice 2 — mobile, needs-Drew/needs-orchestrator tiers, time-granular roadmap, session clarity #898 shape preserved).
- Aggregator stores: actions + comments into Supabase with the same apply/result semantics (design+impl(aggregator): triage actions on /attention - acknowledge, snooze, escalate, answer - orchestrator-mediated #1152/impl(aggregator): 'request status change' action on project/board cards - orchestrator applies it as single writer #1154/impl(aggregator): session actions from /sessions and /attention - poke, answer, stop - keeper/orchestrator-mediated #1156 contracts preserved); the laptop aggregator reads/writes the DB.
- Feed pipeline: fleet-feed snapshots land as DB rows first; the served JSON is derived, not transported.
- Backlogs/queues: backlog state derived from DB + GitHub instead of hand-maintained markdown (markdown becomes a view).
- Central management: one schema map (pm-stack/SHARED-SCHEMA-MAP.md, with the migration plan at pm-stack/SHARED-SCHEMA-MIGRATION-PLAN.md), one place to inspect/pause/repair every component's state.
Non-goals / constraints
- No big-bang rewrite: each phase keeps the current file-based path working until the DB path is verified, then flips.
- Dashboard contracts (impl(aggregator): slice 2 — mobile, needs-Drew/needs-orchestrator tiers, time-granular roadmap, session clarity #898 orchestration shape, actions/comments semantics) do not change shape — only their backing store.
- Single-writer rules stay: orchestrator is the only writer to the GitHub Project; the same discipline applies per table.
- Secrets by name only; muse-dev2 is canonical (old muse-dev is dead; pointer audit tracked in Fleet tooling hardcoded the old Supabase project ref/URL — audit for remaining hardcodes #2796).
Related: #2767, #2768, #2796, #898, #899, #910, #2155.
Phase implementation issues (filed 2026-11-03, task 8438):
- Phase 1 (orchestration state): pm stack → Supabase phase 1 (#3142): orchestration state into Supabase tables, orchestration.json becomes a generated export #5005
- Phase 2 (aggregator stores / shared tables): pm stack: centralize all service data as shared tables in one database schema #1744 (pilot area aggregator(dashboard): comment API accepts self-asserted author identities — anyone can post as Drew into the orchestrator/GitHub flow (PR #920) #941)
- Phase 3 (feed pipeline DB-first): pm stack → Supabase phase 3 (#3142): fleet-feed snapshots land as DB rows first, served JSON derived #5006
- Phase 4 (backlogs as a view): pm stack → Supabase phase 4 (#3142): backlog state derived from DB + GitHub, markdown becomes a view #5007
- Phase 5 (central management surface): pm stack → Supabase phase 5 (#3142): central management surface — inspect / pause / repair every component's state #5008
Acceptance criteria
- The change described in this issue is implemented on main (or, where this issue records a design decision, the decision is recorded on this thread and follow-on implementation issues are filed and linked from here).
- Verification names its oracle: tests, a reproduced-then-fixed check, or a linked PR/run demonstrating the behaviour described above.
- Any docs or book material this change affects is updated in the same change.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 4 sub-issues
Metadata
Metadata
Assignees
Labels
design/pm-data-migrationsDesign: pm-data-migrations - all issues of this effort carry itepicMeta-issue grouping multiple items (org Project Type=Epic)epic/pm-stackReprioritization program epic (2026-11-12)kind/trackerTracking issue: closed when its children close, never triaged by coveragepriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus/triagedTriaged and routed (see agent note)task/triageQueue packet kind: verify, reproduce, and route this item
Activity
dezren39 commentedon Oct 31, 2026
Direction from Drew (2026-10-31, main chat, deciding #941): this migration starts NOW and starts in Supabase. Order of work:
No big-bang change; this note only fixes the starting point and the order: Supabase first, comments/actions + identity first, rest of the tables after.
27 remaining items
dezren39 commentedon Nov 17, 2026
🤖 Agent note · done (triaged)
triaged: the epic's triage of record stands and its remainder is already tracked by its own child issues.developing-today-fleet commentedon Nov 26, 2026
state: triaged — epic live, stays open as tracker
lane: oc-code-02, task 24897
Fresh verification 2026-11-26: #3142 OPEN (epic, epic/pm-stack), correctly structured. Phase states re-checked live:
No new packet from the epic itself (standing rule, triages 8194/12098/18249/19796): phases re-enter coverage individually. No follow-on packet.
developing-today-fleet commentedon Nov 27, 2026
🤖 Agent note · done (triaged)
dezren39 commentedon Nov 29, 2026
🤖 Agent note · census 2026-11-29 (lane CEN-C03)
Census verified: long-term tracker with a phased scope; each phase carries its own implementation issue (#5006/#5007/#5008 for phases 3–5). Blocker: none — phases proceed independently. Labels: added priority/low (none existed) — a long-horizon tracker; its phases carry their own priorities.
developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix): full recheck of this issue (body, all 11 comments, labels, dependency edges).
STRENGTHS: A correctly structured long-term epic: phased scope with each phase becoming its own implementation issue, non-goals stated (no big-bang rewrite; file path stays live until the DB path is verified), and a verified 2026-10-31 baseline of what was already Supabase-backed vs still local-only. Phase states were re-verified live as recently as 2026-11-26: Phase 1 #5005 CLOSED; Phase 2 #1744, Phase 3 #5006, Phase 4 #5007, Phase 5 #5008 OPEN.
GAPS: (1) The epic carried NO priority label at all — invisible to the priority draw. (2) Direction drift a cold reader must know: the 2026-11-26 owner ruling (Cloudflare-first programme, #14866) retargets fleet state to Cloudflare/D1, and parts of this epic's surface have already moved that way (the alerts/decision ledgers are D1-backed under #14968). The body's "state lives in Supabase" framing is therefore partially superseded; the phase children, not this epic, are where the per-store target (Supabase vs D1) now has to be reconciled.
FIXES I APPLIED: Added priority/normal (tracker band: the children carry their own priorities; the epic itself is the default band) and kind/tracker (closed when its children close). No blocker edges — an epic is not blocked by its children; it aggregates them.
REMAINS: Nothing for a human today. Whoever next works a phase child (#1744 / #5006 / #5007 / #5008) should state the child's target store against the #14866 ruling in that child's issue, so this epic's close-out can be an honest per-phase audit.
developing-today-fleet commentedon Nov 29, 2026
Priority validation 2026-11-29 (Felix): priority/normal → priority/low — restoring today's per-issue census judgment (long-horizon tracker; its phases carry their own priorities), which the bulk sweep labelled over and then resolved the wrong way.
developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Wave-2 census pass (group code-01409-03205): rechecked live state, body, labels and recent comments firsthand via
fleet ghimmediately before editing.A 2026-11-29 census note from another lane (CEN-*/Felix) already exists on this issue — skimmed, not duplicated; this note records only the residual verdict and any residual fixes.
Strengths: detailed body (3215 chars) with context a picker-up can start from; single taxonomy priority band (priority/low) — verified against live labels; kind label present (kind/tracker).
Gaps found: no acceptance-criteria section in the body.
Actions taken this pass: labels: +['status/triaged'] -[]; body: appended section(s) — ## Acceptance criteria.
Priority: priority/low — checked against content, unchanged (no reprioritization). No closing keywords used; issue left open.