Compatibility: Pactmark 0.1.x. Codes are stable API. English messages are diagnostics and may change at any time.

The rule

Every failure carries a KAF_* code. Branch on the code, and on the code alone.

Serialization and schema

Runtime and transitions

KAF_RUNTIME_EVENT_SEQUENCE is retryable because it means another writer got there first — re-read and retry is the correct response. KAF_RUNTIME_TERMINAL is not, because no amount of retrying will un-terminate a run.

Authority and policy

Effects

KAF_EFFECT_ABANDONED_UNCERTAIN is not “it failed”. It is “we do not know, and we stopped waiting”. Treat anything downstream of it as unresolved until a human establishes the truth.

Storage

KAF_STORAGE_NOT_FOUND is deliberately the same answer for “does not exist” and “exists but is not yours”. Denial must not become an enumeration oracle.

Model boundary

Verification, evidence and patterns

Commands and idempotency

Retrying correctly

Retry only when the typed classification and the effect strategy permit it. A timeout or a lost transport does not imply that an external effect did not occur — that is precisely the case the effect ledger exists to handle.
Of the whole registry, exactly three codes are marked retryable: KAF_RUNTIME_EVENT_SEQUENCE, KAF_ADMISSION_DENIED and KAF_STORAGE_CONCURRENCY_CONFLICT. All three are contention or quota conditions where the same request can safely be made again.

Wire format

Problem Details, with the code duplicated where a client will actually look for it. Response bodies and logs use different disclosure levels — a response deliberately reveals less.

Run events

RunFailed.errorCode uses this registry.

HTTP API

Where each status appears on the wire.