Skip to content
docs
Arxo ↗

Replay an answer from the same inputs

For LLMs7 sections

I want to replay an answer from the same inputs.

Current time must not be substituted for a stored legal date; a mistyped time axis is not a date.

Incorrect form
effective [@2026-10-01, @2026-09-01);
Arxo Law
language "law.core" version "0.2";
package recipe.m06 version "1.0.0";
namespace "urn:recipe:m-queries:06";
entity Person;
relation filed(p: Person);
relation accepted(p: Person);
rule Accept strict { for p: Person; effective [@2026-09-01, @2026-10-01); when filed(p); then accepted(p); }
Input / variantQuestionExpectation
1. inside the windowtruth(accepted(entity_ref("urn:recipe:m-queries:p")))truth_status == TRUE_ONLY; evaluation_status == COMPUTED;
2. different legal datetruth(accepted(entity_ref("urn:recipe:m-queries:p")))truth_status == NEITHER; evaluation_status == COMPUTED;
inside window replays identically
Arxo Law
test "inside window replays identically" {
given {
context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; }
assert filed(entity_ref("urn:recipe:m-queries:p"));
}
evaluate truth(accepted(entity_ref("urn:recipe:m-queries:p")));
expect truth_status == TRUE_ONLY; expect evaluation_status == COMPUTED;
}
other law date changes hashes
Arxo Law
test "other law date changes hashes" {
given {
context { legal_time @2026-10-01; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; }
assert filed(entity_ref("urn:recipe:m-queries:p"));
}
evaluate truth(accepted(entity_ref("urn:recipe:m-queries:p")));
expect truth_status == NEITHER; expect evaluation_status == COMPUTED;
}

Replay feeds the same CLIR, case, query, and semantic version 0.2. All canonical answer bytes are checked, not only truthStatus. Then two runs receive different execution receipts:

JSON
[
{"engine": "one", "executedAt": "2026-09-13T10:00:00Z"},
{"engine": "two", "executedAt": "2026-09-14T10:00:00Z"}
]

The receipt is passed as a separate receipt.json / EvaluationRequest.receipt field. Both implementations keep the whole answer unchanged. Changing legal_time in scene 2 leaves the program’s theoryHash and artifactHash, but changes caseHash and resultHash. Thus the three hashes theory/artifact/result cannot be used interchangeably.

Check of result fields and extra inputs:

Python
>>> import runpy
>>> checks = runpy.run_path("docs/recipes/m-queries/resources/check.py")
>>> checks["replay"](https://github.com/arxohq/law/blob/master/docs/recipes/m-queries/6)
True

The sidecar mutation reproduces LDC-E4109. Counterfactual table variants are executed separately; input errors are not passed off as NEITHER.

The execution receipt is not part of resultHash.

The result is invariant when the receipt changes, and changes when legal_time changes.

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.