fix(reservation): surface committed metadata on getReservation (v0.1.25.34, closes #197)#198
Merged
Merged
Conversation
…25.34) commit.lua already persists the COMMIT request's metadata as committed_metadata_json on the reservation hash, but getReservationById only projected the reserve-time metadata_json — so commit metadata was write-only: accepted, stored, never returned (#197). - ReservationDetail gains a committed_metadata field (NON_NULL). - getReservationById parses committed_metadata_json into it; reserve-time metadata is unchanged and stays distinct. Per cycles-protocol v0.1.25.7 (runcycles/cycles-protocol#114, merged). Tests: RedisReservationCrudTest +2 (read-path projection: parsed, distinct from reserve metadata, omitted when absent); ReservationLifecycleIntegrationTest +2 (end-to-end commit-with-metadata round-trip through real Redis + commit.lua; NON_NULL wire omission). Full mvn verify green against cycles-protocol@main, jacoco 95% gate met. The starter needs no change (it already transmits commit metadata). The @cycles SpEL-metadata enhancement is tracked at runcycles/cycles-spring-boot-starter#88.
The top **Date:** block was a compact one-line-per-version changelog that did not match the rest of the file's "### date — version: title" + **bold-category** detailed-entry format. Dissolve it into detailed entries so every version conforms: - Add detailed ### entries for the whole CyclesEvidence epoch (v0.1.25.22–.34 plus the getEvidenceJwks live-serving test and the two WIP/no-version evidence entries), above v0.1.25.21. - Backfill the previously index-only CVE/dependency entries v0.1.25.16–.19, between v0.1.25.20 and v0.1.25.15. - Keep the **Spec:**/**Server:** preamble; remove the compact block. Docs-only; no version bump, no code/spec/wire change.
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
Fixes the read-side half of #197: commit-time metadata was write-only on the server.
commit.luaalready persists the COMMIT request's metadata ascommitted_metadata_jsonon the reservation hash, butgetReservationByIdonly projected the reserve-timemetadata_json— so commit metadata was accepted and stored but never returned, which is why a client inspecting the reservation saw nothing.Change
ReservationDetailgains acommitted_metadatafield (@JsonInclude(NON_NULL)).getReservationByIdparsescommitted_metadata_jsoninto it. Reserve-timemetadatais unchanged and stays distinct.v0.1.25.33 → v0.1.25.34. Per cycles-protocol v0.1.25.7 (runcycles/cycles-protocol#114, merged — addscommitted_metadatato theReservationDetailschema).Tests
RedisReservationCrudTest+2 — read-path projection: parsed, kept distinct from reserve metadata, omitted when absent.ReservationLifecycleIntegrationTest+2 — end-to-end commit-with-metadata round-trip through real Redis +commit.lua, and NON_NULL wire omission (the field is absent from the JSON when the commit carried no metadata).Full
mvn verifygreen againstcycles-protocol@main; jacoco 95% gate met. Codex-reviewed (two test-depth findings applied: added the end-to-end round-trip and the wire-omission assertions).Scope
CommitRequest.metadata.@Cyclesdeclarative-SpEL-metadata enhancement from [Bug] setCommitMetadata does not persist or transmit metadata to the reservation on commit #197 is tracked separately at feat: declarative SpEL metadata binding on @Cycles (no CyclesContextHolder boilerplate) cycles-spring-boot-starter#88.