fix(adapters): default PolicyEvidence mode to declared - #223
Open
solloek369-arch wants to merge 1 commit into
Open
solloek369-arch wants to merge 1 commit into
solloek369-arch wants to merge 1 commit into
Conversation
Follows agentrust-io/trace-spec#416. Do not infer policy enforcement from an omitted evidence-constructor mode. Default PolicyEvidence to declared, admit that explicit value, and preserve all supported explicit modes and rejection of unknown values. Document the behavior change and require agentrust-trace>=0.9.0, the release that introduced declared. Runtime enforcement behavior remains unchanged. Signed-off-by: Loek <solloek369@gmail.com>
solloek369-arch
requested review from
a team,
carloshvp and
imran-siddique
as code owners
September 25, 2026 19:12
Member
|
Thanks Loek. Same collision as trace-spec#417: spec section 4.3 says |
Author
|
Yes please Imran, push the same required-argument shape here. |
This branch has not been deployed
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.
What changes
Implements the
integrationsportion of agentrust-io/trace-spec#416.PolicyEvidence(bundle=...)defaults an omittedenforcement_modetodeclaredinstead ofenforce.enforce,advisory,silent, anddeclaredpass through unchanged; unknown modes remain rejected.agentrust-tracedependency floor changes from>=0.7.0to>=0.9.0.The repository-wide
compatibility.yamlfloor is unchanged; this PR changes only this package's runtime dependency to the first TRACE release that can represent its new default.An omitted evidence-constructor argument must not infer that policy enforcement occurred. Callers with an independently established enforcement context pass the actual mode explicitly. Runtime enforcement defaults and behavior are unchanged.
Compatibility
This changes the emitted evidence for callers that previously omitted the mode. Callers that established enforcement can continue to supply
enforcement_mode="enforce"explicitly.TRACE 0.9.0 introduced
declared; the published wheels were checked: 0.8.0 admits onlyenforce | advisory | silent, while 0.9.0 also admitsdeclared. At 0.9.0, three pre-existing OpenShell tests fail because its JSON Schema requirestransparency; 0.10.0 no longer requires that field. This PR neither causes nor fixes those failures. The hash-locked CI dependency environment uses 0.10.0, against which the local package suite passes. The new dependency floor is therefore not a claim that the complete package suite passes at 0.9.0.Validation
Local validation on macOS with Python 3.12.14, published TRACE packages, and a wheel built from this patch. These results are not a CI run.
requirements/adapters.txt's hash-locked environment:tests/test_builder.py31 passed; packagetests110 passed.tests/test_builder.py31 passed. In the earlier unchanged-base reproduction atf6e8c8b, the package suite was 102 passed, 3 failed. The candidate run produced 107 passed, 3 failed; the same three OpenShell test identities and primary'transparency' is a required propertymessages were reproduced. The baseline was not rerun in this GO 2A validation.pip check.enforcedefault fails the omission regression, and removingdeclaredfromMODESfails the explicit-declaredregression. Each pytest process exits 1 for the intended failure while the invalid-mode control still passes. The unmodified builder suite passes again in both environments.requirements/release.txt(build 1.6.1,twine 7.0.0): sdist and wheel built successfully, andtwine checkpassed for both. The wheel built from the sdist is byte-identical to the wheel used for the package tests above. This is not a run of the complete release workflow.Corresponding trace-spec PR: agentrust-io/trace-spec#417.
Follows agentrust-io/trace-spec#416.