5.5 KiB
Continuity Action Envelope Proposal
Status: PROPOSED — not architecture authority
Task: ARCH-000001, revision 1
Base: 543b93105bacc8617ece73d9879410ffb4d1d586
Objective
Enable one explicit Creator-initiated Continuity state transition without allowing the UI, gateway, Commit Runtime, or another module to write Continuity canonical storage directly.
Required path:
Creator session → owner validation → live Authority validation → durable Commit → Executor → Continuity owner CAS → durable attempt/outcome → reconciliation
Observed architecture gaps
commit.ActionProposal.Targetis only awork.TaskTarget. It can express the live Work justification but cannot identify a Continuity subject, expected Prospective revision, or requested transition without conflating semantic identifiers.commit.authorized_actionspersists only action ID, intent ID, state, and revision. The immutable proposal, grant/scope evidence, operation subject, expected revision, and operation parameters are lost after restart.- Commit Runtime exposes authorization and terminal-attempt insertion, but no execution endpoint invokes
commitdomain.Executewith a production Executor. - The only Executor is the deterministic test adapter. There is no remote Continuity executor with idempotent delivery and read-only reconciliation.
- Continuity persistence uses an upsert. A mutation command needs an owner-local atomic compare-and-swap on ID, owner Principal, current state, and expected revision.
- Creator authentication is not consumed by Commit Runtime. Actor, Principal, and Grant must be constructed from a validated session/server policy, not accepted as trusted browser fields.
- Authority V1 validates an active grant and scope but does not constrain
CapabilityID + Operation. A non-empty arbitrary operation currently passes domain validation. - V1 does not specify which Prospective transition a Creator may request, what evidence is required, or whether the command changes only Prospective state or also Commitment state.
Proposed minimum contracts
Durable authorized envelope
Persist an immutable envelope before execution with:
AuthorizedActionID,ActionIntentID, Actor, Principal;- Authority grant ID and revision, Scope ID;
- Work justification target: Task ID, Goal ID, Scope ID, revision;
- operation capability and typed operation name;
- typed operation subject:
ProspectiveItemIDand expected Prospective revision; - requested target state and optional evidence reference;
- authorization time and envelope revision.
The Work target remains justification. The ProspectiveItem remains the operation subject. They must not reuse one identifier field.
Continuity owner command
Continuity Runtime should accept only an internal typed executor request containing the committed envelope identity and operation subject. The owner must:
- validate the permitted state transition in Continuity domain code;
- atomically update with
WHERE id = ? AND owner_principal_id = ? AND state = ? AND revision = ?; - increment revision exactly once;
- record or return an idempotency receipt keyed by
ActionIntentID; - return conflict for stale state/revision without mutation.
Executor and reconciliation
The isolated Commit Runtime owns a Continuity HTTP Executor adapter. A timeout records UNKNOWN_OUTCOME; it never blindly retries. Reconciliation performs a read-only receipt/result query by ActionIntentID and creates a new attempt record.
Creator command boundary
The public Creator command endpoint must:
- validate the bounded Creator session through Identity;
- derive Actor and Principal server-side;
- use a server-selected Grant policy;
- require an explicit Work justification target and its current revision;
- require the selected ProspectiveItem and current revision;
- never accept arbitrary capability or operation strings from the browser;
- return committed action/attempt identities and outcome state.
Required decisions before implementation
- First allowed transition. Choose exactly one:
DELIVERED → SATISFIEDwith an evidence reference (recommended);ARMED → SUPPRESSEDwith a cancellation reason, which requires new lifecycle semantics;- another explicitly specified transition.
- Commit durability shape. Approve a migration storing the full immutable authorized envelope and operation subject.
- Idempotency receipt ownership. Approve a Continuity-owned receipt keyed by
ActionIntentID, or specify another rebuild/reconciliation source. - Operation authorization. Define the allowed mapping between Creator grant class, capability, operation, and scope.
- Commitment interaction. State whether the first transition changes only
ProspectiveItemor also its parent Commitment. Cross-owner or multi-aggregate atomicity must not be implied.
Proposed implementation slices after acceptance
- Accepted ADR/registry-compatible contract decision and Tier E guardrail review.
- Commit envelope contract plus Commit-owned migration and restart recovery tests.
- Continuity transition command, CAS persistence, idempotency receipt, and owner tests.
- Commit Executor/reconciler adapter with injected timeout and no-blind-retry tests.
- Session-authenticated Creator command orchestration with revoked/stale/adversarial tests.
- Gateway allowlist and explicit confirmation UI.
Current terminal state
BLOCKED_BY_ARCHITECTURE_GAP for implementation of Creator mutation. Read-only Creator APIs and the deployed console remain valid and operational.