Skip to content

fix(patchy): each release gets its own version, so old CLIs are told to upgrade - #649

Merged
allisonmahmood merged 1 commit into
mainfrom
t3/fix-cli-version-reporting
Oct 13, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
t3/fix-cli-version-reporting

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

A fresh install from production still says "Patchy CLI 0.0.1", even after a week of deploys. The release was never bumped, so every deploy shipped new bytes under the same name. Patch repos still picked up new bytes through the digest in their pin. But the global CLI only compares release names, so a CLI installed before a deploy passed the check forever and was never told to rerun the installer. Stale-pin errors also read "Pinned release 0.0.1 does not match instance release 0.0.1", and every cliVersion in usage events was 0.0.1.

Now the release is 0.<id>.0, named after the newest What's new release. The deploying agent bumps it in the same docs(whats-new) PR (AGENTS.md › Deploying and the whatsNew.ts header say so), and release.test.ts fails when the two drift. It starts at 0.9.0 to match release 9; the next deploy ships 0.10.0. ADR-0011, the Release glossary entry and OPERATIONS.md say how releases are numbered. A deploy that is all test and tooling churn writes no What's new release, so it keeps its release name.

Deployed patches, open shells and running dev sessions check the wire version, which is unchanged, so they are unaffected. After the next deploy, a global CLI from before it is refused on file publish with the installer line, and repos are told to pnpm patchy refresh. Repos already get that refresh prompt whenever the bytes change.

pnpm check passes (format, lint, typecheck, synth, 1658 offline tests). A GPT 6.1 Sol review found nothing to fix.

Made by Claude Opus 5.5 via Claude Code.

…to upgrade

The patchy release was 0.0.1 for every deploy, so a global CLI installed
before a deploy passed the version check forever. The release is now
0.<id>.0 for the newest What's new release, bumped in the same PR, and a
test keeps the two in step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:core Touches the core area area:docs Touches the docs area size:s Under 100 changed lines labels Oct 13, 2026
@allisonmahmood
allisonmahmood merged commit b23284b into main Oct 13, 2026
13 checks passed
@allisonmahmood
allisonmahmood deleted the t3/fix-cli-version-reporting branch October 13, 2026 11:50
allisonmahmood added a commit that referenced this pull request Oct 13, 2026
…rade (#654)

Follow-up to #649. Only `patchy publish <file>` refused a global CLI
whose release differs from its instance's. `patchy init` and `patchy
look publish` ran on an outdated CLI without a word. That left people on
an old global skill and missing newer commands, and `look publish` ran
an older release's look checks.

Both now refuse with `release_mismatch` and the instance's installer
line, the same as file publishing. Rerunning the installer upgrades the
CLI and its global skill. `init` checks right after sign-in, before it
asks for a purpose or writes anything. `look publish` still refuses a
failing look before any request, as ADR-0004 promises, then checks the
release before sending. The three call sites share one helper,
`requireCurrentCli`.

The rule is that new work outside a repo needs the current CLI. `login`,
`whoami`, `look`, `look restore`, `look preview` and the lifecycle
commands stay unchecked. They start nothing new, and the instance has
the final say on them.

ADR-0004, ADR-0011, the README, the Release glossary entry,
`docs/product.md` and the global `patchy` skill now describe this. The
skill's lock hash is refreshed.

New cases in `cliLook.test.ts` and `cliRepo.test.ts` failed against the
old build and pass now. `pnpm check` passed format, lint, typecheck and
synth. Ten test files timed out while another worktree was loading the
machine; all ten pass on a rerun (131 tests). A GPT 6.1 Sol review had
one wording nit ("behind" → "differs from", since a rollback can leave a
CLI ahead), which is fixed.

Made by Claude Opus 5.5 via Claude Code.

Co-authored-by: Claude Opus 5.5 <[email protected]>
allisonmahmood added a commit that referenced this pull request Oct 13, 2026
…when Patchy is out of date (#659)

Release 10's What's new entry, written through `64458b2`. It ships as
`patchy` `0.10.0`.

**Changes**
- Fixed: New pages and tools no longer get lost in a temporary folder
(#658)
- Fixed: Your agent hears when its copy of Patchy is out of date (#649,
#654)
- Improved: See a sample tool in your look before you approve it (#656)
- Improved: Publishing the company look says who it's for (#655)

**Behind the scenes**
- Connections to your company's data now record what kind of service
each one reaches (#648)

**No line:** #642, a rename of the glossary docs.

This is the first release with its own version number. After it deploys,
global CLIs from earlier deploys (all `0.0.1`) are refused on file
publish, `init` and `look publish` with the installer line. Patch repos
are told to `pnpm patchy refresh`, as on any release.

Made by Claude Opus 5.5 via Claude 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:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:core Touches the core area area:docs Touches the docs area area:server Touches the server area size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant