Skip to content

feat(plugins): add invinoveritas Review plugin (independent pre-action verdict gate) - #6014

Closed
babyblueviper1 wants to merge 1 commit into
IBM:mainfrom
babyblueviper1:invinoveritas-review-plugin
Closed

feat(plugins): add invinoveritas Review plugin (independent pre-action verdict gate)#6014
babyblueviper1 wants to merge 1 commit into
IBM:mainfrom
babyblueviper1:invinoveritas-review-plugin

Conversation

@babyblueviper1

Copy link
Copy Markdown

Grew out of #5437 (Human in the loop Approval for tool execution). Reading through the epic and hegu-1's proposal there, I noticed a real distinction worth making concrete as a plugin rather than just a comment: a risk_tier/gate.mode rule engine decides eligibility deterministically and fast (may this actor/tool/resource combination happen at all) — that's what unified_pdp and the other example plugins here already do well. It structurally cannot decide soundness for this specific payload — the same tool with different arguments can be fine or genuinely risky, which no finite rule set distinguishes without an explosion of conditions. That's a judgment call, which is what this plugin gates on.

What it does

  • Hooks tool_pre_invoke, calls POST /review (api.babyblueviper.com) with {tool_name, arguments} before the tool runs.
  • A reject verdict blocks the call by default (block_on_reject: true). Set false for an advisory/observe-only rollout that only annotates the result, never blocks.
  • Fails open on any /review-side problem (network error, timeout, malformed response, missing key) — never hangs or crashes the gateway on our service having a bad moment; metadata["invinoveritas_review"] = "unavailable" makes this visible rather than silent.
  • Optional sign: true attaches a portable, independently-verifiable signed proof (/verify-proof, free, no auth) to every verdict.
  • Disabled by default in plugins/config.yaml, matching every other opt-in plugin in this repo (e.g. the bundled cpex-* plugins).

How it composes with a PDP

Not a replacement for unified_pdp or similar — the two answer different questions and are meant to run together: PDP first (cheap, deterministic, denies the clearly-disallowed), review second (judgment, for whatever the PDP lets through). Full rationale in plugins/invinoveritas_review/README.md.

Testing

pytest plugins/invinoveritas_review/tests/test_invinoveritas_review.py -v

6/6 passing, real httpx.MockTransport (no live API key needed to run the suite) — covers reject-blocks, advisory-mode-never-blocks, approve-passes-through, fail-open-on-timeout, fail-open-on-malformed-response, and no-api-key-skips-the-call-entirely.

Happy to adjust naming/config shape/anything else — first PR to this repo, want to match the existing plugin conventions as closely as possible rather than introduce a new pattern.

…n verdict gate)

Grew out of IBM#5437 (Human in the loop Approval for tool execution): a
risk_tier/gate.mode rule engine (like unified_pdp) can decide WHETHER a
call needs human/policy attention deterministically and fast, but
structurally cannot decide whether THIS SPECIFIC payload is actually
sound -- that needs a judgment call, which is what this plugin gates on.

Gates tool_pre_invoke on POST /review to api.babyblueviper.com. Design
mirrors the invinoveritas AutoGen GovernedWorkbench integration's
discipline: fails open on any network/timeout/malformed-response error
(never blocks the gateway on our service having a bad moment), gates on
a real `reject` verdict by default (block_on_reject: true), advisory
mode available for observe-only rollout, optional signed proof
(independently verifiable via /verify-proof, no auth).

Disabled by default in plugins/config.yaml, matching every other
opt-in plugin in this repo. 6 tests, all passing, real HTTP mocking via
httpx.MockTransport (same pattern as invinoveritas's own AutoGen
integration tests) -- no live API key needed to run them.

Full technical background: IBM#5437
@cafalchio

Copy link
Copy Markdown
Collaborator

Thank you @babyblueviper1 . We are removing plugins from this repo. We are planning to create a marketplace of plugins that can be shared between projects that use cpex as plugin manager.
I will close this PR, but it will be a great candidate for the future marketplace.

@cafalchio cafalchio closed this Aug 6, 2026
@babyblueviper1

Copy link
Copy Markdown
Author

Appreciate the note, and the reasoning makes sense -- a per-repo plugin doesn't compose well once there's a real shared marketplace to point at instead. Happy to be an early submission once cpex/the marketplace is real and taking entries; the plugin itself doesn't need any real rework to move, it's a thin tool_pre_invoke hook with no other coupling to this repo's internals.

If there's a tracking issue or doc for the marketplace once it exists, I'd genuinely like to follow it -- the eligibility-vs-soundness distinction this plugin makes concrete (deterministic rule engine decides IF an action may happen at all, independent verdict decides whether THIS specific payload is sound) seems like exactly the kind of thing worth being first-class in a shared plugin ecosystem rather than reinvented per-integration.

@cafalchio

cafalchio commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Hi @babyblueviper1 thank you for the understanding, the cpex framework is being developed here. https://github.com/contextforge-org/cpex I think you can ask about the marketplace on their repo, they are responsive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants