You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
design: move agent append streams (agent.events, agent.quota_records) from Supabase to Turso staging #5690
Design scope only — no data moves in this issue's first pass.
What moves
From: Supabase (muse-dev2) agent.events (158,802 live rows, 65.5 MB) and agent.quota_records (8,163 live rows, 3.9 MB)
To: Turso, staging tier (per §4 of the design doc), partitioned by day/work unit
Why
Both are append-only ledgers: in the stats window since 2026-10-29, agent.events shows 159,546 inserts / 0 updates / 3 deletes and quota_records is insert-only periodic plan/quota snapshots with a jsonb payload. The Scaler-era revision (§7 Phase A, §9.2) names exactly this shape — high-write append ledgers — as Turso staging-tier natives. Neither needs cross-row transactions or FK integrity.
Design doc: §9 of doc/2026-11-04T21-27-34Z_design_atlas_scaler_revision/ (PR #5667, addendum PR #5689).
Risks
agent.events is the heaviest-read table in the project (54M cumulative index scans since 2026-10-29) — its consumers are NOT yet audited; a blind move breaks whatever reads it (queue observability is the suspected reader).
Writers are live fleet systems (queue-broker path); dual-write cutover must not lose or reorder events.
quota_records.payload is jsonb — Turso side needs a JSON-column convention consistent with the staging schema versioning rule (§4.1).
Sketch of steps
Consumer audit: enumerate every reader/writer of both tables (code search + pg_stat_statements).
Define the staging-tier tables under the versioned staging schema; decide retention (events are a ledger — propose a rolling window with cold export).
Dual-write from the producers, backfill, compare counts/checksums per day partition.
Flip readers, observe one full fleet cycle, then stop the Postgres writes; keep the Postgres tables read-only for one retention window before any drop decision (separate approval).
Task 10126 (lane code-s) claimed and assigned to the opencode execution lane. Handed off to the opencode claimant — the bound session drives this task to its terminal state. Parked by this lane per the handoff protocol.
Terminal outcome: triaged. The substantive triage verdict already posted on this issue at 2026-11-08T09:56Z stands — this note records the terminal state and re-verifies it fresh rather than re-triage from scratch (resume-don't-restart).
The Turso sink is live and growing: events in fleet-queue held 61,755 rows, oldest 2026-11-07T05:07:08Z, newest 2026-11-08T19:40:51Z — 30,359 rows at the 09:54Z verdict, so ~31k rows appended in ~10h. The sink is running in production.
What remains is unchanged and gated: C4 (historical export at a watermark) needs a green PG window or a verified backup restore, and the PG-side decommission decisions are Drew's call after C4 verifies (doc §"What remains gated on PG recovery").
Why no new packet and no user/escalated: the remaining gate is infrastructure availability (PG recovery) plus a decision already recorded in the design doc — neither is a fresh Drew escalation, and no queue task can advance either. Filing a triage or fix packet would duplicate work already built and running.
Activity
docs: link the §9 migration design issues (#5690, #5691, #5692, #5693, …
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 5, 2026
Task 10126 (lane code-s) claimed and assigned to the opencode execution lane. Handed off to the opencode claimant — the bound session drives this task to its terminal state. Parked by this lane per the handoff protocol.
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
186 remaining items
dezren39 commentedon Nov 8, 2026
🤖 Agent note · handed off
opencodedeveloping-today commentedon Nov 8, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 8, 2026
🤖 Agent note · handed off
opencodedezren39 commentedon Nov 8, 2026
🤖 Agent note · triaged (terminal)
c8b9355e-319a-4640-8096-7ad19480d151ses_e5e43533e9fffeelOYYBeNDjQorepo-queue claimTerminal outcome:
triaged. The substantive triage verdict already posted on this issue at 2026-11-08T09:56Z stands — this note records the terminal state and re-verifies it fresh rather than re-triage from scratch (resume-don't-restart).Fresh re-verification (2026-11-08 19:41Z):
main:doc/fleet/agent-events-turso.md.eventsinfleet-queueheld 61,755 rows, oldest2026-11-07T05:07:08Z, newest2026-11-08T19:40:51Z— 30,359 rows at the 09:54Z verdict, so ~31k rows appended in ~10h. The sink is running in production.Why no new packet and no
user/escalated: the remaining gate is infrastructure availability (PG recovery) plus a decision already recorded in the design doc — neither is a fresh Drew escalation, and no queue task can advance either. Filing a triage or fix packet would duplicate work already built and running.Labels: all
status/*,queue/*,work/*labels removed;task/triage(issue type) retained.dezren39 commentedon Nov 9, 2026
🤖 Agent note · picked up
dezren39 commentedon Nov 9, 2026
🤖 Agent note · done (already satisfied)