Repository navigation
Disable nl2al empty-diff retries; mark stalled agents as failures - #816
Merged
Merged
Conversation
Sun Haoran (haoranpb)
approved these changes
Aug 27, 2026
| __all__ = ["NL2ALPipeline"] | ||
|
|
||
|
|
||
| def _empty_is_acceptable(entry: NL2ALEntry) -> bool: |
Collaborator
There was a problem hiding this comment.
Not sure if this will be needed for our current dataset that focuses on accuracy.
Maybe tasks that allow no responses should all be moved into harms/red team dataset
Collaborator
Author
There was a problem hiding this comment.
Good point, I should move these out. Will do that later
The weekly "Evaluation with bcal" runs were timing out. An empty diff (bcal asking for clarification instead of editing a *.al file) triggered up to 3 agent re-runs; when per-attempt model latency drifts up, the attempts stack past the 28-minute CI step cap and fail the whole run. Disable retries -- run the agent exactly once -- and score an empty diff directly in evaluate(): - Genuine tasks -> create_failure (status "Error"), so a stalled agent is a visible failure instead of being re-run. - Safety/refusal entries (metadata.area == "safety"), where declining is the correct, checklist-accepted answer, stay create_empty_output (Unscored -> judged downstream -> pass), so they do not regress. A single attempt is bounded by bcal_execution (25 min) and fits inside the 28-minute step cap, so no workflow or config change is needed. Expected impact: ~1-3 pp mean pass-rate drop with more run-to-run variance (retries only ever rescued empty-diff flakes on genuine tasks). A failing run is worse than a slightly lower pass rate. Follow-up: pin the bcal CLI / bc-eval versions to remove latency drift as a variable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a5a32ebb-2b8e-48de-b3c9-62836180dc3d
martinsrui-msft
force-pushed
the
fix/nl2al-disable-retries
branch
from
August 27, 2026 08:53
dd619ee to
a9ee219
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The weekly Evaluation with bcal workflow has been failing (e.g. run 32615259126, and the week prior). 5 of the matrix jobs hit the
timeout-minutes: 28cap in Run BCal for entry.Root cause: when the agent produces an empty diff (bcal nondeterministically asks for clarification instead of editing a
*.alfile),run_agentre-runs the agent up to_EMPTY_DIFF_MAX_ATTEMPTS = 3times. Each attempt is bounded only bybcal_execution(25 min). When per-attempt model latency drifts up (execution time on affected entries went from ~48s to 10min+), two or three stacked attempts blow past the 28-minute step cap and fail the entire run. The dataset is unchanged since 07-30 — this is latency-driven flapping, not a data/code change.A failing run is worse than a slightly lower pass rate, so we stop trading wall-clock for retries.
Change
Disable retries —
run_agentinvokes the agent exactly once. Removed_EMPTY_DIFF_MAX_ATTEMPTSand the retry/re-setup loop.Score empty diffs directly in
evaluate():create_failure(..., error_message="Agent produced no changes ...")→ status Error. A stalled agent is now a visible failure instead of being re-run.metadata.area == "safety"), where declining is the correct, checklist-accepted answer → keepcreate_empty_output(Unscored → judged downstream → pass). Gated via a small_empty_is_acceptable(entry)helper so these gold negatives do not regress.Downstream scoring is unchanged:
error_messageis metadata only; the emptyoutputis still exported and judged against the entry's assertions (genuine empty → 0, safety empty → pass). The difference for genuine tasks is only the local Error label — i.e. the requested "mark clarification as a failure" visibility.A single attempt is bounded by
bcal_execution(25 min) plus ~1–2 min setup, comfortably inside the 28-minute step cap, so no workflow or config change is needed.Expected impact
~1–3 pp mean pass-rate drop, with more run-to-run variance (retries only ever rescued empty-diff flakes on genuine
alfix-type tasks; the ~96 always-pass entries are unaffected). No collapse — and, critically, no more timeout failures.Follow-up (not in this PR)
Pin the bcal CLI /
bc-evalversions in the workflow to remove latency drift as a variable.Tests
error_message; safety empty → Unscored + noerror_message; non-empty → raw output; unexpected exceptions still propagate.run_agentnever re-setups or stages a diff).create_nl2al_entrytest helper gains anareaparameter.uv run ruff checkclean; 749 passed, 2 skipped locally.