Preserve state when a multi-target revocation fails #621

Closed
opened 2026-10-20 17:25:12 +02:00 by erikinkinen · 0 comments
Owner

A failed multi-target revocation can mutate authority state without a corresponding accepted event. apply_revoke_cap currently mutates the live EdgeStore in target order. If a later mutation fails, apply_event clears the returned delta but does not roll back earlier mutations.

Reproduction on the current source (the affected apply_event.cpp is unchanged from merged main): create two independent Read roots, set the second root's epoch to UINT64_MAX in a controlled test fixture, then use epoch_indirection to revoke both roots. The second bump fails, but the first root's epoch changes from 0 to 1. Engine time/history remain unchanged.

Observed standalone probe output, exit 1:

error=1 first_epoch=1 unchanged_time=1 unchanged_state=0

This violates failed-event state preservation and is also a prerequisite for safely propagating future checked instrumentation errors. No successful legacy event should change its behavior or serialized bytes.

  • Add regression fixtures proving failed later targets preserve complete state, event/time/identity cursors and result delta for epoch and eager mutations.
  • Stage revocation mutations and publish them only after the whole response and existing oracle checks succeed.
  • Validate successful behavior, legacy goldens and the full Debug/Release/sanitizer suites; document the failure boundary and preserve reproduction evidence.
A failed multi-target revocation can mutate authority state without a corresponding accepted event. `apply_revoke_cap` currently mutates the live EdgeStore in target order. If a later mutation fails, apply_event clears the returned delta but does not roll back earlier mutations. Reproduction on the current source (the affected apply_event.cpp is unchanged from merged main): create two independent Read roots, set the second root's epoch to UINT64_MAX in a controlled test fixture, then use epoch_indirection to revoke both roots. The second bump fails, but the first root's epoch changes from 0 to 1. Engine time/history remain unchanged. Observed standalone probe output, exit 1: ```text error=1 first_epoch=1 unchanged_time=1 unchanged_state=0 ``` This violates failed-event state preservation and is also a prerequisite for safely propagating future checked instrumentation errors. No successful legacy event should change its behavior or serialized bytes. - [x] Add regression fixtures proving failed later targets preserve complete state, event/time/identity cursors and result delta for epoch and eager mutations. - [x] Stage revocation mutations and publish them only after the whole response and existing oracle checks succeed. - [x] Validate successful behavior, legacy goldens and the full Debug/Release/sanitizer suites; document the failure boundary and preserve reproduction evidence.
erikinkinen added this to the Phase 2 milestone 2026-10-20 17:25:12 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erikinkinen/AES#621
No description provided.