GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — Move the PM aggregator's four local stores to Supabase muse-dev2 (#6815) by dezren39 · Pull Request #10722 · developing-today/code Conversation
|
| Store | file (default) |
supabase |
|---|---|---|
| Dashboard actions | actions.json |
public.agg_actions (contract 20261105_0001) |
| Activity ingestion | activity-ingestion.json |
public.agg_activity_ingestion + public.agg_activity_gaps |
| Usage snapshots | snapshots/usage-YYYY-MM.jsonl |
public.agg_usage_snapshots |
| AA last-good | aa-last-good.json |
public.agg_store_documents key aa-last-good |
20261116_0001_aggregator_remote_stores only adds the activity, snapshotparseStoreBackend() acceptsfile or supabase and throws otherwise; in supabase mode the localpm-aggregator.service remains the only writer of the aggregator stores;fleet-feed-collector.scripts/migrate-stores-to-supabase.ts is the idempotent import operatorpm-stack/aggregator/README.md ("Store backend").pm-dashboard-backup.sh exports the five tables as JSON into
supabase/agg_*.json whenever the deployed backend is supabase, recorded
as conditionally-required manifest members (required when the export ran,
optional otherwise). This is the restore source now that the local files are
a cache.
Both migrations were applied and the local data imported (idempotent):
actions=18, ingestion=3, gaps=1351, snapshots=18093, documents=1; read-back
through the new adapters returned the same counts. The deployed unit and
install.sh render PM_AGG_STORE_BACKEND=supabase; a post-deploy re-run of
the import closes writes made between import and cutover.
bunx tsc --noEmit clean.bun test test/store-remote-backends.test.ts — 14 pass (includesbun test test/supabase-export.test.ts — 20 pass; activity, config,store-concurrency, store-corrupt — 59 pass.bash pm-stack/shared-schema/test-migration.sh — full disposablebash nixos/home/pm-dashboard-backup*.test.sh — all 7 green, including thefile, fail-closed when psqltest/actions.test.ts fails the same 6 HTTP-boot cases at origin/main infreshness.json, notifications.jsonl, needs-drew.json, decisions.json,
decision-events*.jsonl, stack-health.json, item-history.jsonl still live
only as laptop-local files.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The dashboard actions, activity-ingestion checkpoints/gaps, usage snapshots and the collector's AA last-good payload were laptop-local JSON files that a lost laptop would have taken with them. This makes Supabase muse-dev2 their canonical store behind PM_AGG_STORE_BACKEND (file | supabase), consuming the #3142 schema contract instead of redesigning it: actions.json -> public.agg_actions (20261105_0001) activity-ingestion.json -> public.agg_activity_ingestion + _gaps snapshots/usage-*.jsonl -> public.agg_usage_snapshots aa-last-good.json -> public.agg_store_documents ('aa-last-good') The additive 20261116_0001 migration creates the activity, snapshot and document tables; agg_actions stays the #3142 contract. Exactly one backend is active: "file" remains the dev/test path and rollback target, "supabase" is the deployed backend, any other value refuses to start, and remote failures are fail-closed (never a silent local fallback). pm-aggregator.service stays the only writer of the aggregator stores; the collector records itself as fleet-feed-collector for its one document. Local copies are documented as a rebuildable cache: a fresh state dir boots empty and reconstructs from muse-dev2 (covered by the new backend tests). scripts/migrate-stores-to-supabase.ts is the idempotent import with a strict argv contract; cutover order and rollback are in the aggregator README. Backup/RPO for #1514: pm-dashboard-backup.sh now exports the five tables as JSON into supabase/agg_*.json whenever the deployed backend is supabase, and records them as conditionally-required manifest members. The sibling stores (freshness.json, notifications.jsonl, needs-drew.json, decisions.json, decision-events*.jsonl, stack-health.json, item-history.jsonl) are follow-on scope (#3989) and are unchanged here. Refs #6815
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.