Skip to content

Commit 2662f28

Browse files
authored
Merge branch 'staging' into codex/fix-daily-user-spend-alert-dedupe
2 parents 81869ca + a0fefdf commit 2662f28

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

backend/api/services/agent_capabilities.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ def is_stale(
468468
current_hash: str,
469469
schema_version: int,
470470
task_version_id: str,
471+
experiment_id: str | None = None,
471472
) -> bool:
472473
"""Whether a stored block must be regenerated. See ``stale_reason``."""
473474
return (
@@ -476,6 +477,7 @@ def is_stale(
476477
current_hash=current_hash,
477478
schema_version=schema_version,
478479
task_version_id=task_version_id,
480+
experiment_id=experiment_id,
479481
)
480482
is not None
481483
)

backend/tests/test_agent_capabilities_endpoint.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,38 @@ def test_not_stale_when_all_match():
4646
)
4747

4848

49+
def test_is_stale_when_experiment_changed():
50+
block_meta = {
51+
"cohort_hash": "aaa",
52+
"schema_version": 1,
53+
"task_version_id": "v1",
54+
"experiment_id": "exp-1",
55+
}
56+
assert is_stale(
57+
block_meta,
58+
current_hash="aaa",
59+
schema_version=1,
60+
task_version_id="v1",
61+
experiment_id="exp-2",
62+
)
63+
64+
65+
def test_not_stale_when_experiment_matches():
66+
block_meta = {
67+
"cohort_hash": "aaa",
68+
"schema_version": 1,
69+
"task_version_id": "v1",
70+
"experiment_id": "exp-1",
71+
}
72+
assert not is_stale(
73+
block_meta,
74+
current_hash="aaa",
75+
schema_version=1,
76+
task_version_id="v1",
77+
experiment_id="exp-1",
78+
)
79+
80+
4981
def test_missing_metadata_is_stale():
5082
assert (
5183
is_stale(None, current_hash="aaa", schema_version=1, task_version_id="v1")

docs/swe-marathon-eval-runbook.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ oddish run -p <task-dir> --agent <agent> --model <provider/model> \
7979
API host and disables server-side web tools for restricted agent phases.
8080
Optional overrides still exist (`--allow-agent-host`, `--disable-web-tools`)
8181
if you need an extra host or want to force the web-tool disable.
82+
- DO NOT RUN QA. DO NOT USE THE QA FLAG.
8283

8384
## 3. Load-bearing gotchas (each cost real debugging time)
8485

0 commit comments

Comments
 (0)