Repository navigation
fix(cli): refresh, dev and publish write the same manifest.json bytes - #1174
Conversation
|
Review (GPT 6.1 Sol, xhigh) on 1a59c29: approve, no findings. All four writers share the schema encoding, indentation and final newline, and stamping keeps config order. Existing manifests stay compatible. Reintroducing either the old formatting or the old ordering makes the new regression test fail. |
Acceptance: PASS with notesChecked Done means
Golden journeys
Rollback answers: they match the diff. Nothing touches migrations, Not run
Notes
Transcript: refresh, dev and publish before and afterTranscript Before is Each line ran in its own 3 of 5 lines changed. A source patch publishes a shared notes table
|
8025ff4 to
43a75ae
Compare
43a75ae to
7ae964b
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
7ae964b to
e30df95
Compare
…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]>
What changed
Refresh, dev and publish each wrote
patchy/_generated/manifest.jsonwith different bytes for the same manifest: refresh pretty-printed it with a final newline, dev wrote it compact with none, publish compact with one. Dev and publish also put amembersdeclaration first inuses, where refresh kept the config's order. So every switch between commands left a change in git, and agents restored the file by hand.Now every writer (init, refresh, dev and publish) goes through one encoder,
Project.manifestFile: the schema-encoded manifest, indented, with a final newline. Stamping keepsusesin config order, as refresh already did.Closes #1168
Look at
Project.manifestFileinpackages/patchy/src/Project.ts, andresolveStampsinexecuteConfig.ts, which now copiesmembersin place instead of first.The dev test fails on
mainfor the ordering half, which a single encoder alone would not have fixed:With the fix:
Test Files 2 passed (2), Tests 56 passed (56)fordevPreparation.test.tsandexecuteConfig.test.ts.The init → publish test now asserts publish leaves init's
manifest.jsonbyte for byte (cliRepoPublish.test.ts, passes).How it was verified
vitest run src/devPreparation.test.ts src/executeConfig.test.ts: 56 passed; the new dev case failed before theresolveStampschange.vitest run src/cliRepoPublish.test.ts -t "publishes the starter": passes with the new byte-for-byte assertion.pnpm lint,effect-tsgoon the package andtsconfig.test.json: clean.pnpm verifyon a shared machine at load average 60 to 84: format, lint, typecheck, synth, cli-smoke, install and tier2-smoke passed. test, test (bun), postgres-concurrency and browser failed. Every failure was a 20 to 30 s timeout, a vitest worker killed by SIGKILL, or a strayGET /in a stub's request log. That last one comes from a local port probe on this machine and doesn't happen on CI. None of the failures were in the manifest paths.pnpm dev transcriptof refresh, dev and publish followed bygit diff. The shared machine's heavy-command lock had a queue hours long.Release impact
The first refresh, dev or publish after upgrading rewrites
manifest.jsononce into the shared format, the same one init and refresh already wrote. The file's content is unchanged, and nothing reads its bytes.manifest.jsonis in the indented format, which the previous release already wrote at init and refresh.Built by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code, through T3 Code.