Skip to content

fix(dev): an eval suite finishes even when a builder leaves a connection open - #1154

Merged
allisonmahmood merged 1 commit into
mainfrom
fix/eval-network-close
Nov 2, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
fix/eval-network-close

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

What changed

An eval suite could hang forever after its last run. A builder that opens a page in a browser inside its sandbox can leave a connection half-open through the sandbox's proxy, and shutting the network down waited for every connection to end on its own (server.close waits for open connections). Twice so far a suite finished every build and then never wrote its scorecard or took its instances down. Now closing a network socket ends the connections still open on it, and each connection's far side closes with the sandbox's side.

Part of #1141.

Look at

scripts/dev/src/eval/network.ts: listen keeps the sockets it accepted and destroys any still open when the scope releases it; the instance and proxy connections end their outside connection when the inside one closes.

How it was verified

  • New test, closes even with a connection a sandbox left open: a client connects to the proxy socket and never sends anything; closing the network must finish within 5 seconds. Against the previous network.ts it times out; with the fix it passes.
  • scripts/dev/src/eval/eval.test.ts (20), typecheck, test typecheck, lint and format pass.
  • Not run: a full live suite; the change only touches how the sockets close.

Release impact

Tick exactly one.

  • Breaking — requires action from anyone already running this

  • Not breaking — no action required. Dev tooling only.

  • What does a revert leave behind? Nothing.

  • Does the release before it still work with that? Yes; nothing outside the dev runner changed.

Built by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, through T3 Code.

@github-actions github-actions Bot added area:ci CI, shared testing infrastructure, development scripts and tooling size:s Under 100 changed lines labels Nov 1, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Reviewed head ffcb8c03c7f0dc30e591f1125257491d71618ff1.

  1. [P2] CONNECT can open an outbound socket after shutdown — scripts/dev/src/eval/network.ts:127–129. If hostname lookup is pending when the scope destroys inside, the lookup continuation still calls net.connect and registers its cleanup after inside has already emitted close. I reproduced this with a controlled delayed resolver and an allowed local fixture endpoint in isolated Node and Bun processes: scope closure completed, DNS then resolved, a new outbound connection opened, and the process stayed alive until its external timeout. Ordinary client disconnect during lookup has the same result. Check inside.destroyed before creating outside, and cover delayed lookup during shutdown. That guard eliminated the leak in temporary copies on both runtimes.

  2. [P2] The new test races the client's EOF notification — scripts/dev/src/eval/eval.test.ts:132. Closing the server-side socket does not guarantee the client has processed its end/close event when the scope returns. The immediate flag assertion therefore fails intermittently; the PR's Bun CI job already fails this exact assertion. Register a client completion listener before teardown, await it with a bounded real-time timeout, and clean up the client in a finalizer.

Other checks passed: all 20 existing tests in focused Node and Bun runs; isolated fixtures for idle/half-open instance connections, idle/partial CONNECT requests, pending TCP connects before joining, and established tunnels. Those cases exited naturally after scope closure, and active traffic remained usable while the network stayed open. Private/loopback addresses and hostname aliases remained refused; invalid ports and malformed/oversized requests did not crash the shared proxy. The pre-change code hung on the idle-connection fixtures.

Verdict: merge after fixes.

@allisonmahmood
allisonmahmood force-pushed the fix/eval-network-close branch 2 times, most recently from 28966e3 to f81ac18 Compare November 1, 2026 15:23
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Both fixed in f81ac18 (rebased onto main):

  1. CONNECT after shutdown. The vetting continuation returns at once when the sandbox's side was destroyed while the name resolved, so no outbound connection opens after the network closed or the client left. I didn't add a deterministic test: it would mean making the resolver injectable only for it. The guard is the first line of the continuation, ahead of any net.connect.
  2. The test's race. It now registers the client's close listener before the network goes, waits for it with a 5-second timeout, and destroys the client in a finalizer. Three runs each under Node and bun --bun vitest (the test (bun) job's command) pass.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-checked head f81ac18c28673bdf438334eb5779758b263653a5 and the author's reply.

  1. Resolved: CONNECT opening after shutdown — scripts/dev/src/eval/network.ts:127. In isolated Node and Bun processes, I held name lookup pending, closed the network scope, then released an allowed loopback address: no outbound connection opened and both processes exited naturally. The same passed when the client disconnected or ended during lookup. Removing only the new guard in temporary copies reproduced the late outbound connection, confirming the fixture exercises the original bug.

  2. Resolved: the client-close test race — scripts/dev/src/eval/eval.test.ts:118–138. The test registers its close listener before teardown, awaits completion, and destroys the client in a finalizer. All 20 eval tests pass under Node 26.12.1 and Bun 1.4.4 with:

    • pnpm exec vitest run scripts/dev/src/eval/eval.test.ts
    • bun --bun vitest run --config vitest.bun.config.ts scripts/dev/src/eval/eval.test.ts

    The exact revised teardown test also passed 30 repetitions per runtime in a temporary isolated suite.

No new findings at the same bar. Additional local fixtures verified idle and partial CONNECT requests, idle instance connections, established tunnels, and active forwarding through both doors. They closed cleanly under both runtimes. Test typechecking, dev-runner typechecking with source resolution, and focused lint pass. No live eval suite was run.

Verdict: merge.

@allisonmahmood
allisonmahmood merged commit 0f04ce2 into main Nov 2, 2026
24 checks passed
@allisonmahmood
allisonmahmood deleted the fix/eval-network-close branch November 2, 2026 11:48
allisonmahmood added a commit that referenced this pull request Nov 2, 2026
## What changed

`pnpm dev eval` could only run the suite at `HEAD`, so it couldn't tell
whether a change to the skills, the `AGENTS.md` template or the CLI's
messages made builders better or worse. It now runs every task on two
sides, the base commit and `HEAD`, and shows each figure as base → head
with its change. The base is where `HEAD` left `origin/main`, or `--base
<ref>`; `--only-head` keeps the old behaviour. First half of #1143; the
blind judges follow in a stacked PR.

Part of #1143.

## Look at

**Two sides, one suite.** Each side is its own evidence instance with
its own network, template home (its own release's CLI and global skill
on the shared toolchain) and database. Tasks, fixtures and checks come
from this checkout for both, so both are graded alike. Runs alternate
sides, and which side goes first alternates by repeat, so neither always
meets a busier machine.

**Fairness guards.** Both sides must come up: there's no head-only
fallback. Each side's personas door must refuse a request without the
eval's key, checked before any setup, so a base from before the keyed
door can't run (its builders could see other runs' people). Live against
today's main before #1147 landed:

```console
The base instance (11dc68b) signs anyone in without the eval's key: its commit predates the keyed personas door, so its builders could see other runs' people. Pick a base that has it.
```

**What a comparison of identical skills shows.** Base `2bd3986` (main)
against this branch, cheers, two repeats each. The builder-facing skills
are the same on both sides, so every difference is noise:

| Builder | Side | Passed | Minutes | Turns | Input tokens |
| --- | --- | --- | --- | --- | --- |
| sonnet | base | 2/2 | 1.4, 1.0 | 11, 14 | 491k, 689k |
| sonnet | head | 2/2 | 2.4, 1.4 | 18, 19 | 848k, 880k |
| terra | base | 2/2 | 3.1, 2.6 | – | 1,720k, 1,254k |
| terra | head | 2/2 | 3.6, 3.0 | – | 1,969k, 1,468k |

At two repeats, Sonnet's input tokens moved about 40% between sides on
noise alone, so efficiency figures need many more repeats before an edit
can be credited with them. (That suite built and graded all eight runs,
then hung on shutdown; #1154 fixes the hang, and these figures come from
its run records.)

## How it was verified

- `scripts/dev/src/eval/eval.test.ts` (20, including the base → head
cells), typecheck, test typecheck, lint and format pass.
- Live: the comparison above, and the refusal of a base without the
keyed door.
- Not checked: a base whose runner predates #1147's eval code entirely;
the guard refuses it at the door.

## Release impact

Tick exactly one.

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required. Dev tooling only;
`--only-head` keeps the previous behaviour.

- **What does a revert leave behind?** Nothing outside this machine:
suites under `.local/evals/`.
- **Does the release before it still work with that?** Yes; nothing
outside the dev runner changed.

Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3
Code.

Co-authored-by: Claude Opus 5.5 <[email protected]>
allisonmahmood added a commit that referenced this pull request Nov 2, 2026
…led where (#1172)

## What changed

A comparison showed whether builders passed the checks and how fast, but
not whether what they built was any good. It couldn't say whether a
build fit Patchy, whether it stayed correct when two people used it at
once, or whether it was pleasant to use.

Now, after the build phase, two judges review every built run in the
eval's sandbox: Opus 5.5 at `xhigh` in Claude Code, and GPT-6.1 Sol at
`xhigh` in Codex.
- **Scoring pass, blind.** Each judge scores fit, platform, correctness,
UX and code from 1 to 5, with findings.
- **Attribution pass.** For findings of medium severity or worse, the
judge reads the skill text and the builder's log, and says which text
plausibly led there or what was missing.
- **Calibration.** `pnpm dev eval --calibrate` checks both judges
against builds a person labelled.

Closes #1143 together with #1155, which it's stacked on.

## Look at

**What keeps the scoring pass blind.** Six review rounds tightened it to
this:
- **The source it reads** has its agent instructions removed, and the
side's instance host renamed. A pulled repo records the host, e.g.
`after-…`, in `patchy.json`, `package.json` and the lockfile.
- **The Patchy checkout it reads** is this checkout, the same for both
sides. A walk masks every copy of what builders are told: `skills/`
folders, release `artifacts/`, `.turbo` and dependency caches, agent
folders, `SKILL.md`/`AGENTS.md`/`CLAUDE.md`, the git history, local
state and the calibration labels. A symlink is never a mask; a symlinked
instruction file hides its target instead.
- **Its workspace** is staged under an anonymous name, so no mounted
path names a run, side or builder. The staging is removed afterwards.
- **Its network** reaches only its harness's inference and sign-in
hosts, by exact name. Each connection must open TLS naming the host that
was vetted, so a shared CDN can't serve another site on the same
connection. The harnesses' own web search and fetch tools are off.
What's left: a request that names another site inside a correctly named
TLS session is the CDN's to refuse. That's documented in `network.ts`.

**Failures.** A judge failure never takes the suite down:
- A pass that gives no answer is tried once more.
- A judge that can't run records why.
- A failed attribution keeps its score.
- If the judges' home can't be set up, every judgment says so and the
scorecard still lands.

**Calibration** on the final code. Both judges ranked every labelled
pairing the labelled way:

| Better | Worse | On | Opus | Sol |
| --- | --- | --- | --- | --- |
| cheers-counter | cheers-page-counter | platform, correctness | ✓ 5.0
vs 1.0 | ✓ 4.5 vs 1.0 |
| cheers-recount | cheers-page-counter | correctness | ✓ 3.0 vs 1.0 | ✓
2.0 vs 1.0 |
| cheers-counter | cheers-recount | platform | ✓ 5.0 vs 2.0 | ✓ 5.0 vs
2.0 |

**#1143's done-means run** at 5fef167: `pnpm dev eval --base origin/main
--tasks cheers --repeats 2`, both builders, both judges. Every run was
judged by both (16 of 16 verdicts). The skill text is the same on both
sides, so the deltas are noise:

| Task | Builder | Verdicts | Fit | Platform | Correctness | UX | Code |
| --- | --- | --- | --- | --- | --- | --- | --- |
| cheers | sonnet | 4/4 → 4/4 | 4.0 → 4.0 | 2.3 → 2.0 (−0.3) | 2.5 → 2.8
(+0.3) | 4.3 → 4.5 (+0.3) | 3.3 → 3.0 (−0.3) |
| cheers | terra | 4/4 → 4/4 | 4.8 → 4.8 | 4.5 → 4.8 (+0.3) | 4.3 → 4.5
(+0.3) | 4.3 → 4.3 | 4.5 → 4.8 (+0.3) |

The judges consistently separate Sonnet's page-side count from Terra's
tier 2 counter on platform. Their attribution, independently, names the
gap #1184 fills. From Opus:

> No skill says that owned tables have no count or aggregate. None says
that an exact running total should be one counter row, incremented by a
tier 2 mutation.

**cheers' rubric** now names today's expert design, a tier 2 atomic
increment read through a live query, instead of saying a tier 1 page is
enough.

## How it was verified

- **Tests.** `scripts/dev/src/eval/eval.test.ts` passes on Node and Bun
(35 tests). They cover:
- the checkout masks, including the symlink case, caches and the
calibration labels
  - the blind source copy
- the exact-host network, and the refusal of `raw.githubusercontent.com`
  - TLS server-name parsing against a real Node ClientHello
  - the closed schemas, task brief, means, splits and verdict counts
  - the calibration labels

  Typecheck, test typecheck, lint and format pass.
- **Real bwrap.** All masks mount over a built checkout, and grepping
`/patchy` finds no skill text.
- **Live runs.** The calibration and the done-means run above. Both ran
with #1154's shutdown fix applied locally, so the process exits after
the scorecard.
- **Review.** Sol reviewed this six times; its last verdict is merge,
with one P3 that was fixed.

## Release impact

Tick exactly one.

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required. Dev tooling only;
`--no-judge` skips the judges.

- **What does a revert leave behind?** Only files on this machine, under
`.local/evals/`.
- **Does the release before it still work with that?** Yes. Nothing
outside the dev runner changed.

Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3
Code.

Co-authored-by: Claude Opus 5.5 <[email protected]>
allisonmahmood added a commit that referenced this pull request Nov 2, 2026
…n-handler and kudos-agents (#1153)

## What changed

Every eval task created a new patch, and cheers was so easy every build
passed it, so the suite couldn't tell a better skill from a worse one.
Tasks can now change a patch that already exists, and checks can act as
a person's own agent through Patchy MCP. This adds the first three
harder tasks: spend-approvals, broken-handler and kudos-agents.

Part of #1144

## Look at

**Existing targets are staged inside the run's sandbox.** A task's
`target` is `{ create: "repo" | "page" }` or `{ existing: "<scenario
patch>" }`, and `visible` names the repos the builder finds in
`~/Patchy`; by default that's the target's own. Before the builder
starts, and untimed, `stage.ts` publishes the task scenario's patches
into the run's own company as the run's publisher, through the run's own
CLI in its sandbox, the way `pnpm dev up` does. For each repo it runs
`patchy init` at its tier, copies the builder-owned files from the
runner's checkout, then `pnpm patchy refresh` and `pnpm patchy publish`.
File patches publish as single-file pages. Sample data is pressed as the
publisher through the grader's keyed door, and guests are shared. Then
the repos the builder isn't meant to see are removed, and each patch's
version is recorded. Grading takes an existing target by its staged id,
and `published` needs a version newer than the staged one; without one,
nothing else is graded. The side's own `AGENTS.md` from `init` is kept
rather than the scenario's copy, because that template is part of what
an eval measures (brightline's committed copy predates the `agent/`
line).

**Checks can act as a person's agent.** A check names the people whose
agents it uses (`agents: ["jordan"]`). Grading mints each a connection
the way `pnpm dev mcp-token` does, and `ctx.agent(key)` lists the
target's tools with `open_patch` and calls them with `read_patch` and
`change_patch`. Builders name and shape their tools however they like,
so `findTool` picks one by its kind and words, and `argsFor` fills its
arguments from its JSON Schema. A field about a person is tried as the
member id, then the email, then the name (the field's own words decide
the order) until one isn't refused. Each change gets a key unique across
the grading. The run's company has agent access on when its scenario
says so (brightline does). Minted tokens go to the scorecard's sanitizer
as they're made, and a failed call throws a message that names only the
door tool; Playwright's own error, which can carry the bearer, stays its
`cause`.

**Checks try rules against the server, not just the page.** A page's
handler calls and table writes go through its shell as `POST
/api/runtime/call`, with the person's session cookie as the authority.
When Ada presses Approve or Reject, every call her press sends (other
than plain reads) is held back in turn and sent as Ben and as Cleo from
their own signed-in pages first, each with its own change key. With
Ada's call still held, Ben's view must show his request the same just
before and just after each try, refused or not. So a refusal after the
change committed doesn't pass, and Ada's own earlier calls aren't blamed
on a member. Holding continues, however long the page waits between
calls, until Ben sees the decision right after one of her held calls
goes through: that call was the decision, and both members tried it
first. A decision that never shows that way within a minute fails the
check rather than passing unproven. Each refusal a try draws is noted as
expected (person, handler, code and Patchy's time of answer), which
excuses exactly one matching log entry; any other refusal during grading
still fails `opens ready`. Patchy not answering one of the grader's
calls is `GraderTrouble`: grading ends as infrastructure and is retried,
never charged to the builder.

**Looking never changes data: a write barrier, not labels.** Every page
the grader opens has a write barrier (`eval/barrier.ts`), raised before
its first navigation and kept through every reload. The page can read,
but every write it attempts is held. The grader never forwards, answers
or fails it, so it never reaches Patchy and the page never hears back,
whatever control, timer, retry or mount effect sent it.
- A call is judged by its operation against an allowlist of reads
audited against the runtime's operation list, and a `server.call` reads
only when the version's published manifest lists its handler as a query.
- Anything else is a write, including `files.discard`, integration
operations and anything unknown, so the barrier fails closed.

Since the page never receives a refusal, there's nothing for it to
report and nothing to excuse: **every console error and uncaught
exception counts.** An earlier version answered refusals and excused the
page's reports of them. However strictly the text was matched, a page
could copy a refusal's words into a wrapper (`AggregateError`, a `cause`
chain) around an unrelated failure, so that approach is gone.

Only a deliberate step lowers the barrier: Ben asking for money, Ben
lending kit, and Ada's decision with its held calls. Before lowering, it
waits until 2 s have passed since the last write it held. A page that
keeps trying to write for 10 s fails the check rather than having those
writes let in. However the step ends, normally or by throwing, the
barrier rises again only once the step's writes have been answered and
nothing new has been sent for 2 s. It waits up to 75 s (an action's 60 s
and a margin); past that, grading ends as the grader's trouble.

A press that tries a write isn't counted as a view. So hard rule 1, the
grader never changes data it isn't meant to, holds whatever a control is
named or renamed to mid-click. The candidate rules only decide which
controls are worth trying.

**What holding costs.**
- A held write lives as long as its page. The shell gives up on it at
its reply deadline (110 s for a server call, 35 s for anything else) and
tells the page its reply was lost. An error the page logs then counts,
and says it came just after a held write timed out.
- Held writes take up the shell's outstanding requests (32 a page); past
that the shell refuses the page's further calls itself.
- A page left waiting on a held write can act differently, for example
keeping a form disabled while it waits. So whenever the grader held
writes on a check's pages, the check's failure detail says how many.
- An error a page would only report once a held write settles is never
reported, since the grader never lets that write finish. That sits on
the same path as any data-changing control the grader doesn't press.

**Accepted limit.** A write that looking schedules for later can land in
a following deliberate window. At the network a write can't be traced to
the press that scheduled it, so before lowering the barrier only waits
until 2 s have passed since the last write it held, and with none yet it
lowers at once. A timer of any length set by looking, even one shorter
than 2 s, can fire after the barrier is lowered and get through. Pages
don't schedule writes that way in practice, and the state checks around
each deliberate step still catch a change to a request's decision that
the step didn't cause. The same note sits beside the barrier in
`barrier.ts`.

**The three tasks, and what their checks do:**

- **spend-approvals** (create, `team`, must be tier 2): Ben submits a
request with an amount, a reason and a receipt file whose bytes carry
the check's code, and Ada opens it: a file Patchy serves her must be
exactly those bytes. On two more requests, Ada approves one and rejects
the other while Ben's and Cleo's tries go to the server first, then Ben
sees each decision. Forms are driven by label and role: a form behind a
button is opened, prefilled fields are replaced, anything else it holds
gets plain values, words a decision asks for are filled in, and a
request hidden in another view is looked for only behind controls that
are views by their role or state: tabs, selections and places that
aren't named like actions, view nouns (All, Mine, My …, Team …), and
statuses only inside a filter bar. Each press is bound to the very
element that was vetted.
- **broken-handler** (existing): `scenarios/kit-room` is new, and Kit
loans in it is broken on purpose. Its board formats due dates with `new
Date(row.due ?? "")`, which throws `RangeError: Invalid time value` once
a loan has no due date, and its sample data has one. Ben sees "The
handler failed. Use the correlation id to find its log." Ben lends kit
with no return date and Ada sees it. Then the board's own query, read as
Ada, must keep the tripod and Ben's loan without due dates, and the
dated loans on the days staging dated them, counted from when it
recorded loading the sample data. Deleting, inventing or moving dates,
even a day and even all together, fails.
- **kudos-agents** (existing, brightline's Kudos): Jordan's agent finds
tools to give and to list kudos. It gives Priya a kudo that Marcus sees
on the wall as Jordan's to Priya, and it lists a kudo it gave. Tools are
ranked by what they're about (kudos, appreciation, thanks) before their
verb, and a name that says people ranks after every other tool, so a
lookup never stands in for the list. A colleague is named in whatever
field a tool's name or description says is a person, nested objects
included.

**Each check passes a correct build and fails an incorrect one.** I ran
them against hand-made builds on a local instance:

| Task | Build | Result |
| --- | --- | --- |
| broken-handler | unfixed | fail: Ben still sees the handler fail |
| broken-handler | "fixed" by hiding open-ended loans | fail: the
open-ended tripod loan is gone from Ben's list |
| broken-handler | "fixed" by inventing today's date on the board |
fail: the tripod's open-ended loan now has a due date |
| broken-handler | board fixed, but lending fills in today | fail: Ben's
loan with no return date got a due date |
| broken-handler | due date handled when absent | pass |
| spend-approvals | brightline's Spend, where members decide others'
requests under $2,500 | fail: Patchy let Priya Shah, a member, approve
(and reject) Ben's request |
| spend-approvals | the same, its receipt card swapped for an inert
"View receipt" button | fail: Ada sees Ben's request but can't open the
receipt he attached |
| spend-approvals | Approve asks the `requests.list` query first, then
calls an approve members may use | fail: Priya Shah, a member, sent
Ada's approve call (requests.approve) as their own, and Ben's request
then showed approved |
| spend-approvals | Approve calls an action that runs the approve
mutation, then throws `not_admin` for a member | fail: Priya Shah … was
refused, but Ben's request then showed approved |
| spend-approvals | Approve asks `requests.list`, waits 6 s, then calls
an approve members may use | fail: Priya Shah … sent Ada's approve call
(requests.approve) as their own, and Ben's request then showed approved
|
| spend-approvals | the same Spend, approve and reject admin-only on the
server | pass (all three) |
| spend-approvals | admin-only, Approve = `list` → 6 s → `approve` →
`list`, Reject = `reject` → `list` | pass (all three) |
| spend-approvals | Sonnet's build from the latest live run, republished
locally | pass (all three) |
| spend-approvals | Terra's build from the latest live run, republished
locally (sends its request with a native `<form onSubmit>`) | fail: Ben
pressed send, but the page sent Patchy nothing (Chromium: "Blocked form
submission … the 'allow-forms' permission is not set") |
| broken-handler | Terra's build from the latest live run, republished
locally | pass |
| broken-handler | the same, lending 300 ms after the press | pass
(before this head's fix: "Lending sent Patchy nothing the grader could
follow") |
| kudos-agents | a probe run's agent area | pass |
| kudos-agents | `getKudos`, `listPeople`, and `giveKudos` taking a
described `id` | pass (`getKudos` picked, Priya's id filled) |

The live suite with the whole-life write barrier, both builders, one
repeat:

#### Eval `20261101T194441-729e4f3`

At `729e4f3`. `sonnet` is claude-sonnet-5-5 at high; `terra` is
gpt-6.1-terra at high. Tools: node 24.20.0, pnpm 12.9.1, claude 2.1.316,
codex 0.166.0.

| Task | Builder | Runs | Built | Passed | Minutes | Turns | Input |
Output | Failed cmds | Off-skill | Refusals |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
|
| spend-approvals | sonnet | 1 | 1 | 1 | 2.7 | 23 | 1568k | 13k | 1 | 4
| – |
| spend-approvals | terra | 1 | 1 | 0 | 2.5 | – | 1245k | 7k | 2 | 3 | –
|
| broken-handler | sonnet | 1 | 1 | 1 | 1.0 | 15 | 693k | 4k | 1 | 0 | –
|
| broken-handler | terra | 1 | 1 | 0 | 1.2 | – | 656k | 3k | 2 | 0 | – |
| kudos-agents | sonnet | 1 | 1 | 1 | 1.2 | 17 | 878k | 7k | 0 | 0 | – |
| kudos-agents | terra | 1 | 1 | 1 | 1.0 | – | 585k | 3k | 2 | 0 | – |

Medians, without infrastructure failures. Few runs are a pilot, not a
measurement.

| Run | Outcome | Checks | Minutes | Notes |
| --- | --- | --- | --- | --- |
| spend-approvals/sonnet/1 | built ✓ | ✓✓✓✓✓✓ | 2.7 |  |
| spend-approvals/terra/1 | built | ✓✓✓✗✗✗ | 2.5 | Ben asks with a
receipt, and Ada opens it: Ben sent the request, but it never showed up
for him on his starting view or behind its tabs and view toggles.; only
an admin's approval counts, and Ben sees it: Ben sent the request, but
it never |
| broken-handler/sonnet/1 | built ✓ | ✓✓✓✓ | 1.0 |  |
| broken-handler/terra/1 | built | ✓✓✓✗ | 1.2 | Ben lends kit with no
return date, and the board keeps every loan as it is: Lending sent
Patchy nothing the grader could follow. |
| kudos-agents/sonnet/1 | built ✓ | ✓✓✓✓✓✓ | 1.2 |  |
| kudos-agents/terra/1 | built ✓ | ✓✓✓✓✓✓ | 1.0 |  |

Both of Terra's failures were looked into on a local instance with its
published source:
- **spend-approvals is a real failure.** Terra's page sends its request
with a native `<form onSubmit>` and a submit button. A patch frame's
sandbox has no `allow-forms`, so Chromium blocks the submission and
nobody can send a request. The detail said "Ben sent the request"; it
now says "Ben pressed send, but the page sent Patchy nothing."
- **broken-handler was the grader's bug, fixed in `b85db49`.** Terra's
fix is correct and passes. The grader stopped listening for the lend
call as soon as the click returned, and on the loaded evaluation
instance the shell sent it a moment later. It now waits up to 10 s for
that first call. A control that lends 300 ms after the press fails the
old code with the live message and passes the new one.

The same commit starts a deliberate step's 2 s quiet window after the
step itself, not at its start, so a write sent shortly after a slow
step's press isn't refused once the barrier rises.

## How it was verified

- `scripts/dev/src/eval/stage.test.ts` (10): each expected refusal
excuses exactly one log entry (same person, handler and code, within
moments of Patchy's answer), and another of the same kind, a different
code from the same handler or a later one still counts. Staging records
a repo by the id its `patchy.json` holds and a page by its name, and
calls an unserved one missing. `visible` defaults. Target choice: a new
patch is the newest one the run didn't stage, and an existing one is the
staged id while it is served. `published` needs a newer version and
fails the wrong tier. Every task names patches and people its scenario
has, and no scenario a task uses declares a connection.
- `scripts/dev/src/eval/barrier.test.ts` (10): the write barrier treats
every operation but an audited read as a write (`files.discard`,
`pidgeon.send`, `postgres.execute` and an unknown one included), lets a
`server.call` through only to a handler the manifest lists as a query,
and judges a request by endpoint, method and operation; an unreadable
call body or an unknown endpoint counts as a write. Against a fake page
on fake timers:
- a looking write is held, never forwarded, and a deliberate write after
it goes through;
- a deliberate step that throws after sending a write keeps the barrier
down until the write is answered, and one still unanswered at the
deadline ends grading as the grader's trouble;
- the barrier lowers only 2 s after the last held write, and never while
a page keeps trying to write.

  Through the check's own result (`checkResult`):
- every console error and uncaught exception fails the check, including
Sol's `AggregateError` and cause-chain reports, an empty `Error()` and
`Error("access_denied")` beside a refusal, and a refusal alone;
  - a lone held write logs nothing and the check passes;
- an error just after a held write timed out says so, and the failure
says how many writes the grader held.
- `scripts/dev/src/eval/checks.test.ts` (22): Also which controls a
search for a view may press. Tabs, places and view nouns are pressed; a
status (Review, Open, Paid) only beside another view and no action. A
lone Paid, Done or Review never is. Neither are Withdraw request,
Supprimer, a Trash icon, Approve all, Open request, New request, Review
(submit), Export CSV or emoji. Hidden controls don't count toward the
twenty, and a dialog closes only by a whole Close, Cancel, Dismiss or ×.
arguments for a colleague named three ways, in the field's own order, by
a description alone, and inside an object about them. Optional fields
left out and required ones filled plainly. Tool choice by meaning,
including Terra's tool set, `getKudos` beside `listPeople`, and `wall`
beside `listKudosPeople`. The entry holding the words, however a list is
shaped. A door failure as `GraderTrouble` that ends grading as
infrastructure, with a message without the bearer. The Kit loans board:
open-ended loans, dated loans on the days staging loaded them, and dates
moved by a day or all together. A receipt counted only as its exact
bytes from a file response. Decisions read as approved, rejected,
undecided or nothing.
- `scripts/dev/src/scenario.test.ts`: `kit-room` loads and is listed.
- `pnpm dev up kit-room` publishes Kit loans, loads its sample data, and
fails for Ben as designed (the log shows the `RangeError`).
- The barrier's browser cases ran locally in Chromium against the real
barrier, `reveal` and error collector, in a frame sandboxed like a
patch's, with a shell-like broker. Every earlier case still holds:
writes reach Patchy only from deliberate steps. A lone held write logs
nothing. An unrelated failure beside a held write counts: an
`AggregateError`, an empty `Error()` with `Error("access_denied")`, or a
thrown one. Reporters that wait on a held write (Sol's `AggregateError`,
cause chain and `allSettled`) never report.
- Against the real shell and broker, on a local instance with a
two-button tier 2 probe patch:
- with 8 looking writes held in one document (more than Chromium's 6
connections per host), a deliberate write reached Patchy and was
answered in 92 ms, and closing the page took 5 ms;
- left past the broker's 110 s deadline, a held call was aborted and the
page got "The runtime reply was lost.";
- with the real `raiseBarrier`, a looking press was held and a
deliberate press after it was answered, with no page errors.
- On real builds with the holding barrier: Sonnet's spend build passes
all three spend checks, and Terra's broken-handler fix passes.
- Checks: `pnpm exec turbo run typecheck --filter=@patchy/dev`, `pnpm
exec effect-tsgo tsc -p tsconfig.test.json`, `pnpm exec oxlint
scripts/dev/src`, `pnpm run format:check`.
- `pnpm verify`, on the first commit (the review fixes touch only
`scripts/dev` and docs): format, lint, typecheck, synth,
postgres-concurrency, cli-smoke, install, tier2-smoke and browser
passed. `test` and `test (bun)` failed locally on the known ones: 11 CLI
stub-server tests and `RequestEvents` each recorded one request more
than they sent (the local port probe), and `LocalTaskProvider` under
load. Those two passed re-run alone, and this branch changes nothing
under `apps/` or `packages/`.
- Found, not fixed (`network.ts` is #1143's; #1154 fixes it): the suite
could hang after its last run, before writing its scorecard, when
`network.ts` waited on `server.close()` for connections that never
ended. Two of the four suites on this PR did; their scorecards were
rebuilt from the run records. The latest one finished on its own.
- Also seen: under this machine's load, Chromium's renderer crashed in
about half of one check's local runs, and `/tmp` briefly filled. The
grader counts a renderer crash as the patch's result.

## Release impact

Tick exactly one.

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required

Dev tooling and an eval-only scenario: nothing in the server, CLI, API
or schema changes.

- **What does a revert leave behind?** Nothing outside `.local/` on the
machine that ran an eval.
- **Does the release before it still work with that?** Yes.

---

Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3
Code.

Co-authored-by: Claude Opus 5.5 <[email protected]>
allisonmahmood added a commit that referenced this pull request Nov 3, 2026
…tals stay exact (#1222)

## What changed

This adds release 35's What's new entry, written from `dd0e2ec`. It
covers everything merged since release 34's `through` (`e5334ca`), and
sets the `patchy` release to `0.35.0` in `packages/patchy/package.json`
and `CURRENT_RELEASE`.

| Change | PRs |
| --- | --- |
| Fixed: keyboard shortcuts in patches do what they say (a
once-per-press shortcut doesn't fire again while held, shortcuts wait
during input-method composition, symbol keys such as `+` work on every
keyboard) | #1152 |
| Improved: agents keep shared totals exact | #1184 |

The rest get no line:
- #1147, #1154, #1189, #1155, #1172 and #1153 are `pnpm dev eval`
tooling.
- #1150 renames a CI check.
- #1203 is an internal docs paragraph.
- #1221 changes the production spend alerts, which nobody using Patchy
sees.
- #1149 is release 34's own entry.

## Look at

- **The entry**, at the top of `releases` in
`packages/core/src/whatsNew.ts`.
- **Rollback safety, from the live commit `11dc68b` (release 34) to
`dd0e2ec`:**
- None of the 11 PRs is labelled `one-way`, and each one's Release
impact answers say a revert leaves nothing behind.
- #1152 changes `patchy/hotkeys`, which patches bundle when they are
built. Published patches keep the copy they bundled. A patch repo that
writes `"+"` stops typechecking only if it moves back to an older
`patchy` release.
- #1184 is skill text. #1147 adds a dev-only personas option that
production never reads.
- #1221 changes a cost setting on the two budgets in the base stack.
Releases don't read budgets.
  - Nothing else touches code that runs in production.

**Rollback line:** If this release misbehaves, roll back to `11dc68b`
(release 34).

## How it was verified

- **Tests.** `whatsNew.test.ts`, `WhatsNewPages.test.ts` and
`schemas.test.ts` pass (21 tests), and `bun fmt` passes on the changed
files.
- **Deploy state.** I pinned the live commit from `/healthz/deep`:
`11dc68b` (release 34). The Deploy run updated last succeeded, and none
is unfinished.

## Release impact

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required

Text and version numbers only. Like every release, the `0.35.0` bump
tells CLIs and patch repos installed before this deploy to upgrade.

- **What does a revert leave behind?** Nothing.
- **Does the release before it still work with that?** Yes.

Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3
Code.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant