Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify policy rule min and max are inclusive #677

Conversation

jiffyclub
Copy link
Contributor

Explain pull request

The policy docs don't say anywhere whether the minimum and maximum values specified on policy rules are to be interpreted as a closed or open interval (that is, whether the endpoints are included in the interval). Most real world policies seem to treat these min and maxes inclusively, e.g. parking for a max of 2 hours or a 70 MPG speed limit. You're not in violation until you go over those maximums. So this change clarifies that min and max values on policy rules are meant to define an inclusive (or closed) interval where values equal to the min and max match the rule.

Is this a breaking change

  • No, not breaking

Impacted Spec

  • policy

Additional context

N/A

@jiffyclub jiffyclub requested a review from a team August 4, 2021 20:07
@jiffyclub jiffyclub requested a review from a team as a code owner August 4, 2021 20:07
@schnuerle schnuerle added the Policy Specific to the Policy API label Aug 4, 2021
@jiffyclub
Copy link
Contributor Author

Per discussion with @avatarneil on an MDS working group call we may want to make the treatment of min and max a user configurable option. For some policies, especially those governing continuous values, it can make it easier to express a policy if min/max are excluded from the range (making an open or half-open) an interval.

@schnuerle schnuerle added this to the 1.2.0 milestone Sep 2, 2021
@schnuerle
Copy link
Member

Realize this clarification language could be part of 1.2.0. What do you think about how to make these a configurable option, or is this idea for a future release?

Looks like there also may be a conflict with dev now to resolve.

@jiffyclub
Copy link
Contributor Author

See #689 for an alternative approach that lets users specify how minimum and maximum should be handled.

The policy docs don't say anywhere whether the minimum and
maximum values specified on policy rules are to be interpretted
as a closed or open interval (that is, whether the endpoints are
included in the interval). Most real world policies seem to treat
these min and maxes inclusively, e.g. parking for a max of
2 hours or a 70 MPG speed limit. You're not in violation until you
go over those maximums. So this change clarifies that min and max
values on policy rules are meant to define and inclusive (or closed)
interval where values equal to the min and max match the rule.
@schnuerle
Copy link
Member

Per our working group meeting, PR #689 was selected as preferable to this solution. IF agreed, @jiffyclub you may close this PR.

@schnuerle schnuerle removed this from the 1.2.0 milestone Sep 13, 2021
@jiffyclub
Copy link
Contributor Author

Closing in favor of #689.

@jiffyclub jiffyclub closed this Sep 16, 2021
@jiffyclub jiffyclub deleted the clarify-policy-min-max branch September 16, 2021 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Policy Specific to the Policy API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants