Skip to content

Runtime profile test cases

Use these cases when Agent Policy is used by Agent Runtime, Lime AgentRuntime Profile, or an equivalent runtime spine. The goal is to prove that policy decisions, approvals, grants, waivers, redaction, and retention facts can be referenced by runtime events without becoming runtime execution itself.

Canonical boundary

text
RiskScope / PolicyDecision / ApprovalRequest / PermissionGrant / WaiverRecord / PolicyTrace
  -> permission.*, action.*, sandbox.*, tool.*, model routing, evidence, and UI refs
  -> Runtime enforces; UI renders; Evidence records

Agent Policy owns the decision fact. Runtime owns enforcement and execution. UI owns presentation. Evidence owns audit packaging.

Runtime correlation fields

Policy events SHOULD preserve these ids when available:

FieldPurpose
runtime_id / session_id / thread_id / turn_idScope a policy decision to a runtime turn.
task_id / run_id / attempt_idScope a decision to a task attempt.
step_id / tool_call_id / action_idJoin tool requests and action waits to policy decisions.
evidence_id / trace_idJoin policy traces to evidence and telemetry.
context_id / artifact_idJoin policy decisions to adjacent owners.

Test cases

IDCaseInput factsExpected result
APOL-AR-ID-001Decision preserves runtime idsTool or model action is evaluatedPolicy event includes session_id/thread_id/turn_id and applicable task/run ids.
APOL-AR-RISK-001Risk scope is explicitTool touches filesystem/network/credentialRisk scope names action, resource, actor, context refs, and severity.
APOL-AR-DEC-001Allow does not execute by itselfPolicy returns allowRuntime still emits enforcement/tool events; policy only records decision.
APOL-AR-ASK-001Ask maps to runtime actionPolicy returns askRuntime can emit permission.evaluated and action.required with action_id.
APOL-AR-DENY-001Deny blocks executionPolicy returns denyRuntime emits denied/blocked fact; no successful tool result is implied by policy alone.
APOL-AR-GRANT-001Permission grant is boundedUser approves requestGrant carries constraints, expiry, scope, actor, and action_id.
APOL-AR-WAIVER-001Waiver preserves original decisionUser or admin waives deny/askWaiver links original decision, reason, approver, expiry, and evidence refs.
APOL-AR-REDACT-001Redaction/retention is enforceableEvidence or context export includes sensitive dataPolicy obligations are referenced by context/evidence/export without exposing raw secrets.
APOL-AR-DELEGATE-001Delegated approval keeps sourceSubagent or remote agent asks for permissionApproval request includes parent/child or remote ids and delegated actor.
APOL-AR-TRACE-001Policy trace joins runtime/evidenceEvidence pack is exportedPolicy trace refs can join decision, action, tool call, runtime ids, and evidence ids.

Failure cases

These are incompatible with Agent Policy:

  1. A policy record claims a tool executed successfully.
  2. UI marks approval resolved before runtime confirms action.resolved or grant issuance.
  3. A grant lacks scope, expiry, or actor information.
  4. A waiver hides the original denied or ask decision.
  5. Delegated/remote approval drops parent session/thread/task lineage.
  6. Redaction obligations are only UI copy and not referenced by context/evidence export.

Minimum validation set

For Agent Runtime-compatible integration, run at least:

  1. APOL-AR-ID-001 and APOL-AR-RISK-001.
  2. APOL-AR-DEC-001, APOL-AR-ASK-001, and APOL-AR-DENY-001.
  3. APOL-AR-GRANT-001 and APOL-AR-WAIVER-001.
  4. APOL-AR-DELEGATE-001 and APOL-AR-TRACE-001.

Runtime proves enforcement happened. Agent Policy proves why a decision, approval, grant, waiver, or redaction obligation existed.

Draft standard for portable agent policy decisions, approvals, permissions, risk, and audit traces.