Repository navigation
ci: install and CLI checks on macOS and Windows - #945
Conversation
The installer put the CLI in the current Node's global npm prefix, so a Node version manager switching versions left the new Node without it. It now installs into ~/.patchy/cli and links ~/.local/bin/patchy (patchy.cmd on Windows), removes the copy an earlier installer left in the current Node's prefix, and accepts a version manager's shim that hands over to the new install. The package's executable refuses a Node older than 22.22.0 before loading the CLI. Closes #943 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review round 1: an earlier install whose npm prefix is ~/.local owns ~/.local/bin/patchy and now migrates instead of being refused; a shim that hands over is accepted only when ~/.local/bin is itself on PATH, exits 0, and answers within 30 seconds; dist/bin.js is executable in the checkout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review round 2: when npm's prefix is ~/.local, the advised npm uninstall --global patchy also removes the new launcher, so the advice now ends with rerunning the installer, which restores it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every job ran on Linux, so the installer's Windows path (cmd quoting, the patchy.cmd launcher, setup's junctions, the PowerShell install line) and macOS never ran in CI. A new install job packs the release once on Linux, then runs scripts/packed-install-e2e.mjs on Linux, macOS and Windows: each platform's install line, a Node switch, an earlier install moving, setup and setup --remove, and the old-Node refusal. pnpm verify runs it on the local platform. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review round 1: a preload records which Node runs patchy after the switch; setup --remove is checked with lstat so a dangling link counts; a timeout kills the whole process tree instead of waiting on pipes; and a saved key, whoami and a file published twice run from fresh shells with bare patchy, PowerShell on Windows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review round 2: on timeout the harness ignores a failed taskkill or an ended process group and destroys the child's pipes, so a descendant holding them can't keep the run alive. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review rounds (GPT-6.1-Sol, xhigh)Round 1 on 59e45f8: nothing blocking. Two should-fix and three nits, all addressed in 6080c84.
Round 2 on 6080c84: nothing blocking and nothing should-fix. One nit, fixed in 535d897.
Round 2 confirmed rounds 1's fixes, the Windows preload, the PowerShell quoting, the stub's response shapes, the saved-key authentication and the cached-id update. It also checked every job's log for 6080c84. |
Acceptance: PASS with notesChecked Done means
Scenario checkpoints present in all three CI logs and both passing local runsThe setup assertions use Golden journeys
Rollback answers: match the diff. Only workflow, test script, package-script/verify wiring and development docs change. No shipped runtime, schema, persistent data or external contract changes; reverting leaves no incompatible state, so no Not run
Notes
|
… patchy survives a Node update (#962) ## What changed This PR adds release 20's What's new entry, written from `c5175bd`. It covers everything merged since release 19's `through` (`156a228`), and it sets the `patchy` release to `0.20.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. With this release patches can read and answer a company email address on Pidgeon, and the `patchy` command keeps working after a Node version change. | Change | PRs | | --- | --- | | New: Patches can read and answer a company email address | #921, #954, #955 | | Fixed: The patchy command survives a Node update | #944 | | Behind the scenes: Patchy keeps only a key for the connected address, never the Pidgeon admin key | #921 | Two merged PRs get no line: #941 is release 19's own entry, and #945 adds CI install checks on macOS and Windows, which is tooling. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. Its labels are the pages' own: Integrations, Read, Read and send. The 200 sends a day is `pidgeon.sends.daily`'s default. The Node fix says what #944's Release impact asks of the note: people whose terminal doesn't look in `~/.local/bin` are shown the line to add when they rerun the install line. - **Rollback safety, from the live commit `fe8a0f2` to `c5175bd`.** Three PRs in the range are labelled `one-way`: - **#921 and #954 (Pidgeon).** Release 19 hides Pidgeon connections and ignores the new `pidgeon_sends` table, but a patch whose current version declares or calls Pidgeon needs this release to serve. Recovering it means rolling forward. - **#944 (CLI install).** On machines where the new installer put `~/.local/bin/patchy` ahead of Node's own bin on PATH, release 19's install-and-login line refuses after installing. Those people would need to clean that up by hand. - **#955 and #945** answer both Release impact questions with "Yes". `rollback-rehearsal` passed on every landed head, including #954's migration `0028`. ## How it was verified - **Tests.** `whatsNew.test.ts` (4), `WhatsNewPages.test.ts` (6), `schemas.test.ts` (11) and the skill lock (1) pass. Typecheck passes for core, api and the CLI, and so do prettier and eslint on the changed files. - **The stack.** #921, #954 and #955 each had GPT 6.1 Sol reviews to merge-ready and an acceptance verdict of PASS with notes. Each landed after all 21 checks passed on its rebased head, `Pidgeon live` included. Each rebase left the tree byte-identical to the accepted head, and `main`'s tree at `c5175bd` is identical to #955's accepted `cce5019`. - **Deploy state.** The live commit was pinned from `/healthz/deep`: `fe8a0f2`, release 19. 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 This PR changes only the changelog text and the `patchy` version. As with every release, a CLI installed before this deploy is told to upgrade. - **What does a revert leave behind?** Nothing. People whose seen marker reached 20 would just see no new release. - **Does the release before it still work with that?** Yes. Rolling back past #921 and #954 would stop any patch whose current version uses a Pidgeon connection from serving, and rolling back past #944 would break the install-and-login line on machines where the new installer put `~/.local/bin/patchy` ahead of Node on PATH; fix forward instead. Made by Claude Opus 5.5 in Claude Code, running in T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
Stacked on #944 (ticket #943); merges with #944, after it.
What changed
Every CI job ran on Linux. So the installer's Windows path (cmd quoting, the new
patchy.cmdlauncher,patchy setup's junctions, the PowerShell install line) and everything on macOS had never run in CI. This adds aninstalljob on Linux, macOS and Windows for the code that runs on people's machines.Look at
scripts/packed-install-e2e.mjs. A dependency-free script run against the release packed once on Linux and served from a stub instance. On throwaway machines whose home has a space (and a%on Windows), with one npm prefix per Node as version managers keep them, it runs:/llms.txt: POSIX throughshandcurl, PowerShell through Windows PowerShell 5.1, thenpatchy --versionin the same shell;patchy, thenvalidateandstatus --json;setup --remove, checked withlstatso a dangling link counts, thensetup, with both links resolving to the copy;auth set, thenwhoamiand the same file (its name has a space) published twice against the stub, the second as an update from the cached patch id. Each runs in a fresh shell with barepatchy, which is Windows PowerShell on Windows;.github/workflows/ci.yml.release-tarballpacks the release onubuntu-24.04and uploadspackages/patchy/artifacts.install (linux|macos|windows)downloads it onubuntu-24.04,macos-15andwindows-2025, sets up both Nodes and runs the script. These jobs need nopnpm install.pnpm verifyruns the same script on the local platform (pnpm test:packed-install-e2e), anddocs/DEVELOPMENT.mdsays so.On the head, 535d897 (run), all three pass, as they did on every earlier head. The first try of the run failed on
test (24)with #723, a known dev-server flake in code this PR doesn't touch, and passed on a rerun. The Windows log for this head:install (macos)prints the same steps endingPASS on darwin. Run againstmain's installer, the script fails at the first step, because that installer'sExecutable:is in Node's npm prefix.How it was verified
packages/api/src/install.tsthrough Node's type stripping.actionlintonci.yml, prettier,eslint scripts/verify.tsandpnpm typecheck:testspass.release-tarball,install (linux),install (macos)andinstall (windows)to the ruleset.release-tarballhas to be in that list: if it fails, GitHub skips the install jobs, and a skipped required check counts as passing.Release impact
CI and a test script only; nothing ships to the server or the package.
Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code; reviewed and accepted by GPT-6.1-Sol (xhigh).