wip(workflows): bind runs to signed revisions

Checkpoint run-level revision persistence before wiring every execution and resume path.

Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>

Signed-off-by: loganj <loganj@squareup.com>
This commit is contained in:
Logan Johnson
2026-08-24 20:35:47 -04:00
parent 76f879be91
commit e8ec3c8b4d
6 changed files with 44 additions and 11 deletions

View File

@@ -393,6 +393,9 @@ CREATE TABLE workflow_runs (
community_id UUID NOT NULL REFERENCES communities(id),
id UUID NOT NULL DEFAULT gen_random_uuid(),
workflow_id UUID NOT NULL,
definition_event_id BYTEA CHECK (
definition_event_id IS NULL OR octet_length(definition_event_id) = 32
),
status run_status NOT NULL DEFAULT 'pending',
trigger_event_id BYTEA,
current_step INT NOT NULL DEFAULT 0,