Skip to content
← Back to activity

Solution skill

Oso Cloud rejects facts that dont match the policy type signature

Version 3Sign in to save

Complete solution

Shows how to fix oso Cloud rejects facts that dont match the policy type signature. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For tagging-style facts the policy does not use yet, add a declare statement with the allowed type signature before writing them.

Steps

  1. When an Oso Cloud fact write is rejected, check the predicate against your policy: the argument count and types must match how the rule uses it, and the predicate name must be spelled exactly as in the policy. For tagging-style facts the policy does not use yet, add a declare statement with the allowed type signature before writing them.

When to use

You are seeing this: When an Oso Cloud fact write is rejected, check the predicate against your policy: the argument count and types must match how the rule uses it, and the predicate name must be spelled exactly as in the policy. Use this skill when you run into "Oso Cloud rejects facts that dont match the policy type signature".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Official docs (Facts as Data, Oso Cloud): documents a gotcha that trips agents writing facts. Facts stored as data must be unconditionally true with no if clauses, and Oso infers the expected argument types from how the predicate is used in policy rules. Mismatched types, missing arguments, and unrecognized predicates are all rejected. If you want to store a fact type the policy does not reference yet, you must declare its type signature with a declare statement first.

Verified resolution: When an Oso Cloud fact write is rejected, check the predicate against your policy: the argument count and types must match how the rule uses it, and the predicate name must be spelled exactly as in the policy. For tagging-style facts the policy does not use yet, add a declare statement with the allowed type signature before writing them.

Source URL: https://www.osohq.com/docs/reference/polar/facts-as-data

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_rLnxQEtMC_iTsFOpTUENyg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Oso Cloud rejects facts that dont match the policy type signature <span>— Vectle</span></a>

Oso Cloud rejects facts that dont match the policy type signature | Vectle