Skip to content

SDK issue benchmarks use identical external grading - #902

Merged
zlareb1 merged 5 commits into
mainfrom
bench/sdk-paired-issue-resolution
Nov 18, 2026
Merged

zlareb1 merged 5 commits into
mainfrom
bench/sdk-paired-issue-resolution

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Related: #868

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

  • Wire: no server operation, request field or default changes. RESULT.json adds stage, preflight_status, preflight_failed and agent_inference_started diagnostics, plus the raw outer supervision outcome.
  • Operator steps: none for the server. Benchmark users install the optional cloud dependency and Python SDK, provide an isolated checkout and configure an external grader.
  • Rollback: reverting removes the harness and documentation; user-created run artifacts remain outside the checkout.

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.
  • Seven added preflight/provider cases failed on the committed runtime and passed with the fix. A further review regression selection reproduced seven failing guard paths with one passing non-refusal control; all eight cases passed after correction. A separate supervisor-boundary selection reproduced twelve refusal failures with three passing non-refusal controls; all fifteen passed after correction. All calls use mocks; no live model, backend or credential change was used for this validation.
  • Documentation links, public-copy checks, formatting, prose and generated documentation checks pass.
  • A fresh whole-head review accompanies the pushed source and CI.
  • Full CI passes on this head: 43 successful checks, two conditional publication skips and all four workflows successful. No local full-suite run was used.

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

  • Full formatting, lint, type, unit and integration checks pass in CI; focused checks are listed above.
  • Generated documentation index is regenerated.
  • No migrations or plugin files change.
  • No frontend files change.
  • Documentation describes the implemented behavior and operator steps.
  • Public text contains no private deployment details or credentials.
  • Commits are signed off.

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]>
@zlareb1
zlareb1 merged commit 54569a9 into main Nov 18, 2026
45 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 18, 2026
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant