Skip to content

Commit 61d6952

Browse files
committed
Specify operation lifecycle state machine
1 parent 6fef8af commit 61d6952

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

docs/VERSION_PLAN.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ continues past the relevant dependency point.
249249
| Missing-parent quotas could be bypassed with unauthenticated issuer claims. | Expanded `v0.21.0 - Missing Parent Reconciliation` with unauthenticated global/source quotas and authenticated per-issuer quotas only after issuer authentication. |
250250
| Repeated replay/provider/cache/receipt/orphan/quorum gap review needed one traceable closure line. | Confirmed the closure remains versioned in `v0.17.1`, `v0.21.0`, `v0.23.0`, `v0.28.1`, `v0.41.0`, and `v0.79.0`; no extra milestone is introduced for the duplicate review. |
251251
| Replay protection alone did not close the crash window between replay commit and consequential side effects. | Added `v0.23.1 - Operation Execution Lifecycle` with lifecycle states, profile-selected recovery models, duplicate/nonce conflict semantics, distinct replay/admission/effect receipts, and crash-after-every-transition fixtures. |
252+
| Operation lifecycle needed deterministic transitions and evidence history rather than a mutable status flag. | Expanded `v0.23.1 - Operation Execution Lifecycle` with canonical `OperationKey`, one-statement binding, effect-attempt identifiers, transition authority, CAS or transaction requirements, append-only lifecycle journal semantics, duplicate responses for every state, and transition/concurrency/reorg fixtures. |
252253

253254
## Phase 0: Published Foundation And Direction Pivot
254255

@@ -1182,9 +1183,31 @@ consequential effects.
11821183

11831184
Deliverables:
11841185

1186+
- canonical `OperationKey` definition scoped by realm, issuer, audience,
1187+
operation class, and nonce,
1188+
- stored binding from each `OperationKey` to exactly one `StatementId`,
1189+
- effect-attempt identifier for retryable execution and externally reconciled
1190+
carrier effects,
11851191
- operation lifecycle states: `Reserved`, `Authenticated`, `Admitted`,
11861192
`EffectPending`, `EffectObserved`, `EffectReceipted`, `Failed`, and
11871193
`Indeterminate`,
1194+
- deterministic transition table:
1195+
`Reserved` to `Authenticated`,
1196+
`Authenticated` to `Admitted`,
1197+
`Admitted` to `EffectPending`,
1198+
`EffectPending` to `EffectObserved`, `Failed`, or `Indeterminate`,
1199+
`EffectObserved` to `EffectReceipted`,
1200+
and `Indeterminate` to `EffectObserved`, `EffectReceipted`, or `Failed`,
1201+
- rejection of backward transitions and skipped transitions unless the
1202+
transition table explicitly permits them,
1203+
- transition authority rules naming which local component, profile adapter, or
1204+
carrier evidence verifier may record each transition,
1205+
- compare-and-swap revision or atomic transaction requirement for concurrent
1206+
transition recording,
1207+
- terminal and retryable state classification:
1208+
`EffectReceipted` terminal for the recorded attempt, `Failed` terminal only
1209+
for the recorded attempt and evidence scope, and `Indeterminate` retryable
1210+
only through profile-defined reconciliation,
11881211
- rule that BCX does not claim generic exactly-once execution across HTTP
11891212
services, databases, blockchains, or other native carriers,
11901213
- required profile recovery model selection:
@@ -1194,17 +1217,34 @@ Deliverables:
11941217
reconciliation using native binding and effect receipts,
11951218
- exact duplicate statement and nonce returns stored operation status or
11961219
receipt rather than re-executing,
1220+
- deterministic duplicate response for every lifecycle state, including
1221+
pending, observed, receipted, failed, and indeterminate operations,
11971222
- same nonce with a different statement commitment is a conflict rather than an
11981223
idempotent retry,
11991224
- distinct evidence rules for replay commitment, admission receipt, and effect
12001225
receipt,
1226+
- append-only operation transition journal or authenticated transition log;
1227+
current operation status is derived from that history and checkpoint or
1228+
profile finality policy rather than by overwriting evidence,
1229+
- effect evidence remains preserved when later reorg, rollback, compensation,
1230+
contradiction, or receipt invalidation evidence changes derived usability or
1231+
finality,
1232+
- `Failed` cannot imply that no effect occurred when the effect may have
1233+
happened but evidence is incomplete,
1234+
- multiple effect attempts remain separately identifiable and cannot inflate
1235+
assurance,
12011236
- missing effect evidence after admission produces `Indeterminate`, not a claim
12021237
that the effect failed or succeeded,
12031238
- profile vocabulary for at-most-once admission, idempotent execution, and
12041239
externally reconciled execution.
12051240

