Evaluation Governance › The Reporting Gate
Language AI HandbookAll chapters The gate returns one of three dispositions. An approved record is eligible for public comparison, a restricted record needs a notice and stays out of the current ranking, and a withheld record is blocked. Those rules apply to callers that enforce the gate result.
The gate is also a pure function of the release and the benchmark state. It has no hidden state and no side effects: given the same inputs, it returns the same decision and the same reasons. That purity is what makes every decision reconstructable after the fact. An auditor can take a release as it existed at any moment and replay the gate to see exactly what it decided and why.
A practical gate is a small, transparent decision function with explicit reasons. Ours checks, in order:
- The required configuration is present, any judge has a nonblank ID and version, and the recorded accuracy is a finite number from zero to one.
- The privacy review records a nonblank reviewer and a cleared disposition.
- No active contamination flag of kind
exact_overlapon a reported number. - No
repeat_submissionsflag with a count of three or more for a public comparison claim. - The exact benchmark ID and version are registered. Deprecation carries a notice, and retirement blocks current reporting.
If any check fails, the release is withheld or restricted, with a written reason. The gate never silently approves; an approval is itself a recorded decision. The order of checks is not a priority: every failing check contributes a reason, so a release with two problems is told about both. This matters for correction workflows, where a reviewer wants to know everything they must fix before re-submitting.
PythonIn [16]Expand
DEMO_BENCHMARK_STATE = {
("syn-demo", "1.0.0"): "active"
} # benchmark_id -> deprecation state
def reporting_gate(
release: Release, benchmark_states: dict, allow_superseded: bool = False
) -> dict:
reasons = []
notices = []
fields = (
release.model_id,
release.model_hash,
release.benchmark_id,
release.benchmark_version,
release.split,
release.harness_id,
release.harness_version,
release.prompt_template,
release.scorer_code,
release.environment,
)
if (
any(not value.strip() for value in fields)
or not release.decoding_config
):
reasons.append("incomplete_configuration")
judge_name = (release.judge_id or "").strip()
judge_version = (release.judge_version or "").strip()
if (
release.judge_id is not None or release.judge_version is not None
) and not (judge_name and judge_version):
reasons.append("incomplete_judge_identity")
privacy = release.privacy_review
if not isinstance(privacy, dict):
privacy = {}
reviewer = privacy.get("reviewer")
if (
privacy.get("disposition") != "cleared"
or not isinstance(reviewer, str)
or not reviewer.strip()
):
reasons.append(
f"privacy_not_cleared:{privacy.get('disposition', 'missing')}"
)
if any(flag["kind"] == "exact_overlap" for flag in release.gaming_flags):
reasons.append("exact_overlap_contamination")
if any(
flag["kind"] == "repeat_submissions" and flag["count"] >= 3
for flag in release.gaming_flags
):
reasons.append("repeat_submission_tuning")
if (
type(release.score) not in {int, float}
or not 0 <= release.score <= 1
or not math.isfinite(release.score)
):
reasons.append("invalid_score")
benchmark_state = benchmark_states.get(
(release.benchmark_id, release.benchmark_version)
)
if benchmark_state not in DEPRECATION_STATES:
reasons.append("benchmark_unregistered")
elif benchmark_state == "retired":
reasons.append("benchmark_retired")
elif benchmark_state == "deprecated":
notices.append("benchmark_deprecated")
if release.superseded_by is not None:
if allow_superseded:
notices.append("historical_superseded_record")
else:
reasons.append("superseded_by_newer_release")
decision = (
"withheld" if reasons else "restricted" if notices else "approved"
)
return {
"release_id": release.release_id,
"decision": decision,
"reasons": reasons,
"notices": notices,
}Pass allow_superseded=True when creating a labeled historical view. A clear superseded release receives a notice and stays out of the current ranking. Unresolved flags and retirement still block approval. The stored original record remains available to an authorized auditor as a separate operation.
Let's walk a release through the full pipeline: create it with fingerprints, attach privacy review and gaming flags, then run the gate.
PythonIn [17]Expand
ledger = ReleaseLedger()
items = synthetic_items()
gold = SYNTHETIC_GOLD
responses = synthetic_model_responses(items, make_errors=True)
score = scorer_synthetic(responses, gold)
release = Release(
model_id="synth-model-a",
model_hash=framed_sha256("synth-model-a-weights"),
benchmark_id="syn-demo",
benchmark_version="1.0.0",
split="test",
harness_id="syn-harness",
harness_version="0.1.0",
prompt_template="Q: {question}\nA:",
decoding_config={"temperature": 0.0, "max_tokens": 16, "top_p": 1.0},
access_tier="gated",
environment="cpu-fp32",
judge_id=None,
judge_version=None,
scorer_code=SYNTHETIC_SCORER_CODE,
privacy_review=make_privacy_review(
items_contain_human=False,
consent_documented=True,
contains_personal_data=False,
redaction_applied=True,
reviewer="privacy-bot-v0",
),
gaming_flags=[],
)
release.score = score
ledger.add(release)
print(f"score: {score:.3f} (synthetic, known ~0.667)")
print("fingerprint:", release.fingerprint())
print("gate:", reporting_gate(release, DEMO_BENCHMARK_STATE))The score comes out at 0.667 because two of six responses were forced wrong by i % 3 == 2. The gate approves because the release is complete, privacy-cleared, contamination-free, and the benchmark is active. Every one of those favorable facts is visible in the release record, so an auditor can confirm the basis of the approval without having to trust the evaluator. Now suppose the same config is submitted repeatedly (a tuning red flag) and an exact overlap is discovered later. We model each change as a new event bound to the same release. The current view includes the event, and the gate flips.
ConsoleOut [18]Expand
recorded flags: [{'kind': 'exact_overlap', 'item_id': 'syn-001'}, {'kind': 'repeat_submissions', 'count': 3}]
gate after flags: {'release_id': 'demo-0001', 'decision': 'withheld', 'reasons': ['exact_overlap_contamination', 'repeat_submission_tuning'], 'notices': []}The gate withholds and names both open flags. The original snapshot remains intact. The current view includes the flags recorded later. This is the "one release, many gate evaluations over time" pattern, and it is how a governance system stays honest as new information arrives. Contrast this with a spreadsheet of scores, where the only way to "un-report" a bad number is to delete it, and the deletion leaves no trace of why.
The simulation calls the same gate for 2,000 synthetic releases with independent input assignments. A trial can fail several checks, so the plotted shares can overlap. The separate dashed line reports the share approved overall. In this seeded run, the reason counts are 144 incomplete configurations, 293 privacy holds, 210 overlaps, 260 repeat-submission holds, and 355 retired snapshots.
PythonIn [19]Expand
import random
def _sweep_gate(n: int = 2000, seed: int = 0) -> dict:
rng = random.Random(seed)
blocked = dict.fromkeys(
(
"incomplete_configuration",
"privacy_not_cleared",
"exact_overlap_contamination",
"repeat_submission_tuning",
"benchmark_retired",
),
0,
)
approved = 0
for _ in range(n):
incomplete = rng.random() < 0.08
privacy_blocked = rng.random() < 0.15
overlap = rng.random() < 0.10
repeated = rng.random() < 0.12
retired = rng.random() < 0.18
candidate = replace(
release,
prompt_template="" if incomplete else release.prompt_template,
privacy_review=bad_review
if privacy_blocked
else release.privacy_review,
gaming_flags=([{"kind": "exact_overlap"}] if overlap else [])
+ (
[{"kind": "repeat_submissions", "count": 3}] if repeated else []
),
)
result = reporting_gate(
candidate,
{("syn-demo", "1.0.0"): "retired" if retired else "active"},
)
for reason in result["reasons"]:
blocked[reason.split(":", 1)[0]] += 1
approved += result["decision"] == "approved"
return {"blocked": blocked, "approved": approved, "n": n}
_gate_sweep = _sweep_gate()
_gate_reason_names = list(_gate_sweep["blocked"])
_gate_reason_counts = list(_gate_sweep["blocked"].values())
_gate_reason_pct = [
100.0 * count / _gate_sweep["n"] for count in _gate_reason_counts
]VisualizationOut [20]Expand

Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!