feat: execute continuity satisfaction through commit
CI / test (push) Successful in 11s

This commit is contained in:
m
2026-08-16 16:19:23 +03:00
parent fe0b93739f
commit 4a165b5238
25 changed files with 1249 additions and 28 deletions
+45 -1
View File
@@ -82,7 +82,37 @@ CREATE TABLE IF NOT EXISTS commit.authorized_actions (
CREATE TABLE IF NOT EXISTS commit.action_attempts (
action_attempt_id TEXT PRIMARY KEY, authorized_action_id TEXT NOT NULL,
action_intent_id TEXT NOT NULL, state TEXT NOT NULL,
recorded_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
recorded_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
revision BIGINT NOT NULL DEFAULT 1,
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
CHECK (revision > 0)
);
CREATE TABLE IF NOT EXISTS commit.authorized_action_envelopes (
authorized_action_id TEXT PRIMARY KEY,
action_intent_id TEXT NOT NULL UNIQUE,
actor_id TEXT NOT NULL,
principal_id TEXT NOT NULL,
grant_id TEXT NOT NULL,
grant_revision BIGINT NOT NULL,
scope_id TEXT NOT NULL,
task_id TEXT NOT NULL,
goal_id TEXT NOT NULL,
task_scope_id TEXT NOT NULL,
task_revision BIGINT NOT NULL,
capability_id TEXT NOT NULL,
operation TEXT NOT NULL,
prospective_item_id TEXT NOT NULL,
expected_prospective_revision BIGINT NOT NULL,
prospective_from_state TEXT NOT NULL,
prospective_to_state TEXT NOT NULL,
evidence_ref TEXT NOT NULL,
proposal_state TEXT NOT NULL,
action_state TEXT NOT NULL,
authorized_at_unix_millis BIGINT NOT NULL,
envelope_revision BIGINT NOT NULL,
recorded_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
CHECK (grant_revision > 0), CHECK (task_revision > 0),
CHECK (authorized_at_unix_millis > 0), CHECK (envelope_revision = 1)
);
RESET ROLE;
@@ -142,5 +172,19 @@ CREATE TABLE IF NOT EXISTS continuity.prospective_items (
recorded_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
CHECK (revision > 0)
);
CREATE TABLE IF NOT EXISTS continuity.action_receipts (
action_intent_id TEXT PRIMARY KEY,
authorized_action_id TEXT NOT NULL,
owner_principal_id TEXT NOT NULL,
prospective_item_id TEXT NOT NULL,
expected_revision BIGINT NOT NULL,
from_state TEXT NOT NULL,
to_state TEXT NOT NULL,
evidence_ref TEXT NOT NULL,
result_state TEXT NOT NULL,
result_revision BIGINT NOT NULL,
recorded_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
CHECK (expected_revision > 0), CHECK (result_revision > expected_revision)
);
RESET ROLE;
COMMIT;