Skip to content

Database tables for policies and evidence

This page lists the columns of policies, evidence, findings and verdicts. Database tables says how to read the columns.

The rules every change to a repo must pass. Each edit is a new version, and each piece of evidence records the version that judged it.

Column Type Notes
id uuid key
team_id uuid references teams
name text
version integer
rules jsonb
created_by uuid optional; references people
created_at timestamptz default now()

Unique (team_id, name, version). Check (version > 0).

What the runner saw, with one row for each gate for each commit. Only server code writes these rows.

Column Type Notes
id uuid key
team_id uuid references teams
run_id uuid references runs
run_stage_id uuid optional; references run_stages
policy_id uuid references policies
commit text
base text
gate text
status text one of pass, fail, needs_owner
summary text
detail jsonb default '{}'
build jsonb
created_at timestamptz default clock_timestamp()

What a reviewer or a verifier found, and what became of it. A finding is open until the same reviewer’s next round. Then it is fixed, or repeated by a new row. Only the repo’s owner overrules one.

Column Type Notes
id uuid key
team_id uuid references teams
run_id uuid references runs
run_stage_id uuid optional; references run_stages
stage text
round integer
commit text
agent_id uuid optional; references agents
model text
rule text
path text optional
line integer optional
body text
blocking boolean
topic text optional; one of security, auth, billing, data, migrations, concurrency
status text default 'open'; one of open, fixed, repeated, overruled
decided_by uuid optional; references people
decided_at timestamptz optional
created_at timestamptz default clock_timestamp()

Check ((status = 'overruled') = (decided_at IS NOT NULL)). Check (round > 0).

A verifier’s verdict on a change, from an agent that did not write it, kept by pull request and head commit. A new head voids a verdict unless the change’s patch id is the same.

Column Type Notes
id uuid key
team_id uuid references teams
run_id uuid references runs
run_stage_id uuid optional; references run_stages
repo_id uuid references repos
pull_request integer optional
head text
base text
patch_id text
verdict text one of live-ui-verified, unit-test-verified, type-check-only, verifier-blocked, verifier-failed
agent_id uuid optional; references agents
model text
ran jsonb default '[]'
summary text
build jsonb
accepted_by uuid optional; references people
accepted_at timestamptz optional
voided_at timestamptz optional
created_at timestamptz default clock_timestamp()