12061241
Verification:
12071242

1243+
- transition-table mutation tests,
1244+
- concurrent compare-and-swap or transaction conflict tests,
1245+
- duplicate delivery fixtures for every lifecycle state,
1246+
- effect-attempt substitution tests,
1247+
- observed-then-reorganized evidence fixtures,
12081248
- crash-after-every-lifecycle-transition fixtures,
12091249
- retry same-statement fixtures,
12101250
- retry mutated-statement same-nonce conflict fixtures,

docs/security-controls.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,19 @@ Required controls from the first production profile:
1515
- operation lifecycle tracking for reserved, authenticated, admitted,
1616
effect-pending, effect-observed, effect-receipted, failed, and indeterminate
1717
states,
18+
- canonical operation key, one-statement binding, effect-attempt identifiers,
19+
deterministic transition table, transition authority, and atomic revision or
20+
transaction checks for lifecycle updates,
21+
- append-only operation transition journal or authenticated transition log with
22+
derived current status,
23+
- preserved effect evidence when later reorg, rollback, compensation,
24+
contradiction, or receipt invalidation evidence changes derived finality,
1825
- profile-selected recovery model for replay/effect crash windows: atomic local
1926
transaction, durable journal/outbox, native carrier idempotency key, or
2027
external effect reconciliation,
2128
- duplicate statement and nonce returning stored operation status or receipt
2229
without re-execution,
30+
- deterministic duplicate response for every lifecycle state,
2331
- same nonce with different statement commitment treated as conflict,
2432
- no generic exactly-once execution claim across native carriers,
2533
- proof-of-possession capabilities,

docs/threat-model.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ internal motive.
3333
- Replay-store poisoning before authentication.
3434
- Crash windows between replay commitment, admission, native side effects, and
3535
effect receipts.
36+
- Concurrent, skipped, backward, or unauthorized lifecycle transitions.
37+
- Lost lifecycle history after effect evidence is reorged, contradicted,
38+
compensated, rolled back, or invalidated.
3639
- Stale contextual verification-cache reuse.
3740
- Unauthenticated orphan-quota bypass.
3841

@@ -52,6 +55,7 @@ internal motive.
5255
primitive provider through `v1.0.0`.
5356
- Guaranteeing generic exactly-once execution across HTTP services, databases,
5457
blockchains, or other native carriers.
58+
- Treating a mutable operation status alone as complete evidence history.
5559

5660
## Security Claims
5761

@@ -80,6 +84,8 @@ BCX must not claim:
8084
unless local policy explicitly trusts that verifier role,
8185
- missing effect evidence after admission proves that the effect failed or
8286
succeeded.
87+
- later reorg, rollback, compensation, contradiction, or receipt invalidation
88+
evidence erases the earlier observation.
8389

8490
## Privacy Risks
8591

@@ -111,6 +117,7 @@ Every WHY query must be authenticated and bounded by:
111117
- receipt replay boundaries,
112118
- replay-store authentication-before-commit policy,
113119
- operation lifecycle and recovery-model policy,
120+
- append-only lifecycle journal and transition-authority policy,
114121
- cacheability-by-outcome policy,
115122
- unauthenticated source quota policy,
116123
- threshold quorum-intersection policy.

0 commit comments

Comments
 (0)