Phase 2: Preserve authority state on failed batch revocation #623
No reviewers
Labels
No labels
bug
cli
core
docs
event
experiment
figure
invariant
metrics
oracle
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
provenance
revocation
tests
workload
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erikinkinen/AES!623
Loading…
Reference in a new issue
No description provided.
Delete branch "phase2/bug-621-atomic-revocation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task
Closes #621.
Summary
A failed multi-target epoch revocation could increment an earlier target and then fail on a later target at the u64 epoch limit. No event or delta was recorded, leaving authority changed outside the event history. Stage the complete revocation response and publish it only after every mutation and existing postcondition succeeds.
Scope
Included
Explicitly excluded
Design intent
The staged result reuses the one store copy previously needed for the pre-response snapshot. An error discards the candidate; the existing dispatcher clears partial result fields and Engine records no event. A successful response publishes once with its normal event/time semantics.
Phase discipline
This repairs a preexisting failure-atomicity defect discovered while preparing Phase 2 measured mutations. Successful historical outputs remain exact compatibility fixtures.
Verification
The regression test failed on the original code with
later epoch overflow mutated state without an accepted eventand passes after the fix. All 49 tests pass at this exact source commit in Debug, Release and Clang 22 ASan/UBSan, including all 31 archived legacy cases. The fixtures cover both selector orders, all three mutation policies with a later invalid target, a duplicate deletion target and the largest successful epoch increment. Complete snapshots and the separate GrantId cursor remain unchanged across every failed response. All hooks pass.Reproduction, before/after logs and full-suite evidence are attached to the issue. All eight exact-head Forgejo checks are required before checklist update and merge.