Browse documentation
Query code and test evidence
Find a definition, inspect checked context and compare a receipt with current inputs.
Use the pricing project from the library tutorial. Run commands from its parent directory.
1. Find a definition
effectful code find ./pricing/consumers/example \
--query scale --format json
Find the library’s scale definition. Retain its id and snapshot. Search identifies candidates; it does not show execution or test coverage.
2. Read its context
Replace the placeholders with those returned values:
definition_id='PASTE_DEFINITION_ID'
snapshot='PASTE_SNAPSHOT'
effectful code context ./pricing/consumers/example \
--id "$definition_id" --depth 2 \
--expected-snapshot "$snapshot" --format json
effectful code show ./pricing/consumers/example \
--id "$definition_id" --expected-snapshot "$snapshot" --format json
context returns bounded checked relationships; show includes the body. The expected snapshot prevents a request from silently reading a changed revision. Library and consumer definitions retain their original owners.
3. Record fresh test evidence
evidence_dir=$(mktemp -d)
effectful graph test ./pricing/consumers/example \
--no-cache --evidence "$evidence_dir/run-001.json" --format json
The receipt records consumed source and case inputs, the bundle and execution environment. A failed test produces failed evidence.
4. Compare it with current inputs
effectful code evidence ./pricing/consumers/example \
--receipt "$evidence_dir/run-001.json" --format json
This checks the current graph but runs no tests. Read outcome and applicability separately: an applicable failure is still a failure.
5. Edit and compare again
Change the library or a consumer test, then rerun the evidence query. Inspect the changed components. A relevant change makes a test result stale; an unrelated change can preserve a case’s applicability.
Use a new receipt filename for fresh execution. Existing evidence files are not overwritten.
Scope
These are scripted in-memory graph tests. They cover supplied inputs, effect answers, messages, restarts and expected results or traces. They do not test a live provider, UI, native adapter or deployment.
Receipt integrity detects accidental alteration; it is not authenticated attestation. See the evidence reference for the exact fields and statuses.