Search the complete documentation

Try idempotency, proposal lifecycle, authentication, or ordering.

Navigate Open
繁體中文
Browse documentation

Govern · Reliability contract

Retry and replay Govern work

Govern uses three different mechanisms for three different problems. They should not be treated as one generic retry button.

MechanismPurposeSide effects
Delivery retryRecover from a temporary transport or downstream failureMay repeat a request with the same identity
Idempotent reconciliationMake duplicate delivery converge on one recordReturns or updates the same logical record
Fixture replayRe-evaluate a captured contract caseNone; offline validation only

Delivery and reconciliation identities

SurfaceStable identityRequired behavior
Provider webhookProvider, tenant, channel, and message IDsThe same event does not create a second turn
Host tool callCorrelation, causation, and idempotency IDsPreserve the IDs across retry
Proposal sinkProposal ID or proposal idempotency keyCreate or return one host record
Lifecycle callbackProposal and callback idempotency keyRecord one lifecycle fact
Execution receiptPermit and idempotency keyReturn the existing receipt
Witness or reversal eventOrganization and idempotency keyReturn the existing evidence event

Govern keeps a processing receipt for inbound provider webhooks, including provider identity, status, attempts, last error, and completion time. A proposal is also persisted before sink delivery, so a delivery failure does not erase the proposal.

Retry decisions

When the result is uncertain because of a timeout or transport failure, retry the same logical request with the same idempotency key. Do not generate a new key merely because the client did not receive the response.

Use the problem code, not only the HTTP status, to decide what to do:

ResultClient action
Transport failure or 5xxRetry with the same key and bounded backoff
401 unauthorized or invalid_signatureRepair authentication; do not blind retry
404 *_not_foundRepair the referenced identity or ordering
400 missing_*, invalid_*Correct the contract payload
409 idempotency_key_conflictStop; the key was reused with different content
422 host_evidence_rejectedInspect authority or evidence scope

Tonetify does not currently publish one universal retry budget, backoff schedule, or dead-letter recovery contract for every Govern surface. The stable guarantee is duplicate convergence where an idempotency identity is documented.

Fixture replay is not production re-execution

The captured workflow fixture scenarios evaluate recorded JSON inputs against the current verifier and proof builders:

mix tonetify.governed_action.replay

Replay is pure contract validation. It does not read the database, call a host, execute a mutation, issue a permit, create credentials, apply policy candidates, or retry a failed production job.

Fixture metadata may preserve authority evidence or a policy candidate for review. Replaying it does not create authority or promote a policy.

Current boundary

Captured Golden Loop evidence is useful as a replayable proof artifact, but it is not a public replay API or a production re-execution engine. A live permit-backed mutation and a published operational recovery policy remain productization work.

Next: review the current proof boundary.