You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Temper describes integrations as outbox-pattern work that runs after a state
transition commits, but the generic runtime contract does not yet make external
operations durable across process failure.
The existing integration engine uses an in-memory channel and background tasks,
and its available dead-letter implementation is in-memory. Other runtime work is
adding durable internal effects, schedules, spawns, timeouts, and retries, but
there is no single operation record that durably connects a committed entity
transition to external egress and a governed settlement callback.
This leaves applications to implement their own intent journals, workers,
leases, retry classification, remote-operation polling, ambiguity handling,
recovery files, metering, and settlement logic.
Desired outcome
A state transition can authorize an external operation with a durable intent.
Temper records that intent before egress, executes it under bounded policy,
survives restart, records the strongest honest outcome available, and settles
the result through a governed entity action.
The operation must remain inspectable and auditable without moving application
business logic into the kernel.
Required semantics
Atomically co-commit the external-operation intent with the source transition.
Derive a stable operation ID from tenant, source entity, committed sequence,
integration, and effect index.
Record an attempt before each external create/send.
Use lease generation or equivalent fencing so multiple workers cannot execute
the same attempt concurrently.
Recover pending and accepted work after process restart.
Support immediate responses, accepted remote-operation IDs with polling,
authenticated callbacks, cancellation, and bounded deadlines.
Distinguish known Failed outcomes from Ambiguous outcomes where egress may
have succeeded.
Never automatically retry an ambiguous non-idempotent operation.
Reuse a stable provider idempotency key when the remote endpoint supports it.
Make settlement into entity state idempotent and independently retryable
without repeating egress.
Surface terminal failures, expired leases, ambiguous outcomes, and settlement
failures to operators.
Preserve originating principal, workflow trace, integration declaration,
module digest, operation ID, and attempt identity through execution and
settlement.
Exactly-once external effects are not generally possible without cooperation
from the remote system. The API should declare honest delivery modes such as:
Problem
Temper describes integrations as outbox-pattern work that runs after a state
transition commits, but the generic runtime contract does not yet make external
operations durable across process failure.
The existing integration engine uses an in-memory channel and background tasks,
and its available dead-letter implementation is in-memory. Other runtime work is
adding durable internal effects, schedules, spawns, timeouts, and retries, but
there is no single operation record that durably connects a committed entity
transition to external egress and a governed settlement callback.
This leaves applications to implement their own intent journals, workers,
leases, retry classification, remote-operation polling, ambiguity handling,
recovery files, metering, and settlement logic.
Desired outcome
A state transition can authorize an external operation with a durable intent.
Temper records that intent before egress, executes it under bounded policy,
survives restart, records the strongest honest outcome available, and settles
the result through a governed entity action.
The operation must remain inspectable and auditable without moving application
business logic into the kernel.
Required semantics
integration, and effect index.
the same attempt concurrently.
authenticated callbacks, cancellation, and bounded deadlines.
Failedoutcomes fromAmbiguousoutcomes where egress mayhave succeeded.
without repeating egress.
failures to operators.
module digest, operation ID, and attempt identity through execution and
settlement.
Exactly-once external effects are not generally possible without cooperation
from the remote system. The API should declare honest delivery modes such as:
idempotentrecoverable_remote_idnon_idempotentcallbackread_onlyProposed lifecycle
Recovery and terminal paths should include:
The exact states are an ADR decision, but the distinction between operation
execution and settlement must be preserved.
Workstreams
Verification requirements
The verification model should explore:
It must prove:
justification.
Observability requirements
Expose bounded, redacted fields for:
Provide metrics for queue depth, oldest pending age, claim latency, dispatch
latency, accepted-to-terminal latency, settlement latency, retries, ambiguous
creates, expired leases, cancellation failures, dead letters, and budget
exhaustion.
Non-goals
Related work
Definition of done
restart tests.
entity settlement transitions, and correlated telemetry.