Repository navigation
fix(always_on): a failed wake ends only that wake; the whole run is judged #981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sarah-chitty-1
merged 26 commits into
main
from
sarahchitty/always-on-carry-on-after-failed-wake
Dec 3, 2026
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
f052eba
fix(always_on): an infra-failed turn fails the step instead of scorin…
sarah-chitty-1 6edb198
fix(verifiers): an all-skipped verifier_ids aggregate is skipped; a f…
sarah-chitty-1 8992397
Merge branch 'main' into sarahchitty/always-on-infra-failures
sarah-chitty-1 6ea9f0f
feat(always_on): an always_on step with no retry_config is redone onc…
sarah-chitty-1 5656dd3
Merge remote-tracking branch 'origin/sarahchitty/always-on-infra-fail…
sarah-chitty-1 34e8b0b
test: import recorded_scores from task.result after main moved it
sarah-chitty-1 91a2a16
fix(always_on): keep the default retry in seeded runs; leave rubrics_…
sarah-chitty-1 85c5510
feat(always_on): a failed wake ends only that wake, and the whole run…
sarah-chitty-1 5c7cf96
feat(always_on): the next wake tells the agent its last turn ended wi…
sarah-chitty-1 bf8e40c
fix(always_on): imply the default retry only when its rollback redoes…
sarah-chitty-1 1334eac
fix(always_on): a judged run whose failed turns stored no trajectory …
sarah-chitty-1 fe36f38
fix(always_on): the default retry redoes only an infra-failed run
sarah-chitty-1 1f220a6
revert: the default retry redoes only an infra-failed run
sarah-chitty-1 b3e77d0
Merge #933's head (sarahchitty/always-on-infra-failures) into sarahch…
sarah-chitty-1 b833d41
fix(always_on): a verifier leaves an infra-failed always_on run ungra…
sarah-chitty-1 38c43db
fix(always_on): harness v14's turn cap is a cut-off at the tool-call …
sarah-chitty-1 2e09297
fix(always_on_agent_verifier): re-grading a run recorded before faile…
sarah-chitty-1 6c7cb2b
fix(aggregate_verifiers): an always_on run's aggregate of skipped jud…
sarah-chitty-1 e1747cd
fix(always_on): judge a run with no trajectories only when every turn…
sarah-chitty-1 91ae270
fix(always_on): episodes take no default retry; a task works out its …
sarah-chitty-1 8bb31d8
Merge #933's head (91ae270e) into sarahchitty/always-on-carry-on-afte…
sarah-chitty-1 7098a18
fix(always_on): each task keeps its own default retries and changes n…
sarah-chitty-1 0ce9ad8
Merge #933's head (7098a184) into sarahchitty/always-on-carry-on-afte…
sarah-chitty-1 26ae0f9
fix(always_on): a seeded run works its default retries out from its s…
sarah-chitty-1 c05e0fe
Merge #933's final head (26ae0f92) into sarahchitty/always-on-carry-o…
sarah-chitty-1 8f6cc28
Merge origin/main (dbbc03f1) into sarahchitty/always-on-carry-on-afte…
sarah-chitty-1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| """What the steps that read an always_on run's record need of how it ended: the key the record is kept under, and the | ||
| ends that are the agent's own failure. A leaf that imports nothing of agent-env's, so the verifiers and the | ||
| satisfaction rating import it where always_on, which imports their peers, can't be.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from typing import Any, Optional | ||
|
|
||
| ALWAYS_ON_KEY = "always_on" # each run's record: metadata[ALWAYS_ON_KEY][step_id] | ||
| # The error ends that are the agent's own doing: its turns failing always_on's FAILED_TURNS_IN_A_ROW_MAX times in a | ||
| # row, or a turn agent-env gave up waiting on. A run that ends on one is judged as a whole (ended_on_agent_failure). | ||
| AGENT_FAILURE_ENDS = ("agent_turn_failed", "agent_turn_timeout") | ||
|
|
||
|
|
||
| def record_ended_on_agent_failure(record: Any) -> bool: | ||
| """Whether an always_on run's record says the run ended on its agent's own failure (``AGENT_FAILURE_ENDS``).""" | ||
| return isinstance(record, dict) and record.get("end_reason") in AGENT_FAILURE_ENDS | ||
|
|
||
|
|
||
| def ended_on_agent_failure(metadata: dict, step_id: Optional[str]) -> bool: | ||
| """Whether ``step_id`` is an always_on step whose run ended on its agent's own failure (``AGENT_FAILURE_ENDS``), | ||
| its prompt response's ``error_type`` set: such a run is judged as a whole, wakes that ran and turns that failed | ||
| alike, each failure counted against the agent, never left unjudged for them. False for any other step's prompt and | ||
| any other end (an infrastructure failure, the user sim's, the step's own error).""" | ||
| return record_ended_on_agent_failure((metadata.get(ALWAYS_ON_KEY) or {}).get(step_id) if step_id else None) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.