Skip to content

fix: recover compensation runs after lost acknowledgements - #363

Merged
ovasylenko merged 7 commits into
mainfrom
review/compensation-request-recovery
Oct 27, 2026
Merged

ovasylenko merged 7 commits into
mainfrom
review/compensation-request-recovery

Conversation

@ovasylenko

@ovasylenko ovasylenko commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

A compensation creation response can be lost after the run is committed and its source fenced. Add an optional durable request UUID scoped to tenant and continuity: retries return the original run and saved plan with current progress, including completed outcomes. Recheck the exact intent after admission errors to recover concurrent winners and lost commit acknowledgements. Legacy callers can recover the active run through a tenant-scoped GET endpoint or orch8 execution compensation-active.

Share validated decoding between active and known-ID reads so inconsistent tenant, continuity, run ID, state or version fails closed. Preserve encrypted compensation parameters, strict tenant authorization and distinct-intent conflicts. Malformed request IDs and unknown fields are rejected before writing. OpenAPI exposes typed creation/recovery request, parameter and response schemas for SDK generators. No database schema or dependency changes.

Validation: 64 Rust tests (48 storage across plain/encrypted PostgreSQL and SQLite, 15 HTTP safety tests, one scoped identity unit test); all 129 invariant/compensation/runtime E2E cases and all 221 lifecycle/tenant-isolation cases on the isolated server and PostgreSQL; strict all-target Clippy across storage/engine/API/gRPC/CLI/mobile; formatting, typecheck and docs. The corrupt known-ID read regression failed on all four storage variants before the fix.

Builds on #362 and must merge after that source-fence prerequisite passes CI. Independent offline-owner acknowledgement, invocation-specific compensation inputs and acknowledged archival with retained receipts remain separate review work.

The complete API unit suite passes all 367 tests, including route inventory and generated recovery schemas; all 15 HTTP safety cases and strict all-target API lint pass on the API documentation repair.

The CI generated-client gate caught the expected OpenAPI fingerprint change. The representative Rust and JavaScript clients regenerate, compile/check and execute successfully; the regenerated contract fingerprint is updated and the complete generated-client gate passes locally.

@ovasylenko
ovasylenko merged commit 5da67ca into main Oct 27, 2026
25 checks passed
@ovasylenko
ovasylenko deleted the review/compensation-request-recovery branch October 27, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant