black homelan is gone; prod target is the DO backend droplet (lilith-store-backend, 209.38.51.98 / wg 10.9.0.5) where mac-sync-server already runs. Fix black:2546x DB-host refs in comments/migrations. GPU is on-demand + queue-driven: hold warm while backlog is deep, release on idle grace (not strictly per-tick). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
20 lines
960 B
SQL
20 lines
960 B
SQL
-- prospector service — runner audit trail (own DB, the DO backend droplet (lilith-store-backend, wg 10.9.0.5)).
|
|
|
|
CREATE TABLE IF NOT EXISTS prospect_drafts (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
handle TEXT NOT NULL,
|
|
person_id UUID,
|
|
channel TEXT,
|
|
inbound_text TEXT,
|
|
classification TEXT,
|
|
template_key TEXT,
|
|
outcome TEXT NOT NULL, -- 'send' | 'hold'
|
|
hold_reason TEXT, -- state:<kind> | <gate-2 hold> | 'paused' | 'error'
|
|
evidence TEXT,
|
|
body TEXT,
|
|
mode TEXT NOT NULL, -- kill-switch mode at decision time
|
|
macsync_outbox_id TEXT,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
CREATE INDEX IF NOT EXISTS idx_prospect_drafts_created ON prospect_drafts(created_at DESC);
|
|
CREATE INDEX IF NOT EXISTS idx_prospect_drafts_outcome ON prospect_drafts(outcome, created_at DESC);
|