Files
Agent-System/deploy/postgres/goose/00071_2026-09-25-context-conflict-adjudications.sql
T
weichen dc29b84cdf feat(ctx): inject cleaned project dialogue into squad and assistant
Add dialoguectx packaging, conflictresolve adjudication with HITL routing,
workspace context/dialogue/ injection (default on), and goose 00071.
2026-09-24 17:04:04 +00:00

23 lines
897 B
SQL

-- +goose Up
CREATE TABLE IF NOT EXISTS context_conflict_adjudications (
id BIGSERIAL PRIMARY KEY,
task_run_id TEXT NOT NULL DEFAULT '',
project_id BIGINT NOT NULL DEFAULT 0,
fact_key TEXT NOT NULL,
resolution TEXT NOT NULL DEFAULT '',
hitl_route TEXT NOT NULL DEFAULT '',
winning_value TEXT NOT NULL DEFAULT '',
decided_by TEXT NOT NULL DEFAULT 'rule',
evidence_digest TEXT NOT NULL DEFAULT '',
nonce TEXT NOT NULL DEFAULT '',
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
CONSTRAINT uq_cca_run_fact_nonce UNIQUE (task_run_id, fact_key, nonce)
);
CREATE INDEX IF NOT EXISTS idx_cca_project ON context_conflict_adjudications (project_id, created_at DESC);
CREATE INDEX IF NOT EXISTS idx_cca_run ON context_conflict_adjudications (task_run_id);
-- +goose Down
-- record retention: do not drop tables
SELECT 1;