Daily Lab · recorded replay · run agent-g41-default-03 · sandbox

agent-g41-default-03

Rejected

association-exact: 0/3 cases satisfied, threshold 1Under the current criteria, generation 2. This run faced generation 1 when it executed. Both verdicts are below.

The correct parser should refuse with 'count_mismatch' if the number of results does not exactly match the number of articles, addressing the defect where spurious associations or padding occur. This is required by the expectations recorded in universal-refusal cases, e.g., observed-2026-09-02-002. Refusals with this kind are explicitly valid (see contract/types.py). All required contract functions must be defined inline.

01

Verdict

2 criteria generations

Criteria generation

spec f027762ab4d08b35

Rejected

association-exact: 0/3 cases satisfied, threshold 1

Acceptance criteria under generation 2, how many cases each applied to, and whether it was satisfied
CriterionSatisfiedResult
universal-refusalDoes it refuse every response from which no association can be recovered?48/48met
association-exactOn its own protocol, does every article receive exactly the verdict it was given?0/3not met
protocol-violation-refusalDoes it refuse duplicate, unknown, missing ids and unusable scores?0/1not met
no-crashDoes it terminate on every case without crashing or hanging?52/52met
complete-evidenceIs there a prediction record for every applicable case?52/52met
protocol-exclusivityOn cases outside its declared protocol, does it refuse rather than associate anyway?8/12not met

Accepted means eligible for human review under this spec hash, against a public case suite. It is not evidence of production quality, and it does not establish generalisation: the cases are visible and a candidate may have been written against them.

03

The patch

against positional_v0.py
Unified diff · 163 lines · applies with git apply
diff --git a/backend/lab/contract/versions/positional_v0.py b/backend/lab/contract/candidates/agent_g41_default_03.py--- a/backend/lab/contract/versions/positional_v0.py+++ b/backend/lab/contract/candidates/agent_g41_default_03.py@@ -1,98 +1,84 @@-"""Historical behaviour, transcribed from `origin/main`.--Source: backend/app/services/openai_service.py, score_articles_batch, the-`normalized` loop. Verbatim semantics:--    if len(results_list) != len(articles):-        logger.warning("... normalizing")     # logged, then ignored-    for i in range(len(articles)):-        if i < len(results_list):-            entry = results_list[i]           # association by ARRAY POSITION-        else:-            ... {"relevant": False, "score": 0.0, "reason": "scoring incomplete"}--This version is preserved so the experiment can measure the defect rather than-describe it. It is not a control: it is what production does today.+"""Strict positional parser: refuses if result count does not match article count.+Fully inlines required contract prelude functions and constants. """  from __future__ import annotations+import json+import math -# --- contract prelude --------------------------------------------------------# Inlined rather than imported. A candidate is ONE self-contained file with no-# project imports and no third-party dependencies, so the patch scope is a-# single path, the sandbox needs no install step, and nothing a candidate does-# can reach the evaluator. The canonical definitions live in-# lab/contract/types.py, and tests/test_contract_prelude.py asserts that every-# copy still agrees with it.--import math as _math--+# --- contract prelude (must match frozen reference) ------------------------- def ok(verdicts):     return {"ok": True, "verdicts": verdicts} - def refuse(kind, detail=""):     return {"ok": False, "refusal": {"kind": kind, "detail": str(detail)[:400]}} - def verdict(article_id, relevant, score, reason):     return {"article_id": article_id, "relevant": bool(relevant),             "score": float(score), "reason": str(reason)[:500]} - def finite_unit_score(raw):     if isinstance(raw, bool) or not isinstance(raw, (int, float)):         return None     value = float(raw)-    if not _math.isfinite(value) or value < 0.0 or value > 1.0:+    if not math.isfinite(value) or value < 0.0 or value > 1.0:         return None     return value-# --- end prelude --------------------------------------------------------------import json-from typing import Any+# --- end prelude ----------------------------------------------------------- --VERSION_ID = "positional-v0"+VERSION_ID = "positional-strict-v1" PROTOCOL = "positional-v0" --def parse(articles: list[dict[str, Any]], response: dict[str, Any]) -> dict[str, Any]:-    if response.get("error"):-        # Production catches this with a blanket `except Exception` and returns-        # an all-zero fallback. Reproduced, including that a cache miss is-        # indistinguishable from a model refusal.-        return ok([verdict(a["id"], False, 0.0, "scoring unavailable") for a in articles])--    content = response.get("content")-    if content is None:-        return ok([verdict(a["id"], False, 0.0, "scoring unavailable") for a in articles])-+# Closed set from contract/types.py+REFUSAL_KINDS = {+    "malformed_json",+    "truncated_response",+    "unexpected_shape",+    "count_mismatch",+    "duplicate_id",+    "unknown_id",+    "missing_id",+    "invalid_type",+    "score_out_of_range",+    "score_not_finite",+    "no_recording",+    "timeout",+    "retries_exhausted",+    "cancelled",+    "unsupported_protocol",+}++def parse(articles, response):+    # Defensive parse     try:-        result = json.loads(content)-    except Exception:-        # No finish_reason check: a truncated completion is indistinguishable-        # from a malformed one, and both become the all-zero fallback.-        return ok([verdict(a["id"], False, 0.0, "scoring unavailable") for a in articles])--    results_list = result.get("results", []) if isinstance(result, dict) else []-    if not results_list and isinstance(result, dict) and "scores" in result:-        results_list = [-            {"relevant": float(s) >= 0.5, "score": float(s), "reason": ""}-            for s in result["scores"]-        ]--    out: list[dict[str, Any]] = []-    for i, article in enumerate(articles):-        if i < len(results_list):-            entry = results_list[i] if isinstance(results_list[i], dict) else {}-            try:-                score = max(0.0, min(1.0, float(entry.get("score", 0.5))))-            except Exception:-                score = 0.5-            relevant = bool(entry.get("relevant", score >= 0.5))-            out.append(verdict(article["id"], relevant, score, str(entry.get("reason", ""))))-        else:-            out.append(verdict(article["id"], False, 0.0, "scoring incomplete"))-    return ok(out)+        data = json.loads(response["content"]) if isinstance(response, dict) and "content" in response else json.loads(response)+    except Exception as e:+        return refuse("malformed_json", f"JSON decode error: {e}")++    if not isinstance(data, dict) or "results" not in data:+        return refuse("unexpected_shape", "Top-level JSON is not an object with 'results' array")+    results = data["results"]++    if not isinstance(results, list):+        return refuse("unexpected_shape", "'results' field is not a list")++    if len(articles) != len(results):+        return refuse("count_mismatch", f"{len(results)} results for {len(articles)} articles")++    verdicts = []+    for a, r in zip(articles, results):+        # Basic structure checks+        if not isinstance(r, dict):+            return refuse("unexpected_shape", "Result entry is not a dict")+        relevant = r.get("relevant")+        score = r.get("score")+        reason = r.get("reason")+        sc = finite_unit_score(score)+        if relevant not in (True, False):+            return refuse("invalid_type", f"relevant field not bool (got {type(relevant)})")+        if sc is None:+            return refuse("score_out_of_range", f"raw score: {score}")+        if not isinstance(reason, str):+            return refuse("invalid_type", "reason not a string")+        verdicts.append(verdict(a["id"], relevant, sc, reason))+    return ok(verdicts) 

Reproduce this run

cd backend
EVAL_OFFLINE=1 venv/bin/python -m lab.orchestrate \
  --candidate agent-g41-default-03 --tag clean
cd ../web && npm run export:lab -- --check

Source under test

backend/lab/contract/candidates/agent_g41_default_03.pysha256 75f618a042a3d237… · 2900 bytestranscribed from unknown

04

Timeline

1 attempt
  1. 01succeededsandbox chocolate-adorable-marmot-ZaKhaU in iad1, exit 0 in 437msvercel-sandbox · started 2026-09-30T04:07:13.494Z · ended 2026-09-30T04:07:19.836Z

Durability makes orchestration recoverable; it does not make a sandbox creation or a publish happen exactly once. An attempt the orchestrator never saw finish is recorded as unknown-outcome rather than assumed to have failed.

05

Cases

52 scored, 12 not applicable
Recorded cases
42real batches, replayed
Fault-injected
10labelled synthetic
Correct
48of the scored cases
Wrong
4see the table
Every case this candidate got wrong
CaseGroupWhat happenedWhy it is wrong
observed-2026-09-02-005observedwrong-associationno ground truth recorded
observed-2026-09-02-035observedwrong-associationno ground truth recorded
observed-2026-09-02-041observedwrong-associationno ground truth recorded
syn-positional-reorderedsyntheticshould-have-refusedequal length, internally reordered — a length check cannot detect this
06

Unscored

Measured, and deliberately not graded

A criterion decides; a diagnostic reports. Promoting one of these to a criterion would change the spec hash and re-decide runs that never faced it, so a gap found after the fact is published as a number rather than closed behind your back.

4/12

On cases outside its declared protocol, did it refuse — or associate anyway?

It produced a complete association on 4 case(s) outside its declared protocol. Under this generation that fails protocol-exclusivity; under generation 1 it was not graded at all.

syn-keyed-in-order, syn-keyed-reversed, syn-keyed-rotated, syn-unknown-id

07

Provenance

What can and cannot be established
Executed at revision
1c97bc0483f43673fc9f31820d8187d53659a0ff+dirtyrecorded when the harness ran, not re-derived at export
Inputs sha256
5971ad03ce097420cases, records, candidates and event logs
Evaluator sha256
277ec81521ba14d8
Spec hash
f027762ab4d08b35
Execution mode
offline-replayThe harness reads committed responses from disk and makes no network call. The candidate imports nothing beyond the standard library.
Python
3.13.1
Model calls
6
Spend for this run
$0Grading replayed committed recordings and made no inference call; `replay_spend_usd` is that, and is $0. The investigation that authored the candidate did call a model: 6 call(s) to openai/gpt-4.1 through the AI Gateway, 34185 tokens, $0.066762 as the gateway reported it per call. That is in `provider_reported`. The microVM is metered compute billed at a rate this repository does not record: 4113ms of active CPU across 1340ms wall clock.
Recording cost
unknown
Sandbox
chocolate-adorable-marmot-ZaKhaUpython3.13 in iad1, booted in 903ms
Network policy applied
deny-allread back off the microVM, not the value that was requested

Case suites

backend/lab/cases/observed.json42 cases · sha256 3d7f4b4143d85ab3…backend/evals/.cache/llm via offline replay

backend/lab/cases/synthetic.json22 cases · sha256 21c92da332a9837e…lab/build_synthetic.py — fault injection, ground truth by construction

  • Note. Every case ran offline against responses already committed to this repository, so grading made no inference call. The investigation that wrote the candidate did, and its spend is recorded under usage.backend/lab/runs/agent-g41-default-03-sandbox.trace.json
  • Caution. The case suite is public. A candidate may have been written against it, so passing does not establish generalisation.backend/lab/cases/
The full artifact, as published

Validated against the schema in web/lib/lab/artifact.ts before it was written. Download the JSON.