Skip to content

feat(dev): eval judges score each run blind and say which skill text led where - #1172

Merged
allisonmahmood merged 1 commit into
mainfrom
feat/skill-evals-judges-1143
Nov 2, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
feat/skill-evals-judges-1143

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

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 fix(dev): an eval suite finishes even when a builder leaves a connection open #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

  • 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.

@github-actions github-actions Bot added area:ci CI, shared testing infrastructure, development scripts and tooling size:xl Over 1,000 changed lines; review in multiple passes labels Nov 1, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review (GPT 6.1 Sol)

Verdict: blocking findings at dd38a46; do not merge yet. Reviewed only origin/feat/skill-evals-compare-1143...dd38a46 against #1143.

  1. P1 — Skill text remains accessible through both scoring mounts. scripts/dev/src/eval/judges.ts:282–283,303. copySource removes only node_modules and .patchy. Its input comes from grade.ts's patchy pull, which refreshes the repo and regenerates .agents/skills/patchy-*/SKILL.md; published AGENTS.md/CLAUDE.md also survive. Consequently a normal cheers judge can read /work/source/.agents/skills/patchy-tables/SKILL.md during blind scoring. Separately, the checkout masks omit /patchy/packages/patchy/skills/ and the release archives in packages/{patchy,sdk}/artifacts/. The package build copies the global skill into both. I verified that the packaged skill equals the root skill and the SDK archive contains package/skills/patchy/SKILL.md. Sanitize both mounted trees, including generated/distributed copies and agent instructions. This directly violates Skill evals 2: compare two commits, judged blind by Opus 5.5 and Sol #1143's no-skill-text requirement.

  2. P1 — Mount metadata reveals the side and builder. scripts/dev/src/eval/judges.ts:353–355,383–386. HOME and /work are bound directly from the named run directory, while bwrapArgs exposes /proc. Reading /proc/self/mountinfo reveals the bind roots, including runs/head-cheers-terra-1/judging/sol/{home,work}; the /patchy root also exposes the side checkout's path. I reproduced this with a minimal bwrap probe using the same mount layout. Renaming the mountpoints to /work and /home/builder does not anonymize their host roots. Use anonymous staging and prevent host mount metadata from disclosing identity. This violates Skill evals 2: compare two commits, judged blind by Opus 5.5 and Sol #1143's explicit side/builder blindness requirement.

  3. P2 — Calibration exposes its expected answers. scripts/dev/src/eval/calibrate.ts:125. Calibration mounts the runner's entire checkout as /patchy, but masksIn leaves scripts/dev/eval-calibration/ readable. A scoring judge can inspect /patchy/scripts/dev/eval-calibration/expectations.json, including the preferred rankings and reasons, and match the sample source against the adjacent labelled folders. Thus a passing calibration does not establish agreement with hidden human labels. Mask the calibration corpus/expectations from the reference checkout too.

  4. P2 — Failed scoring passes are never retried. scripts/dev/src/eval/judges.ts:378–393,402–407. A timeout, rate limit, missing output file or malformed structured answer becomes the final null verdict immediately. Neither judgeAll nor calibration retries judge; the existing runWithRetry covers builders only. A transient provider failure therefore permanently removes one judge's contribution, or fails calibration, even if the next request would succeed. Add a bounded infrastructure retry, explicitly required by Skill evals 2: compare two commits, judged blind by Opus 5.5 and Sol #1143's “Malformed output is an infrastructure status, retried.”

  5. P2 — A judge infrastructure error can abort the whole completed suite. scripts/dev/src/eval/suite.ts:374–408. The concurrent judge calls have no error boundary. Their filesystem/setup operations and runSandboxed's process spawn can fail through Effect's error channel rather than return an infra record. For example, an OS EAGAIN spawning one bwrap fails Effect.forEach, interrupts the other judgings, and exits runSuite before scorecard.md/scorecard.json are written. The judges' toolchain installation at line 369 has the same suite-wide failure behavior. Convert recoverable judge infrastructure failures into recorded statuses and retain the build scorecard/other verdicts.

  6. P2 — Attribution failures lose their infrastructure status. scripts/dev/src/eval/judges.ts:461–475. If scoring finds a medium/high problem but attribution times out or produces malformed JSON, pass returns a reason in why. This code discards that reason, persists attribution: null, and marks the judge record infra: null. The saved result cannot explain whether attribution was skipped or failed, while the scorecard presents a successful judge. Persist a separate attribution failure status without discarding the valid scoring verdict.

  7. P2 — Judge failures and sample counts disappear from the scorecard. scripts/dev/src/eval/scorecard.ts:157–167,238–240. Means pool whichever verdicts exist, but the Markdown displays neither verdict counts nor judge infrastructure failures; the existing “infra” count counts builder outcomes only. If Opus times out on base while both judges answer on head, the displayed delta compares different judge coverage without disclosing it, and the run table contains no judge failure either. Show the scoring n and failed-judge coverage per side/judge so a partial comparison is visible. Skill evals 2: compare two commits, judged blind by Opus 5.5 and Sol #1143 explicitly requires deltas with n.

