Repository navigation
feat(cli): published patches use TypeScript 7 - #1010
Conversation
9b7a3c8 to
e22290c
Compare
|
Review (GPT 6.1 Sol, xhigh): no findings. Sol verified these:
|
Acceptance: PASS with notesChecked Done means
Golden journeys
Exact refusal and compact command evidenceSurfaces: CLI text/JSON, ADR-0004, CLI README, product docs and the generated project skill apply and agree. No wire-schema, migration, company-resource, served-page policy or package-layout changes. Rollback answers: match the diff. There are no migrations, new stored shapes or infrastructure changes. Migrated repos keep TypeScript 7/Oxlint; the base CLI successfully published that migrated repo. The Breaking box is correct: existing TypeScript 6 repos need action at their next fresh publish. Existing hosted versions and pending publish recovery continue working. No Not run
Notes
Local verification
The throwaway instance, patch dev processes and temporary base checkout were removed. The head checkout remains detached and clean; no PR code, branch, body or labels were changed. |
c270b9f to
6def2cd
Compare
e22290c to
d77d0f7
Compare
|
Rebased onto #994's final head (dc83ce9), which changed only |
6def2cd to
c441394
Compare
New patch repos start on TypeScript 7 since #1009; this makes it the bar for anything published. Publish reads the version in the repo's node_modules/typescript, the compiler it runs, and refuses one outside the release's accepted range (^7.0.2) with toolchain_unsupported, before it syncs the description or runs config, Vite or the typecheck. The refusal names `pnpm add --save-dev 'typescript@^7.0.2'` and points at the patchy-preact skill, which now carries the scaffold's .oxlintrc.json for moving lint off typescript-eslint, which can't run beside TypeScript 7. Dev and refresh only warn: an existing TypeScript 6 repo keeps running locally, and published patches are untouched. As people's agents next publish them, they move. Part of #985. Co-Authored-By: Claude Opus 5.5 <[email protected]>
d77d0f7 to
294857d
Compare
…1041) ## What changed #1000 moved the crypto that Effect's own `Crypto` covers. The rest still called `node:crypto` directly: sealing integration credentials, signing file links, HKDF for agent connections, the management secret check, and reading Clerk's JWT key. Now those take `Cryptography` from the environment. It's a new `@patchy/core` service, and its `NodeCryptography.layer` is the one place they reach Node. Nobody using Patchy sees a difference. Part of #1039. Stacked on #1010. ## Look at - **Stored values still open, through the code that reads them:** - An integration credential sealed by the old code decrypts through `CredentialKeys`. - A retry copy sealed the old way, with HKDF info, connection-id AAD and layout as before, refreshes through `AgentConnections.refresh`. - The file handle `Files` issues equals the old HMAC of the same key and binding, cut to 24 bytes. - Changing the HKDF info or the truncation fails these tests. I checked both. - HMAC-SHA256 and HKDF also match the RFC 4231 and RFC 5869 test vectors. - **Errors keep their shape:** - A failed seal is still `CredentialEncryptionFailed` with a redacted cause. - A failed open is still `CredentialDecryptionFailed`, with no cause, and still a 503. - A retry copy that won't open is still a defect. - A bad `CLERK_JWT_KEY` still fails at boot as that setting. - **One change from #1039's plan:** - `NodeCryptography.layer` requires nothing, the way Effect splits `Crypto` from `NodeCrypto`. Entrypoints and test layers provide it beside `NodeCrypto`, with no ordering between them. - The plan had it built on Effect's `Crypto`. - **One behaviour gets stricter.** A file handle whose MAC is the wrong length is now refused. Before, Node's `timingSafeEqual` threw on it. ## How it was verified - `pnpm check`: format, lint, typecheck and synth pass. - Tests: - Every suite passes except the CLI suites' stray `GET /` flake on this shared machine, which also fails on the base branch. CI decides those. - The affected suites pass: auth, credentials, files, management and `Cryptography` (309 tests). ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required This is an internal refactor. Every stored format is unchanged, and the known-answer tests above prove it for the sealed ones. - **What does a revert leave behind?** Nothing new. Values sealed or signed in between use the same formats as before. - **Does the release before it still work with that?** Yes. Made by Claude Opus 5.5 (Claude Code in T3 Code); reviewed by GPT 6.1 Sol. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
… 7 (#1046) ## What changed This adds release 22's What's new entry, written from `a2d1331`. It covers everything merged since release 21's `through` (`f30d8fe`), and sets the `patchy` release to `0.22.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. With this release, patch repos move to TypeScript 7 and Oxlint, and Patchy's crypto runs through one Effect service. | Change | PRs | | --- | --- | | Improved: Your agent checks patches several times faster. New repos use TypeScript 7 and Oxlint, the patchy download is a third smaller, and an existing repo's next publish asks it to move over | #989, #994, #1009, #1010 | | Behind the scenes: Patchy itself builds with TypeScript 7 and Oxlint | #989, #1009 | | Behind the scenes: Encryption, signing and ids go through one place, with tests proving stored values still open | #1000, #1041, #1042 | One merged PR gets no line: #971 is release 21's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. It tells builders that their next publish of an existing repo will ask them to move to TypeScript 7, and that live patches keep working. That's the one behaviour change people will meet. - **Rollback safety, from the live commit `2f9f7c1` (release 21) to `a2d1331`:** - No PR in the range is labelled `one-way`, and none has a migration or an infrastructure change. - Every stored format is unchanged: ids, tokens, digests, sealed credentials, file handles and index names. The crypto PRs prove this with known-answer tests. - #1010 is Breaking for builders: publishing a TypeScript 6 repo is refused, with the command to fix it. A rollback lifts that refusal, and doesn't strand anyone. - `rollback-rehearsal` passed on every landed head. **Rollback line:** If this release misbehaves, roll back to `2f9f7c1` (release 21). ## How it was verified - **Tests.** `whatsNew.test.ts`, `WhatsNewPages.test.ts` and `schemas.test.ts` pass (21 tests), and prettier passes on the changed files. - **The stack.** All seven PRs were Sol-reviewed with every finding fixed, and each got an acceptance PASS or PASS with notes. Each landed after a rebase onto `main` that left it unchanged (range-diff `=`), with all 12 required checks passing. #1000's one red run was the known Fleet flake #1012, and it passed on rerun. - **Deploy state.** The live commit, pinned from `/healthz/deep`, is `2f9f7c1` (release 21). 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. The `0.22.0` bump tells CLIs and patch repos installed before this deploy to upgrade, as every release does. - **What does a revert leave behind?** Nothing. - **Does the release before it still work with that?** Yes. Made by Claude Opus 5.5 (Claude Code in T3 Code). Co-authored-by: Claude Opus 5.5 <[email protected]>


What changed
Patches now publish on TypeScript 7. Publishing a patch repo still on TypeScript 6 stops before anything runs, with the exact steps for the builder's agent: upgrade TypeScript, and move lint from ESLint to Oxlint, because typescript-eslint can't run beside TypeScript 7. Published patches keep running untouched, and
patchy devandpatchy refreshonly warn. Each repo moves the next time someone publishes it.Closes #985 (step 5 of 5). Stacked on #1009.
Look at
The gate (
toolchainProcess.ts,repoBuild.ts). Publish reads the version in the repo'snode_modules/typescript, the compiler it actually runs, rather than the declared range. It checks that against the release'stypescript.accepted(^7.0.2, served byGET /api/release) right after the release check, before it syncs the description or runs config, Vite or the typecheck. The refusal reusestoolchain_unsupported, exit 1 and the existing--jsonfailure shape:The lint move (
patchy-preactskill). The skill now carries the scaffold's.oxlintrc.jsonand what to remove. A test fails if the documented config drifts from whatpatchy initwrites.Docs. ADR-0004 now treats TypeScript as a publish gate, and the CLI README and
docs/product.mdfollow.docs/product.mdalso drops a stale "by TypeScript AST" left from refactor(cli): parse patch sources without the TypeScript API #994.How it was verified
cliRepoBuildcase runs against a release that requirestypescript@^99:refreshexits 0 with the warning.publish --jsonexits 1 withtoolchain_unsupportedand the upgrade line./api/meand/api/release, andpatchy.config.tsis unchanged.cliRepoBuild(13),initProject(15) andpackages/sdk(34) pass.pnpm lint,pnpm typecheck:testsand the CLI'seffect-tsgotypecheck exit 0.[email protected], and lint clean under the scaffold's Oxlint config, with no code changes (see Move to TypeScript 7 #985).patchy dev's warning. It rides the sametypescriptRefusalcheck and the warnings list dev already prints.Release impact
A patch repo on TypeScript 6 can't publish until it moves:
pnpm add --save-dev 'typescript@^7.0.2', then, if its lint runs ESLint, the Oxlint config from thepatchy-preactskill. The refusal says exactly that, so a builder's agent can do it unaided. Running patches, local dev and refresh are unaffected. Deploying this needs a What's new line telling builders their next publish asks for the move.Made by Claude Opus 5.5 (Claude Code in T3 Code); reviewed by GPT 6.1 Sol.