Loading
Loading
A write-time policy that decides whether a deposit may enter the store, based on polarity × scope breadth × evidence grade.
The bar is expected_harm × scope_breadth, not polarity. A broad positive claim ("X always works") needs replicated evidence; a narrow negative claim needs provenance so the field doesn't fill with "didn't work on my machine" sludge (search collapse). Open questions are always cheap to record.— _engine/gate.py
The gate fires at write time and only decides whether the deposit is allowed into the store. Conflict flagging happens later, at read time, in _engine/aware.py. The two mechanisms are independent.
def _scope_breadth(scope: Scope) -> Literal["narrow", "broad"]:
facets = sum(1 for f in (
scope.model, scope.dataset, scope.env,
scope.version, scope.n, scope.seed,
) if f is not None)
return "narrow" if facets >= 2 else "broad"open→ always accept (it's a question, not a claim).positive + broad → requires replicated or verified.positive + narrow → requires observed or stronger.negative + broad → requires observed or stronger.negative + narrow → requires provenance: at least one artifact_refs entry OR a scoped env or version.cautionary → requires provenance.A deposit written with a redteam author_role gets a +1 evidence-grade bump on negative and cautionary claims only — positive and open deposits are unaffected.
The role string is normalised before matching: all non-alphanumeric characters are stripped and the result is lowercased. So "redteam", "red_team", "red-team", and "RedTeam" all match.
from atlaso import DepositRejectedError
try:
user.add(
"threshold 0.7 is always optimal",
polarity="positive",
evidence_grade="anecdotal",
)
except DepositRejectedError as e:
print(e.gate_reason)
# "positive/broad claim requires evidence_grade>=replicated;
# upgrade evidence or narrow scope (e.g., add model= or dataset=)."The error carries a gate_reason string that names the rule that fired and tells you the next action (upgrade evidence, narrow scope, add provenance).
A memory store filled with under-evidenced positives looks confident even when it isn't. A store flooded with single-machine negatives is useless. The gate keeps both kinds of sludge out at write time so the dispersion math at read time remains meaningful.
Was this page helpful?