[T4/T6/T5] Budget + approvals bans + night DDL/runner + eval harness
This commit is contained in:
1 parent
73fd8d2557
commit
42ad47296b
7 files changed
+295
No files matched your search
@@ -0,0 +1,35 @@
|
||||
-- T6 night queue / journal (runbook v2.0)
|
||||
-- Schema: hub_core.agents.night_queue, night_journal
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS hub_core.agents.night_queue (
|
||||
id bigserial PRIMARY KEY,
|
||||
dedup_key text NOT NULL UNIQUE,
|
||||
task_id text,
|
||||
class text NOT NULL,
|
||||
payload jsonb NOT NULL DEFAULT '{}'::jsonb,
|
||||
status text NOT NULL DEFAULT 'pending'
|
||||
CHECK (status IN ('pending','running','done','blocked','failed')),
|
||||
budget_rub numeric(10,4) NOT NULL CHECK (budget_rub > 0),
|
||||
approved_by text,
|
||||
approved_at timestamptz,
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
started_at timestamptz,
|
||||
finished_at timestamptz
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS hub_core.agents.night_journal (
|
||||
id bigserial PRIMARY KEY,
|
||||
queue_id bigint,
|
||||
task_id text,
|
||||
class text NOT NULL,
|
||||
status text NOT NULL,
|
||||
tokens bigint DEFAULT 0,
|
||||
cost_rub numeric(10,4) DEFAULT 0,
|
||||
write_actions integer DEFAULT 0,
|
||||
secret_reads integer DEFAULT 0,
|
||||
error text,
|
||||
created_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
Reference in new issue
Block a user