Status: Launch baseline contract
This contract defines the minimum integration boundary for any framework adapter (LangChain, OpenAI Agents, MCP tools, etc.) to be considered MVAR-conformant.
Adapters MUST make direct tool execution impossible without passing through MVAR policy evaluation and execution-token authorization.
- No direct sink execution
- Tool/process/network/file execution MUST NOT be callable from adapter codepaths without MVAR authorization.
- All sink calls MUST route through a single enforcement wrapper.
- Provenance before policy
- Adapter MUST create/lookup a provenance node before sink evaluation.
- For untrusted external inputs, provenance integrity MUST be
UNTRUSTED.
- Deterministic policy evaluation
- Adapter MUST call:
policy.evaluate(...)for preflight decisions/logging, ORpolicy.authorize_execution(...)for enforcement path.
- For executable sinks, the effective enforcement call MUST be
authorize_execution(...).
- Execution-token boundary
- When
MVAR_REQUIRE_EXECUTION_TOKEN=1, adapter MUST pass the returned token into authorization. - If token is missing/invalid, execution MUST be blocked (fail-closed).
- Principal isolation
- Adapter MUST pass explicit principal identity into MVAR context (
MVAR_PRINCIPAL_IDor equivalent runtime mapping). - Overrides and trust state MUST remain principal-scoped.
- Structured auditability
- Adapter MUST preserve decision context:
tool,action,target,provenance_node_id,principal_id- decision outcome and reason
- policy/evaluation trace if available
An adapter is conformant if it provides a thin execution wrapper equivalent to:
result = adapter.enforce_and_execute(
tool="bash",
action="exec",
target="ls",
provenance_node_id=node_id,
parameters={"command": "ls /tmp"},
)And internally enforces this flow:
decision = policy.evaluate(...)(optional, for preflight telemetry)execution_decision = policy.authorize_execution(..., execution_token=decision.execution_token)- If outcome is
BLOCK-> return deny (never execute sink) - Else execute sink with bounded args/target
- Direct
subprocess, SDK tool call, HTTP client, or filesystem write from model output path without MVAR authorization. - Ignoring
authorize_executionand only checkingevaluate. - Falling back to permissive behavior on token/policy errors.
- Global overrides shared across principals.
Run the pytest harness template in conformance/pytest_adapter_harness.py inside the adapter repo.
Pass criteria:
- Missing execution token -> BLOCK
- Token/provenance mismatch -> BLOCK
- Valid token + trusted bounded target -> ALLOW or STEP_UP
- Untrusted + critical sink path remains blocked by sink-policy mechanism (not capability-only short-circuit)
- Adapter does not execute sink when authorization fails
- First-party adapters MUST pass conformance harness in CI before release.
- Third-party adapters SHOULD publish harness results and MVAR version compatibility.
This section defines the v1 compatibility surface consumed by the MIRRA Execution Governor bridge.
Required adapter entrypoint:
MVARExecutionAdapter.authorize_execution(tool, action, target, provenance_node_id, parameters=None, execution_token=None, pre_evaluated_decision=None)
Required decision fields (via PolicyDecision.to_dict()):
outcome(allow|block|step_up)reasonevaluation_trace(list)policy_hashtarget_hashsink.toolsink.actionsink.riskprovenance.node_idprovenance.integrityprovenance.confidentiality
Contract policy:
- v1.x releases MUST preserve the method name and parameter order above.
- v1.x releases MUST preserve decision fields above.
- Any breaking change requires a major-version bump and explicit migration guidance.