Skip to content

feat(cli): publish --dry-run shows what a repo's version keeps, and publish warns near the limits - #1188

Merged
allisonmahmood merged 4 commits into
mainfrom
feat/repo-snapshot-preview
Nov 4, 2026
Merged

allisonmahmood merged 4 commits into
mainfrom
feat/repo-snapshot-preview

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

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 Repo snapshots: see the size and contents before publish, and say what belongs #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. fix(cli): no description notice when only its stamp moved, and a copied dev record says how to start #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.

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
$ patchy init notes --purpose "Team notes" > /dev/null && cd notes && mkdir research qa && head -c 880…: no change, exit 0 in 1.4 s
$ 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
Publishing it

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

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

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

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

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

@allisonmahmood
allisonmahmood force-pushed the feat/repo-snapshot-preview branch from 5f76ca6 to a80b2ff Compare November 1, 2026 16:59
@allisonmahmood
allisonmahmood changed the base branch from main to fix/publish-unknown-base-version November 1, 2026 16:59
@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 a80b2ff: FAIL, three confirmed defects, being fixed.

  1. P1: a dry run overwrites patchy.json. Preparation syncs a newer portal description through recordDescription.
  2. P2: a dry run deletes legacy tier-0 pending attempts, because readPendingPublish runs before the dry-run branch.
  3. P2: the 80% size warning is lost when a later step fails, since it isn't registered with Output.rememberWarnings. ADR-0004 says notices found before a failure are kept.

Found sound:

@github-actions github-actions Bot added size:l 501-1,000 changed lines and removed size:m 100-500 changed lines labels Nov 1, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-check (GPT 6.1 Sol, xhigh) on d7b09ce: FAIL. The three earlier findings are closed. Rewriting the manifest in place and restoring it has four new problems:

  • partial writes can corrupt it;
  • a crash during the build leaves the fresh manifest behind;
  • a manifest that didn't exist is never removed;
  • the size check reads the unsynced patchy.json, so a dry run can pass at the limit and the real publish then refuse.

It also conflicts with #1175 in syncDescription.

Next: the dry run does the real preparation in a temporary copy of the repo, so the repo is never written and the size check sees the same synced files a real publish would. That also removes the syncDescription change and the conflict with #1175.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-check (GPT 6.1 Sol, xhigh) on f84ca9f: FAIL.

  • P1: the temp copy's links let a build write back into the repo: ignored files, .env, .patchy/, and Vite's .vite-temp under node_modules.
  • P2: linked ignored source resolves back into the repo and fails only in the dry run.
  • P2: parent-relative config such as extends: ../shared.json is lost in the copy.

Next: the scope narrows to what #1167 asked for. --dry-run checks the repo snapshot and version without building or sending: the same refusals, exclusions and limits, with patchy.json measured as synced, in memory. Nothing is copied or written.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-check (GPT 6.1 Sol, xhigh) on a0fc92f: FAIL, two P2 output gaps, being fixed.

Verified:

  • Write safety: no writes to patchy.json, generated files, .patchy/, pending records or CLI state on any tested path.
  • Description parity: the predicted text matches the real sync's bytes in every stamp case.
  • Size parity: the size check agrees with a real publish just below, at and just above both limits, including when the portal description grows or shrinks.

Remaining:

  1. The portal-change notice is missing. A dry run's too_large failure leaves out the notice a real publish includes.
  2. The pending-publish warning is lost when a later step fails, against ADR-0004.

Recommendation: the description sync and its in-memory prediction should share one pure function.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-check (GPT 6.1 Sol, xhigh) on bf1e7d9: PASS, no findings. Both earlier P2s are closed.

  • Failure parity: at the size limit, a dry run and a real publish return identical failure documents, portal-change warning included.
  • The pending notice survives too_large and a failed portal read.
  • The refactor: 240 combinations of stamps, text, binding and publish mode matched the old behaviour in results, written bytes, warnings and request counts.
  • Still holding: write safety, kept pending attempts, exclusions and size parity.

For integration: after #1175 and #1179 merge, rebase onto main. Keep #1175's rule inside portalSync: identical text still returns the updated stamp, with no warning. Keep its regression test.

@allisonmahmood
allisonmahmood force-pushed the fix/publish-unknown-base-version branch from 059055c to 8932680 Compare November 4, 2026 00:24
Base automatically changed from fix/publish-unknown-base-version to main November 4, 2026 00:40
…ublish warns near the limits

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood force-pushed the feat/repo-snapshot-preview branch from bf1e7d9 to 6bc6c1c Compare November 4, 2026 03:30
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-check (GPT 6.1 Sol, xhigh) on the rebase over #1175 and the train (now head 6bc6c1c, same change as the reviewed 49a3fda): PASS, no findings.

  • portalSync keeps all four of fix(cli): no description notice when only its stamp moved, and a copied dev record says how to start #1175's cases:
    • a stamp that isn't newer does nothing;
    • a newer stamp over the same text records it silently;
    • no local description gets the plain notice;
    • different local text gets "replaced".
  • Publish and the dry run give the same sync notices and the same serialized patchy.json text.
  • Comparing the old and rebased diffs, the only changes are the expected resolution and the new test. Every other difference comes from the base.
  • The new test pins both notice cases. It goes red with the rule removed and the CLI rebuilt. cliRepoPublish.test.ts and Project.test.ts: 17/17 pass.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-checks (GPT 6.1 Sol, xhigh) after the rebase

  • On 87dec8a, the dry run's description check: FAIL, P2. With unsupported TypeScript and a missing description, the dry run refused with invalid_manifest, but publish refuses with toolchain_unsupported first.

  • Fixed in bbfb180. checkRepoToolchain, publish's own first checks, is shared, so the dry run checks the installed release and then TypeScript before the description. A test went red before the fix.

  • On bbfb180: FAIL, P2, docs only. Each competing-failure case returns identical refusal documents:

    • release mismatch plus a missing description gives release_mismatch;
    • TypeScript plus an unknown base gives unknown_base_version;
    • TypeScript plus an oversized snapshot gives toolchain_unsupported.

    checkRepoToolchain writes nothing, and the focused suites pass, 28 tests. The finding was that the README still implied full parity. Publish also validates the last generated manifest and server list, finds server code and checks a tier 2 repo's workerd pin before it builds, and the dry run does none of these.

  • Fixed in 9f6ec13, README and PR body only. They now say which checks the dry run makes in publish's order, and list what only publish does. No code changed after bbfb180.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

The head moved to 9f6ec13 while I worked. That commit changes only the README's dry-run paragraph. I read its diff, but this verdict names the commit I ran, and 9f6ec13 needs a new run.

Checked bbfb180e1ab0418290d8a20463b1551a5ce9a431 (base d3da458b87f32fb9e537b8d60d79dfbd35a252bb, main) on team, by Claude Opus 5.5 in Claude Code, through T3 Code.

This is a focused re-acceptance of bbfb180, and it replaces the PASS with notes at 87dec8a. The commit makes the dry run run publish's first checks, the installed release and then TypeScript, before the description sync and the snapshot. It also rewords the note and the docs. What was verified at 87dec8a and 6bc6c1c isn't repeated here.

I drove the environment's own CLI as Ada against a tier 1 repo from patchy init, bound by a first publish. For each case I ran publish --dry-run --json, publish --json, publish --dry-run and publish, in that order and from the same state. Around every command I took a fingerprint of the repo and of the CLI's state folder. It covers every path's type, size, mode and mtime (node_modules included), plus a hash of every file outside node_modules. I also read the portal's current version and description.

The dry run and publish give the same document, and nothing is written: passed

Case Both say Written
The installed release doesn't match: package.json pins a 0.34.0 tarball, and the instance is 0.35.0 Exit 1, release_mismatch: "Pinned release 0.34.0 does not match instance release 0.35.0. Run: pnpm patchy refresh". The --json documents are byte-identical, and so are the plain stderr lines. Nothing. All five fingerprints are equal, and the portal is still at version 1.
The installed runtime reports 0.34.0, with the pin correct Exit 1, release_mismatch: "Runtime release 0.34.0 does not match instance release 0.35.0…". Byte-identical. Nothing.
TypeScript 5.9.3, pinned with pnpm add --save-dev, where the release accepts ^7.0.2 Exit 1, toolchain_unsupported, naming 5.9.3, ^7.0.2 and the pnpm add line. Byte-identical. Nothing.
TypeScript 5.9.3 and no description in patchy.json Exit 1, toolchain_unsupported in both, not invalid_manifest. Byte-identical. Nothing.
A mismatched release pin, TypeScript 5.9.3 and no description Exit 1, release_mismatch in both. Byte-identical. Nothing.
A bound repo with no version, and TypeScript 5.9.3 Exit 1, unknown_base_version in both, since the version comes first. Byte-identical. Nothing.
A portal description newer than the repo's, and TypeScript 5.9.3 Exit 1, toolchain_unsupported, with no sync notice in either. Byte-identical. Nothing. patchy.json keeps its old description and stamp, because both refuse before the sync.
The TypeScript and missing description case, --json
{"ok":false,"error":"This repo has TypeScript 5.9.3; this release publishes only TypeScript ^7.0.2 (tested against 7.0.2). Run: pnpm add --save-dev 'typescript@^7.0.2'. typescript-eslint doesn't run beside TypeScript 7: if the lint script runs ESLint, move it to Oxlint as .agents/skills/patchy-loop/SKILL.md says.","kind":"local","code":"toolchain_unsupported"}

