feat(policy): validate agent-authored proposals#1453
Draft
zredlined wants to merge 1 commit into
Draft
Conversation
4d83b4b to
e5304be
Compare
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
e5304be to
a2f715e
Compare
6 tasks
Signed-off-by: Alexander Watson <zredlined@gmail.com>
a2f715e to
59bebfd
Compare
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
Wire agent-authored policy proposals through gateway-side prover validation before they land in the draft inbox. The validation result is intentionally scoped: it reports prover findings for the supported policy surface, distinguishes narrow L7 proposals from broad L4 proposals, and returns
validation unavailablewhen the effective policy uses features the prover does not model yet.Related Issue
Closes #1097
Refs #1062
Changes
openshell-proveras a gateway dependency for proposal-time validation.analysis_mode = agent_authoredproposal against the current effective policy plus the proposed rule, including providers-v2 policy composition when enabled.narrow L7 method/path scope,needs human: L4/no method-path scope, orvalidation unavailablefor unsupported prover inputs.deny_rulesas unsupported by the current prover instead of emitting a misleading pass verdict.Validation:inopenshell rule getso the prover result is visible in the developer approval path.Testing
mise run pre-commitpassesAdditional detail:
cargo fmt --checkcargo test -p openshell-server --lib agent_authored -- --nocapturecargo test -p openshell-server --lib grpc::policy::tests -- --nocapturecargo clippy -p openshell-server --lib --tests -- -D warningscargo clippy -p openshell-cli --lib --tests -- -D warningscargo test -p openshell-cli --lib -- --nocapturebash -n examples/agent-driven-policy-management/demo.shmise run pre-commitcompleted Rust workspace tests, clippy, cargo check, Python checks, Helm lint, license check, and Mermaid lint; it failed only on existing local ignoredarchitecture/plans/*.mdmarkdownlint errors that are not part of this PR.Checklist