feat(prover): add standalone policy maximum checker - #3289
Open
johnnygreco wants to merge 12 commits into
Open
Conversation
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
johnnygreco
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 11, 2026 18:59
|
🌿 Preview your docs: https://nvidia-preview-pr-3289.docs.buildwithfern.com/openshell |
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Collaborator
|
/ok to test a86633f |
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Collaborator
Author
|
/ok to test fd2880f |
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Collaborator
Author
|
/ok to test 5764a6b |
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Collaborator
Author
|
/ok to test ae699e1 |
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
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 adds the maximum-policy checking function and the standalone
openshell-prover checkCLI. It proves whetherAllowed(candidate) ⊆ Allowed(maximum)for the supported policy model and returns containment evidence, a counterexample, or an explicit unsupported/inconclusive result. The check runs locally against two fully composed policy files; it does not contact a gateway, store a maximum policy, or enforce approval modes.flowchart LR maximum[Operator maximum policy] --> check[openshell-prover check] candidate[Fully composed candidate policy] --> check check --> within[within_max<br/>exit 0] check --> exceeds[exceeds_max + counterexample<br/>exit 1] check --> incomplete[unsupported or inconclusive + reason code<br/>exit 3 or 130]Related Issue
Part of #2109. This PR provides the reusable containment engine and standalone CLI. Gateway maximum-policy storage and enforcement and permission modes remain separate work, so the issue should stay open.
Changes
unsupportedorinconclusiveinstead of being guessed.candidate && !maximumbefore returning counterexamples. Reject invalid inputs such as embedded NULs without panicking.openshell-prover check candidate.yaml --maximum maximum.yamlcommand with text and JSON output, stable exit codes and reason codes, bounded inputs, solver timeouts, resource limits, and Unix cancellation. No other prover subcommands are added.scope(model_version,policy_version, and modeleddomains),result, optionalcounterexample, and optionalreason_code/reasonfields. The removedassumptionsfield is not part of the contract.openshell-proverthrough the existing OpenShell installation paths: the Debian package, an RPM subpackage installed alongside the CLI and gateway, and the Homebrew formula resource. Continue publishing standalone Linux x86_64/aarch64 and macOS Apple Silicon archives with a dedicated SHA-256 manifest.Testing
mise run pre-commitmise run testmise run cicargo test --locked -p openshell-prover -p openshell-prover-cliwith system Z3 4.8.12 and Z3 4.16cargo test -p openshell-prover-cli(unit and CLI integration tests)bash tasks/scripts/test-install-sh.shbash tasks/scripts/test-packaging-assets.shuv run pytest -q python/openshell/release_formula_test.pyruby -cad953f64ec51948ce324f825cd8699cc73a2db4a, including Branch Checks on Linux x86_64, Linux aarch64, and macOS Apple Silicon; Branch E2E; Windows MSVC; Helm; docs preview; dependency review; Trivy; workflow security; and DCOThe local
mise run e2eattempt could not execute the MCP conformance assertions because the runner could not read two mounted/tmpfixtures (EACCES). The final hosted Branch E2E workflow passed its required gate and skipped deployment-specific jobs because its change detector found no deployment inputs in scope.Release workflows build and smoke-test the native release artifacts. They were not dispatched locally across every release target; the branch validates their definitions with Actionlint and the focused packaging tests above.
Checklist