PatchBenchCOMPLETE
showcase · captured run · execution disabledwall time 19.7s

Evidence matrix

3 independent candidates verified against the same frozen regression and commands. Candidate B was rejected automatically: introduced new test failures (2). 2 candidates remain eligible. The choice is yours.

Candidates
3
Eligible
2
Rejected
1by hard gate
Checks run
15/15
New failures caught
2
Verification
12.9ssequential
Evidence matrix: hard gates reject a candidate; every other row is informational and never weighted.
Candidate →
Hard gatesany failure rejects the candidate
Frozen regression test intactsha256 matches the frozen artifact
INTACT(pass)
INTACT(pass)
INTACT(pass)
Regression testmust now pass
PASS(pass)
PASS(pass)
PASS(pass)
New test failures vs baselinecandidate failures − baseline failures
0(pass)
2(fail)
  • refresh during a token-store outage returns 503, not an auth error
  • refresh for a disabled account returns 403 account_disabled
0(pass)
Typecheckrequired by run policy
PASS(pass)
PASS(pass)
PASS(pass)
Buildrequired by run policy
PASS(pass)
PASS(pass)
PASS(pass)
Evidenceinformational · shown, never weighted
Test suite (pass / total, incl. frozen regression)
13/13(pass)
11/13(fail)
13/13(pass)
Pre-existing baseline failures still failingalready failing on baseline · not held against it
0
0
0
Lintnot required by run policy
PASS(pass)
PASS(pass)
PASS(pass)
Files changedexcludes the injected regression test
1
1
1
Lines added / deletedimplementation only
+2−1
+6−2
+8−3
Dependency manifest changed
NO
NO
NO
Config files touched
0
0
0
No composite score. No recommendation. Hard gates reject; everything else is evidence. The developer decides.base ad6b83d · baseline failures 0

Candidate A: Map TokenExpiredError in the HTTP error mapper

ELIGIBLE

The domain already distinguishes expiry; the HTTP boundary simply lacks a mapping for it.

Trade-offs · as proposed
  • Smallest change
  • Every route gains the mapping, which is the documented contract
Implementation brief

Add a TokenExpiredError branch to toErrorResponse returning 401 { error: "token_expired" }.

Change surface
  • src/http-errors.ts+2 −1
dependency manifest unchangedconfig untouched
Inspect locally
git -C .patchbench/worktrees/run-20260926073526-aab88e/a diff

Branch patchbench/run-20260926073526-aab88e/a. PatchBench never merges or pushes.

@@ -1,4 +1,4 @@
1removed: import { HttpError, InvalidTokenError, ValidationError } from "./errors.ts";
1added: import { HttpError, InvalidTokenError, TokenExpiredError, ValidationError } from "./errors.ts";
22
33export interface ErrorBody {
44 error: string;
@@ -8,6 +8,7 @@ export interface ErrorBody {
88export function toErrorResponse(error: unknown): { status: number; body: ErrorBody } {
99 if (error instanceof ValidationError) return { status: 400, body: { error: "invalid_request" } };
1010 if (error instanceof InvalidTokenError) return { status: 401, body: { error: "invalid_token" } };
11added: if (error instanceof TokenExpiredError) return { status: 401, body: { error: "token_expired" } };
1112 if (error instanceof HttpError) return { status: error.status, body: { error: error.code } };
1213 return { status: 500, body: { error: "internal_error" } };
1314}