feat(protocol): surface cycles_evidence on ErrorResponse (v0.1.25.5)#109
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surface
cycles_evidenceonErrorResponse(v0.1.25.5)Closes the last gap in the CyclesEvidence lifecycle binding loop: decide / reserve / commit / release / error.
Why
The
errorartifact (cycles-evidence-v0.1) wraps any 4xx/5xxErrorResponsefrom the four core runtime endpoints and is the canonical home for non-dry reserve denials — insufficient budget surfaces as HTTP 409BUDGET_EXCEEDED, not a 200 withdecision: DENY(per §ReservationCreateResponse.decision). The evidence draft calls these "the highest-signal evidence APS receipts carry."Until now the signed
errorenvelope 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 viagetEvidence.What
cycles-protocol-v0.yaml:info.version0.1.25.4 → 0.1.25.5; optionalcycles_evidence(CyclesEvidenceRef) added toErrorResponse— identical shape/semantics to the four success responses.drafts/cycles-evidence-v0.1.yaml:ErrorResponseMirrorgains the DELIBERATE OMISSION —cycles_evidencenote, matching the other four mirrors. The mirror keepsadditionalProperties: falseand omits the ref, so theerrorenvelope'spayload.error.responsecontent hash is never self-referential (TRANSPORT METADATA, NOT attested).cycles-spec-index.yaml:runtime_baseeditorial → 0.1.25.5;spec_index→ 0.1.30.semantic_basestays0.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.25clients that don't read it are unaffected. Present only when the server emitted anerrorenvelope 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
errorartifact via the global exception handler + stamp the ref on the denial path) follows in a separate PR against this revision.