Repository navigation
fix(sdk): refresh and dev survive a release that doesn't know a skill - #1099
Conversation
Sol reviewReviewed against StandardsNo blockers in correctness, method or YAGNI. SpecNo blockers. Refresh installs the instance's advertised package and runs that installed CLI's Unknown supplied names are filtered through the fixed server allowlist before any skill path is constructed. CLI removals retain name validation and symlink checks; unrelated folder names are preserved. The existing Verification: exercised the actual generation and filesystem transaction code with controlled dependencies and temporary repos outside the checkouts. Unknown/injected-name omission, sticky/server/members selection, folder removal, unrelated-folder preservation, restoration on transaction failure and symlink refusal passed. Standards: 0 blockers. Spec: 0 blockers. |
715879e to
c3e4860
Compare
Acceptance: PASS with notesChecked This is a re-check after the rebase onto main. Main had gained #1003 (publish keeps the repo, Done means
Refresh and dev, plain and
|
d702fe3 to
3b61d31
Compare
Generation used to refuse a present skill its release doesn't ship, so a production rollback past a release that added a skill would break refresh and `patchy dev` in every repo that got it. Generation now leaves such a name out, never reading it as a path, and refresh and a new dev start remove every present skill generation left out and name it in `warnings`. That one rule also covers `patchy-server` below tier 2 and `patchy-members` without its declaration, so the CLI's special cases for them go. Only `patchy-[a-z0-9-]+` folders count as present skills. Closes #1089 Co-Authored-By: Claude Opus 5.5 <[email protected]>
3b61d31 to
dfb05c1
Compare
## What changed This adds release 32's What's new entry, written from `58d94b3`. It covers everything merged since release 31's `through` (`5888411`). It also sets the `patchy` release to `0.32.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | Fixed: a patch has the keyboard as soon as it opens, so its shortcuts work, and Space and Page Down scroll it, without a click first | #1097 | | Improved: agents give a patch pages of its own, each view at its own address under the patch, with back and forward working; repos pick it up at their next refresh | #1095 | | Fixed: a patch that hits Pidgeon's hold on a new message is told nothing was sent and to reply in the conversation, not to wait and retry | #1139 | | Behind the scenes: refresh and `patchy dev` keep working when a repo holds a skill the instance's release doesn't ship, so a rollback can't break them | #1099 | #1138 is a live test tier change with nothing that ships. #1140 is release 31's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `9e176cb` (release 31) to `58d94b3`:** #1138, #1139, #1097, #1095 and #1099. None is labelled `one-way`, and their Release impact answers agree: - #1097 changes only the shell's script. - #1095 changes only skill text. - #1139 adds a `details.limit` value and a `details.message` on an existing refusal. - #1099 adds no skill, so a repo refreshed on this release holds only skills release 31 also ships. - #1138 is tests only. - **#1099 has to be live before #1092 (PR #1098, `patchy/hotkeys`) ships.** That's why this release goes out alone. Once #1098 is live, a rollback to release 32 or later keeps refresh and dev working for repos that picked up the new `patchy-hotkeys` skill. **Rollback line:** If this release misbehaves, roll back to `9e176cb` (release 31). ## How it was verified - **Tests.** `whatsNew.test.ts`, `schemas.test.ts` and `WhatsNewPages.test.ts` pass (21 tests), and prettier passes on the changed files. - **The range.** - #1097, #1095 and #1099 were each reviewed by GPT 6.1 Sol, with every finding resolved. Each got a fresh acceptance PASS with notes after its rebase onto Preact 11. - Each landed with all 12 required checks green on its final head. - #1138 and #1139 were merged from their own thread. - **Deploy state.** The live commit, pinned from `/healthz/deep`, is `9e176cb` (release 31). 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.32.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. 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 This adds release 33's What's new entry, written from `d5a7862`. It covers everything merged since release 32's `through` (`58d94b3`). It also sets the `patchy` release to `0.33.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | New: patches can have keyboard shortcuts that work as soon as the patch opens, and `?` opens a sheet listing them in the company's look. Repos pick it up at their next refresh | #1098, #1107 | #1146 is release 32's own entry. The shortcuts and the sheet are one change: the sheet lists the shortcuts and has nothing to show without them. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `3f4a842` (release 32) to `d5a7862`:** #1098 and #1107. - **#1098 is labelled `one-way`.** Its answers hold: - Published patches keep working on a rollback, because the helper is bundled into each page. - Refresh and `patchy dev` keep working, because release 32 carries #1099. Generation there leaves out the `patchy-hotkeys` skill it doesn't know, and the CLI removes the folder. - A repo whose page imports `patchy/hotkeys` can't build a new version until production rolls forward. - **#1107** is additive: a new export and an optional option. A repo that uses `HotkeySheet` or `group` can't build on the older release either. - This is why #1099 went out alone in release 32 first. **Rollback line:** If this release misbehaves, roll back to `3f4a842` (release 32). Published patches keep working; a repo whose page imports `patchy/hotkeys` can't publish a new version until production rolls forward again. ## How it was verified - **Tests.** `whatsNew.test.ts`, `schemas.test.ts` and `WhatsNewPages.test.ts` pass (21 tests), and prettier passes on the changed files. - **The range.** - **Sol reviews.** #1098 and #1107 were each reviewed by GPT 6.1 Sol, with re-checks after the Preact 11 fixes. Every finding was resolved. - **#1098's acceptance passed with notes** on its third round. The first two failed on the skill: fresh agents misplaced a dialog's Escape, then used `autofocus`. The third round's agents built trackers that work entirely from the keyboard. - **#1107's acceptance passed with notes.** - **Checks.** Each landed with all 12 required checks green on its final head. - **Not done:** Allison's Edge and real-Mac Mod+Shift+K checks, recorded as a human gate in #1098's body. CI covers Chromium on Linux and an emulated Mac. - **Deploy state.** The live commit, pinned from `/healthz/deep`, is `3f4a842` (release 32). 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.33.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. 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
Generation refused any present skill its release doesn't ship. So after a production rollback past a release that adds a skill, refresh and
patchy devwould fail in every repo that got it, until someone deleted the folder by hand. #1092 addspatchy-hotkeysto every tier 1 and 2 repo, which would make that every one of them.Now generation leaves out a name it doesn't ship and never reads it as a path. Refresh and a new dev start remove that skill's folder and say so:
Removed the patchy-later skill.Closes #1089
Look at
omittedSkillsinpackages/patchy/src/ManagedProject.ts). Refresh and dev start remove every present skill generation left out. That rule already coverspatchy-serverbelow tier 2 andpatchy-memberswithout its declaration, so the CLI's two special cases for them are gone. Dev start now also removespatchy-serverbelow tier 2; it used to leave it until the next refresh. Onlypatchy-[a-z0-9-]+folders count as present skills; any other folder under.agents/skills/is the builder's and is left alone.warnings. This is the existing field, so the--jsonshapes in ADR-0004 don't change. It also means refresh now saysRemoved the patchy-server skill.on a tier downgrade, andpatchy removenames the declaration skill it removed.docs/SKILL_DISTRIBUTION.md, ADR-0004, the CLI README, thepatchy-loopproject skill and the generate endpoint's description indocs/API.md. The intent holds: no stale instructions survive, because the folder goes.The issue's "done means", on two throwaway
brightlineinstances.patchy-laterstands in for a skill from a later release:Transcript
unknown-skillBefore is
2449055(where this branch left main) and after ise6398f4(fix/unknown-skills-1089), both on thebrightlinescenario, frompnpm dev transcript.Each line ran in its own
bash -cfrom 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, except the dev URLs' ports and ids and the session folder, trimmed for this PR. Nothing in it matched a collected secret (each side's CLI state, machine-token and login-code shapes, email addresses outside the scenarios' example domains, secret-named variables, and any accounts the run acts as).4 of 5 lines changed.
Refresh in a repo holding a skill this instance's release doesn't ship, as after a rollback past the release that added it
Changed. Before, exit 2 in 0.5 s; after, exit 0 in 0.8 s.
Changed. Before, exit 0 in 0.0 s; after, exit 0 in 0.0 s.
A new dev start, with the folder back
Changed. Before, exit 2 in 0.6 s; after, exit 0 in 3.1 s.
$ cd new-business && patchy dev stop: no change, exit 0 in 0.3 sChanged. Before, exit 0 in 0.0 s; after, exit 0 in 0.0 s.
Tests, red on the base code and green here:
SdkApi.test.ts: generation withpatchy-removedandpatchy-../../package.jsonamong the present skills answered422before (expected 200, received 422). Now it returns 200 with exactly the skills it ships.devPreparation.test.ts› removes and names a present skill the release doesn't ship:expected true to be falseon the old dev preparation, because the folder stayed. Now it passes.cliRepo.test.ts› refreshes the generated client and reports the managed changes as JSON: on the old CLI code the JSON didn't match, because the folder stayed and neitherchanged.skillsnorwarningsnamed it. Now refresh removespatchy-laterand names it in both.The CLI tests' stub instance now keeps present skills it ships, as real generation does, since the CLI now trusts the set generation returns.
How it was verified
pnpm verifyon this commit: format, lint, typecheck, synth, postgres-concurrency, cli-smoke, install, tier2-smoke and browser (74 specs) pass.teststep failed on this shared machine under load (load average 28–48). The failures were 5 s and 30 s timeouts, and strayGET /requests from a local port probe landing in CLI stub request logs. They were in suites this change doesn't reach, such as single-file publish, look, login and execution. CI is the clean run.SdkApi,devPreparation,ManagedProject,Project,cliRepoandcliRepoPublish(105 tests), thendevLifecycle,cliRepoBuildandcliRepoRecovery(39 tests).Release impact
Generation accepts what it used to refuse, and refresh and dev succeed where they used to fail. The
--jsonshapes are unchanged; the new lines arrive in the existingwarnings.This ships alone, and must be deployed in a release before #1092's. The fix only works in the release a rollback lands on. Once #1092 is live, rolling back to a release before this one brings the refusal back, for every repo that refreshed since #1092.
Built by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code, through T3 Code.