pub fn is_cacheable(trace: &Trace) -> boolExpand description
Whether a finished decision may be cached at all.
The single place these rules live. They were duplicated nowhere and must stay that way: a second backend re-deriving “was this proven?” from its own reading of the receipt is how one of them eventually accepts something the other would reject, and the failure is silent — an unverified answer served from cache looks exactly like a verified one.
Rejects, in order:
- Not served from a real attempt.
BestAttemptis the budget-exhausted fallback, served without a passing verdict; caching it would replay an answer that never passed anything. - A cache hit. Harmless in itself, but it would relocate
cache_sourceonto a replay rather than the decision that ran a gate, letting the provenance chain go a hop stale. - A verdict that is not an unambiguous Pass. An
Abstainis “the gate could not tell”, which is precisely the state that must never be frozen and replayed. - A deferred Fail already on the receipt. Rarely the path that matters — deferred verdicts
usually arrive later via
/v1/feedback, which is whatretracthandles — but free to check.