Skip to content

eval(dashboard): actions/comments stores — JSON files vs SQLite #1452

Closed

Description

@dezren39

Question from Drew (2026-10-27): the dashboard stores are JSON files (actions.json, comments.json in ~/pm-stack/aggregator) — should they be a database? Evaluate migrating the actions/comments stores to SQLite (bun:sqlite, built into the runtime — no new service) preserving today's semantics exactly: full append-only history, supersedes-never-delete undo, outcome/byRun write-backs, atomicity. Include: current file sizes + growth rate, the in-memory load-once behavior of ActionsStore (loads the file once per process; external changes invisible until restart — the API is the only writer today, so this is latent), corruption/recovery story, and a migration path that keeps the JSON files as an export. Deliverable: a short evaluation + recommendation on this issue; implement only on Drew's go.

Acceptance criteria

  • A short evaluation is posted on this issue comparing the JSON-file stores vs SQLite (bun:sqlite) on: current file sizes + growth rate, the load-once in-memory behavior and its external-change blindness, corruption/recovery story, and atomicity/history semantics (append-only history, supersedes-never-delete undo, outcome/byRun write-backs).
  • The evaluation ends with a clear recommendation; the JSON files remain exportable in any migration path.
  • No implementation is started without Drew's go (this issue is the evaluation only).

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    kind/questionQuestion or design decision to resolve
    priority/lowNice to have; do when convenient
    effort/sSmall: expected under 2 hours of work
    source/humanFiled directly by a human
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 27, 2026
  3. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet monitor intake pass (protocol §5) — this issue was filed today (2026-10-27) from Drew's dashboard/orchestration requests via the orchestration pass and had no priority/* label (and, where noted, no acceptance-criteria section).

    Live check: filed within the last hour; no merged PR or commit can have resolved it yet, and it is part of a deliberately filed set — not a duplicate. Cross-checked against the sibling filings from the same pass.

    Related: Related: #1450/#1451/#1446/#1456 all build on the same actions/comments stores — this evaluation's outcome affects their storage assumptions.

    Notes: Evaluation only; Drew asked the question, implementation is explicitly gated on his go.

    Risks: Risk: the load-once behavior means external edits are invisible until restart — latent today because the API is the only writer; any migration must preserve append-only history and supersedes-never-delete undo exactly.

    Suggested approach: Suggested approach: measure current sizes/growth from the live stores, write the comparison against the listed criteria, end with one recommendation.

    Labels normalized this pass: kind/question, priority/low, effort/s, status/needs-triage, source/human + meta/enriched.

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Oct 28, 2026
  5. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane D shift
    • Session / ID: queue task 2584
    • Found via: queue claim
    • Task: Triage / evaluation: dashboard actions/comments stores — JSON files vs SQLite (bun:sqlite). Verify current store code and runtime data on current main / laptop, post evaluation + recommendation. No implementation without Drew's go.
    • Expectation: effort s; done = evaluation posted on this issue with file sizes/growth, load-once behaviour, corruption/recovery, atomicity/history semantics, and a clear recommendation; follow-up routed only if warranted.
    • Links: n/a yet
  6. 6 remaining items

  7. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    What shipped: ActionsStore.doLoad / CommentsStore.doLoad now treat a missing file as the only silent empty start; an unparseable or wrongly-shaped store is quarantined to <file>.corrupt-<timestamp> (original bytes preserved, loud log naming the path), the store starts empty, and the next persist writes a fresh valid version:1 file without touching the quarantine. New test/store-corrupt.test.ts covers missing/corrupt/wrong-shape/valid for both stores.

    Verification: laptop bun test over store-corrupt + actions + slice3 + store-concurrency: 43 pass, 1 fail — the failure (actions.test.ts snooze-strip) is pre-existing on clean main (verified against an untouched main checkout) and already tracked as #1682; unrelated to this change. PR CI was queued/pending at handoff. user/review reviewed here first: the SQLite migration stays Drew's call and is explicitly out of scope in the PR.

  8. added
    queue/needs-reviewQueue task finished and is awaiting review
    and removed
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/sSmall: expected under 2 hours of workkind/questionQuestion or design decision to resolvemeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workpriority/lowNice to have; do when convenientqueue/needs-reviewQueue task finished and is awaiting reviewsource/humanFiled directly by a humanstatus:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions