Skip to content

Long-term: migrate the pm stack into Supabase — refactor component state into schemas for central management #3142

Open
1 of 4 issues completed

Description

@dezren39

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:

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)

  1. 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).
  2. 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.
  3. Feed pipeline: fleet-feed snapshots land as DB rows first; the served JSON is derived, not transported.
  4. Backlogs/queues: backlog state derived from DB + GitHub instead of hand-maintained markdown (markdown becomes a view).
  5. 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

Related: #2767, #2768, #2796, #898, #899, #910, #2155.

Phase implementation issues (filed 2026-11-03, task 8438):

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

Sub-issues

1 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    epic
    on Oct 31, 2026
  2. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    Direction from Drew (2026-10-31, main chat, deciding #941): this migration starts NOW and starts in Supabase. Order of work:

    1. First slice: the aggregator's identity/provenance + comments/actions data goes into Supabase (muse-dev2) as part of the aggregator(dashboard): comment API accepts self-asserted author identities — anyone can post as Drew into the orchestrator/GitHub flow (PR #920) #941 fix (accept + attribute design: tailscale identity/IP/client details stamped server-side; operator tokens + login session foundation stored there).
    2. Then move the rest of the aggregator's tables after, in the phases this issue already lays out — the comments/actions migration is the pilot that proves the pattern (single-writer rules and the impl(aggregator): slice 2 — mobile, needs-Drew/needs-orchestrator tiers, time-granular roadmap, session clarity #898 dashboard contract shape still hold).

    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.

  3. added
    queue/queued
    source/creator
    status/needs-triage
    task/triage
    work/assigned
    queue/claimed
    status/in-progress
    queue/parked
    status/parked
    and removed
    status/in-progress
    queue/claimed
    status/needs-triage
    on Nov 3, 2026
  4. 27 remaining items

  5. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triaged)

  6. removed their assignment
    on Nov 20, 2026
  7. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    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.

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

    @developing-today-fleet
    Contributor

    🤖 Agent note · done (triaged)

  9. added
    priority/low
    on Nov 29, 2026
  10. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    🤖 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.

  11. added
    kind/tracker
    priority/normal
    on Nov 29, 2026
  12. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    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.

  13. added
    priority/low
    and removed
    priority/low
    priority/normal
    on Nov 29, 2026
  14. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    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.

  15. added
    status/triaged
    on Nov 29, 2026
  16. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Wave-2 census pass (group code-01409-03205): rechecked live state, body, labels and recent comments firsthand via fleet gh immediately 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.

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

    design/pm-data-migrationsepicepic/pm-stackkind/trackerpriority/lowsource/creatorstatus/triagedtask/triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions