Scenario coherence
OpenAgentWorks 1.4.0 adds the required feature
scenario_coherence_v1 for producers adopting these
bindings. Core wire version remains 1.0.0. Consumers that do not support
this feature must refuse it.
Run python3 -B tooling/build_validate.py PATH_TO_BAG
from a trusted distribution. Checks run across every scenario, including
alternates and refusals. No packaged code is executed by validation.
Response contract
A scenario uses response_schema_pointer to select
#, #/anyOf/0, or another declared top-level
response variant. The validator checks all observed response fields
together, including types, values and closed properties. The default
capture source is http for HTTP operations and
artifact for verification operations; an HTTP-verifying
adapter explicitly declares response_source: "http".
For example, an inventory oracle asserting
movement_type: "receipt" and
unique_effect_count: 1 requires those fields in the
selected success variant. A generic variant requiring an unasserted
code cannot admit this success.
Top-level equality predicates are partial observations: missing,
unobserved required response fields are not errors. This is an admission
check, not a proof that every complex schema has a satisfying
completion. Nested pointers or non-equality predicates require a
complete response_example; that witness must validate
against the full response schema and selected variant and satisfy all
response predicates. For example, a gte count predicate can
use a full response example with count 3.
Setup and state changes
Every scenario declares setup_assertions, with an empty
array explicitly meaning no additional typed predicates. Each assertion
has source_ref, left JSON pointer,
operator, and exactly one of value or
right pointer. Operators are eq,
ne, gte, lte, gt,
lt. For example, activation asserts equality between
/business_facts/debits_minor and
/business_facts/credits_minor, referencing its accounting
requirement.
Operation outcome_constraints condition on a response
schema fragment and constrain initial_state_schema,
request_schema, and additional setup assertions. An
inventory projection returning cancelled requires an already cancelled
seed unless an explicit cancellation command is bound. An operation
transition_contract identifies the data model and the
initial, requested and observed state pointers; the result must match
the requested target and an allowed transition.
Copied negative-case prose is not a universal precondition. The
feature rejects retained
initial_state.original_precondition and the legacy copied
canonical-acceptance precondition pattern. Original acceptance criteria
remain conditional authority. Typed bindings must be authored and
reviewed: the tool does not extract arbitrary natural-language rules or
certify full business correctness.
Regression suite
python3 -B tooling/test_scenario_coherence.py checks
forbidden fields, wrong types, wrong variants, generic error escape
hatches, missing selectors, witness failures, setup conflicts, missing
or contradictory transition commands, and explicit HTTP capture
bindings. CI runs this suite alongside request admission and existing
conformance checks.