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
| 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)
| 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 C: Handle expiry explicitly in the refresh route
ELIGIBLE
Expiry is only meaningful for the refresh flow; keep the global mapper untouched.
Trade-offs · as proposed
- Local, explicit handling
- Other routes that surface expiry would need their own handling
Implementation brief
Catch TokenExpiredError around auth.refresh in the refresh route and return 401 { error: "token_expired" }; rethrow anything else.
Change surface
- src/app.ts+8 −3
dependency manifest unchangedconfig untouched
Inspect locally
git -C .patchbench/worktrees/run-20260926073526-aab88e/c diffBranch patchbench/run-20260926073526-aab88e/c. PatchBench never merges or pushes.
@@ -1,5 +1,5 @@
11import type { AuthService } from "./auth-service.ts";
2removed: import { ValidationError } from "./errors.ts";
2added: import { TokenExpiredError, ValidationError } from "./errors.ts";
33import { toErrorResponse } from "./http-errors.ts";
44
55export interface Request {
@@ -28,8 +28,13 @@ export function createApp(auth: [REDACTED] (req: Request) => Response {
2828 return { status: 200, body: session };
2929 }
3030 if (req.method === "POST" && req.path === "/auth/refresh") {
31removed: const session = auth.refresh(requireString(req.body, "refreshToken"));
32removed: return { status: 200, body: session };
31added: const refreshToken = [REDACTED] "refreshToken");
32added: try {
33added: return { status: 200, body: auth.refresh(refreshToken) };
34added: } catch (error) {
35added: if (error instanceof TokenExpiredError) return { status: 401, body: { error: "token_expired" } };
36added: throw error;
37added: }
3338 }
3439 return { status: 404, body: { error: "not_found" } };
3540 } catch (error) {