Validation: pnpm exec vitest run scripts/dev/src/eval passed all 28 tests. Mean-score arithmetic, the >=2 split threshold and the calibration ranking comparison match their declared definitions. The work and checkout binds are read-only; judge HOME is a separate writable copy, Claude's host credential file is read-only, and Codex receives a credential copy. No eval suite or instance was started, no production endpoint was accessed, and no tracked files were changed.

@allisonmahmood
allisonmahmood force-pushed the feat/skill-evals-judges-1143 branch from dd38a46 to 316cdf2 Compare November 1, 2026 16:01
@github-actions github-actions Bot added the area:docs Touches the docs area label Nov 1, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

All seven findings are fixed in 316cdf2, which is rebased onto #1155's 95d8b1b. I also fixed one leak the review didn't name.

  1. Skill text in both mounts. The checkout's masks now come from a walk instead of a list. They cover every skills, artifacts, .agents, .claude and .codex folder and every SKILL.md, AGENTS.md and CLAUDE.md, wherever they are. That includes packages/patchy/skills, both release archives and the scenario patches' AGENTS.md, plus .git and .local. Dependencies aren't walked, because they link back into the checkout. In the published source copy, .agents, .claude and .codex folders and any SKILL.md, AGENTS.md and CLAUDE.md are removed. I checked a built checkout: no dist bundle inlines skill text.
  2. Mount metadata. Each judge's HOME and workspace are now staged under <suite>/judging/<random>, and removed afterwards. Nothing mounted carries a run, side or builder name. Judges read this checkout for both sides instead of the side's clone, whose path says before-…/after-…. The trade-off: judging a change to the platform itself reads head's code for base too. That is documented.
    • The extra leak. A pulled repo records its instance in patchy.json, package.json and the lockfile (http://after-6trhq6.localhost:…), and that host names the side. The source copy and checks.json now rename that host to patchy.localhost. Judges also get a network of their own that bridges an unused port, so they never reach either side's instance.
  3. Calibration labels. scripts/dev/eval-calibration is masked whole.
  4. Retries. A pass with no answer, whether it timed out or didn't decode, is tried once more, for both scoring and attribution.
  5. Error boundary. judge never fails. Any sandbox or filesystem error becomes a record with no verdict and a fixed reason; the detail is printed to the console only. A judges' home that can't be set up marks every judgment that way instead of failing runSuite. Writing a verdict file is best-effort.
  6. Attribution failures. JudgeRecord gains attributionInfra, set to the reason when an attribution pass ran and gave nothing. The run's notes show it.
  7. n in the scorecard. The per-dimension table has a Verdicts column, given as verdicts out of those asked for (base → head in a comparison). Each run's notes say which judge gave no verdict or attribution, and why.

The judges commits had also left the docs stale. docs/DEVELOPMENT.md and the dev-loop skill now describe the judges, calibration, --no-judge and --calibrate.

New tests cover the checkout masks (build outputs, scenario AGENTS.md, calibration labels, node_modules not walked) and the source copy (instructions removed, instance renamed). All 32 eval tests pass on Node and Bun, along with typecheck, test types, lint and format. I'll re-run calibration on the new masks once the suite running on this machine finishes.

@allisonmahmood
allisonmahmood force-pushed the feat/skill-evals-compare-1143 branch from 38f7585 to 675b9cb Compare November 1, 2026 16:08
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-review (GPT 6.1 Sol)

Verdict: blocking findings at 316cdf2; do not merge yet. Reviewed this PR's own diff against 95d8b1b, the fix commit, the author's reply and #1143.

The seven previous findings:

  1. Skill text in both scoring mounts — not fully resolved. copySource removes the named agent instructions and renames the instance correctly; the checkout walk covers the previously identified skill directories and release artifacts. However, cached archives and the public network still expose skill text (B and C below).
  2. Mount metadata revealing side/builder — resolved for the reported route. Anonymous staging and the common reference checkout remove the run's side/builder from the bind roots. The minimal probe's mountinfo showed only anonymous staging and common checkout/network paths. The PID namespace contains the sandbox's bwrap, bridge and command; the environment is closed. Preserved source timestamps are not normalized, but I did not establish a deterministic side/builder disclosure through them.
  3. Calibration labels readable — not fully resolved. The local corpus is masked, but the scoring network can fetch its exact expected answers from public GitHub (C).
  4. No judge retries — resolved for timeout/malformed-answer results. Both passes now get two attempts. A fake Codex harness returning malformed JSON first and a valid verdict second successfully produced the second attempt's scores. Filesystem/spawn failures still bypass this retry, but the original timeout/decode retry path is implemented.
  5. A judge error aborting the suite — not fully resolved. Per-judge errors, template installation errors and verdict-file writes are contained, but the new shared judge-network acquisition is outside the boundary (E).
  6. Attribution failures losing their status — not fully resolved. Returned timeout/decode failures now populate attributionInfra; a filesystem/setup/spawn failure during attribution instead discards the already valid scoring verdict (D).
  7. No n or judge failures in the scorecard — resolved for the reported coverage gap. The dimension table now reports verdicts/asked on each side, and run notes name scoring and attribution failures by judge.

Remaining/new findings:

A. [P1] The walk adds a symlink mask that prevents every judge from starting. scripts/dev/src/eval/judges.ts:392–393 (consumed at sandbox.ts:128–130). This repository tracks CLAUDE.md -> AGENTS.md. fs.stat follows it, so masksIn emits a file bind at /patchy/CLAUDE.md. Running the actual masks through runSandboxed fails with bwrap: Can't mount on symlink destination /patchy/CLAUDE.md. Both retries fail before the harness starts, for both suite and calibration. Resolve masks to safe targets/avoid symlink destinations; the target AGENTS.md is already masked. The current tests check mask arrays without exercising bwrap against this tracked symlink.

B. [P1] Turbo's compressed build cache remains a local copy of the masked skills. scripts/dev/src/eval/judges.ts:392–394. After a normal cached build, .turbo/cache/*.tar.zst contains the declared patchy#build outputs, including packages/patchy/skills/** and its release archive (turbo.json:18). The walk leaves these cache files readable, and masking extracted skills//artifacts/ directories does not mask bytes inside an archive. In a representative temporary Turbo-cache fixture, masksIn returned no masks and a sandbox command successfully extracted packages/patchy/skills/patchy/SKILL.md; its SHA-256 was 368fb8d4…d394b, equal to the real global skill and skills-lock.json. Hide build caches as well, or mount a sanitized reference tree. This route requires a populated cache; I did not run a build to populate this checkout's cache.

C. [P1] The judge's public proxy bypasses both skill and calibration masks. scripts/dev/src/eval/suite.ts:377–381 and calibrate.ts:87–92, using network.ts:93–100. NO_INSTANCE changes the local instance bridge, but openNetwork still permits CONNECT to every public address; allow is only a private-address exception, not an outbound allowlist. This repo is public. From a sandbox using that network, fetching https://raw.githubusercontent.com/allisonmahmood/patchy-cloud/316cdf277e58256c8d54ad98c7324ba14fb6c986/skills/patchy/SKILL.md returned HTTP 200 and the exact 45,551-byte skill. The corresponding scripts/dev/eval-calibration/expectations.json returned HTTP 200 and all 955 bytes of expected rankings/reasons. The mounted skill lock identifies the public repository, and real suite bind roots retain the suite's head SHA prefix. Restrict scoring/calibration egress to the model-provider endpoints rather than the builders' general public proxy. For this probe I omitted only A's redundant symlink mask; the local skill and calibration directories were otherwise masked and confirmed empty. No Patchy deployment endpoint was contacted.

D. [P2] An attribution infrastructure error erases a successful score. scripts/dev/src/eval/judges.ts:589–595; attribution begins at line 517. The catch wraps both passes and always returns noVerdict. If scoring succeeds with a medium finding, then attribution mkdir/copy/write or process spawn fails, the result loses the verdict and reports attributionInfra: null. A fake harness produced a valid all-4 scoring verdict; injecting a filesystem failure only at /attribution/skills returned scores: null, verdict: null, infra: "Its sandbox couldn't be set up or run.", attributionInfra: null. Keep the valid score and catch attribution failures within the attribution stage, preserving their separate status. Otherwise incidental attribution failures change the scoring sample and means.

E. [P2] Shared judge-network setup can still abort the completed suite before its scorecard. scripts/dev/src/eval/suite.ts:377–381. openNetwork runs before the protected ready block. A temp-directory failure or Unix-socket listen failure (for example ENOSPC/EMFILE) escapes judgeAll; runSuite does not recover it and writes its scorecards only after that call (suite.ts:568–599). Thus a judging-only infrastructure failure still loses the completed build comparison. Include network acquisition in the shared setup boundary and return no-verdict records for every requested judge when it fails.

Reading the runner's checkout for both sides is acceptable for #1143: the issue explicitly freezes the evaluation suite and asks for a masked Patchy checkout, without requiring the reference checkout to be the side's version. A common reference is appropriate for skill-text comparisons. The documented limitation when platform behavior itself changes is real, but I would not block this issue on that choice.

Validation: all 32 eval tests passed on Node and Bun. Minimal bwrap probes exercised the real masks/network and a temporary cache fixture; fake harnesses exercised retry and attribution-error behavior without model calls. No eval suite or Patchy instance was started, no production endpoint was touched, and no tracked files were changed.

@allisonmahmood
allisonmahmood force-pushed the feat/skill-evals-judges-1143 branch from 316cdf2 to da147c9 Compare November 1, 2026 16:18
@allisonmahmood

Copy link
Copy Markdown
Owner Author

All five fixed in da147c9, which is rebased onto #1155's new head 675b9cb.

  • A. Linked files. A link is never a mask now. masksIn checks for one first with readLink. A link whose name is an instruction's hides its target, when the target is inside the checkout, and links are never followed. In a published source, such a link is removed rather than read. Checked against real bwrap on a built checkout: all 40 masks mount, there is no CLAUDE.md mask, and grepping /patchy (outside node_modules) for skill text finds nothing in skills/, packages/*/skills, the release archives or the calibration labels.
  • B. Build caches. .turbo folders are masked wherever they are, and so is each node_modules/.cache. Dependencies are still not walked, but their cache folder is hidden.
  • C. Public network. openNetwork takes an only list of hosts. The proxy then reaches only those hosts and their subdomains, by name and before any lookup, besides the exact allow endpoints, and refuses IP literals outside allow. Judges run on only: anthropic.com, claude.ai, claude.com, openai.com, chatgpt.com. A custom Codex provider still passes through allow. The harnesses' own web tools are off too, since those searches run on the provider's side and never touch our proxy: Claude Code with --disallowedTools WebSearch,WebFetch, Codex with -c web_search="disabled". I checked that this Codex validates that value: a bogus value fails to load, "disabled" loads. The toolchain still installs through the public internet, on a separate network that is closed as soon as the install finishes.
  • D. Attribution errors. The attribution pass has its own guard. Any error there keeps the verdict and scores, and records attributionInfra.
  • E. Network setup. The judges' home and both networks are set up in one guarded step, prepareJudges. If that fails, every requested judgment becomes a no-verdict record, and the suite's scorecard is still written.

New tests:

  • the narrowed network refuses CONNECT raw.githubusercontent.com:443 with a 403
  • host matching by name (subdomains in; lookalike suffixes and IP literals out)
  • the tracked-link case in the masks
  • .turbo and node_modules/.cache are hidden
  • a published source's CLAUDE.md link is removed without being followed

All 34 eval tests pass on Node and Bun, along with typecheck, test types, lint and format. Calibration is running now on this head as the end-to-end check, with real judges through the narrowed network. I'll post its table here.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Calibration on da147c9 passes. The run used real judges with the calibration labels masked, links not masked, caches hidden, the network limited to their providers and web tools off. Both judges ranked all three labelled pairings 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

All six judges started and answered through the narrowed network. That settles finding A in practice, and shows the providers-only network is enough for both harnesses. One caveat: the run had #1154's shutdown fix applied locally, so that the process exits after printing the table.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-review (GPT 6.1 Sol)

Verdict: one P1 blocker remains at da147c9; do not merge yet. Reviewed this PR's own diff against origin/feat/skill-evals-compare-1143 (675b9cb), the latest fix commit, and the previous review/reply.

A–E:

  • A — resolved. masksIn recognizes the tracked CLAUDE.md -> AGENTS.md link and masks the target rather than mounting over the link. The actual checkout's 37 masks mounted successfully through runSandboxed; the command exited 0.
  • B — resolved for the reported cache routes. .turbo directories and node_modules/.cache are masked. A temporary checkout containing both cache paths and the tracked-link shape started successfully under bwrap and saw both cache directories empty. I found no additional readable Patchy skill archive in the built checkout.
  • C — not resolved. Direct GitHub CONNECTs are denied, but the provider-wide subdomain allowlist admits shared web hosting. The tunnel can switch to an unrelated GitHub mirror after the name check; details below.
  • D — resolved. attribute has its own error boundary. With a fake Codex harness producing a valid all-4 verdict and a filesystem failure injected specifically at /attribution/skills, judge retained the verdict and all scores, left infra: null, and populated attributionInfra.
  • E — resolved. judgeAll guards prepareJudges, covering template creation and both network acquisitions. Injecting a network temporary-directory failure returned no-verdict records for both requested judges without throwing. The later verdict/run-file writes remain guarded. Calibration may fail its own setup, which is appropriate for that command.

Remaining blocker [P1]: shared Vercel ingress bypasses the judge allowlist and serves the exact hidden files. scripts/dev/src/eval/judges.ts:63, with the unchecked tunnel at scripts/dev/src/eval/network.ts:140–154.

openai.com plus all subdomains includes cookbook.openai.com, which resolves to Vercel. The proxy checks that CONNECT name and address, then blindly forwards bytes. In a real judge-shaped bwrap sandbox using the new only list, I sent CONNECT cookbook.openai.com:443, then TLS with SNI github-proxy.vercel.app and an HTTP request with that same Host. Certificate verification was enabled. Vercel routed it to that unrelated GitHub mirror, which returned HTTP 200 for:

  • /allisonmahmood/patchy-cloud/blob/da147c914d2b4489b60ee782c79cef709e2399e4/skills/patchy/SKILL.md
  • /allisonmahmood/patchy-cloud/blob/da147c914d2b4489b60ee782c79cef709e2399e4/scripts/dev/eval-calibration/expectations.json

The mirror's embedded rawLines, joined with newlines and the final newline restored, reproduced all 45,551 skill bytes (SHA-256 368fb8d4a7c36a152bef13f7aa20a3099d12c10797b5ca49a29d9cf9443d394b) and all 955 expectation bytes (9c9f3c9e7812bcbb38285cae82eea39f57043326e6be773ecd686c57c0c653ec), matching the files at this head. Thus a scoring judge can still recover the masked skill and calibration answers using ordinary shell networking, despite its harness web tools being disabled. This requires neither DNS rebinding nor an IP literal: the allowed name resolves honestly, and the request switches virtual hosts inside the permitted tunnel. Restrict the judges to concrete inference/auth endpoints rather than every provider subdomain, and ensure shared ingress cannot route the permitted connection to another authority.

Other probes: direct GitHub, lookalike suffixes, IP literals (including IPv4-mapped IPv6), and userinfo-shaped CONNECT targets were rejected. DNS vetting connects to the checked numeric address, so I found no lookup/connect rebinding gap. /proc contained only the sandbox's processes; their roots retained the masks and their file descriptors did not expose a host checkout. copySource no longer follows links. No other blocking error-boundary escape was established.

Validation: 34/34 eval tests passed on Node and 34/34 on Bun. The authorized dependency build/typecheck completed from cache after a standalone probe import initially lacked built dependencies. Minimal bwrap probes and a fake harness exercised the routes above; no eval suite, calibration, or Patchy instance was started, no production endpoint was contacted, and no tracked files were changed.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Fixed in 601d6a4. You were right: allowing whole provider domains let shared hosting under them in.

  • Exact hosts. Judges now reach only these names: api.anthropic.com, console.anthropic.com, platform.claude.com, claude.ai, api.openai.com, auth.openai.com and chatgpt.com. No subdomain matching, so cookbook.openai.com is refused at CONNECT.
  • TLS must name the vetted host. Exact names alone wouldn't be enough, because the provider APIs also sit on shared CDNs, and those serve any site they host on the address an allowed name resolves to. So on a narrowed network, a tunnel to a host admitted by only now waits for the client's first TLS record. It reads the ClientHello's server name and opens only if that equals the host it vetted. Anything else is dropped: another name, no server name, plain HTTP, or a first record longer than 16 KiB. allow endpoints, the developer's own private provider, are exempt, since those may not use TLS at all. serverNameOf is tested against a real ClientHello from Node's TLS client, and against partial and non-TLS bytes.
  • What's left. A request inside a correctly named TLS session that gives another site in its Host header (Host-header fronting). The CDNs these hosts sit on refuse that across customers, and the proxy can't see inside TLS without terminating it. That trade-off is documented in network.ts.

All 35 eval tests pass on Node and Bun, along with typecheck, test types, lint and format. Calibration is re-running on 601d6a4 to confirm both harnesses work with only these exact hosts.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Calibration on 601d6a4 passes with judges limited to the exact provider hosts and TLS server-name check. Both judges ranked all three labelled pairings 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

So both harnesses work with only those hosts. One Sol pass crashed (Codex exited 101), and its retry answered. That crash put a whole minified file on the console, which is why cc7cdc5 caps the failure line at 240 characters. (The run had #1154's shutdown fix applied locally.)

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-review (GPT 6.1 Sol)

Verdict: merge at cc7cdc591955d0f6aeec1be34c43967e2323319b, with one non-blocking P3 cleanup finding below. Reviewed git diff da147c9..cc7cdc5, the relevant network/judge call sites, #1143, and the previous review and author's reply.

Previous open item C — resolved. PROVIDER_HOSTS contains concrete inference/auth hostnames, and among now requires an exact match. cookbook.openai.com, unrelated subdomains, suffix lookalikes and unlisted IP literals do not pass. For public hosts admitted through only, the proxy buffers the client's bytes and compares the lowercased ClientHello SNI with the lowercased vetted CONNECT hostname before its first outside.write. The explicitly configured private-provider allow exemption remains intentional.

TLS parser and gate. I found no out-of-bounds Buffer read or exception in the parser. A partial first record waits for more TCP data; a complete record without SNI, plaintext, an oversized record header, and an oversized accumulated hello are refused. Local probes through the actual narrowed tunnel confirmed that one-byte TCP delivery forwards zero client bytes until approval, that a different SNI closes both sockets without forwarding, that mixed-case CONNECT/SNI works, and that a hello pipelined after CONNECT is checked too. A ClientHello fragmented across TLS records is not generally supported; that is a fail-closed compatibility limit, distinct from TCP fragmentation.

This is an SNI reader, not a complete TLS validator: it skips the handshake length and does not enforce the server_name extension/list lengths. Deliberately inconsistent lengths can therefore still return the approved name. The same malformed hellos were rejected by Node/OpenSSL before its SNI callback, and I found no way for those cases to establish TLS under a different name. I do not count their permissive parsing as an established blindness bypass.

#1143's blindness requirement. The documented reliance on the provider CDN to reject cross-customer Host-header fronting is acceptable for this internal harness's explicit trusted-provider boundary. Matching SNI closes the demonstrated shared-ingress route; this is not an independent guarantee about encrypted HTTP authorities. The CDN isolation assumption must remain true for each allowed host. I did not probe live provider/CDN behavior in this re-review, so this verdict does not independently certify that assumption.

Non-blocking finding [P3]: close the upstream socket when a client abandons SNI inspection. scripts/dev/src/eval/network.ts:226 (the new waiting phase at lines 209–228). The upstream socket is already connected, but inside.pipe(outside) is installed only after a matching hello. If the client sends only a prefix and disconnects, no close/end handler tears down outside. A local reproduction sent 40 hello bytes and destroyed the client; the upstream remained open with neither an end nor a close event. Aborted handshakes can therefore retain sockets until the provider times them out. Couple client close/error to upstream destruction while waiting, as the explicit rejection path already does. This does not expose hidden material or block normal judging.

Validation: 35/35 eval tests passed on Node and 35/35 on Bun using the two permitted commands. Additional local-only parser probes covered every prefix of a valid hello and 69,968 mutation/fuzz inputs without a throw; local socket probes exercised the gate and cleanup case above. git diff --check passed and the working tree is clean. No eval/calibration suite or Patchy instance was started, no production endpoint was contacted, and no tracked files were changed. The console-line truncation introduces no additional finding.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Fixed the P3 in 5fef167. While the tunnel waits for the TLS hello, a client that disconnects now destroys the upstream socket too, the same as the rejection path. All 35 eval tests pass on Node and Bun.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked 5fef1675b3271d765e15bf322c88a04a9d3998f9 (stack base 675b9cb39a7e9d595ccd890c9898f38a91ee31fa, #1155) on team / cheers, by GPT-6.1 Sol in the Codex harness through T3 Code. I did not write this PR. The head was unchanged when rechecked; CI is green.

Done means

  • Both sides and both builders, with both judges: passed on one measured repeat per side/builder. Four published builds passed all sixteen grader checks. All eight judge verdicts and eight attributions were saved in judges/<judge>.json and the four run.json records. No judge or attribution infrastructure statuses were present in this comparison.
  • Blind scoring: passed the checks performed. Inspected four live scoring workspaces: task, checks, anonymized published source and screenshots only; no instruction files, builder narrative, side hosts or builder labels. A separate real-bubblewrap probe exercised the actual judge adapter: scoring mounts were read-only, checkout instructions/history/state/calibration labels were hidden, malformed scoring output retried, and failed attribution preserved the valid scores. The network tests pass, including public-repo refusal, exact host matching and TLS server-name parsing. The documented provider/CDN trust boundary remains an assumption.

Scorecard and attribution evidence

The comparison encountered the known #1154 shutdown hang after all judgments were persisted, before its scorecard write. I stopped only my runner after verifying its cwd, then passed its persisted measured records through this head's unchanged scorecardMarkdown renderer. Independently recomputed the means and counts below. This verifies the renderer and data, not a normal command exit.

Builder Checks passed, base → head Verdicts, base → head Fit Platform Correctness UX Code
sonnet 4/4 → 4/4 2/2 → 2/2 4.0 → 4.0 2.0 → 2.0 3.0 → 3.0 4.5 → 4.5 3.5 → 3.5
terra 4/4 → 4/4 2/2 → 2/2 4.5 → 5.0 (+0.5) 4.0 → 5.0 (+1.0) 4.0 → 4.5 (+0.5) 3.5 → 4.5 (+1.0) 4.5 → 4.5

No two-point judge splits. The global skill bytes are identical across these runs; these deltas are sampling noise. Both judges correctly distinguish the published Sonnet full-table recounts from Terra's tier 2 atomic counters. Checked all fourteen attribution links: eleven quotations match literally, one matches after joining a wrapped line, and two explicitly identify missing instructions.

pnpm exec vitest run scripts/dev
Test Files 16 passed (16); Tests 133 passed (133)

Targeted eval tests: Node 35/35; Bun 35/35

Golden journeys

  • Publish a tool and use it as colleagues: passed on both sides with both builders. The grader pulled the published versions, typechecked them, opened desktop/phone views without browser errors or failed calls, and verified that visits do not add cheers and that Ben's and Cleo's cheers reach Ada. Other reader/account journeys are unaffected by this dev-tooling diff.

Rollback answers: match the diff. This adds local eval records and fixtures, not production schema, kept rows, infrastructure or a deployed client contract. The earlier runner can ignore the new local files; no one-way label is needed. The applicable mirrored surface is the dev loop, whose documentation and skill were updated.

Not run / not fully verified

  • A complete passing calibration was not established. Two isolated calibration attempts each produced five of six build verdicts: Sol's cheers-counter scoring process exited 101 on both automatic tries. That leaves two Sol pairings without verdicts; it is not evidence of reversed rankings. Opus ranked all three pairs correctly, and Sol ranked its one evaluable pair correctly. The first command exited 1; the second hung after judging and was stopped. These harness failures are reported as infrastructure limitations, not credited as passes.
  • A normal comparison shutdown/scorecard write was not verified because of the separately tracked fix(dev): an eval suite finishes even when a builder leaves a connection open #1154 hang. No shutdown fix was applied to this checkout.

Notes

  • One substantive judge false positive: Opus calls the base Terra page's hard-coded “Acme Co” an incorrect placeholder company name. scenarios/team/scenario.json actually names the company “Acme Co”. Treat individual findings and their attribution as hypotheses even when the output schema and citations are valid.
  • The first attempt under /tmp hit its per-user disk quota while copying judge homes. I removed only my artifacts and reran on the regular filesystem. No production endpoint was contacted; other suites and their instances were left alone.

@allisonmahmood
allisonmahmood force-pushed the feat/skill-evals-compare-1143 branch from 675b9cb to c7de44f Compare November 2, 2026 12:01
Base automatically changed from feat/skill-evals-compare-1143 to main November 2, 2026 12:15
@allisonmahmood
allisonmahmood force-pushed the feat/skill-evals-judges-1143 branch from 5fef167 to e5a2e41 Compare November 2, 2026 12:15
@allisonmahmood
allisonmahmood merged commit 4a98479 into main Nov 2, 2026
24 checks passed
@allisonmahmood
allisonmahmood deleted the feat/skill-evals-judges-1143 branch November 2, 2026 12:27
allisonmahmood added a commit that referenced this pull request Nov 2, 2026
…ce (#1184)

## What changed

Owned tables have no count or sum. Asked for a button with a live
company-wide count, Sonnet 5.5 kept building a tier 1 page that paged
through every row to add them up. That reads the whole table on every
change in every open page, and a page-side counter loses concurrent
cheers. The skills never said how to keep a total: the tier guidance
offered tier 2 for "atomic multi-row writes" and said live sync works on
tier 1. The judges on #1172 traced their findings to that gap.

Now:
- `patchy-tables` has a short **Totals** section. It says to keep an
exact total as its own row, changed by the same tier 2 mutation that
writes the rows it counts.
- The tier lists in the global skill and in `patchy-loop` name "a value
such as a total that several people change at once" as a reason for tier
2.

Part of #1141.

## Look at

**Measured with `pnpm dev eval`.** Both sides ran cheers three times per
builder, plus one uncounted warm-up. The only difference between the
sides is this commit: base `316cdf2`, head `c2749fc`, the same edit on
top of the eval branch.

| Build | Base (skills today) | Head (this edit) |
| --- | --- | --- |
| sonnet | tier 1, pages through every row, **4/4** | tier 2, mutation
updates a counter row, **4/4** |
| terra | tier 2, counter row, 3/3 | tier 2, counter row, 3/3 |

Every build passed every check on both sides. Sonnet is the one that
changed. Its head builds even shard the counter, so many simultaneous
cheers don't contend for one row:

```ts
export const cheer = mutation({
  handler: async (ctx) => {
    const shard = `s${Math.floor(Math.random() * SHARDS)}`;
    const found = await ctx.tables.tallies.list({ index: "byShard", eq: { shard }, limit: 1 });
    const row = found.rows[0];
    if (row) await ctx.tables.tallies.update(row.id, { count: row.count + 1 });
    else await ctx.tables.tallies.insert({ shard, count: 1 });
    return true;
  }
});
```

**The cost.** Tier 2 is more work for the builder. Sonnet's medians went
from 1.9 to 2.9 minutes, from 784k to 1,266k input tokens, and from 0 to
2 failed commands. Terra's were flat or better. With identical skills,
input tokens have moved about 40% between sides on noise alone, so I'd
read only the direction of these.

**What wasn't scored.** The judges in this run predate #1172's sandbox
fixes and gave no verdicts, so design quality comes from reading the
published sources, not from scores.

## How it was verified

- The suite above: 12 measured builds and 2 warm-ups, all passing, with
the tier and counting approach read from each published source.
- `skillLock.test.ts` passes with the refreshed hash of the global
skill. `SdkApi.test.ts`, `initProject.test.ts` and `limits-md.test.ts`
(39 tests) and the format check pass.

## Release impact

Tick exactly one.

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required. Skill text only; builders
get it with the next release's skills.

- **What does a revert leave behind?** Nothing. Patches built while it
was live keep their tier 2 counters, which are ordinary patch code.
- **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 area:docs Touches the docs area size:xl Over 1,000 changed lines; review in multiple passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill evals 2: compare two commits, judged blind by Opus 5.5 and Sol

1 participant