Repository navigation
feat(dev): held-out eval task, a recipe book with a link per recipe - #1242
allisonmahmood wants to merge 7 commits into
Conversation
…re valid books Cleo must see every ingredient and step Ben wrote. A recipe link passes when the other recipe isn't rendered, or the linked one is in view and the other isn't, so a book that scrolls to its recipe passes. A card's own View button opens a recipe whose title isn't a control, and a recipe the page already selected keeps its address. Made by Claude Opus 5.5 in Claude Code.
…m the grader Made by Claude Opus 5.5 in Claude Code.
… the two landings A recipe opens through its card's control named for it, or exactly View, Open or Read, before its title is clicked, each click with a short timeout. A link can't be the book's bare address, and a third recipe is added before the links are opened, so a link that means the newest fails. Each landing must bring its recipe into view, an observer that never answers failing it, and the two landings must differ in what they render or where they scroll. Titles match whatever their case. Made by Claude Opus 5.5 in Claude Code.
…dings apart An opener may start with View, Open, Read or See, never naming another action or a part of the recipe. A landing's look includes horizontal scroll, so a deck swiped to the linked recipe isn't taken for the whole book. Made by Claude Opus 5.5 in Claude Code.
Acceptance: PASS with notesChecked Done means No closing issue supplies Done means for this slice; checked the PR's own claims, as requested.
The content-loss case was rejected with Golden journeys
Rollback answers: They match the diff. No production schema, persisted product data, infrastructure, or supported API/CLI contract changes; reverting removes the eval task and documentation. No Not run
Notes
|
… kept missing (#1249) ## What changed Agents building on Patchy kept tripping over the same few platform behaviours that nothing they read said plainly. The fixes are facts, one or two sentences each, in the two places builders read: the `AGENTS.md` that `patchy init` writes, and the project skills. - **A page's form never submits.** Every page runs in a sandboxed frame without `allow-forms`, so `<form onSubmit>` with a submit button sends nothing. This caused 27 of the 53 failing runs on main (51%), nearly all of them Terra's. - **A plain `Error` doesn't reach the page.** Anything a handler throws besides a declared `HandlerError`, or one of Patchy's own refusals, arrives as `handler_failed`, with its message lost. - **An agent knows a tool's arguments only from its description and schema.** `t.enum` lists the accepted values in the schema; `t.text()` names none. - **The look can colour every `button`'s text, as the Patchy look does.** A button restyled with a light background then keeps the look's cream text and disappears. - **What `ctx.viewer` is, and how a row id reaches `ctx.tables.<t>.get`.** This was the most common reason builders left the skills to read Patchy's type declarations. - **`get` refuses an empty id.** A last round of edits, written by Claude Fable 5.2 from the judges' findings on this branch, is the last four commits, the last of them fixing a review of the round: - **List order and paging.** A list on a declared index comes back ascending by the index's columns, so oldest first when `eq` fixes them all, unless it passes `order: "desc"`; and rows past `limit` come only through the cursor. The tables example passes both, and patchy-server gains a paged handler example. - **What a refusal looks like on the page.** A `HandlerError`'s `message` is its code. The generated client exports `isHandlerError` and `isPatchyError`, and patchy-preact shows a page telling them apart and keeping `retry()` for a lost reply. - **`useQuery` can't be skipped**, so a query that can't run yet belongs in a component rendered once it can. - **`useFileUrl` downloads the whole file as soon as it mounts**, and each download counts against the viewer's 300 calls a minute. - **An action's table writes commit one at a time**, and a write that fails with `unknown_outcome` may have committed. - **Every `server/` export is callable from the page.** `ctx.agent` is null where no tool arrives, and a re-export can rename a tool with `as`. - **The look's heading colour and paragraph width hold** the way its button colour does. - **The members skill exists only after `pnpm patchy add members`.** - It also cuts paragraphs repeated word for word in another skill, corrects the per-patch live-query re-run limit (2, not 1), and gives the agent section's error sentence the same exception for Patchy's own refusals. Part of #1141. Supersedes #1244, whose change is the first commit here. ## Look at  | ×6, 120 verdicts a side | Fit | Platform | Correctness | UX | Code | Mean | Checks pass | | --- | --- | --- | --- | --- | --- | --- | --- | | main (`8a3b347`) | 4.02 | 3.89 | 3.75 | 4.11 | 3.96 | 3.95 | 50/60 (83%) | | this branch | **4.20** | **4.03** | 3.90 | **4.06** | 3.94 | **4.03** | **54/60 (90%)** | The goal was 4.0 or more on every judge dimension. Fit, platform and UX meet it; **correctness (3.90) and code (3.94) don't yet**. UX and code are level with main in this run, within noise, though round K moved both. The rest of the correctness gap is design choices: paging, which agent tools exist, copying a handler instead of re-exporting it, receipt cleanup. Five rounds of facts didn't move those (see below). - **Native-form pages** went from 4 to 0, and "the page sent Patchy nothing" failures from 6 to 0. - **Off-skill lookups** fell on the hard tasks: war-room/terra 4.0 → 0.3, spend-approvals/terra 3.7 → 0.0, spend-approvals/sonnet 5.7 → 2.8 per run. - **Per task**, spend-approvals/terra went from 3/6 to 6/6. One drop: spend-approvals/sonnet went 5/6 → 4/6. One head build subscribed every viewer to an admin-only query, and logged `not_admin` refusals. In another, Ben's request wasn't on Ada's starting view. **Held-out tasks** (#1242 `recipe-book`, #1243 `standup`, ×3, never used to choose a change): checks pass 9/12 → **12/12**; judges 3.68 → **4.04**, correctness 3.04 → 3.75. **On today's main, with the last round.** Measured after rebasing onto `7f93b91`: | ×3, 60 verdicts a side | Fit | Platform | Correctness | UX | Code | Mean | Checks pass | | --- | --- | --- | --- | --- | --- | --- | --- | | main (`7f93b91`) | 3.85 | 3.88 | 3.65 | 4.08 | 3.97 | 3.89 | 17/30 | | the first five commits (two suites, 120 verdicts) | **4.10** | 3.98 | 3.79 | **4.18** | 3.98 | **4.01** | 16/30, 18/30 | | with the last round | **4.05** | **4.10** | 3.90 | **4.13** | **4.00** | **4.04** | 18/30 | - **The first five commits** still score higher than main on every dimension. - **The last round** against the first five is within ×3 noise on scores (+0.06 mean), but what it aimed at moved. The judges' high and medium findings about paging and truncation fell from 38 to 17, lists returning the wrong end from 12 to 6, and retry handling from 18 to 12. All high and medium findings fell from 170 to 154. - **Pass rates are low on every side because the eval is broken on main.** Since #1204, the `team` scenario's Cleo hasn't accepted the terms, so when the grader opens a patch as her it gets the terms prompt and the patch never loads. Every cheers and spend-approvals build fails there. That hits both sides equally, so the comparison holds, but these pass rates can't be compared with the ×6 above. **Where the facts go matters more than what they say.** Terra (Codex) loads `AGENTS.md` into its instructions and reads the skills as long tool output. Each fact in this table was first tried in a skill alone, and none changed what Terra built there. In `AGENTS.md`, each did: | Fact | In the skill only | In `AGENTS.md` | | --- | --- | --- | | Forms never submit | native-form pages 1 → 4 of 12, dropped (H1) | native-form pages 2 → 0; pass 77% → 93% (round A) | | A plain `Error` is `handler_failed` | plain throws 2 → 1, judges flat, dropped (G) | plain throws 1 → 0; pass 80% → 90% (H) | | `t.enum` is in the tool's schema | judges 3.86 → 3.81, dropped (C) | every dimension up, mean 3.91 → 4.01 (I) | | A restyled button keeps the look's text colour | too rare in its suite to read, dropped (F) | transparent-button rules 9 → 3 of 30; UX 3.92 → 4.15, code 3.85 → 3.98 (K) | `AGENTS.md` is written once, at `patchy init`; `refresh` never touches it. So each fact also goes into its skill, as it was measured there, so builders in existing repos get it too. Those skill versions measured neutral on their own, not harmful. After review, three sentences were tightened without changing what they tell a builder. A business refusal is a declared `HandlerError`, and Patchy's own refusals keep their codes. A tool's description counts as well as its schema. The button rule holds when the look sets a button text colour. **War room, Terra, one build each side (round K):** before, the Resolved and All filter tabs are cream text on cream and only Open shows; after, all three read. | Before | After | | --- | --- | |  |  | <details><summary>Every round, kept and dropped</summary> Each round is an A/B suite: base and head both build all five training tasks ×3, both builders (Claude Code on Sonnet 5.5, Codex on Terra 6.1), both judges (Opus 5.5, Sol 6.1): 30 runs and 60 verdicts a side (H2, run twice: 60 and 120). Rounds after A are measured against #1244 + A. | Round | Change, and where | Judges, mean | Pass | Target signal | Result | | --- | --- | --- | --- | --- | --- | | H1 | Retitle patchy-loop's "Tier 1 constraints" to cover every page (forms) | 3.93 → 3.80 | 80% → 77% | native-form pages 1 → 4 of 12 | dropped | | H2 | patchy-server: `ctx.viewer`'s shape; row ids reach tables as `Id<"table">` (×6) | 3.85 → 3.83 | 83% → 78% | off-skill lookups on the hard tasks 5.2 → 2.1 per run; held-out `standup` too | **kept** (was #1244) | | H3 | patchy-server: a `HandlerError`'s message is its code; the `errors` list | 3.92 → 3.91 | 80% → 83% | bare-code findings 16 → 15 | dropped | | A | `AGENTS.md` and patchy-preact: forms never submit in the frame; patchy-tables: `get` refuses an empty id | 3.82 → **4.03** | 77% → **93%** | native-form pages 2 → 0; "sent nothing" 3 → 0 | **kept** | | B | patchy-server: a `t.member()` column holds `user.id`, a copied name goes stale; patchy-tables: filtering a fetched page misses later pages | 3.86 → 3.80 | 83% → 73% | builds using a member column 5 → 5 of 12; truncation findings 65 → 67 | dropped | | C | patchy-server: an action with no tool is closed to agents; `t.enum` is in the tool's schema | 3.86 → 3.81 | 73% → 73% | agent-coverage findings 17 → 18 | dropped | | D | patchy-look: recipe classes need their CSS, the Patchy look's example company is made up; files: `put` by a caller's name, `useFileUrl` fetches on mount | 3.93 → 3.91 | 90% → 83% | look findings 13 → 10, files 22 → 15; dimensions flat | dropped | | F | patchy-tables: a declared index lists ascending; patchy-look: a restyled button keeps the look's text colour | 3.97 → 4.01 | 90% → 90% | invisible-text findings 1 → 1, order findings 5 → 7 | dropped | | G | patchy-server: a plain `Error` reaches the page as `handler_failed` | 4.06 → 4.05 | 90% → 87% | plain throws 2 → 1 | dropped (moved to H) | | H | `AGENTS.md`: G's fact | 3.95 → 3.95 | 80% → **90%** | plain throws 1 → 0; `handler_failed` failures 1 → 0 | **kept** | | I | `AGENTS.md`: C's `t.enum` fact | 3.91 → **4.01** | 83% → 80% | every dimension up; agent-check failures 1 → 0 | **kept** (part of the lift is likely noise: it spans tasks without agent tools) | | J | `AGENTS.md`: a `list` returns one page and a cursor | 3.99 → 3.96 | 83% → 83% | truncation findings 17 → 19 | dropped | | K | `AGENTS.md`: F's button fact | 3.92 → **4.03** | 90% → 77% | transparent-button rules 9 → 3 of 30; UX 3.92 → 4.15 | **kept**, an exception: its pass dip was 4 plain-`Error` refusals and 1 free-text agent argument, H's and I's targets, which K's branch lacked | Judges are the mean of the five dimensions over both judges; each round is 30 runs and 60 verdicts a side (H2: 60 runs and 120 verdicts). </details> ## What didn't work, and why - **Restating a rule where Terra already reads it.** Terra `cat`s whole skill files on both sides of every A/B, so a heading never gated whether it saw the form rule (H1). It saw it, and wrote a native form about half the time anyway. The same fact in `AGENTS.md` worked. - **Facts about design choices.** Telling builders that a `t.member()` column holds a stable id (B), that leaving out an agent tool closes it to agents (C), that filtering a fetched page misses later pages (B, and J in `AGENTS.md`), or that a declared index lists oldest first (F) left the designs unchanged. Truncation findings stayed at 65 → 67 and 17 → 19. Only facts about behaviour the builder didn't know changed what it built. The exception came in the last round: it restated paging as what `list` does, with an example passing `order` and the cursor, and the paging findings halved (38 → 17). - **Saying what a refusal looks like on the page (H3).** True, and builders still showed the bare code. - **The look's example company.** I wrote that the Patchy look's example markup names a made-up company, Acme Co, after judges flagged pages that read "Acme Co". The `team` scenario's company *is* Acme Co, so those pages were right and the judges wrong. Dropped (D). The last round says only that the sample's names are placeholders and the company's name is `company.name`. - **Codex truncating long output.** Terra prints several skills in one command, so I checked whether the form rule fell in an elided middle. Runs where the rule landed in the visible head or tail used native forms as often (3/5) as those where it was cut (21/49), so that isn't why. ## How it was verified - **Final:** this branch's head against main (`8a3b347`), ×6 (two ×3 suites on the same commits), all five training tasks, both builders, both judges. - **Held-out:** both held-out tasks, #1242 `recipe-book` and #1243 `standup`, merged locally onto main, with this branch on top. They were never used to choose a change. Result, ×3, 24 verdicts a side: pass 9/12 (75%) → **12/12 (100%)**; judges 3.68 → **4.04** (fit 3.79 → 4.17, platform 3.96 → 4.25, correctness 3.04 → 3.75, UX 3.92 → 4.13, code 3.71 → 3.88); native-form pages 3 → 0. - **Facts checked against the code:** - forms: `packages/serving/src/shell.ts`, the frame's `sandbox="allow-scripts allow-modals"` - refusals: `packages/runtime/src/Invocation.ts`, `HandlerFailed`'s fixed message - enums in tool schemas: `packages/api/src/agentTools.ts` - buttons: `packages/companies/looks/patchy/look.css`, the `button` rule - empty ids: `packages/api/src/runtime.ts`, `tables.get` takes `NonEmptyText` - viewer shape: `ContextBase.viewer: Me` in `packages/patchy/src/server.ts` - **The last round:** its head (`c8af5ed`, before the last commit's two wording fixes and a clean rebase) against the first five commits, ×3; and the first five against main in a separate ×3 suite, both on `7f93b91`. Each claim in it was checked against the code: `TableOperations.ts` for list order, `handlerError.ts`, `generateClient.ts` and `generateServer.ts` for refusals and imports, `useQuery.ts`, the admission in `Runtime.ts` for file downloads, `registry.ts` for limits, `handlerDescriptors.ts` for re-exports, `Generation.ts` for the members skill, and `look.css`. - **Review of the last round:** GPT-6.1 Sol at xhigh, in Codex. Its five findings are fixed in the last commit: a declared index sorts by its columns, not by age; the page's error example left the `missing` code to show as text; only handler runs leave log entries; a call never sent fails with `unknown_outcome` and no `retry()`; and patchy-server repeated patchy-preact on `useQuery`. - **Raw runs stay on the eval machine.** - On this head, format, the SDK's skill tests (34, in `install`, `FrontDoor` and `SdkApi`) and `initProject.test.ts` (15) pass. Before the last round, `env -u NODE_ENV pnpm check`: format, lint, typecheck and synth pass; 2,828 of 2,830 tests pass. The two that timed out at 30 s (`cliRepoPublish`, `devServerWatch`) did so while four eval suites shared the machine; rerun alone with `initProject.test.ts`, all 38 pass. **Noise, so the numbers read right.** The same main commit read between 3.89 and 3.99 mean across suites, and one run is 3.3 points of a ×3 pass rate. Rounds were kept when their target moved and their pass rate held; K is the stated exception. The headline numbers pool two ×3 suites run on the same two commits. **Found on the way, outside this PR:** - **The eval since #1204.** The grader can't open a patch as the `team` scenario's Cleo, who hasn't accepted the terms, so two of the five tasks can't pass. A fix: the eval accepts the current terms for every person it signs in as. - **A live-query race.** A shell `replace` that arrives after a later `subscribe` is refused with 409, and the grader fails any check whose page logged an error. That can fail a correct build. - **Eval disk use.** The harness keeps a ~2 GB builder home per run. A trimmer on the eval machine covered it here. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required: skill text, and the `AGENTS.md` text new repos get. - **What does a revert leave behind?** Repos initialised in between keep the new `AGENTS.md` sentences, which stay true; skills regenerate from the release. - **Does the release before it still work with that?** Yes. Claude Opus 5.5 in Claude Code, through T3 Code; the last round's skill edits by Claude Fable 5.2. --------- Co-authored-by: Allison Mahmood <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
No eval task asked for something naturally tier 1, and none used a page's own routes.
recipe-bookis a held-out task, the "recipes-routes" #1144 planned. A person asks for a team recipe book: anyone adds a recipe with a title, ingredients and steps, and every recipe has its own link that opens right on it. Held out, it runs only when--tasksnames it, so it confirms that a skill edit generalises and never chooses one.Part of #1144
Look at
The request, as the builder gets it:
Target, tier and visible.
targetis a new repo, since a single-file page has no data of its own and the book is shared.tieris unset. Tier 1 is the expert answer: no rule to keep against the viewer, no write that must be atomic, and no agents. A tier 2 build still meets the request, though, andtieris for when only one tier is correct. The rubric's first line tells the judges, ascheersdoes.visiblekeeps its default: it's a new patch, andteamhas none.Two checks, beside the built-in published, typechecks and opens ready:
patchy.route.setis the shell'spushState, not a runtime call, so the write barrier never holds it.IntersectionObserverin the frame sees it.Opening a recipe. The check presses the recipe card's own control, best first:
None may name another action or a part of the recipe, so "Show ingredients", "View steps" and "Copy link to …" never count.
The card is the innermost part of the page holding the title and such a control. Only when there's none does the check click the title. Every click has a 5 s timeout, and one that can't land is passed over. Steps already on the page don't count as opened, since opening is what makes the link.
Neither check depends on names a builder picks:
A press can send nothing because the browser blocked a native
<form>submission; the frame's sandbox has noallow-forms. The check's detail then says so. Without that, the scorecard only said "sent Patchy nothing", and Chromium's reason stayed in the console.How it was verified
Three review passes, by GPT-6.1 Sol at xhigh.
The first, at
ac10fad, found four defects, fixed in69739a9and8c2ff2c:The re-check, at
8c2ff2c, found seven. Two were false passes from the first fixes:/could hand out/as that recipe's link;The other five were false failures:
Rather than add a case for each,
6170125replaces the opening, linking and landing rules with the simpler ones above.The third pass, at
6170125, blocked only on false passes and realistic false failures. It found no false pass, and two realistic false failures, both fixed in4088fff:Fixtures, each on a fresh patch. I published a hand-made tier 1 recipe book on a local
pnpm dev up teamenvironment, one fresh patch per fixture, so each book starts empty as in a run. Each was graded at4088fffunder Bun, by the task's checks through the grader's ownopenAs, write barrier andcheckResult. The last column is an earlier check on the same fixture, where I ran it./and leaves the address there (re-check)8c2ff2c: link passed8c2ff2c: link passed8c2ff2c: both failed, the title click timing out after 30 s8c2ff2c: link failed6170125: both failed, as the button was never pressed6170125: link failed, "Cleo's two links landed on the same view of the book …"A note on the stretched link: the grader runs Playwright as a library, whose default action timeout is 30 s. So the title click wasn't retried forever. It failed after 30 s, and the check then failed a correct build.
The fixtures also caught a bug in my own fixture book. It listed recipes oldest first, so last round's "opens on the newest" fixture really opened on the oldest. It's fixed above.
Real builds, regraded at
4088fff. Every build from the suites below was republished as a fresh patch and graded with the current checks:6cab855), Sonnet 1 (ac10fad)ac10fad)6cab855)What can still go wrong.
69739a9, Sonnet's first warm-up logged one 409. The shell's live-query subscription sent areplacethat reached the server after a latersubscribe, which was refused asstale_sequence. The grader fails a check on any console error. It happened once, and the rerun passed clean.The suites, three of
--only-head --tasks recipe-book, graded with the checks at their own commits. Each suite starts with one uncounted Sonnet warm-up build, graded like the rest.20261104T150006-b64366c--repeats 2 --no-judge20261104T151427-6cab855--repeats 2 --no-judge20261104T155811-ac10fad--repeats 1, judgedCounting measured runs only: Sonnet 2 of 3 passed every check, and Terra 1 of 3. Every warm-up passed. Each failure was read against the build's published source:
6cab855): the builds'. Both checks failed with "pressed Save recipe, but the page sent Patchy nothing". Both builds save through<form onSubmit>and a submit button, which the frame's sandbox blocks; Chromium logs "Blocked form submission … the 'allow-forms' permission is not set". Republished locally, Terra 1 failed the same way. With only its submit button changed totype="button" onClick, both checks passed, so the checks read its routes and its table correctly. feat(dev): eval tasks that change existing patches, with spend, broken-handler and kudos-agents #1153 and feat(dev): war-room eval task, a reference for the hardest builds #1220 found the same failure in Terra's spend and war-room builds.6cab855): the builder's detour. It timed out at 25 minutes with nothing published. Its app was written by minute 2. It then spent about 22 minutes installing Playwright's Chromium through the sandbox's proxy, to look at its own page, and was atpublish --dry-runwhen time ran out. Every other build took 1.9 to 3.9 minutes.Judges. Both judges gave verdicts on both judged runs (2 of 2 each), and their findings follow the rubric.
Tests.
pnpm checkat4088fff, withNODE_ENVunset (see below): format, lint, typecheck and synth pass, and 2,829 of 2,830 tests pass. The other,PgliteCompanyDatabases, is in a package this PR doesn't touch. It timed out at 5 s while other worktrees' eval suites held the machine at a load of about 27 on 8 cores, and its file then passed on its own. At8c2ff2cthe whole check passed.NODE_ENVhas to be unset: the shell that ran the check hadNODE_ENV=production, which fails 41 execution tests withproduction_refused. The dev runner setsNODE_ENV=developmentfor its server, so the evals never saw it.stage.test.ts,checks.test.ts,eval.test.tsandbarrier.test.ts: 86 passed.stage.test.ts's per-task test now coversrecipe-book: its scenario, its people, and unique check names.Docs.
docs/DEVELOPMENT.mdlists the suite's tasks, and nowrecipe-bookas held out. The dev-loop skill names no tasks. No existing task, check, rubric, judge or skill text changes.Release impact
Tick exactly one.
Breaking — requires action from anyone already running this
Not breaking — no action required: an eval task under
scripts/devand a docs line; nothing ships.What does a revert leave behind? Nothing.
Does the release before it still work with that? Yes.
Made by Claude Opus 5.5 in Claude Code, through T3 Code.