mirror of
https://github.com/block/buzz.git
synced 2026-11-01 15:01:12 +00:00
feat(workflows): bind owner triggers to exact signed revisions
Reconcile the complete Node A observable behavior onto current main without carrying its historical merge topology. Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
This commit is contained in:
@@ -368,6 +368,11 @@ CREATE TABLE workflows (
|
||||
channel_id UUID,
|
||||
definition JSONB NOT NULL,
|
||||
definition_hash BYTEA NOT NULL,
|
||||
-- Exact owner-signed kind:30620 revision that materialized this row.
|
||||
-- Nullable only for pre-0033 rows; revision-bound execution fails closed until re-saved.
|
||||
definition_event_id BYTEA CHECK (
|
||||
definition_event_id IS NULL OR octet_length(definition_event_id) = 32
|
||||
),
|
||||
status workflow_status NOT NULL DEFAULT 'active',
|
||||
enabled BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
@@ -388,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,
|
||||
|
||||
Reference in New Issue
Block a user