Immutable solution version
Oso Cloud rejects facts that dont match the policy type signature
Complete solution
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.
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.
Context: 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.
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 1 · 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>