DelegusDocsv0.2

Docs/Evidence layout

Protocol

Evidence layout and receipt schema — frozen before production's first write

Everything a receipt references must be retrievable by hash for seven years (spec §8), and receipts are verified offline against these artifacts for as long as they exist (§6.4). So the shapes below are frozen from the first production write. A change is a new version (a new receipt_version, a new key prefix, a new content type), never an edit of an existing one.

1. Receipt schema: delegus-receipt-v1#

The receipt is spec §6.2. The engine emits exactly these fields, in this order in the JSON body; the signed payload is the JCS of the body without receipt, so field order never affects verification.

FieldPresentNotes
receipt_versionalways"delegus-receipt-v1"
receipt_idalwaysdrc_<ULID>
decision, reasonalwaysreason is null on ALLOW, else a §5.2/§5.3 code
evaluated_atalwaysRFC 3339 UTC with milliseconds; the historical clock
relying_partyalwaysRP DID
principal, agent, grant_id, authority, expires_atonly once P3 passed (§6.4)authority is the matching Capability, or null on DENY
grant_hash, proof_hashalwayssha256:<hex> over the compact JWS strings as received
request_hashwhen the action canonicalizessha256:<hex> over UTF-8 of JCS(action)
evidence.issuer_resolutiononce the issuer lookup succeededdid, did_document_hash, resolved_at
evidence.statusonce the revocation state was readcredential_url, credential_hash, valid_from (if the credential parsed), checked_at, status_list_index
evidence.trust_config_version, evidence.trust_config_hashalways
protocolalwaysresult PASS/FAIL, profile delegus-base-v1, profile_hash, checks P1…P20 each true \| false \| "skipped"
trustalwaysresult, policy_version delegus-trust-v1, checks T1, T2, T3, T5
receiptalwaysnon-detached compact JWS: alg EdDSA, typ delegus-receipt+jwt, kid did:web:<domain>#receipt-<n>

Reason codes, check ids and the two result values are the enums in docs/openapi.json (ReasonCode, ProtocolCheckId, TrustCheckId); the engine's tests assert the document equals the code.

2. Evidence store (S3, Object Lock)#

Bucketone per environment (delegus-evidence-<env>-<account>, infra)
Object keysha256/<64 lowercase hex>: the artifact's own hash, so retrieval is GET /evidence/sha256:<hex> and the key can never disagree with the content
WritePutObject with If-None-Match: *; a 412 means the bytes are already there (same hash, same bytes) and counts as success. No ServerSideEncryption or SSEKMSKeyId headers; bucket default encryption applies.
ReadGetObject by key; served with the stored content type, Cache-Control: public, max-age=31536000, immutable, ETag = the hex hash
Deletenever issued by the API
RetentionObject Lock COMPLIANCE, 7 years, in production; GOVERNANCE, 1 day, in development (infra)

Artifact kinds and their content types:

ArtifactHash in the receiptContent typeBytes
DID document snapshotevidence.issuer_resolution.did_document_hashapplication/did+jsonthe response body exactly as fetched (hosted) or exactly as generated (managed)
Status-list credentialevidence.status.credential_hashapplication/vc+jwtthe compact JWS string, ASCII
Profile documentprotocol.profile_hashtext/markdown; charset=utf-8docs/profiles/delegus-base-v1.md, 1836 bytes, sha256:23d4ace09635816acf058cf86f0db15dae3ea802fce4ab2e916df0412ac7aa4e
Trust-configuration descriptorevidence.trust_config_hashapplication/jsondocs/trust-config/trust_0001.json, sha256:a075fa93bed9b85cf2697df1ea80f65c1d4b0ca00afcaab788d486e477cb1196

Grants, Proofs and Actions are not stored by Delegus; the receipt pins their hashes and the relying party keeps the bytes (§8 lists what Delegus retains). Receipts themselves are stored in Postgres (receipts) by receipt_id, with the full body and JWS; the JWS is the canonical receipt.

3. Status-list credential#

One Bitstring Status List (131,072 bits) per Principal, published at https://status.<domain>/<principal domain path>/<n> with Cache-Control: max-age=30:

Every re-signed list (each revocation) is a new artifact in the evidence store; receipts pin the one that was evaluated.

4. Keys#

5. Operational records (not receipt evidence, but shape-frozen)#

6. What changing any of this means#

A new receipt version (delegus-receipt-v2) with its own verifier in core; a new key prefix for any new artifact kind; a new profile or trust-config file with a new hash. Old receipts must keep verifying with the old shapes for their entire retention.