Add fail-closed operational decision gates - #12
Draft
Deathcharge wants to merge 6 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
passed,blocked, orindeterminateverdicts with stable reason codes, the applied policy snapshot, and complete consensus evidenceWhy
The core tally engine was credible but stopped at “what did the group agree on?” Real release, output-safety, authorization, and routing workflows also need a deterministic answer to “may the application act on this evidence?” Keeping policy evaluation separate preserves the small provider-neutral core while giving the package concrete operational use cases.
Blocking evidence takes precedence: a configured veto or agreed non-pass choice is
blocked. Missing reviewers, insufficient successful weight, unknown choices, quorum failure, or no consensus isindeterminate. Only a fully satisfied policy ispassed.Read-only inspection of optional Samsarix producer contracts informed the policy-panel recipe: action policy emits allow/deny with policy identity, ethics emits allow/deny/review with decision identity, orchestration needs an approval primitive, and LaunchGuard has release/readiness evidence. The package imports none of them.
Developer impact
New public API:
DecisionPolicyDecisionStatusDecisionReasonDecisionVerdictevaluate_decision()DecisionPolicy.digestcovers normalized schema-v1 policy content using canonical UTF-8 JSON and SHA-256. A fixed contract vector protects the encoding from drift. The digest is not a signature.There are still no runtime dependencies, network calls, persistence, provider SDKs, sibling-repository imports, or protected-action side effects. Hosts remain responsible for authenticated identity, authorization, redaction, policy distribution, and enforcement.
Exact-head validation
Head:
310372apython -m ruff format --check .— 18 files formattedpython -m ruff check .— passedpython -m mypy agent_consensus— passed, 6 source filespython -m pytest— 79 passed, 99.62% branch-aware coveragepython -m build— sdist and wheel built; wheel built from sdistpython -m twine check <artifacts>— both passedpip install --no-deps <wheel>— passedpip check— no broken requirementsLocal artifact snapshot:
0EC23FA1C984E7044B03CD23E3ABDBA7A0C2C260F7E4D0AFCF2637AFC62364020245C34A52F6C51FE847C21332EEDA489BB3AD86A975F2D8C2B6FD4127F9C251Review and release gates