Skip to content

feat(protocol): surface cycles_evidence on ErrorResponse (v0.1.25.5)#109

Merged
amavashev merged 1 commit into
mainfrom
feat/evidence-error-ref
Jun 13, 2026
Merged

feat(protocol): surface cycles_evidence on ErrorResponse (v0.1.25.5)#109
amavashev merged 1 commit into
mainfrom
feat/evidence-error-ref

Conversation

@amavashev

Copy link
Copy Markdown
Contributor

Surface cycles_evidence on ErrorResponse (v0.1.25.5)

Closes the last gap in the CyclesEvidence lifecycle binding loop: decide / reserve / commit / release / error.

Why

The error artifact (cycles-evidence-v0.1) wraps any 4xx/5xx ErrorResponse from the four core runtime endpoints and is the canonical home for non-dry reserve denials — insufficient budget surfaces as HTTP 409 BUDGET_EXCEEDED, not a 200 with decision: DENY (per §ReservationCreateResponse.decision). The evidence draft calls these "the highest-signal evidence APS receipts carry."

Until now the signed error envelope existed but a denied caller had no in-band pointer to it. Surfacing the ref lets a denied caller bind its own signed receipt to the denial and fetch the envelope via getEvidence.

What

  • cycles-protocol-v0.yaml: info.version 0.1.25.4 → 0.1.25.5; optional cycles_evidence (CyclesEvidenceRef) added to ErrorResponse — identical shape/semantics to the four success responses.
  • drafts/cycles-evidence-v0.1.yaml: ErrorResponseMirror gains the DELIBERATE OMISSION — cycles_evidence note, matching the other four mirrors. The mirror keeps additionalProperties: false and omits the ref, so the error envelope's payload.error.response content hash is never self-referential (TRANSPORT METADATA, NOT attested).
  • cycles-spec-index.yaml: runtime_base editorial → 0.1.25.5; spec_index → 0.1.30. semantic_base stays 0.1.25 (additive/optional).
  • changelogs/cycles-protocol-v0.md: v0.1.25.5 entry.
  • merged/: regenerated.

Compatibility

Additive + non-breaking. The field is optional; 0.1.25 clients that don't read it are unaffected. Present only when the server emitted an error envelope for the response; absent when emission is disabled or for errors raised before evidence could be emitted (request validation / auth failures).

Validation

spectral lint (sources + merged): 0 errors. Changelog pointers valid. Merged artifacts regenerated (no drift).

Server implementation (cycles-server: emit the error artifact via the global exception handler + stamp the ref on the denial path) follows in a separate PR against this revision.

Adds the optional `cycles_evidence` field (CyclesEvidenceRef) to
ErrorResponse, closing the last gap in the lifecycle binding loop
(decide / reserve / commit / release / error).

The `error` artifact wraps any 4xx/5xx ErrorResponse from the four core
runtime endpoints and is the canonical home for non-dry reserve denials
(insufficient budget surfaces as HTTP 409 BUDGET_EXCEEDED, not a 200 with
decision: DENY) — the highest-signal evidence an APS receipt can bind to.
Surfacing the ref in-band lets a denied caller bind its own signed receipt
to the denial and fetch the envelope via getEvidence.

The field is CyclesEvidenceRef, identical to the four success responses;
TRANSPORT METADATA, NOT attested — the `error` artifact's
payload.error.response mirror (drafts/cycles-evidence-v0.1.yaml) keeps
additionalProperties: false and omits it, so the content hash is never
self-referential. Present when the server emitted an `error` envelope for
this response; absent when emission is disabled or for errors raised before
evidence could be emitted. Additive + non-breaking.

- cycles-protocol-v0.yaml: info.version 0.1.25.4 -> 0.1.25.5; cycles_evidence
  on ErrorResponse.
- drafts/cycles-evidence-v0.1.yaml: DELIBERATE OMISSION note on
  ErrorResponseMirror (matches the other four mirrors).
- cycles-spec-index.yaml: runtime_base 0.1.25.5, spec_index 0.1.30.
- changelogs/cycles-protocol-v0.md: v0.1.25.5 entry.
- merged/: regenerated.
@amavashev
amavashev merged commit f0beb54 into main Jun 13, 2026
5 checks passed
@amavashev
amavashev deleted the feat/evidence-error-ref branch June 13, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant