Skip to content

fix(cli): no description notice when only its stamp moved, and a copied dev record says how to start - #1175

Merged
allisonmahmood merged 1 commit into
mainfrom
fix/cli-messages-1169
Nov 4, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
fix/cli-messages-1169

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

What changed

Two CLI messages misled agents upgrading old patches.

  • Description. Refresh, dev and publish said "The description was changed in the portal to '…'; check it" when the text was identical and only its sync stamp had moved. They now record the stamp and say nothing.

  • Copied dev record. A copied repo carries the original's dev record, so patchy dev, dev status and dev reset refused with "The dev record belongs to another repo or instance. It was left untouched." That message gave no next step, and four agents renamed the record by hand. The refusal now names the record file and the repo it belongs to, and says how to start fresh while keeping local rows and files:

    The dev record .patchy/dev//daemon.json belongs to on , so it was left untouched. If this repo is a copy, delete .patchy/dev//daemon.json and run patchy dev; local rows and files are kept.

Closes #1169

Look at

  • syncDescription in packages/patchy/src/Project.ts: the notice is skipped when the text matches, and the stamp is still recorded.
  • recorded in packages/patchy/src/devLifecycle.ts: the record isn't cleared automatically. The refusal still protects a record that really belongs elsewhere; it now just says what to do.
  • New tests:
    • Project.test.ts › "records a newer stamp over the same text without a notice" fails on main (expected [ Array(1) ] to deeply equal []) and passes here.
    • devLifecycle.test.ts › "a copied repo names the record it carried…" starts dev, writes a row, stops it, and copies the repo with the original's record. It asserts that dev, dev status and dev reset each refuse with the message above and leave the record. It then deletes the named file and starts patchy dev in the copy, which serves the copied row. It passes in 29 s.

How it was verified

  • vitest run src/Project.test.ts: 4 passed. The new case was red before the change.
  • vitest run src/devLifecycle.test.ts -t "copied repo" and -t "pulls a newer cloud description": both pass.
  • vitest run packages/sdk/src/SdkApi.test.ts (it reads the patchy-loop skill): 22 passed.
  • pnpm lint, effect-tsgo on the package and tsconfig.test.json, bun fmt: clean.
  • CI on this head: every check passes (22 pass, 2 skipped).
  • Not run locally: pnpm verify and a before/after pnpm dev transcript. The shared machine's heavy-command lock had a queue hours long, and CI ran the same suites.
  • README, ADR-0004 and the patchy-loop skill now say the notice appears only when the text differs.

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

Only messages change: one notice is dropped when it said nothing, and one refusal gets a next step. Exit codes, JSON shapes and what is written are the same.

  • What does a revert leave behind? Nothing. No files or state change shape.
  • 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.

@github-actions github-actions Bot added area:server Touches the server area area:cli Touches the cli area area:docs Touches the docs area size:m 100-500 changed lines labels Nov 1, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review (GPT 6.1 Sol, xhigh) on 65d6fdf: approve, no findings.

  • Identical description text silently advances the stamp, and changed text still warns.
  • The recovery names only the copy's own record, and the ownership checks run before any process operation.
  • A probe with an extended copy kept the rows and uploaded file bytes, and left the original's dev process and record untouched.
  • The README, ADR and skill wording match the code.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked 65d6fdf8ae9f9eb1c8d358803c9281296f063630 (base 1f187a92b2c20da81e8a1d647ea28a60a075d6ef) on team, by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, through T3 Code.

