Better cancel response handling and supplier cancel actions#459
Merged
Better cancel response handling and supplier cancel actions#459
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit “cancel rejected” handling to the returnables patron-request workflow so a supplier can reject a cancellation request and the requester can transition back to supplying.
Changes:
- Extend the returnables state model with a
cancel-rejectedevent and split supplier cancel handling intoaccept-cancel/reject-cancelactions. - Update supplier action/message capability lists to include
reject-cancelandcancel-rejected. - Update ISO18626 supplying-agency message handling and tests to recognize cancel responses that reject cancellation.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| misc/returnables.yaml | Updates the YAML source state model to include cancel rejection and rename cancel actions. |
| broker/patron_request/service/statemodels/returnables.json | Updates the embedded returnables state model JSON to match the new cancel rejection flow. |
| broker/patron_request/service/statemodel_capabilities.go | Adds new lender action/message-event constants and exposes them via capabilities. |
| broker/patron_request/service/message-handler.go | Interprets cancel-response messages that indicate cancellation rejection and adds contradiction detection. |
| broker/patron_request/service/action.go | Implements new lender actions for accepting/rejecting cancel via ISO18626 CancelResponse. |
| broker/patron_request/service/action_mapping_test.go | Adjusts expected action availability for CANCEL_REQUESTED. |
| broker/patron_request/service/statemodel_test.go | Extends capabilities assertions for new action/event. |
| broker/patron_request/service/message-handler_test.go | Adds/updates tests for cancel rejection + contradiction scenarios. |
| broker/patron_request/service/action_test.go | Adds tests to validate outgoing ISO18626 cancel-response contents for new actions. |
| broker/test/patron_request/api/api-handler_test.go | Updates API capability assertions for the new supplier action/event. |
You can also share your feedback on Copilot code review. Take the survey.
adamdickmeiss
approved these changes
Mar 14, 2026
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.
No description provided.