feat(bap): classify external outcomes for reconciliation - #228
feat(bap): classify external outcomes for reconciliation#228seonghobae wants to merge 2 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing this Draft as a proven duplicate of the earlier canonical BAP crash-recovery owner #214 rather than implementing a second competing outcome API. Fresh comparison on the common exact base By contrast this PR changes only No unique production behavior from #228 is being discarded: the distinct unknown-vs-explicit-reconciliation cause is already retained by |
Partial implementation of #200, stacked on exact current PR #211 head
6ce74587dcfeede71ad6ceea94fe5c72dc0f244a.Buyer/recovery gap
The BAP lifecycle already has explicit reconciliation/dead-letter states and exact idempotency receipts, but crash recovery still lacks a typed boundary that distinguishes a command known to have produced no external side effect, a command known to have produced an external side effect, an unknown outcome, and an explicitly reconciliation-required outcome. Without that distinction, a future durable runtime could accidentally retry a side effect or treat uncertainty as success.
Test-first state
Exact test-only head
09dfd50a02eb26896c7ac649a8a00a7a35d6bc4aadds focused regressions requiringBapExternalOutcome,BapRecoveryDirective,BapExternalOutcomeError, andBapTaskLifecycle::classify_external_outcome(...). Confirmed-no-side-effect must permit retry without lifecycle mutation; confirmed-side-effect must require post-condition verification without lifecycle mutation; unknown and explicit-reconciliation outcomes must require the existing explicit reconciliation transition while retaining their distinct cause; classification outsideRunningmust fail closed.The production API is intentionally absent on this head so CI should establish the missing boundary as RED before implementation.
Truth boundary
This slice will remain storage-neutral and authority-neutral. It will not attest whether a side effect occurred, persist recovery evidence, execute retries, resolve reconciliation, authenticate callers, or grant browser/network/model/secret authority. A trusted runtime must derive the external-outcome fact from reviewed evidence, durably preserve it, and separately execute the lifecycle transition or post-condition verification required by the typed directive.
No merge, approval, workflow, secret, ruleset, release, tag, or publish mutation is included.