Skip to content

test: close OPA adapter review coverage gaps - #96

Merged
imran-siddique merged 2 commits into
agentrust-io:mainfrom
dinakarjs:test/opa-review-boundaries
Oct 17, 2026
Merged

imran-siddique merged 2 commits into
agentrust-io:mainfrom
dinakarjs:test/opa-review-boundaries

Conversation

@dinakarjs

@dinakarjs dinakarjs commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Follow up the nonblocking review on #73 with three test cases: reject invalid elements inside the ids list, preserve successful challenge/error mapper outputs, and map an omitted result to not_applicable. The unhashable-mapper correction and its dict/list controls are already on main; this PR preserves them. Production source, schema and contract are unchanged.

Validation on Python 3.12: full unittest suite 151 tests, 2 skipped. The runner inherited OTEL_TRACES_SAMPLER=parentbased_traceidratio with OTEL_TRACES_SAMPLER_ARG=0.01; clearing OTEL_TRACES_SAMPLER for the test process restored the default recording behavior. No tracing environment is modified persistently. The first run with inherited sampling failed three unrelated span-recording checks; these are not claimed as fixed by this PR.

Three isolated mutations were detected: removing ids element validation (4 failures), mapping challenge/error to deny (2 failures), and defaulting missing result to False (1 failure). Source restored and git diff --check passes. These controls verify adapter behavior only, not policy enforcement or OPA service execution.

Signed-off-by: Srinivasa Dinakar <78673153+dinakarjs@users.noreply.github.com>
@dinakarjs
dinakarjs requested review from a team and imran-siddique as code owners October 16, 2026 18:50
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 16, 2026

@rajnisht7 rajnisht7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes looks good, this PR adds three focused tests that close the remaining OPA coverage gaps from the earlier review, which are invalid ids elements, challenge/error mapper paths, and omitted result -> not_applicable.

Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>

Copy link
Copy Markdown
Contributor Author

Refreshed current main at e193283; the merge brings in the current dependency locks and does not change this PR's tests or runtime source. Installed the resulting hash-pinned test lock, then validated on Python 3.12: 151 unittest cases run, 149 passed and 2 skipped. Version, bundled-schema, OTel compatibility, TypeScript-schema parity and conformance-fixture checks pass; diff whitespace checks pass. Published tree matches the tested tree. Hosted checks and fresh independent review remain separate.

Copy link
Copy Markdown
Contributor Author

@imran-siddique current head e193283 is approved by @rajnisht7, who is listed in this repository's maintainer policy, and all seven hosted checks pass. The branch is current and mergeable. I attempted a normal head-pinned squash merge under the user's instruction to close the work, but the GitHub connector returned 403 Resource not accessible by integration. Please merge through the normal maintainer path; no branch rule or approval bypass is requested.

@imran-siddique
imran-siddique merged commit 96c9c5d into agentrust-io:main Oct 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants