commentary


Description

{“what”:“AI-generated textual notes associated with one of three entity types.”,“why”:“Without it, there is no record of machine-written observations for these entities.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:52.893241918+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id serial 10 √ nextval('commentary_id_seq'::regclass)

{“what”:“Unique integer identifier for each commentary row.”,“why”:“Without it, rows cannot be referenced or updated individually.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:52.918895351+00:00”}

profile_id int4 10 √ null
profiles.id commentary_profile_id_fkey R

{“what”:“ID of the profile this commentary is about, if any.”,“why”:“Without it, commentary cannot be linked to a specific profile when applicable.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:52.934896531+00:00”}

contact_id int4 10 √ null
contacts.id commentary_contact_id_fkey R

{“what”:“ID of the contact this commentary is about, if any.”,“why”:“Without it, commentary cannot be linked to a specific contact when applicable.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:52.944167015+00:00”}

event_card_id int4 10 √ null
event_cards.id commentary_event_card_id_fkey R

{“what”:“ID of the event card this commentary is about, if any.”,“why”:“Without it, commentary cannot be linked to a specific event card when applicable.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:52.961763198+00:00”}

commentary_type text 2147483647 null

{“what”:“Category of commentary: ‘profile’, ‘contact’, or ‘event’.”,“why”:“Without it, it is unclear which entity the commentary targets when multiple IDs are null.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:52.980390758+00:00”}

content text 2147483647 null

{“what”:“The full text of the generated commentary.”,“why”:“Without it, there is no commentary to display or analyze.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:52.996537786+00:00”}

model text 2147483647 null

{“what”:“Name or version of the AI model that produced the content.”,“why”:“Without it, provenance and reproducibility of generated text are lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:53.014003535+00:00”}

prompt_hash text 2147483647 √ null

{“what”:“Hash of the prompt used to generate this commentary.”,“why”:“Without it, duplicate or near-duplicate prompts cannot be detected.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:53.032214335+00:00”}

generated_at timestamptz 35,6 √ now()

{“what”:“UTC timestamp when the commentary was generated.”,“why”:“Without it, the age and ordering of commentary entries are unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:53.045360468+00:00”}

stale_after timestamptz 35,6 √ null

{“what”:“UTC timestamp after which this commentary is considered outdated.”,“why”:“Without it, there is no signal to refresh or discard old commentary.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:53.056461058+00:00”}

Indexes

Constraint Name Type Sort Column(s)
commentary_pkey Primary key Asc id
idx_commentary_contact Performance Asc contact_id
idx_commentary_profile Performance Asc profile_id
idx_commentary_type Performance Asc commentary_type

Check Constraints

Constraint Name Constraint
commentary_commentary_type_check (commentary_type = ANY (ARRAY['surprise'::text, 'relational'::text, 'warning'::text, 'connection'::text, 'approach'::text]))

Relationships