Skip to content

Return Violation Messages from Constraints#1782

Merged
Mythicaeda merged 3 commits into
developfrom
fix/return-violation-messages
May 12, 2026
Merged

Return Violation Messages from Constraints#1782
Mythicaeda merged 3 commits into
developfrom
fix/return-violation-messages

Conversation

@Mythicaeda
Copy link
Copy Markdown
Contributor

@Mythicaeda Mythicaeda commented Feb 13, 2026

Description

If a Procedural Constraint has a message on a Violation, it is now included alongside the windows and activityId fields.

The changes match those in the ticket, except one more file was updated: actions.graphql was also updated so that Hasura is aware of this new optional field.

Verification

A new test was added to BasicConstraintTests: messageReturnedIfPresent. It runs the constraints FruitThresholdConstraint (which has been updated to include a violation message) and NoMessageConstraint (a new constraint that is equivalent to FruitThresholdConstraint, except it does not contain a message) and shows that the message` field is now populated if the Violation contained a message.

Documentation

The API example for checking constraints should be updated to include the new field.
Done, PR is here.

Future work

The UI needs to be update to display these messages, if they are present.

@Mythicaeda Mythicaeda requested a review from a team as a code owner February 13, 2026 22:27
@Mythicaeda Mythicaeda changed the title Fix/return violation messages Return Violation Messages from Constraints Feb 13, 2026
@Mythicaeda Mythicaeda requested review from dandelany and removed request for adrienmaillard and joshhaug February 13, 2026 22:28
@Mythicaeda Mythicaeda self-assigned this Feb 13, 2026
@Mythicaeda Mythicaeda added fix A bug fix constraints Anything related to the constraints domain labels Feb 13, 2026
@Mythicaeda Mythicaeda force-pushed the fix/return-violation-messages branch from 0240389 to 4b59937 Compare February 17, 2026 20:52
@Mythicaeda Mythicaeda force-pushed the fix/return-violation-messages branch from 4b59937 to bd47d81 Compare February 17, 2026 21:43
@dandelany dandelany force-pushed the fix/return-violation-messages branch from bd47d81 to 0395e1a Compare March 23, 2026 18:28
Comment thread e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/utils/HasuraRequests.java Outdated
Copy link
Copy Markdown
Collaborator

@dandelany dandelany left a comment

Choose a reason for hiding this comment

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

👍 this looks good, reviewed code & tested locally by running FruitThresholdConstraint and finding constraint message in the DB. We'll work on hooking up the UI for this soon, but this PR can merge whenever.

@dandelany dandelany added the publish Tells GH to publish docker images for this PR label May 9, 2026
While the constraints are run according to their priority, because the results did not have that guarantee, causing flakiness in E2ETests
@Mythicaeda Mythicaeda force-pushed the fix/return-violation-messages branch from 30b2e1a to 338a6f7 Compare May 12, 2026 21:00
@Mythicaeda Mythicaeda merged commit 3c89ed2 into develop May 12, 2026
12 of 21 checks passed
@Mythicaeda Mythicaeda deleted the fix/return-violation-messages branch May 12, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

constraints Anything related to the constraints domain fix A bug fix publish Tells GH to publish docker images for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return Violation Messages from Procedural Constraints

2 participants