Skip to content

Send rejection response for out-of-scope GOPACS flex messages#49

Merged
igorrutka merged 3 commits into
mainfrom
fix/gopacs-out-of-scope-rejection
Jul 8, 2026
Merged

Send rejection response for out-of-scope GOPACS flex messages#49
igorrutka merged 3 commits into
mainfrom
fix/gopacs-out-of-scope-rejection

Conversation

@Miggets7

@Miggets7 Miggets7 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

fixes openremote/denhaag#178

Problem

GOPACSHandler.processRawMessage silently dropped validly-signed flex messages whose congestion point is outside the contracted EAN: the transport call returned HTTP 200 but no UFTP response message was ever sent, leaving the DSO's conversation without a reply.

The GOPACS manual Use own UFTP implementation for handling CSC and ATR calls (Chapter 5, steps 3 and 7) requires the AGR to always answer a FlexRequest/FlexOrder with a FlexRequestResponse/FlexOrderResponse, and to reject it when it does not meet the contract terms — which an out-of-scope congestion point is.

Change

  • Out-of-scope flex messages now get a rejection response (Result=Rejected, RejectionReason="CongestionPoint not within contracted scope"), built with shapeshifter's UftpValidationResponseCreator (the same factory the library uses for the accepted path) and sent through the existing outgoing-message path with the usual response delay so the HTTP 200 goes out first.
  • Asset mutation and the FlexOffer are still skipped for out-of-scope messages.

Note: an incoming out-of-scope FlexOffer would map to a FlexOfferResponse, which notifyNewOutgoingMessage does not send — irrelevant in practice since as AGR we never receive FlexOffers. Full per-contract/role scoping remains tracked in #28.

Miggets7 added 3 commits July 7, 2026 13:21
The GOPACS UFTP manual requires the AGR to always answer a FlexRequest
or FlexOrder with a response message. Out-of-scope congestion points
were silently dropped, leaving the DSO conversation without a reply.
Now a FlexRequestResponse/FlexOrderResponse with Result=Rejected and a
rejection reason is sent, while asset mutation and the FlexOffer are
still skipped.
@Miggets7 Miggets7 added the Bug Error or issue in the system label Jul 7, 2026
@Miggets7 Miggets7 requested review from igorrutka and wborn July 7, 2026 12:08
@igorrutka igorrutka merged commit c2e74ed into main Jul 8, 2026
1 check passed
@igorrutka igorrutka deleted the fix/gopacs-out-of-scope-rejection branch July 8, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Error or issue in the system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants