Open Agent Rules
Contents
  1. Run the corpus against your implementation
  2. The runner algorithm
  3. Fixtures (132)

Conformance

Run the corpus against your implementation#

Fetch the index, fetch each fixture it names, and run each one: load the fixture's rules, apply the input, and compare against expected. An implementation claiming conformance passes every fixture, and reports the ones it skipped. A skipped fixture is not a passed fixture.

curl https://openagentrules.org/spec/1.0/conformance/manifest.json

The runner algorithm#

The requirements below define the evaluation algorithm end to end. Each step is separately identified so a conformance fixture can cite it.

Fixtures (132)#

FixtureCoversWhat it proves
copy-does-not-affect-decisionOAR-COPY-6A copy-carrying rule does not displace the rule that wins
copy-double-canonicalOAR-COPY-9A double renders as the shortest round-tripping decimal
copy-host-fact-reached-through-requires-factsOAR-COPY-5, OAR-FACT-19, OAR-FACT-15A host fact declared in requires_facts renders in copy
copy-malformed-construct-rejectedOAR-COPY-3A copy construct outside the grammar is rejected by name
copy-non-core-fact-unreached-rejectedOAR-COPY-5Copy naming a host fact the rule does not require is rejected at load
copy-non-interpolatable-type-rejectedOAR-COPY-4Copy binding a map fact is rejected at load
copy-renders-in-decisionOAR-COPY-1, OAR-COPY-7The winning rule's copy renders against the occurrence facts
copy-unknown-binding-rejectedOAR-COPY-2Copy binding an undeclared fact is rejected at load
copy-whitespace-insignificantOAR-COPY-8Whitespace inside a binding is permitted and insignificant
copy-zero-value-rendersOAR-FACT-25, OAR-COPY-4, OAR-FACT-24A fact at its zero value renders, it does not vanish
detector-threshold-in-whenOAR-OPS-10, OAR-FACT-9, OAR-CONF-18, OAR-FACT-6A detector supplies a score and the rule owns the threshold
detector-threshold-not-crossedOAR-OPS-10The same detector score below the rule's threshold produces no decision
doc-copy-fields-do-not-affect-decisionOAR-DOC-18Presentation copy describes the finding and changes nothing about the decision
doc-detector-ref-required-for-detector-kindOAR-DOC-17A detector-kind document without a detector reference is rejected at load
doc-effect-outside-vocabulary-rejectedOAR-DOC-8An effect outside the four this version defines is rejected at load
doc-extension-field-ignoredOAR-DOC-19An x- extension field is ignored rather than rejected
doc-invalid-id-rejectedOAR-DOC-4An id that does not match the identifier pattern is rejected at load
doc-missing-required-field-rejectedOAR-DOC-2A document missing a required field is rejected at load
doc-namespace-identityOAR-DOC-20, OAR-DOC-21, OAR-EVAL-7Two publishers may ship the same id under different namespaces; the decision still carries the bare id
doc-non-core-reference-must-be-listedOAR-DOC-22, OAR-PROF-5A rule referencing a standard-profile fact it does not list is rejected at load
doc-profile-field-is-informationalOAR-DOC-23The profile field records intent and derives no behaviour
doc-references-do-not-affect-decisionOAR-DOC-16Interoperability taxonomy tags are telemetry and change nothing
doc-rule-set-duplicate-identity-rejectedOAR-DOC-28, OAR-DOC-27A rule set holding two rules with one identity is rejected at load
doc-title-does-not-affect-decisionOAR-DOC-5A title is a label: it changes nothing about the decision
doc-unknown-field-rejectedOAR-DOC-19, OAR-CONF-1A field the specification does not define is rejected, naming the key
doc-unknown-kind-rejectedOAR-DOC-6A kind outside the closed set is rejected at load
doc-unknown-on-fire-action-rejectedOAR-FIRE-1A side-effect outside the closed on_fire vocabulary is rejected at load
doc-unsupported-major-rejectedOAR-DOC-3, OAR-CONF-2A document whose spec_version major is unsupported is rejected at load
doc-unsupported-minor-rejectedOAR-DOC-1, OAR-DOC-3A spec_version the engine does not support is rejected, not coerced
doc-version-leading-zero-rejectedOAR-DOC-3, OAR-CONF-2A spec_version with a leading zero is not a version
eval-allow-does-not-overrideOAR-EVAL-5An explicit allow contributes no decision and does not override a warn
eval-block-short-circuitsOAR-EVAL-3, OAR-CONF-10The first rule that fires with block stops the anchor occurrence
eval-first-of-winning-effect-decidesOAR-EVAL-10When several rules fire with the winning effect, the first in order decides
eval-kind-orderOAR-EVAL-1, OAR-EVAL-2, OAR-CONF-10Rules evaluate schema before policy before invariant, then by id
eval-namespace-breaks-identifier-tiesOAR-EVAL-1, OAR-DOC-21Rules of one kind and id order by namespace
eval-precedence-block-winsOAR-EVAL-4, OAR-EVAL-6, OAR-CONF-11A block outranks a nudge that fired earlier in the order
eval-precedence-nudge-over-warnOAR-EVAL-4, OAR-CONF-11A nudge outranks a warn when no rule blocked
expr-arithmetic-faults-raiseOAR-EXPR-14Division by zero, integer overflow and non-finite doubles raise
expr-builtins-evaluateOAR-EXPR-17The four built-ins evaluate as specified
expr-call-arguments-are-expressionsOAR-EXPR-16A call argument may be any condition of the declared type
expr-call-signature-mismatch-rejectedOAR-EXPR-16A call whose arguments do not match its signature is rejected at load
expr-chained-relation-rejectedOAR-EXPR-4A relation holding two relational operators is rejected at load
expr-comment-rejectedOAR-EXPR-6A comment is not part of the language
expr-double-literal-not-finite-rejectedOAR-EXPR-15A double literal with no finite value is rejected at load
expr-double-modulo-rejectedOAR-EXPR-9Modulo on doubles is rejected at load
expr-empty-list-rejectedOAR-EXPR-7An empty list literal is rejected at load
expr-equality-of-aggregates-rejectedOAR-EXPR-11Equality between lists or maps is rejected at load
expr-equality-of-unrelated-types-rejectedOAR-EXPR-11Equality between unrelated types is rejected at load
expr-grammar-derives-every-formOAR-EXPR-1, OAR-EXPR-8Every form the grammar derives is accepted and evaluated
expr-host-map-member-selectedOAR-EXPR-2, OAR-EXPR-13A reference selects a member of a host-tier map fact
expr-in-tests-membership-and-keysOAR-EXPR-12in tests list membership and map key presence
expr-in-with-non-string-rejectedOAR-EXPR-12in with a non-string left operand is rejected at load
expr-index-rejectedOAR-EXPR-1An index expression is outside the grammar and is rejected at load
expr-int-against-double-rejectedOAR-EXPR-10Ordering an int against a double is rejected at load
expr-int-literal-out-of-range-rejectedOAR-EXPR-15An int literal beyond 64 bits is rejected at load
expr-integer-division-truncatesOAR-EXPR-9Integer division and modulo truncate toward zero
expr-least-int-literalOAR-EXPR-15The least int is written as unary minus over 9223372036854775808
expr-map-member-selectedOAR-EXPR-2, OAR-EXPR-13A dotted reference selects a member of a map fact
expr-mixed-arithmetic-rejectedOAR-EXPR-9Arithmetic mixing int and double is rejected at load
expr-names-lex-greedilyOAR-EXPR-6A name beginning with a reserved word is one name
expr-node-floor-acceptedOAR-EXPR-19A condition of 256 nodes is accepted
expr-non-string-list-rejectedOAR-EXPR-7A list literal of non-strings is rejected at load
expr-non-string-member-raisesOAR-EXPR-13A present member that is not a string raises
expr-null-is-unknownOAR-EXPR-7null is an unknown identifier
expr-precedence-and-associativityOAR-EXPR-4Operators group by the specified precedence
expr-selection-from-non-map-rejectedOAR-EXPR-2Selecting a member of a fact that is not a map is rejected at load
expr-short-circuit-skips-raising-operandOAR-EXPR-5A decided && or || does not evaluate its right operand
expr-string-builtins-use-code-pointsOAR-EXPR-18String built-ins count and compare code points without folding case
expr-string-escapesOAR-EXPR-3The six string escapes decode as specified
expr-strings-order-by-code-pointOAR-EXPR-10Strings order by Unicode code point, not UTF-16 code unit
expr-ternary-branches-agreeOAR-EXPR-8A ternary whose branches differ in type is rejected at load
expr-undeclared-function-rejectedOAR-EXPR-17A call to a function that is neither built-in nor declared is rejected at load
expr-unknown-escape-rejectedOAR-EXPR-3An escape outside the six is rejected at load
fact-core-observation-composedOAR-FACT-1, OAR-FACT-5A rule composes core observations rather than reading a verdict
fact-dyn-member-comparison-rejectedOAR-FACT-22A condition comparing a selected dyn member is rejected at load
fact-int-out-of-range-fails-providerOAR-FACT-17, OAR-OPS-2An int fact outside 64 bits routes the rule through on_error
fact-mcp-accessor-wrong-type-errorsOAR-FACT-23A typed mcp accessor reading a member of another type is a fact-provider failure
fact-mcp-result-members-read-by-typeOAR-FACT-13The mcp profile reads result members by selection and typed accessors
fact-non-boolean-condition-rejectedOAR-FACT-3A condition that does not evaluate to a boolean is rejected at load
fact-observation-function-composedOAR-FACT-7A parameterized observation function is composed like any other observation
fact-type-outside-vocabulary-rejectedOAR-FACT-16A host fact declared under a type outside the closed vocabulary is rejected
fact-unknown-identifier-rejectedOAR-FACT-2, OAR-CONF-5A condition referencing an undeclared fact is rejected at load, naming it
fact-value-type-violation-erroredOAR-FACT-18A fact value that violates its declared type is a provider failure, not a coercion
fire-counter-incrementOAR-FIRE-2, OAR-FIRE-4, OAR-CONF-12A rule that fires applies its declared on_fire increment
fire-counter-of-unknown-rule-rejectedOAR-FIRE-6Reading the counters of a rule outside the rule set is rejected at load
fire-counter-read-before-incrementOAR-FIRE-5A condition reads the counter value from before this occurrence's own increment
fire-counter-threshold-crossingOAR-FIRE-3, OAR-FIRE-4, OAR-FIRE-6A rule reads another rule's counter on a later occurrence
fire-counters-keyed-by-identityOAR-FIRE-4, OAR-DOC-21Rules sharing an id under different namespaces keep separate counters
fire-counting-rule-feeds-escalationOAR-FIRE-6, OAR-FIRE-5An allow rule that counts feeds a rule that escalates on the count
fire-fire-count-reads-increment-counterOAR-FIRE-6fire_count reads the counter increment_counter maintains
fire-on-fire-survives-lost-precedenceOAR-EVAL-9A rule that fired and was enforced applies on_fire even when its effect loses precedence
fire-publish-event-changes-nothingOAR-FIRE-7publish_event does not affect the decision, trace, or counters
fire-same-call-run-breaks-on-different-argumentsOAR-FIRE-9A call with different arguments ends the run of the same call
fire-same-call-run-ignores-member-orderOAR-FIRE-9, OAR-FACT-20, OAR-FIRE-10same_call_run compares arguments as JSON values, ignoring member order
fire-same-code-reject-run-counts-blocksOAR-FIRE-8, OAR-FIRE-10same_code_reject_run counts the latest blocks carrying one identifier
fire-same-code-reject-run-resetsOAR-FIRE-8A decision other than a block ends the run of blocks
flow-sequence-does-not-matchOAR-FACT-10A flow whose steps appear out of order does not match
flow-sequence-matchesOAR-FACT-10, OAR-DOC-10A flow matches an ordered, not necessarily contiguous, subsequence
hint-copy-must-be-staticOAR-HINT-3Hint copy carrying a binding is rejected at load
hint-duplicate-code-rejectedOAR-HINT-2Two hints with one code are rejected at load, whatever their namespace
hint-evaluation-field-rejectedOAR-HINT-1A hint that carries a condition is rejected at load
hint-loads-and-does-not-perturbOAR-HINT-1, OAR-HINT-6A hint document loads beside rules and leaves every decision alone
hint-without-copy-rejectedOAR-HINT-2A hint that publishes no copy is not a hint
host-fact-absent-reads-zero-valueOAR-FACT-24, OAR-FACT-25, OAR-COPY-3A declared host fact absent from the occurrence reads as its zero value
host-int-fact-compares-as-intOAR-FACT-19, OAR-COPY-4An int host fact reached through a dotted select compares as an int
on-error-copy-omittedOAR-COPY-10, OAR-FACT-23An on_error block whose copy cannot render stands without copy
ops-applied-trace-records-passesOAR-OPS-7The applied-rules trace records selected rules that did not fire
ops-detector-ref-unresolvable-rejectedOAR-OPS-11A detector-kind rule whose reference cannot be resolved is rejected at load
ops-mandatory-monitor-rejectedOAR-OPS-9A mandatory rule cannot be monitored
ops-mandatory-not-disableableOAR-DOC-11, OAR-OPS-5A mandatory rule is evaluated and fires like any other
ops-monitor-does-not-short-circuitOAR-EVAL-8A monitored rule that would have blocked does not stop later rules
ops-monitor-error-produces-no-decisionOAR-OPS-8A monitored rule that cannot be evaluated produces no decision
ops-monitor-suppresses-effectOAR-OPS-1, OAR-CONF-9A rule in monitor mode is recorded but produces no effect
ops-monitor-suppresses-on-fireOAR-OPS-1, OAR-FIRE-2A rule in monitor mode applies no side-effect
ops-on-error-fail-closedOAR-DOC-13, OAR-OPS-2, OAR-CONF-7, OAR-CONF-18A rule that cannot be evaluated blocks under the default on_error, fail_closed
ops-on-error-fail-openOAR-OPS-3, OAR-CONF-18A rule that cannot be evaluated contributes nothing under fail_open
ops-on-error-substitute-codeOAR-OPS-4, OAR-CONF-18A named on_error substitutes the decision identifier, not the effect
ops-on-error-unknown-substitute-rejectedOAR-OPS-4An on_error naming no rule of the rule set is rejected at load
ops-severity-does-not-affect-decisionOAR-DOC-7Severity is telemetry only: an info-severity rule still produces its declared effect
prof-core-anchor-resolvedOAR-PROF-1, OAR-PROF-3, OAR-CONF-3A rule on a core anchor is resolved through the host profile map and fires
prof-core-anchor-unsupported-rejectedOAR-PROF-3, OAR-CONF-19, OAR-PROF-2A rule on a core anchor the host declares unsupported is rejected at load
prof-profile-map-names-every-anchorOAR-PROF-2An anchor profile map that omits a core anchor is rejected
prof-requires-facts-met-loadsOAR-PROF-6A rule requiring facts the host provides loads and fires normally
prof-requires-facts-unmet-rejectedOAR-DOC-22, OAR-PROF-6, OAR-CONF-4A rule requiring a fact the host does not provide is rejected at load, naming both
sel-absent-when-firesOAR-CONF-8A rule with neither when nor flow fires whenever it is selected
sel-clauses-andOAR-SEL-2, OAR-SEL-4, OAR-CONF-6A selector clause that does not match deselects the rule
sel-empty-matches-allOAR-SEL-3, OAR-SEL-4, OAR-DOC-12, OAR-DOC-14An empty selector matches every occurrence of the anchor
sel-unknown-anchor-rejectedOAR-SEL-1A document naming an anchor the host cannot resolve is rejected, naming the value
sel-unknown-clause-rejectedOAR-SEL-7A selector clause the vocabulary does not define is rejected at load
sel-unmodelled-clause-does-not-matchOAR-SEL-6A tools clause does not match at an anchor where no tool is invoked
stream-chunk-unsupported-rejectedOAR-OPS-6An engine that does not implement chunked evaluation rejects the document
substitute-carries-copyOAR-OPS-4, OAR-COPY-7A substitute on_error block carries the substitute rule's rendered copy