Repository navigation
feat(dev): pnpm dev trial has a fresh agent try a task before and after - #806
Conversation
Each side's agent launcher runs the task without a person, under a turn and time budget, and the PR section shows a filtered log of each attempt: whether it finished, its answer in brief, its commands with exit codes, a line per failure, and the counts. Nothing but the log is kept, and the sanitizer reads each side's CLI state after every tool call. Closes #793 Co-Authored-By: Claude Opus 5.5 <[email protected]>
An agent in a trial wrote the environment folder as ~/…, which only the absolute form was normalized from. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Also reads the reason Claude Code gives in a failed result's errors, and the docs offer a trial in the dev loop rather than ask for one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
GPT 6.1 Sol review, round 1 (on
Also since the first push ( |
|
GPT 6.1 Sol review, round 2 (on |
…omains Claude Code tells its agent which account it is signed in as, and a trial's agent put that email in its answer. Scenario people and the seed use reserved domains, which stay; any other address is redacted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in any form The sanitizer takes identities: a trial passes the Claude account's email from `claude auth status` and git's author email, so every form of them is redacted. The email shape now matches %40, Unicode, quoted and apostrophe forms, keeps only patchy.local among .local names, and scans a run without an @ once. Normalizing also covers resolved paths and ~<user>. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Email found in a real run, and GPT 6.1 Sol review round 3 (on A real trial on
Tests: the Sol cases plus the kept forms ( |
…ophes once Reading the Claude account and git's author email drops their stderr, which could name the address before the sanitizer exists. Apostrophes count as local-part characters at the boundary too, so a run of them is scanned once, and a leading quote stays outside the span. ~<user> forms of each folder are normalized whole. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
GPT 6.1 Sol review, round 4 (on
A short round 5 is confirming these. |
Leading apostrophes may precede either form of local part; a plain one never starts with an apostrophe, so a run of them is still read once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
GPT 6.1 Sol review, round 5 (on |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
GPT 6.1 Sol review, round 6 (on |
|
GPT 6.1 Sol review, round 7 (on |
…ne's /tmp The launcher adds $TMPDIR, or /tmp without one, so interactive use is unchanged. A trial points TMPDIR at a scratch folder in the side's environment and deletes it when the run ends; a base's launcher that adds /tmp runs as a copy with only that swapped. A published trial had shown an agent reading other sessions' files in /tmp. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Temp-folder fix, and GPT 6.1 Sol review round 8 (on The orchestrator's review found that the launcher's
A real run on Sol round 8, on just this fix: no findings. Quoting, the swap, cleanup ordering and failure paths, and the sanitizer interplay all checked out. |
…den journeys (#807) ## What changed The agent that wrote a change also says it works, and its tests prove only what it thought to test. Now an agent that didn't write the PR checks it and posts a verdict before Allison merges: - **A new internal skill, `acceptance`**, written for that agent. It reads the PR, its issue's Done means and the rollback answers, and challenges the answers when the diff disagrees. It checks the head on throwaway instances, using whatever fits: the `pr-evidence` commands run without `--pr`, tests, or an instance of a checkout made for the run. It runs the golden journeys the change could touch, then posts one verdict comment: PASS, PASS with notes or FAIL. The comment names the commit it checked and lists what it couldn't run as not run. It replaces that account's earlier verdict, found by a `<!-- patchy-acceptance -->` marker. It never fixes or merges. - **Golden journeys** are a short map in the skill. Each names its scenario, people, what working looks like and its way back: sign in, log a machine in, publish a page, share and unshare, find and open a tool, a tier 1 tool live, a tier 2 tool, invite and join. A PR that adds a journey adds its entry. The acceptance agent decides how to check each one. - **Asking for a verdict** lists ways to start one, without requiring any: T3's `delegate_task` to a Codex model in its own worktree, `codex exec`, `claude -p`, or a person asking any agent. - **AGENTS.md › Pull requests:** a PR is ready to merge when its required checks pass, its review findings are resolved and an acceptance verdict on its latest commit passes. - `.claude/skills/acceptance` links the skill, and `docs/SKILL_DISTRIBUTION.md` lists it with the other internal skills. Closes #794 ## Look at **1. A PR that breaks a golden journey gets FAIL with its evidence.** Throwaway PR #808 changed one line in `packages/serving/src/Pages.ts`: a patch's address admitted readers by its owner instead of its company. Its body called this an internal refactor, checked by opening the page as its publisher. GPT 6.1 Sol was told only to follow the skill for PR #808, not about the break. It posted [this FAIL](#808 (comment)). From the verdict: > **Publish a page: failed.** Ada's isolated environment CLI successfully publishes a tier 0 page. Ada receives 200 with the published content; Ben receives 404, although his Home and patch card both list it. The same checks on fresh base data admit Ben with 200. > > **Find and open a tool: failed.** Jordan's Home lists all four Brightline patches; searching for Kudos finds one result. Clicking it opens the not-found page, HTTP 404. It listed the Kudos and New Business live checks as **not run**, since the 404 blocked them, rather than as passed. It also judged the rollback answers right (a reversible code change) and the "Not breaking" call wrong. It found the break on fresh `team` and `brightline` instances, with the CLI's `PATCHY_API_URL` and `PATCHY_API_TOKEN` cleared, and took them down afterwards. #808 is closed unmerged and its branch is deleted. It reported one gap in the skill, a PR with no Done means, which `ddea7ff` fixes. **2. This PR's own verdict: [PASS with notes on `83106f5`](#807 (comment), from a separate GPT 6.1 Sol acceptance run, kept apart from the code review rounds. No product code changed, but Sol brought the head up on fresh `team` data anyway. It ran the publish and sign-in journeys there: Ada published, Ben opened the page, and retire, delete and restore all worked. It stub-tested the posting recipe and checked that the packed CLI leaves this internal skill out. The note is the after-merge Done means line, marked not run. [Dismissed](#807 (comment)), since the skill already says how to treat it. ## How it was verified - `pnpm verify --changed` on `2f617d3`: format, lint, typecheck, synth and 2004 offline tests passed. It skipped the acceptance suites, since only docs and agent files changed. Every later commit edits only the skill. - The posting recipe's comment selection, run read-only against #806's comments, returns the right comment for the signed-in login and nothing for another. In round 2, Sol stub-tested that a failed post deletes nothing. - Two GPT 6.1 Sol review rounds, summarized in the comments below. The last had no blocking findings. - **Done means.** "A PR that breaks a golden journey gets FAIL with its evidence" is shown above with #808. "A PR opened after this lands carries a verdict from an agent that didn't write it" can only be shown after merge. This PR carries the first one. ## Release impact Tick exactly one. - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Agent docs and one skill only; no code, schema or contract changes. - **What does a revert leave behind?** Verdict comments already posted on PRs. Nothing in the product or its data. - **Does the release before it still work with that?** Yes. Nothing the server or CLI runs changes. Made by Claude Opus 5.5 in Claude Code, running in T3 Code. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…connection (#814) Release 15's What's new entry, written from `9e4b0df`. It covers everything merged since release 14's `through` (`7694bab`), and sets the `patchy` release to `0.15.0` (`packages/patchy/package.json` and `CURRENT_RELEASE`). | Change | PRs | | --- | --- | | New: Your agent can read a tool's log | #786 | | Fixed: Tools with server code keep one steady connection | #798 | | Behind the scenes: an unused open tool lets its server rest | #802 | #783 is release 14's own entry, so it's left out. #795, #796, #797, #799, #803, #804, #806 and #807 are agent docs, CI and dev tooling, with no line. None of the PRs in the range are `one-way`; #786 and #798 predate the rollback questions, and their diffs leave nothing an older release can't run with (a new read-only route and CLI command, and the load balancer's stickiness setting, which the older commit restores). If this release misbehaves, roll back to `03891e4` (release 14). Made by Claude Opus 5.5 via Claude Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
People's agents use the CLI and the Patchy skill, and when something is awkward they fumble: they guess flags, retry, read help or give up. Until now we only saw that when someone's agent hit it. Now
pnpm dev trial "<task>"gives a task to a fresh agent on both evidence instances (#725), the base and the head, and puts how each attempt went in the PR.The agent is each side's own
agentlauncher: Claude Code as the scenario's publisher, with the release's Patchy skill and no personal instructions or settings. It runs without a person, within 30 turns and 10 minutes by default. Only a filtered log is kept: whether it finished, its answer in a sentence or two, its commands with exit codes, one line per failure, and the counts. #792's sanitizer reads each side's CLI state after every tool call and redacts everything before it's written.Closes #793
Look at
1. This PR's own trial, published with
--pr. This branch changes no CLI command, so the trial uses--base 6900c71~1, the commit before #786 addedpatchy logs, with the task "Show me the last few lines of the new-business patch's log." On this PR's head, after's agent foundpatchy logsthrough--helpand read the log. Before's had nopatchy logs, triedpnpm patchy dev logsand reported "No dev log yet."One run is a smell test, not a measurement. Over seven
brightlineruns of this task, after's agent foundpatchy logsfive times and before's never did. In the other two, both agents took "log lines" to mean a log file and gave up.Trial
show-me-the-last-few-linesBefore is
03891e4(--base 6900c71~1) and after isebe3966(dev/793-trial), both on thebrightlinescenario, frompnpm dev trial.Each side gave the task to a fresh agent: the environment's
agentlauncher, Claude Code onclaude-sonnet-5-5as the scenario's publisher, with the release's Patchy skill and no personal instructions or settings, run without a person within 30 turns and 10 minutes. The log keeps each tool call, commands with their exit codes, and one line per failure; not the agent's reasoning or what its commands printed. Nothing in it matched a collected secret (each side's CLI state, machine-token and login-code shapes, email addresses outside the scenarios' example domains, secret-named variables, and any accounts the run acts as).One run is a smell test, not a measurement.
Before answered: “The new-business patch has no log yet.
pnpm patchy dev logsreturned "No dev log yet." The log only exists once the local dev session has run.”After answered: “The new-business patch's log has only one entry. It's the newest, and I asked for 5.”
Before's log: 9 commands, 3 failures
After's log: 10 commands, 2 failures
2. What leaves the machine. The log keeps each tool call and nothing else the stream carries: not the agent's text or thinking, and not what its commands printed. No session is saved (
--no-session-persistence), and auto memory is off, so one trial can't carry memories into the next. Each string is redacted, then normalized, and only then cut, so a cut can't split a secret or a path where redaction can't find it. The tests that cover this:reads the CLI state after each tool call, before a later one clears it, against a stand-in launcher that writes a token to the CLI state and deletes it;redacts and normalizes a long line before cutting it;redacts the section's key before slugging it, since the key is public in the markers (Sol's round-1 blocker).A real run turned up one more thing. Claude Code tells its agent which account it is signed in as, and on a
whoamitask the agent named the developer's real email in its answer. That run wasn't published. The shared sanitizer now also redacts any email address outside the reserved domains the scenarios and the seed use (.example,patchy.local), and that coverstranscripttoo. Sol's round 3 then showed the shape alone misses encoded and unusual forms. So a trial now also collects who its agents act as: the Claude account's email (claude auth status --json) and git'suser.email. These reach the sanitizer as known values, so every form of them is redacted. Asked for its account email outright, plain and URL-encoded, the agent's answer read[redacted]in both forms, Ada's scenario address stayed readable, and the address appeared nowhere in--jsonor stderr.How it was verified
Focused tests,
pnpm exec vitest run scripts/dev(13 files, 77 tests). The new ones cover:Exit code N, a denial frompermission_denied, a tool error, a call that never returned, and thinking, text and unknown lines dropped;errors, no result;claudeand a temporary git config, and redacting every form of one;%40, quoted, apostrophe, a.localhost), with[email protected],@effect/[email protected]and the scenarios' addresses left alone.Claude Code 2.1.303 probes, on Haiku in a scratch folder, before writing the parser:
HOMEandPATH;--max-turnsending aserror_max_turns;--disallowedToolsbeating--allowedTools;CLAUDE_CODE_DISABLE_AUTO_MEMORY=1droppingmemory_paths, with nothing written under~/.claude/projects.Real trials on a shared Linux machine, Sonnet. The costs are what Claude Code reported, at API prices:
brightline,--base 6900c71~1, 15 turns / 5 min, the task naming "brightline"--pr 806~/…, so that form is now normalized tooea261bb,--pr 806team,--base c7a6d08~1(before fix(dev): the environment's agent ignores the developer's PATCHY_* variables and parent CLAUDE.md files #701), 3 turns[redacted], from the email shape; the scenario address keptbrightline,--pr 806on3258425patchy logsagainteam, asking for the account email URL-encoded, on5869ee9[redacted], withidentityandemailmatchedbrightline,--pr 806on5869ee9patchy logsbrightline,--pr 806on712bec8/tmp, so each agent now gets a temp folder of its own (below)team,--base 6900c71~1, asking each agent to use its temp folder and then list/tmp<env>/trial-tmp;ls /tmpwas blocked on both sides, the old launcher's copy includedbrightline,--pr 806onebe3966(above)/tmpin either logThe trials came to about $1.20 at API prices, plus the interrupted Ctrl-C run, which reported no cost; the Haiku probes were under a cent.
The temp folder. The launcher adds
"${TMPDIR:-/tmp}", so interactive use is unchanged. A trial setsTMPDIRto a scratch folder in each side's environment folder and deletes it when the run ends. A base whose launcher still adds/tmpruns as a copy with only that flag swapped, so both sides have the same limits. Tested with a stubclaudeand a test of the swap; theteamrun above shows it for real. The launcher isn't a sandbox:node, which it pre-approves, can still read whatever you can, and the docs say so.Ctrl-C mid-run, while both agents were working: both instances were taken down, both agents ended, both environment folders were deleted and the lock folder was empty. Only the reusable checkouts stayed.
Leak check of each published section and its
--json: the home path, the username, the developer's email,pp_…, the login-code shape and local origins matched nowhere. Since the temp-folder fix, the published logs name no path outside each side's environment folder (<env>).pnpm verify --changedonebe3966, the head: format, lint, typecheck, synth and 2,004 tests passed. It skipped the acceptance suites, since only the runner and docs changed.Hit every surface:
docs/DEVELOPMENT.md(the command table, "Showing a change in a PR" and "What to exercise") and thepatchy-dev-loopskill. The seed and the vitest template are unchanged.pr-evidencegains atrialentry in its Shows, Make, Costs and Gotchas shape, and "Not built yet" is gone.transcriptas well, and DEVELOPMENT's sanitizer paragraph says so.trialuses the evidence checkouts thatpnpm dev downdeletes, and leaves no session or memory behind.packages/patchy, migrations, company resources, served pages, the repo layout and vocabulary.Reviewed by GPT 6.1 Sol over eight rounds; the summaries are in the comments.
~userpaths), all fixed;Not checked: macOS, where Claude Code keeps its login in the keychain; signing in with
ANTHROPIC_API_KEYorCLAUDE_CODE_OAUTH_TOKEN(only the login under HOME); a real expired login (a fixture only).Done means: shown above. A trial on feat(patchy): agents read a published patch's log with
patchy logs#786's CLI change, through--base, shows each side's attempt in the PR, and nothing in it matched a secret.Release impact
Tick exactly one.
Breaking — requires action from anyone already running this
Not breaking — dev tooling and docs; nothing ships to production
What does a revert leave behind? Trial sections already in PR bodies. The evidence checkouts are dev: PRs show what changed, with before/after screenshots and recordings #725's, and the older
pnpm dev downstill deletes them. Transcript sections published from here on redact non-example emails; a revert only stops doing that.Does the release before it still work with that? Yes. Nothing here runs in production.
Made by Claude Opus 5.5 in Claude Code, running in T3 Code.