Skip to content
docs
Arxo ↗

Read an external limit from a snapshot

For LLMs7 sections

I want to obtain an external indicator from a precisely pinned data set.

An external indicator is read only from a presented snapshot; there is no ambient access.

Declaring a function without a link to a snapshot does not specify a reproducible call.

Incorrect form
external snapshot function limit(key: Text) -> Decimal {
capability "recipe.limit/1";
}

Even a complete declaration without a presented snapshot yields EXTERNAL_SNAPSHOT_MISSING.

The package declares the contract; the scene presents the resource resources/04-limit.json. Its hash is produced by the neighbouring generator, with no semantics of its own.

Arxo Law
language "law.core" version "0.2";
package recipes.n.r04 version "0.1.0";
namespace "urn:recipe:n-package:04";
external snapshot function limit(key: Text) -> Decimal {
capability "recipe.limit/1";
snapshot_from context.limits;
}
relation measured(key: Text, amount: Decimal);
relation exceeds(key: Text);
rule Exceeds strict {
for key: Text;
for amount: Decimal;
when measured(key, amount) and amount > limit(key);
then exceeds(key);
}
FactsQuestionAnswer
measured(“lead”,2.0), snapshot limit 1.0exceeds(“lead”)TRUE_ONLY, COMPUTED
Same facts, no snapshotexceeds(“lead”)NEITHER, EXTERNAL_SNAPSHOT_MISSING

The external snapshot is passed as an evaluation-request input; the command-line test runner has no such argument, so for this scene the test runner checks both evaluators through the same lowered test.

limit reads from snapshot
Arxo Law
test "limit reads from snapshot" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
assert measured("lead", 2.0);
}
evaluate truth(exceeds("lead"));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
missing snapshot refuses external call
Arxo Law
test "missing snapshot refuses external call" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
assert measured("lead", 2.0);
}
evaluate truth(exceeds("lead"));
expect truth_status == NEITHER;
expect issue(EXTERNAL_SNAPSHOT_MISSING);
}

The teaches mutation removes snapshot_from and pins a static rejection. The second scene drops the resource under the same complete declaration and facts: there is no network lookup of a missing indicator.

This is a synthetic limit, not a live rate. Exchange rates, registries, and measurements are pinned by the supplier. Snapshot completeness and the policy for choosing a value belong to the subject-matter package; data is not requested by URL during computation. Request inputs are schema-checked before evaluation: the pinned resource carries a snapshot schema version, and without it the request itself is refused.

Absence of a set is not a zero rate. The second scene holds EXTERNAL_SNAPSHOT_MISSING; the first applies the pinned value for real.

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

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