Capture contracts and privacy-safe coherence
OpenAgentWorks 1.6.0 introduces scenario_capture_contracts_v1. Core wire remains 1.0.0. Consumers must explicitly support the feature; unknown scenario features are refused.
Non-presence
Under strict coherence, absent predicates check non-presence in a complete response example, including closed objects, nested arrays and missing indexes. They do not require a declaration for a forbidden field. Positive assertions still need typed declarations. Adding the forbidden field to a witness must fail.
Observations and evidence
The build contract's capture_schemas maps http, artifact, event, database, browser and metric to offline JSON Schemas. Every positive observed pointer must resolve to a typed field and its authored observation value must match that type. Array item schemas provide indexed typing. These checks establish an authored interface, not that the application emits it. Current typed-pointer resolution intentionally supports explicit properties and homogeneous items; unsupported complex bindings must be authored explicitly rather than treated as checked.
A schema_rejection scenario may declare schema_rejection_evidence with code={source,pointer} and zero_effects=[{source,pointer,kind}]. The code must bind an actual INVALID_INPUT equality predicate in the operation response source. Effects must bind explicit equality observations: kind unchanged requires true, kind zero_count requires integer zero (never boolean false). Their source pointers must be typed under the capture feature. Without this feature the existing /code and /committed_effects=0 envelope remains supported. A missing proof, valid request claiming schema rejection, or unknown code must fail. Database proofs must be produced by independent before/after measurements, never copied from expected values.
Processes and replay
Keep production response schemas separate from test process metadata.
event/process may hold observed exit_code and inspected log
measurements; event/replays/
execution_steps declare id, operation_id, request, sequence/parallel mode, repeat count and optional state_overrides. Each operation must resolve, and each request must validate unless it exactly matches the scenario's declared malformed primary request. Fixture state and step overrides are test inputs only, never production authority. A model-state declaration is not a command.
Runtime capture checking
Run
python -B tooling/capture_contracts.py CONTRACT_JSON SCENARIO_ID CAPTURE_JSON
against independently recorded observations. It checks source schemas,
every predicate, operation response variants and bound replay bodies. It
never calls the application or manufactures evidence; authentication,
provenance and independent execution remain separate obligations.
Refusal transitions
A legitimate declared error response need not include a nested success-result field. The setup checker validates known refusal codes and checks an INVALID_TRANSITION refusal against the seeded/requested edge, without fabricating a success object or skipping genuine successful transition constraints.
Producer adoption
Pin the immutable tool release, author interfaces and complete witnesses, retain legacy inputs/oracles except documented capture-source moves, regenerate through the producer source and seal a new version. Run all shared regressions and fresh product acceptance. No passing specification check is an application certificate.