fix(evidence): correct cycles_evidence_url join + state cycles_evidence non-attestation (v0.1.25.2)#106
Merged
Conversation
…ce non-attestation
Addresses two review findings on v0.1.25.1:
- High: ReservationCreateResponseMirror (drafts/cycles-evidence-v0.1.yaml) keeps
additionalProperties:false and omits cycles_evidence, but the omission was not
stated normatively, leaving the hash input ambiguous. Now explicit: cycles_evidence
is transport metadata, NOT attested; evidence_id is computed over the pre-evidence-ref
response; servers MUST compute it before stamping the ref. Documented on the field
and the mirror.
- Medium: cycles_evidence_url was documented as {server_id}/v1/evidence/{evidence_id},
but server_id already includes the /v1 base, yielding a double /v1. Corrected to
{server_id}/evidence/{evidence_id} with a normative note.
v0.1.25.1 -> v0.1.25.2; changelog prepended; merged regenerated; changelogs validated;
spectral 0 errors.
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.
Summary
Addresses two review findings on the merged v0.1.25.1 (
cycles_evidenceon the reserve response).Finding 1 (High) —
cycles_evidencenon-attestation now explicitReservationCreateResponseMirror(drafts/cycles-evidence-v0.1.yaml) already keepsadditionalProperties: falseand omitscycles_evidence, but the omission wasn't stated, leaving the hash input ambiguous (include it → self-referential id; exclude it → not stated normatively).Now explicit, in two places:
CyclesEvidenceRef/cycles_evidencefield: it is transport metadata, NOT attested;evidence_idis computed over the pre-evidence-ref response; servers MUST computeevidence_idbefore stamping the ref; the ref MUST NOT appear in the attested payload.additionalProperties: falseforbids it precisely to keep the content hash non-self-referential.Finding 2 (Medium) —
cycles_evidence_urldouble/v1server_idis the canonical base including/v1(https://cycles.example.com/v1). The old doc{server_id}/v1/evidence/{id}produced…/v1/v1/evidence/…. Corrected to{server_id}/evidence/{evidence_id}with a normative note.Validation
validate_changelogs.py: OK. Spectral: 0 errors.merged/regenerated.Companion impl fix
The cycles-server
EvidenceEmitter.evidenceUrl()had the same double-/v1bug (its test even asserted it); fixed in the cycles-server evidence-id PR to match this{server_id}/evidence/{id}form.