0048 option C: purge the machine tables — migration 0055 + delete every run read path #126
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "glen/0048-machines-purge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements approved doc 0048, option C — the machines purge. Contains a destructive migration (0055); it runs on deploy.
What it does
0055_machines_purge.sql: deletes the 12 run conversations (all 2026-10-10 e2e artifacts — the doc's live-DB evidence) with every dependent row across all 11 FK/linkage tables, sweeps ghostmr_…stage sessions from harness_events/harness_runs, and dropsmachine_runs+machine_stage_runs./r/[runId]view + run GET API +db/machines.tsdeleted; run arms removed from attention (unread is message-based only), organize (purge walk, runStatus/runParent maps), sandboxes/sandbox-view (run lease arm, run sandbox links), reaper (LIVE_STATUSES), child-status (mr_→ not-found), inspect (mr_targets, dead stage-strip), conversation-href, sidebar-tree, page-context, preview-list, agent-cards; tool descriptions dropmr_mentions; AGENTS.md's four machine-era notes rewritten.Verification
FOREIGN KEYdeclaration, exercisedsandbox_attachmentsseparately). Both: zero tables left, zero orphans, cleanPRAGMA foreign_key_check, innocent chats untouched.OR session_id GLOB 'mr_*'(GLOB's_is literal) and re-proven with a ghost-session test db. Remaining nits are inert historical-render arms (old transcripts'machinewake chips), kept deliberately.Deploy note: migration 0055 runs on merge via the Forgejo workflow — irreversible, but the 0048 doc records what's lost (12 e2e runs; the one real conversation was "should a solo developer self-host…", one question and answer). Backups exist in
data/backupsper the reaper's schedule if you ever want the raw rows.Implemented by claude (first half) + in-thread (migration, remaining cuts, review fixes); reviewed by a fresh child thread with an independent migration proof.