Done means

  • With identical description text, refresh updates the stamp and says nothing: passed. In the transcript, a published tier 1 repo was pulled into a second folder. That folder changed the description and then changed it back with patchy describe, so the cloud stamp moved over the same text. A same-text describe alone doesn't move the stamp. refresh in the first folder:
    • Before: The description was changed in the portal to 'A ledger of notes'; check it.
    • After: no notice. descriptionSyncedAt in patchy.json moved ("stamp recorded").
    • A real change still gives the full notice with the replaced text on both sides (no change in that line). Project.test.ts › "records a newer stamp over the same text without a notice" fails against base Project.ts (expected [ Array(1) ] to deeply equal []) and passes at the head (4/4).
  • The copied-record refusal names the record and says how to start fresh while keeping local rows and files: passed. dev, dev status and dev reset --json in a copy taken while dev ran:
    • Before: The dev record belongs to another repo or instance. It was left untouched.
    • After: The dev record .patchy/dev/<hash>/daemon.json belongs to <env>/workspace/ledger on <origin>, so it was left untouched. If this repo is a copy, delete .patchy/dev/<hash>/daemon.json and run `patchy dev`; local rows and files are kept.
    • Exit 1 and "kind":"local" are unchanged.
  • A copied repo can start patchy dev that way: passed. A line took the path out of the --json error, deleted it and ran patchy dev. The copy then served the note written in the original before the copy (notes: Copied along), and the original's session was still running. On the base there's no path to follow, so that line fails. devLifecycle.test.ts › "a copied repo names the record it carried…" and "…pulls a newer cloud description…" pass at the head.

Golden journeys

  • None is on this diff's path: only syncDescription's notice and the dev record refusal's text change. Repo publish and dev start share syncDescription with refresh. CI passes on this head, including cli-smoke, tier2-smoke and every test job, and packages/sdk/src/SdkApi.test.ts (which reads the patchy-loop skill) passes locally (22/22).

Rollback answers: they match the diff. Only message text changes. Exit codes, kind and every --json shape are unchanged, and nothing on disk changes shape. No one-way label needed.

Not run

  • A file in a store surviving the copy: the starter declares no store. Store files live under the same .patchy/dev/<hash>/ folder that the copy carries and the instruction leaves alone. The row case is what ran.

Notes

  • A repo moved (not copied) while dev runs gets the same refusal, and its session is still alive. I tried that at the head: mv while dev ran, then followed the message. patchy dev started a second session on the same .patchy/dev data, and the first kept running with no record, so patchy dev stop couldn't reach it (I stopped it by pid). The message's "If this repo is a copy" excludes this case, and renaming the record by hand did the same before. Still, an agent that sees the old path is gone may take the instruction anyway. If the record's process is still alive, the refusal could say so, or offer a way to stop it.
  • Nit: the global patchy skill (skills/patchy/SKILL.md, "Relay the "changed in the portal" notice…; it quotes replaced local text when different") wasn't reworded with README, ADR-0004 and patchy-loop. It's still accurate, since the notice now only appears when the text differs, so it can wait for the next change to that skill and its lock hash.
Transcript: the description notice and a copied dev record, before and after

call.mjs is a 15-line helper that posts to the dev session's /api/runtime/call as its person, as devLifecycle.test.ts's call does.

Transcript messages

Before is 1f187a9 (where this branch left main) and after is 65d6fdf (HEAD), both on the team scenario, from pnpm dev transcript.

Each line ran in its own bash -c from the side's agent workspace, as the scenario's signed-in CLI, with stdin closed. Each side's origin reads <origin>, its environment folder <env>, its checkout <checkout> and the home folder ~; nothing else is normalized. Nothing in it matched a collected secret (each side's CLI state, machine-token, login-code, API-key and access-token shapes, email addresses outside the scenarios' example domains, secret-named variables, and any accounts the run acts as).

6 of 11 lines changed.

A published tier 1 repo, pulled into a second folder

$ cp /tmp/acc-scripts/call.mjs . && patchy init ledger --tier 1 --purpose "A ledger of notes" >/dev/nu…: no change, exit 0 in 5.0 s
$ cp /tmp/acc-scripts/call.mjs . && patchy init ledger --tier 1 --purpose "A ledger of notes" >/dev/null 2>&1 && cd ledger && patchy publish >/dev/null 2>&1 && patchy pull "$(node -p 'require("./patchy.json").patch')" ../ledger-pulled >/dev/null 2>&1 && echo "published and pulled"
published and pulled

The pulled folder changes the description and changes it back, so the cloud stamp moves over the same text

$ cd ledger-pulled && patchy describe "A ledger of team notes" >/dev/null && patchy describe "A ledger…: no change, exit 0 in 0.7 s
$ cd ledger-pulled && patchy describe "A ledger of team notes" >/dev/null && patchy describe "A ledger of notes" >/dev/null && echo "described twice"
described twice

Refresh in the first folder: same text, newer cloud stamp

