Skip to content

Better cancel response handling and supplier cancel actions#459

Merged
jakub-id merged 1 commit intomainfrom
cancel-response-handling
Mar 14, 2026
Merged

Better cancel response handling and supplier cancel actions#459
jakub-id merged 1 commit intomainfrom
cancel-response-handling

Conversation

@jakub-id
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 14, 2026 10:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-rejected event and split supplier cancel handling into accept-cancel / reject-cancel actions.
  • Update supplier action/message capability lists to include reject-cancel and cancel-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.

@jakub-id jakub-id merged commit 58e3107 into main Mar 14, 2026
7 checks passed
@jakub-id jakub-id deleted the cancel-response-handling branch March 14, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants