fix: Disabled Policy Rule P3b Still Active in Code#254
Open
Tomeshwari-02 wants to merge 1 commit into
Open
Conversation
Align policy behavior with the disabled P3b documentation by disabling exact 1-hour slot validation by default and adding tests for both disabled and enabled modes. Made-with: Cursor
ameetdesh
requested changes
Apr 26, 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.
Summary
This PR fixes the mismatch reported in #249, where delivery slot duration validation was marked as disabled in comments but still executed in policy code.
What changed
specification/policies/p2p-trading-interdiscom.rego:data.config.validateDeliverySlotDurationvalidateDeliverySlotDuration = falseTests added
Updated
specification/policies/p2p-trading-interdiscom_test.regowith regression tests to verify:validateDeliverySlotDuration: trueWhy this change
The policy comments explicitly state P3b is disabled, but the previous implementation still enforced exact 1-hour duration. This PR aligns runtime behavior with documented intent while preserving a safe path to re-enable strict validation via config.
Backward compatibility