Skip to content

docs(access-rules): define indeterminate formula evaluation - #103

Open
Martin187187 wants to merge 1 commit into
admin-shell-io:IDTA-01004-3-2_Workingfrom
Martin187187:issue-96
Open

Martin187187 wants to merge 1 commit into
admin-shell-io:IDTA-01004-3-2_Workingfrom
Martin187187:issue-96

Conversation

@Martin187187

@Martin187187 Martin187187 commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR clarifies how access-rule formulas behave when an expression cannot be evaluated.

Changes

  • Introduces indeterminate for runtime failures such as unresolved or inapplicable FieldIdentifiers, missing or unusable claims, and invalid casts.
  • Defines complete truth tables for combining true, false, and indeterminate with $and, $or, and $not.
  • Clarifies the behavior of logical operators with more than two operands and permits result-preserving short-circuit evaluation.
  • Ensures that only a final result of true activates an ALLOW rule; false and indeterminate never grant access.
  • Distinguishes runtime indeterminate results from invalid access-rule documents, which are rejected before evaluation.

Validation

  • python tools/validate_spec_artifacts.py
  • python -m unittest discover -s tests/query

Closes #96

@Martin187187 Martin187187 changed the title docs(access-rules): clarify formula evaluation failures (#96) docs(access-rules): define indeterminate formula evaluation Sep 3, 2026
@Martin187187
Martin187187 marked this pull request as ready for review September 3, 2026 09:23
@Martin187187

Copy link
Copy Markdown
Collaborator Author

Securtiy TF: this change makes sense because:
Main rationale: Different behavior depending on evaluation order (e.g., indeterminate $or true vs. true $or indeterminate) should be avoided. We do not want to enforce strict evaluation (i.e., all subterms are required to be evaluated in any case) to allow optimized implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant