{
  "id": "fact-profile-is-provided-whole",
  "title": "A host claiming a profile provides every member of it, not a convenient subset",
  "covers": [
    "OAR-FACT-16"
  ],
  "rules": [
    {
      "oar": "1.0",
      "namespace": "oar.test",
      "kind": "policy",
      "anchor": "tool.pre_invoke",
      "id": "WHOLE_PROFILE",
      "effect": "warn",
      "requires": {
        "profiles": [
          "tool"
        ]
      },
      "when": "permission_profile == \"restricted\" && size(arg_validation_errors) == 0 && !policy_denied && tool_args_fingerprint != \"\""
    }
  ],
  "input": {
    "capability": {
      "oar_capability_version": "1.0",
      "host": "oar.testhost",
      "anchors": {
        "core": {
          "tool.pre_invoke": "tool.pre_invoke",
          "tool.handler": "tool.handler",
          "tool.post_invoke": "tool.post_invoke",
          "agent.post_turn": "agent.post_turn",
          "agent.finalize": "agent.finalize",
          "model.input": "model.input",
          "model.output": "model.output",
          "model.tool_result": "model.tool_result"
        },
        "unsupported": []
      },
      "profiles": [
        "tool"
      ],
      "activity_window": 0,
      "detectors": [],
      "expression_nodes_max": 1024,
      "supports_transform": false
    },
    "anchor": "tool.pre_invoke",
    "facts": {
      "permission_profile": "restricted",
      "arg_validation_errors": [],
      "policy_denied": false,
      "tool_args_fingerprint": "abc123"
    }
  },
  "expected": {
    "decision": "warn",
    "code": "WHOLE_PROFILE"
  }
}
