Skip to content

Use durable single-item phases from Grant intake through delivery - #25

Merged
kentbull merged 4 commits into
masterfrom
refactor/durable-delivery-phases
Nov 1, 2026
Merged

kentbull merged 4 commits into
masterfrom
refactor/durable-delivery-phases

Conversation

@kentbull

@kentbull kentbull commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Replace batch readers, scheduling bookmarks and association-history scans with durable single-item phases from IPEX intake through delivery. Grant replay and verification persist attempts before processing, move missing evidence/RPC failures to timed waiting, and retain exhausted work for explicit operator retry. Completion requires active verification; one unfinished acceptance produces nonce ownership and its immutable delivery obligation atomically.

A narrow subclass of the pinned native Reger commits each accepted revocation handoff with KERIpy's TEL index. Retirement consumes that handoff only after committing application status and the outgoing event. This recovers both commit gaps without scanning completed associations or relying on transient cues. Native KERI validation and escrows remain authoritative.

Delete pending/acceptance/association batch APIs, notice paging, scan bookmarks and the in-memory retry calendar. Public stored status exposes waiting and dead letters; local retry commands resume corrected Grant, verification, acceptance or delivery work. Three-attempt budgets survive restart. This is a breaking storage layout: fresh stores, no migration, fallback or old-format reader.

Validation on acea6613f6add016fa129221910b579d745d3e78:

  • Fresh installed-wheel suite outside the checkout: 243 passed locally; final-head CI also passes all 243.
  • All four real witnessed IPEX/Anvil scenarios pass, including interrupted intake, delayed evidence across restart, delayed-anchor revocation and revocation during RPC.
  • Native rev/brv handoff rollback, retirement acknowledgement gaps, persistent retry budgets/deadlines, fairness and explicit operator recovery pass.
  • Final pinned paired qualification: passed, 76.48 seconds, with six witness listeners using the existing issuance profile. Lost ACK, independent restart, replacement, revocation, public Oracle progress and actual token balances remain asserted. Both process manifests are empty after shutdown.
  • Companion Oracle: 73 passed; Comply: 35 Forge tests passed.

The IPEX test now drives retry deadlines and progress assertions from one epoch plus the shared HIO clock across restart. This fixes scheduler catch-up racing a UTC cooldown without changing the ten-second assertions or three-attempt budget. Application timing remains UTC and survives restart.

Companions: Oracle #56 pins this exact producer; Comply #17 is merged. Review/merge Verifier before Oracle. No additional mutex, background synchronization, compatibility framework or architecture/docs checker is introduced.

Queue acceptance when verification completes, and queue delivery in the acceptance or retirement transaction. Resume the single active delivery after restart instead of scanning completed result and outbox history.

Bound webhook attempts, retain failed events in a dead-letter phase, and provide an explicit local retry command. Keep authentication, immutable event bytes and destination cooldown intact. This intentionally requires fresh application stores without migrations.

Focused persistence, delivery and acceptance checks passed, including atomic phase recovery and exhausted attempts. The full fresh installed-wheel suite is running for the coordinated Oracle and Comply review.
Record accepted revocation work in the same registry transaction as KERIpy's TEL index. Consume one handoff at a time, committing application retirement before acknowledging it, so restart recovery no longer scans association history or depends on transient cues.

The service owns a narrow Reger subclass against pinned GLEIF KERI 1.2.19. Focused tests cover both revocation variants, write rollback and the retirement acknowledgement gap; all four witnessed IPEX/Anvil scenarios passed.
Claim one Grant or verification attempt before processing, persist retry deadlines and finite budgets, and dead-letter exhausted work for explicit operator resumption. Replace acceptance pages with one unfinished obligation and stop missing or revoked evidence instead of revisiting it indefinitely.

Delete batch readers, scan bookmarks and the in-memory retry calendar. Completion requires active verification. Public stored status, retry commands, protocol documentation and ADRs describe the breaking layout with no migration or compatibility path. Focused phase, rollback, restart, fairness and operator-command checks pass; full installed-wheel and paired qualification follow this exact commit.
@kentbull kentbull changed the title Use durable acceptance and delivery phases with bounded retries Use durable single-item phases from Grant intake through delivery Nov 1, 2026
The real HIO scheduler can catch up after slow store work, advancing a test deadline before the production UTC retry is due. Drive injected worker clocks from one epoch plus the shared HIO time across every service reopen. Keep the ten-second assertions and three-attempt budget unchanged and include durable phase diagnostics on failure.

The previously failing local-only POST scenario passes against the installed wheel. This changes test scheduling only; application code is identical to the head that passed all 243 installed-wheel tests in CI.
@kentbull
kentbull merged commit 84e4034 into master Nov 1, 2026
1 check passed
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