Expand description
VerdictEnvelopeV1 + ReasonCode — schema-locked mirror of
@cleanstart/cleanlib-sdk@0.4.1 (tarball sha-1
b5f00c160907a6ea1f490f14a9bda6f6de34b8b6).
Sister of:
- sdk-js
dist/reason-codes.js+dist/verdict-envelope.schema.json - sdk-py
cleanlib_sdk/reason_codes.py - sdk-go
reason_codes.go
Drift between any of the four SDK consumers is a CI failure;
cleanlib-contract-fixtures v1.0.0 verifies byte-identical
(status, reason_code) across all 4 implementations.
Freshness-precedence rule (ratified 2026-05-28; binding via App dispatch §4
- Client dispatch §2.3): when the substance-driving signal’s
availability == "degraded_stale", the substance-derived status tier is PRESERVED and thereason_codeOVERRIDES toVERDICT_DEGRADED_STALE. Server-sideVERDICT_DEGRADED_STALEis architecturally distinct from the client-sideLIVE_DEGRADEDcache-fallback state (extension status bar + Cli7 offline mode).
Structs§
- Verdict
Envelope V1 VerdictEnvelopeV1— parsed shape of theverdict-envelope.v1.jsonschema. Top-level fields are required; rich sub-objects are sparse and#[serde(default)]-tolerant so the SDK can consume partial responses during cycle-N spec evolution without forcing a recompile.
Enums§
- Reason
Code - Canonical 15-value
ReasonCoderegistry — Rust mirror of sdk-js v0.4.1dist/reason-codes.js. Drift = CI failure. - Status
- Tri-state envelope status tier — sister of sdk-js Literal type
'ALLOW' | 'WARN' | 'DENY'.
Constants§
- ALL_
REASON_ CODES - All 15 canonical reason-code values — consumed by drift-check CI.