Database tables for decisions, lessons and deploys
This page lists the columns of decisions, lessons, obligations, refused_pushes and deploys. Database tables says how to read the columns.
decisions
Section titled “decisions”The decision log, which holds what an agent or a person decided, why, and what else they weighed.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
task_id |
uuid |
references tasks |
run_id |
uuid |
optional; references runs |
stage |
text |
optional |
who |
text |
one of agent, person |
session_id |
uuid |
optional; references sessions |
event_id |
bigint |
optional; references events |
person_id |
uuid |
optional; references people |
what |
text |
|
why |
text |
|
alternatives |
jsonb |
default '[]' |
created_at |
timestamptz |
default clock_timestamp() |
Unique (event_id) where (event_id IS NOT NULL).
lessons
Section titled “lessons”A lesson the team learned. It starts written, and becomes enforced once it names the gate, lint rule or check that holds it.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
repo_id |
uuid |
optional; references repos |
rule |
text |
|
incident |
text |
|
evidence |
text |
default '' |
enforced_by |
text |
optional |
enforcement |
text |
optional; one of architecture, type, lint, test, doc |
proof |
text |
optional |
status |
text |
default 'written'; one of written, enforced, retired |
review_by |
date |
optional |
created_by |
uuid |
optional; references people |
created_at |
timestamptz |
default now() |
Check ((status <> 'enforced') OR ((enforced_by IS NOT NULL) AND (enforcement IS NOT NULL) AND (proof IS NOT NULL))).
obligations
Section titled “obligations”A promise made outside Agents, such as “the outcome will be posted here” on an issue. It closes only with proof of delivery or a person’s waiver by name.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
task_id |
uuid |
optional; references tasks |
run_id |
uuid |
optional; references runs |
repo_id |
uuid |
references repos |
promise |
text |
|
channel |
text |
one of forge_issue, forge_pull_request |
number |
integer |
|
target |
text |
|
proof |
text |
one of comment, pull_request, commit |
due_at |
timestamptz |
|
status |
text |
default 'open'; one of open, done, waived |
generation |
integer |
default 1 |
delivery |
jsonb |
optional |
delivery_event |
text |
optional; unique |
attempts |
integer |
default 0 |
retry_at |
timestamptz |
optional |
waived_by |
uuid |
optional; references people |
waive_reason |
text |
optional |
closed_at |
timestamptz |
optional |
created_at |
timestamptz |
default now() |
Unique (run_id, target) where (run_id IS NOT NULL). Check ((status = 'done') = (delivery IS NOT NULL)). Check ((status = 'waived') = (waive_reason IS NOT NULL)).
refused_pushes
Section titled “refused_pushes”Pushes the git proxy refused, which are a machine pushing anything but a task branch.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
instance_id |
uuid |
references instances |
repo_id |
uuid |
references repos |
refs |
text[] |
|
created_at |
timestamptz |
default clock_timestamp() |
deploys
Section titled “deploys”A deploy of a repo’s commit. The deployer carries it out, restarts the API, and rolls back by itself when the health check fails.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
repo_id |
uuid |
references repos |
run_id |
uuid |
optional; references runs |
commit |
text |
|
previous_commit |
text |
optional |
status |
text |
default 'requested'; one of requested, preparing, switching, checking, rolling_back, healthy, rolled_back, failed |
approved_by |
uuid |
references people |
log |
text |
default '' |
note |
text |
optional |
created_at |
timestamptz |
default now() |
started_at |
timestamptz |
optional |
ended_at |
timestamptz |
optional |