Changed. Before, exit 0 in 1.5 s; after, exit 0 in 1.3 s.

$ cd ledger && old=$(node -p 'require("./patchy.json").descriptionSyncedAt') && patchy refresh && [ "$(node -p 'require("./patchy.json").descriptionSyncedAt')" != "$old" ] && echo "stamp recorded"
Refreshed 0.34.0 → 0.34.0.
patchy/_generated/index.json
patchy/_generated/manifest.json
stamp recorded
-The description was changed in the portal to 'A ledger of notes'; check it.
 Refreshed 0.34.0 → 0.34.0.
 patchy/_generated/index.json
@@ 2 unchanged lines @@

A changed description still gets the notice

$ cd ledger-pulled && patchy describe "A ledger of team notes" >/dev/null && cd ../ledger && patchy re…: no change, exit 0 in 2.1 s
$ cd ledger-pulled && patchy describe "A ledger of team notes" >/dev/null && cd ../ledger && patchy refresh
The description was changed in the portal to 'A ledger of team notes'; check it (replaced local description: 'A ledger of notes').
Refreshed 0.34.0 → 0.34.0.
patchy/_generated/manifest.json

Dev runs in the first folder, with a note written to it

$ cd ledger && patchy dev >/dev/null && node ../call.mjs "$(patchy dev status --json)" tables.insert '…: no change, exit 0 in 5.0 s
$ cd ledger && patchy dev >/dev/null && node ../call.mjs "$(patchy dev status --json)" tables.insert '{"table":"notes","row":{"title":"Copied along"}}'
inserted: Copied along

The folder is copied while dev runs

$ cp -a ledger ledger-copy && echo copied: no change, exit 0 in 0.2 s
$ cp -a ledger ledger-copy && echo copied
copied

In the copy: dev, dev status and dev reset

Changed. Before, exit 1 in 0.3 s; after, exit 1 in 0.3 s.

$ cd ledger-copy && patchy dev
[stderr]
The dev record .patchy/dev/<hash>/daemon.json belongs to <env>/workspace/ledger on <origin>, so it was left untouched. If this repo is a copy, delete .patchy/dev/<hash>/daemon.json and run `patchy dev`; local rows and files are kept.
 [stderr]
-The dev record belongs to another repo or instance. It was left untouched.
+The dev record .patchy/dev/<hash>/daemon.json belongs to <env>/workspace/ledger on <origin>, so it was left untouched. If this repo is a copy, delete .patchy/dev/<hash>/daemon.json and run `patchy dev`; local rows and files are kept.

Changed. Before, exit 1 in 0.3 s; after, exit 1 in 0.3 s.

$ cd ledger-copy && patchy dev status
[stderr]
The dev record .patchy/dev/<hash>/daemon.json belongs to <env>/workspace/ledger on <origin>, so it was left untouched. If this repo is a copy, delete .patchy/dev/<hash>/daemon.json and run `patchy dev`; local rows and files are kept.
 [stderr]
-The dev record belongs to another repo or instance. It was left untouched.
+The dev record .patchy/dev/<hash>/daemon.json belongs to <env>/workspace/ledger on <origin>, so it was left untouched. If this repo is a copy, delete .patchy/dev/<hash>/daemon.json and run `patchy dev`; local rows and files are kept.

Changed. Before, exit 1 in 0.3 s; after, exit 1 in 0.3 s.

$ cd ledger-copy && patchy dev reset --json
[stderr]
{"ok":false,"error":"The dev record .patchy/dev/<hash>/daemon.json belongs to <env>/workspace/ledger on <origin>, so it was left untouched. If this repo is a copy, delete .patchy/dev/<hash>/daemon.json and run `patchy dev`; local rows and files are kept.","kind":"local"}
 [stderr]
-{"ok":false,"error":"The dev record belongs to another repo or instance. It was left untouched.","kind":"local"}
+{"ok":false,"error":"The dev record .patchy/dev/<hash>/daemon.json belongs to <env>/workspace/ledger on <origin>, so it was left untouched. If this repo is a copy, delete .patchy/dev/<hash>/daemon.json and run `patchy dev`; local rows and files are kept.","kind":"local"}

Following the message: delete the file it names, start dev in the copy, and list its notes

Changed. Before, exit 1 in 0.3 s; after, exit 0 in 2.9 s.

$ cd ledger-copy && f=$(patchy dev --json 2>&1 | node -e 'process.stdout.write(JSON.parse(require("fs").readFileSync(0, "utf8")).error.match(/delete (\S+) and run/)[1])') && echo "rm $f" && rm "$f" && patchy dev >/dev/null && node ../call.mjs "$(patchy dev status --json)" tables.list '{"table":"notes"}'
rm .patchy/dev/<hash>/daemon.json
notes: Copied along
-[stderr]
-[eval]:1
-process.stdout.write(JSON.parse(require("fs").readFileSync(0, "utf8")).error.match(/delete (\S+) and run/)[1])
-                                                                                                          ^
-
-TypeError: Cannot read properties of null (reading '1')
-    at [eval]:1:107
-    at runScriptInThisContext (node:internal/vm:219:10)
-    at node:internal/process/execution:451:12
-    at [eval]-wrapper:6:24
-    at runScriptInContext (node:internal/process/execution:449:60)
-    at evalFunction (node:internal/process/execution:283:30)
-    at evalTypeScript (node:internal/process/execution:295:3)
-    at node:internal/main/eval_string:71:3
-
-Node.js v24.20.0
+rm .patchy/dev/<hash>/daemon.json
+notes: Copied along

The first folder's session is still up; stop both

Changed. Before, exit 1 in 1.0 s; after, exit 0 in 1.0 s.

$ cd ledger && patchy dev status >/dev/null && echo "ledger still running" && patchy dev stop; cd ../ledger-copy && patchy dev stop
ledger still running
Stopped. Local data retained.
Stopped. Local data retained.
 ledger still running
 Stopped. Local data retained.
-[stderr]
-The dev record belongs to another repo or instance. It was left untouched.
+Stopped. Local data retained.

…ed dev record says how to start

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood merged commit 9a2ca11 into main Nov 4, 2026
24 checks passed
@allisonmahmood
allisonmahmood deleted the fix/cli-messages-1169 branch November 4, 2026 00:24
allisonmahmood added a commit that referenced this pull request Nov 4, 2026
…ublish warns near the limits (#1188)

## What changed

Publish keeps the repo with each version, up to 2,000 files and 10 MiB,
but an agent found out how big its repo was only when publish refused
it. One repo was 172 MB of source material. Now `patchy publish
--dry-run` **checks the release, TypeScript, version, description and
repo snapshot without building or sending; publish still runs the
build.** It lists the file count and size against the limits, and every
top-level file and folder with its files and bytes. For what it checks,
it refuses as publish would, in publish's order: `unknown_base_version`
for a bound repo with no recorded version, `release_mismatch` and
`toolchain_unsupported` for the installed release and TypeScript,
`invalid_manifest` for a missing or invalid description, and `too_large`
over the limits. It doesn't run `patchy.config.ts`, check generated
state, find server code, check a tier 2 repo's workerd pin, build or
typecheck, so publish can still refuse what it passed. Publish and the
dry run warn past 80% of either limit. `patchy-loop` says what belongs
in the kept repo: what builds, runs and maintains the patch, and not
research inputs, QA output or bulky source material.

Closes #1167

## Look at

- **What the dry run does** (`dryRunPublish` in
`packages/patchy/src/commands.ts`):
1. It looks for a pending publish without reading it
(`State.hasPendingPublish`), so an older CLI's tier 0 attempt isn't
cleared. If one is pending, its notice is remembered at once, so any
later refusal still carries it.
2. `checkRepoPublish`, which a real publish also runs: it refuses
file-mode flags, and `unknown_base_version` unless `--allow-behind` is
passed.
3. `checkRepoToolchain`, publish's own first check, also shared: the
installed release, then TypeScript. It only reads.
4. `Project.previewDescriptionSync` makes the portal read the
description sync makes and decides as the sync decides. It returns
`patchy.json`'s text as the sync would leave it, without writing it, and
remembers the sync's notice as publish does.
5. `Project.publishDescription`, publish's description check, shared:
the description as the sync would leave it must be there and valid.
6. `RepoSnapshot.survey` applies publish's walk, exclusions, refusals
and warnings from file sizes alone, counting that `patchy.json` text.
7. It reports, with a `note` field stating that scope, or refuses with
the `too_large` document publish gives, notices included.

It doesn't build, typecheck, generate the manifest, copy the repo or
write anything. Earlier rounds built in place and then in a temp copy.
Both leaked writes into the repo or lost inputs from outside it, and
#1167 asked for neither.
- **One decision for the description sync** (`Project.ts`).
`readPortalDescription` is the portal read, refusing a gone patch as
publish does. `portalSync` is pure: from the stamps, it returns the repo
with the portal's text and stamp plus the notice, or nothing.
`syncDescription` writes its result, and `previewDescriptionSync` only
measures it, so the two can't drift. #1175's rule, that identical text
updates the stamp with no notice, lives in `portalSync`: when
`repo.description === cloud.description`, it returns the repo with empty
`warnings`, so publish and the dry run both follow it. A dry-run test
pins both notices, and it fails without the rule.
- **The ranking** (`repoSnapshot.ts`): entries rank by the larger of
their share of the file limit and the byte limit, then by size. So a
folder of 1,650 small screenshots comes before a 1 MiB fixture. The
`too_large` refusal uses the same entries, and gives each folder's file
count.
- **Warnings survive a later failure in publish.** `prepareRepoPublish`
remembers the snapshot's warnings (near-limit, symlinks) and the
agent-typecheck warning as it finds them, so a typecheck failure after
them still reports them, as ADR-0004 asks.

A new repo with an 8.4 MiB research file and 30 QA screenshots. On the
base, publish keeps it without a word and `--dry-run` is an unknown
flag. On the head, publish warns and the dry run lists what the version
would keep. After adding both folders to `.gitignore`, it lists 16
files, 38.3 KiB.

The transcript ran at `735dca6`, when the dry run still built. Its
snapshot lines and warnings read the same today. Its headline now reads
"Dry run: Checks the release, TypeScript, version, description and repo
snapshot without building or sending; publish still runs the build." The
one-file entries are now ordered by size, so the warning's `Largest:`
names `AGENTS.md 2.9 KiB` rather than `.gitignore 29 B`.

<!-- patchy-dev:transcript:repo-snapshot-preview -->

#### Transcript `repo-snapshot-preview`

Before is `1f187a9` (where this branch left main) and after is `735dca6`
(feat/repo-snapshot-preview), both on the `team` scenario, from `pnpm
dev transcript`.

Each line ran in its own `bash -c` from the side's agent workspace, as
the scenario's signed-in CLI, with stdin closed. Each side's origin
reads `<origin>`, its environment folder `<env>`, its checkout
`<checkout>` and the home folder `~`; nothing else is normalized.
Nothing in it matched a collected secret (each side's CLI state,
machine-token, login-code, API-key and access-token shapes, email
addresses outside the scenarios' example domains, secret-named
variables, and any accounts the run acts as).

3 of 4 lines changed.

##### A new repo with research inputs and QA screenshots beside its
source

<details><summary><code>$ patchy init notes --purpose "Team notes" &gt;
/dev/null &amp;&amp; cd notes &amp;&amp; mkdir research qa &amp;&amp;
head -c 880…</code>: no change, exit 0 in 1.4 s</summary>

```console
$ patchy init notes --purpose "Team notes" > /dev/null && cd notes && mkdir research qa && head -c 8800000 /dev/zero > research/interviews.bin && for i in $(seq 1 30); do head -c 20000 /dev/zero > qa/screen-$i.png; done && ls
AGENTS.md
CLAUDE.md
fixtures
helpers
index.html
node_modules
package.json
patchy
patchy.config.ts
patchy.json
pnpm-lock.yaml
qa
research
src
tsconfig.json
vite.config.ts
```

</details>

##### Publishing it

**Changed.** Before, exit 0 in 1.6 s; after, exit 0 in 1.5 s.

```console
$ cd notes && patchy publish 2>&1 | grep -E "^(Repo|Warning)"
Repo: 47 files, 9.0 MiB, kept with this version
Warning: The repo is 9.0 MiB in 47 files, near the most a version keeps: 10.0 MiB and 2000 files. Largest: research/ 1 file, 8.4 MiB; qa/ 30 files, 585.9 KiB; pnpm-lock.yaml 30.2 KiB; src/ 3 files, 2.5 KiB; .gitignore 29 B. Add what the patch doesn't need to .gitignore before it gets there.
```

```diff
 Repo: 47 files, 9.0 MiB, kept with this version
+Warning: The repo is 9.0 MiB in 47 files, near the most a version keeps: 10.0 MiB and 2000 files. Largest: research/ 1 file, 8.4 MiB; qa/ 30 files, 585.9 KiB; pnpm-lock.yaml 30.2 KiB; src/ 3 files, 2.5 KiB; .gitignore 29 B. Add what the patch doesn't need to .gitignore before it gets there.
```

##### What the next version would keep, before anything is sent

**Changed.** Before, exit 1 in 0.3 s; after, exit 0 in 1.1 s.

```console
$ cd notes && patchy publish --dry-run
Checking a publish to <origin> (target came from patchy.json).
Dry run passed publish's local checks. Nothing was sent.
Repo: 47 files, 9.0 MiB, of the 2000 files and 10.0 MiB a version keeps:
  research/ 1 file, 8.4 MiB
  qa/ 30 files, 585.9 KiB
  pnpm-lock.yaml 30.2 KiB
  src/ 3 files, 2.5 KiB
  .gitignore 29 B
  .oxlintrc.json 722 B
  AGENTS.md 2.9 KiB
  CLAUDE.md 11 B
  fixtures/ 1 file, 0 B
  helpers/ 1 file, 0 B
  index.html 247 B
  package.json 475 B
  patchy.config.ts 226 B
  patchy.json 183 B
  tsconfig.json 624 B
  vite.config.ts 278 B
[stderr]
Warning: The repo is 9.0 MiB in 47 files, near the most a version keeps: 10.0 MiB and 2000 files. Largest: research/ 1 file, 8.4 MiB; qa/ 30 files, 585.9 KiB; pnpm-lock.yaml 30.2 KiB; src/ 3 files, 2.5 KiB; .gitignore 29 B. Add what the patch doesn't need to .gitignore before it gets there.
```

```diff
-DESCRIPTION
-  Publish the current patch repo, or a single self-contained HTML file.
-
-USAGE
-  patchy publish [flags] [<file>]
-
-ARGUMENTS
-  file string    HTML file path (optional)
-
-FLAGS
-  --name string           Set the patch's name in its company
-  --patch string          Update an existing patch only; never creates a patch
-  --share choice          Who can open the patch: your company or anyone with the link (choices: company, public)
-  --description string    Set the description when publishing an HTML file
-  --force                 Accept the reported dependant or source breakage; ask the person first
-  --allow-behind          Publish this repo over versions published since it was pulled or last published; ask the person first
-  --new                   Always create a new patch
-
-GLOBAL FLAGS
-  --help, -h                                                          Show help information
@@ 18 lines cut @@
+  helpers/ 1 file, 0 B
+  index.html 247 B
+  package.json 475 B
+  patchy.config.ts 226 B
+  patchy.json 183 B
+  tsconfig.json 624 B
+  vite.config.ts 278 B
 [stderr]
-Unrecognized flag: --dry-run in command patchy publish
+Warning: The repo is 9.0 MiB in 47 files, near the most a version keeps: 10.0 MiB and 2000 files. Largest: research/ 1 file, 8.4 MiB; qa/ 30 files, 585.9 KiB; pnpm-lock.yaml 30.2 KiB; src/ 3 files, 2.5 KiB; .gitignore 29 B. Add what the patch doesn't need to .gitignore before it gets there.
```

_18 of 48 lines are cut from the middle. `--json` has it all._

##### Leaving the research and QA output out

**Changed.** Before, exit 1 in 0.2 s; after, exit 0 in 1.2 s.

```console
$ cd notes && printf 'research/\nqa/\n' >> .gitignore && patchy publish --dry-run
Checking a publish to <origin> (target came from patchy.json).
Dry run passed publish's local checks. Nothing was sent.
Repo: 16 files, 38.3 KiB, of the 2000 files and 10.0 MiB a version keeps:
  pnpm-lock.yaml 30.2 KiB
  src/ 3 files, 2.5 KiB
  .gitignore 43 B
  .oxlintrc.json 722 B
  AGENTS.md 2.9 KiB
  CLAUDE.md 11 B
  fixtures/ 1 file, 0 B
  helpers/ 1 file, 0 B
  index.html 247 B
  package.json 475 B
  patchy.config.ts 226 B
  patchy.json 183 B
  tsconfig.json 624 B
  vite.config.ts 278 B
```

```diff
-DESCRIPTION
-  Publish the current patch repo, or a single self-contained HTML file.
-
-USAGE
-  patchy publish [flags] [<file>]
-
-ARGUMENTS
-  file string    HTML file path (optional)
-
-FLAGS
-  --name string           Set the patch's name in its company
-  --patch string          Update an existing patch only; never creates a patch
-  --share choice          Who can open the patch: your company or anyone with the link (choices: company, public)
-  --description string    Set the description when publishing an HTML file
-  --force                 Accept the reported dependant or source breakage; ask the person first
-  --allow-behind          Publish this repo over versions published since it was pulled or last published; ask the person first
-  --new                   Always create a new patch
-
-GLOBAL FLAGS
-  --help, -h                                                          Show help information
@@ 15 lines cut @@
+  AGENTS.md 2.9 KiB
+  CLAUDE.md 11 B
+  fixtures/ 1 file, 0 B
+  helpers/ 1 file, 0 B
+  index.html 247 B
+  package.json 475 B
+  patchy.config.ts 226 B
+  patchy.json 183 B
+  tsconfig.json 624 B
+  vite.config.ts 278 B
```

_15 of 45 lines are cut from the middle. `--json` has it all._

<!-- /patchy-dev:transcript:repo-snapshot-preview -->

## How it was verified

- `repoSnapshot.test.ts` covers ranking and warnings near either limit:
an 8.5 MiB asset warns with `assets/ 1 file, 8.5 MiB` first, and 1,650
tiny files put `qa/` above a 1 MiB fixture. Entries using the same share
of the limits order by size, and the `too_large` refusal names entries
in the new format.
- `cliRepoPublish.test.ts`:
- A dry run sends no `/api/publish` and saves no attempt. Its `note`
states the scope, its `entries` include an untracked `notes.md` and add
up to `files`, and after an interrupted publish it warns that the next
publish recovers it. With a file, `--dry-run` points at `patchy validate
<file>`.
- With a newer portal description, `patchy.json` and every other file in
the repo are byte-identical after a dry run.
- **Size parity at the limit, growth:** at exactly 10 MiB, a longer
portal description makes the dry run refuse `too_large` with the same
failure document as the real publish that follows, compared whole, the
portal's notice in `warnings` included.
- **A pending attempt kept through a refusal:** with an attempt in the
slot, a dry run of a repo over 10 MiB refuses `too_large` with the
pending notice in `warnings`. A dry run whose portal read finds the
patch gone refuses, exit 2, with the notice too.
- **Size parity at the limit, shrink:** at 10 MiB plus one byte the dry
run refuses. After the portal's description gets shorter, it passes, and
the real publish that follows sends exactly the files and bytes the dry
run reported.
- With an older CLI's tier 0 attempt in the slot, a dry run exits 0,
warns that it's pending and leaves the file.
- With an 8.5 MiB file and a type error, publish exits 1 with the
near-limit warning in `warnings`.
- On a bound repo with no version, a dry run refuses with exactly the
failure document a real publish gives, and `--dry-run --allow-behind`
passes.
- Locally, at `bf1e7d9`, with the machine heavily loaded by other
worktrees: `pnpm vitest run` on `cliRepoPublish`, `cliRepoDescriptions`,
`cliRepoBuild`, `cliRepoRecovery`, `repoBuild`, `repoSnapshot`, `State`
and `Project` passed 64 of 65. The one failure, in `cliRepoRecovery`,
was the local editor's port probe sending an extra `GET /` to a test
that asserts an exact request list; it passed on three reruns. The new
full-document parity and pending-notice tests fail at `a0fc92f` and pass
at `bf1e7d9`. `pnpm lint`, `pnpm format:check` and `pnpm typecheck` (the
workspace, tests included) are clean. I didn't run a full `pnpm verify`
or the whole offline suite locally; CI runs them on this PR.

## Release impact

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

A new flag and a new warning. Nothing that publishes today is refused or
changed. The `too_large` message lists entries in a new format, but
agents branch on its `code`, which is unchanged.

- **What does a revert leave behind?** Nothing: no schema, rows or wire
change.
- **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 4, 2026
…ges publish (#1241)

## What changed

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

| Change | PRs |
| --- | --- |
| Improved: shortcuts work where you use them (keys for one part of a
patch, the closest wins, text boxes keep their typing keys) | #1231 |
| Improved: the shortcuts sheet shows what works where you are (Ctrl+/
and ⌘/ open it, its commands run, it opens from a patch's menu and in
view on a narrow screen, keeps the look, spells keys out away from a
Mac) | #1231, #1181, #1178, #1180, #1177 |
| Fixed: keys pressed while a patch opens reach it | #1183 |
| Fixed: pages styled with Tailwind 4 publish, and a look with the same
rule saves | #1191 |
| Fixed: an old copy of a patch no longer replaces newer work
(**Breaking** for such a copy: it needs `patchy pull` or one
`--allow-behind` publish) | #1179 |
| Improved: your agent can check a publish before sending it | #1188 |
| Improved: your agent hears what changed when it updates a patch |
#1186, #1185 |
| Fixed: your agent stops chasing false alarms (`pnpm install` exit
codes, `manifest.json` bytes, the description notice, a copied dev
record) | #1176, #1174, #1175 |
| Behind the scenes: fuller hotkeys instructions for agents; fewer
redraw costs for patches with many shortcuts | #1182, #1187 |

`patchChanges` has three sentences for the agent refreshing a patch
across this release:
- #1231's, from its PR: text fields keep their keys, `preventDefault()`,
and the sheet's Mod+/ and `.hotkey-row` buttons.
- The sheet's dialog renders in `document.body`, and element-only page
rules don't reach it (#1178, #1180). Its own row lists last (#1181). The
hotkey label helpers take only valid literals (#1177).
- Publish's `unknown_base_version` (#1179).

It also rewords release 33's "Press ? to see every shortcut a patch
has". That was true only for a patch that mounts the shortcuts sheet, so
it now says a patch *can* list its shortcuts.

The rest get no line:
- #1206, #1207, #1209 and #1220 are `pnpm dev eval` tooling.
- #1222 is release 35's own entry.

## Look at

- **The entry**, at the top of `releases` in
`packages/core/src/whatsNew.ts`, and release 33's reworded line.
- **Rollback safety, from the live commit `d28fdd0` (release 35) to
`1acc968`:**
- #1191 is labelled `one-way`. Its Release impact: a company look
published after this release with a nested `@supports` condition stays
stored after a revert. Release 35 refuses any bundle carrying it, so
repo publishes in that company would fail until an admin runs `patchy
look restore` to an earlier revision. Pages and Tailwind 4 repos already
published stay published.
- #1183 is the only change to what the server serves browsers: the
shell's script, under a digest-named URL. Its revert leaves nothing
behind.
- The hotkeys PRs change `patchy/hotkeys`, which patches bundle when
they are built. Published patches keep their copy.
- The CLI PRs change what a CLI writes and refuses. Release 35 reads
everything they leave behind: #1176's `allowBuilds` entry, #1174's
indented `manifest.json`, and the `version` recorded by an
`--allow-behind` publish.

**Rollback line:** If this release misbehaves, roll back to `d28fdd0`
(release 35). First check that no company's look has a nested
`@supports` condition, and `patchy look restore` an earlier revision
where one does (#1191).

## How it was verified

- **Tests.** `whatsNew.test.ts`, `WhatsNewPages.test.ts` and
`schemas.test.ts` pass (22 tests), and `bun fmt` passes on the changed
files.
- **Facts.** The sheet's new `document.body` home and its element-rule
reset were checked against `hotkeys.ts` and `hotkeySheet.ts` on main.
- **Deploy state.** I pinned the live commit from `/healthz/deep`:
`d28fdd0` (release 35). 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.36.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:cli Touches the cli area area:docs Touches the docs area area:server Touches the server area size:m 100-500 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two CLI messages mislead: a description stamp-only change, and a copied dev record

1 participant