For the runtime case, I replaced the repo's installed dist/dev.js with a copy that reports 0.34.0. It was a new file, so pnpm's store kept the original. I put the file back afterwards.

A plain dry run on a healthy repo reads right, and publish keeps what it counted: passed. On the fresh repo, a plain dry run exits 0 with nothing on stderr, and the --json note is the same sentence. Its entries add up to the 17 files and 39,269 bytes it reports, and the first publish kept 17 files and 39,269 bytes (artifacts.repo). I then restored TypeScript 7 and gave the portal a newer description. The bound repo's dry run warned "The description was changed in the portal to 'Notes for the team'; check it (replaced local description: 'Team notes')." and counted 17 files and 39,373 bytes, writing nothing. Version 2 then kept 17 files and 39,373 bytes, with the same warning, and patchy list reports the same. publish --help, the README, ADR-0004, docs/product.md and patchy-loop all use the new wording.

The plain dry run on the bound repo
$ patchy publish --dry-run
Checking a publish to <origin> (target came from patchy.json).
Dry run: Checks the release, TypeScript, version, description and repo snapshot without building or sending; publish still runs the build.
Repo: 17 files, 38.5 KiB, of the 2000 files and 10.0 MiB a version keeps:
  pnpm-lock.yaml 30.2 KiB
  src/ 3 files, 2.5 KiB
  AGENTS.md 2.9 KiB
  .oxlintrc.json 722 B
  tsconfig.json 624 B
  package.json 481 B
  vite.config.ts 278 B
  index.html 247 B
  patchy.config.ts 226 B
  patchy.json 197 B
  pnpm-workspace.yaml 103 B
  .gitignore 29 B
  CLAUDE.md 11 B
  fixtures/ 1 file, 0 B
  helpers/ 1 file, 0 B
Warning: The description was changed in the portal to 'Notes for the team'; check it (replaced local description: 'Team notes').

Golden journeys

  • Publish a page: passed. Ada published the repo twice. Ben opens /acme/notes (200, <title>Notes</title>), and a signed-out request gets 401.

Tests: The commit's new cliRepoBuild case fails on a CLI bundle built from 87dec8a's source, where the dry run says invalid_manifest and publish says toolchain_unsupported. It passes at bbfb180, as do all 28 cases in cliRepoBuild.test.ts and cliRepoPublish.test.ts. On CI at bbfb180, every check passed or was skipped except test (22), test (24) and test (26). Those three were cancelled when 9f6ec13 was pushed, and test (bun) passed. On 9f6ec13, whose code is the same as bbfb180's, they were still running when I posted.

Rollback answers: they still match the diff. This commit adds no migration, row shape, wire or infrastructure change. A revert only makes the dry run skip the release and TypeScript checks again. It doesn't need one-way.

Not run

  • A tier 2 repo: outside this focused scope, as at the earlier commits.
  • pnpm verify: not asked for in this re-check.
  • 9f6ec13: pushed during the run, and it changes only the README.

Notes

  • A Vite outside its range passes the dry run, then publish refuses it with the same code. With [email protected], where the release accepts ^8.3.0, the dry run exits 0. Publish exits 1 with toolchain_unsupported: "Loaded vite 7.1.12 is unsupported…". That is within the stated scope: the dry run names only TypeScript, and the README at 9f6ec13 lists the build as publish-only. But an agent that sees toolchain_unsupported among the dry run's refusals could expect it to cover Vite too. Naming the Vite and vite-plugin-singlefile range check in that README list would close the gap.
  • Unrelated to this PR: the dev runner. pnpm dev up has failed on this machine while installing the environment's CLI. Under pnpm, npm resolves to npm 12.2.1, which refuses the instance's own tarball (EALLOWREMOTE). So I started the same runner directly with Bun, outside pnpm's PATH, and didn't retry pnpm dev up.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

The acceptance verdict above is on bbfb180. The head, 9f6ec13, changes only the dry-run paragraph in packages/patchy/README.md after it, adopting GPT 6.1 Sol's wording fix, so the code checked is the code that merges. The verdict's Vite note is dismissed: an unsupported Vite is refused by the build's own toolchain check, and the README now lists the build among what happens only at publish, so publish can still refuse a repo the dry run passed.

@allisonmahmood
allisonmahmood merged commit 299b046 into main Nov 4, 2026
24 checks passed
@allisonmahmood
allisonmahmood deleted the feat/repo-snapshot-preview branch November 4, 2026 07:20
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:l 501-1,000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo snapshots: see the size and contents before publish, and say what belongs

1 participant