Wire Cedar into the cross-operator delegation example - #62
Conversation
imran-siddique
left a comment
There was a problem hiding this comment.
The change itself reads well and it is the right direction: loading policy.cedar into CedarPolicy and actually evaluating the rule, rather than mirroring it with a LocalPolicy allow-set, removes a stand-in that made the example weaker than it looked. The README and transcript updates match what the code now does, and CI is green on this branch.
Only blocker is a merge conflict in pyproject.toml, and it is my fault rather than yours. main moved under you twice today: #69 moved the extension URI and maintainer email off agentrust.io, and #71 bumped the agentrust-trace pins for the TRACE v0.2 cutover. Both touched the dependency block you are editing.
It should be a mechanical resolution: keep your Cedar dependency addition, take main's versions for agentrust-trace (>=0.5) and agentrust-trace-tests (>=0.4,<0.5). Happy to push the rebase for you if you would rather not deal with a conflict you did not cause, just say so.
One unrelated note in case you hit it: tests/unit/test_cedar.py can fail locally on around six tests while passing in CI. That is an environment difference rather than your code, and CI here is clean.
44dd2a4 to
3c3cdd7
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@imran-siddique I rebased this onto current Local validation completed with 212 passed and 3 skipped, plus mypy, Ruff, Bandit, pip-audit, and all 12 demo scenarios. GitHub reports the branch mergeable with all required checks green. Could you re-review when available? |
Summary
cedarpyto the verified4.8.7API.policy.cedarintoCedarPolicyin the cross-operator demo and test the shipped policy's allow and deny decisions.Root cause
The demo treated
policy.cedaras documentation and gave enforcement to a duplicateLocalPolicyallow-list. Thecedarpy>=4.8range also allowed the runtime and tests to resolve against a future incompatible API.Impact
The example now evaluates the policy it ships. The delegated
task:readcapability passes the Cedar check, while Cedar deniestask:write. The change keeps the existing software-asserted attestation labels.Validation
pytest tests/unit/ tests/conformance/ -q --cov=src --cov-report=term-missing(202 passed, 93.82% coverage)mypy src/ca2a_runtime/ src/ca2a_verify/ruff check src/ tests/bandit -q -r src/ -c pyproject.tomlpip-audit(no known vulnerabilities)python examples/cross-operator-delegation/demo.py(12/12)Closes #45