Repository navigation
SDK issue benchmarks use identical external grading - #902
Merged
Merged
Conversation
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
SDK preflight failures expose HTTP status metadata rather than inheriting PermissionError. Classify those refusals consistently with model tool calls and retain them when resource cleanup also fails. Record stage, preflight state and inference-loop progress so failed setup cannot appear to be a zero-usage agent comparison. Signed-off-by: zlareb1 <[email protected]>
Propagate the original SDK exception so tool-time refusals keep their HTTP status and request ID. Preserve guard status when patch collection fails, and classify cleanup refusals before secondary cleanup errors. Signed-off-by: zlareb1 <[email protected]>
Reduce persisted refusal evidence before applying supervisor and artifact status. A worker may be interrupted after a denied tool result but before its terminal event, so retain that refusal and its metadata as primary. Keep the outer supervisor outcome separately, and preserve failed supervision when no refusal was recorded. Signed-off-by: zlareb1 <[email protected]>
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.
Related: #868
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The SDK issue harness compares code-index lookups with an identical local-tool baseline and grades both patches outside the agent. Authorization refusals retain their status and execution stage, including during binding preflight and cleanup.
Why
A tool being connected does not show that an agent used it. Unequal test execution, missing usage after errors and collecting pre-existing edits can also distort an evaluation. The harness freezes the protocol before inference and retains unsuccessful attempts with their evidence. SDK authorization failures carry HTTP status metadata; a preflight refusal must stop before agent inference instead of appearing to be an agent provider failure.
Scope and risk
Adds a benchmark tool loop, process supervision, structured grader validation and documentation. Both arms share model instructions, local search with bounded context, file reads and edits. Neither agent can execute tests; an external evaluator uses the same declared checks and timeout. The treatment adds one read-only SDK binding. Tool choice remains automatic, and zero-use runs remain in the results.
SDK HTTP 401, 403 and 409 errors and local permission failures produce
guard_refused. Result artifacts record the execution stage, preflight state and whether the inference loop was attempted; unavailable progress remains unknown. SDK tool-time refusals retain HTTP status, code and request ID. Patch collection errors remain visible without replacing a refusal. Cleanup records its own stage and cannot replace the first refusal. Persisted refusals remain primary across supervisor timeouts, interruptions and nonzero exits; the outer outcome remains separately available. A failed preflight supplies no valid paired efficiency measurement. Controllers must stop on refusals before grading or advancing, including serialized HTTP denial metadata from an older worker.The harness measures code-index integration. It makes no long-term-memory or general performance claim. Provider calls require an explicitly requested run. No benchmark results are published by this change.
Compatibility, rollout and rollback
RESULT.jsonaddsstage,preflight_status,preflight_failedandagent_inference_starteddiagnostics, plus the raw outersupervisionoutcome.Tests
python -m pytest tests/unit/test_sdk_issue_resolution.py -q: 44 focused protocol tests pass, including typed SDK 401/403/409 preflight refusals, 400/503 neighbors, provider errors after successful preflight, cleanup-origin refusals, typed tool-time refusal metadata, patch-error refusal precedence, persisted denials across failed supervision, cleanup preserving the first guard, dirty setup refusal, partial patches, unfinished lookups, contextual search and contradictory grader reports.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Codex. Protocol parity, failure artifacts, grader outcomes and the whole diff were independently reviewed.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist