Repository navigation
fix: present peer blockers as a pending upgrade plan - #77
Merged
Merged
Conversation
Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
marked this pull request as ready for review
October 11, 2026 19:58
Merged
lucasbraum
added a commit
that referenced
this pull request
Oct 11, 2026
A successful migration could remain in its temporary clone while `fix` printed “verification passed” and offered `uptide pr` for an older local branch. Export and publication now require the recorded verified tree. A fresh migration whose branch name is already occupied by different content exports to `-2`, `-3`, etc., preserving the old branch. ## Cause and behavior On `alanagoyal/alanagoyal@22aa5f12047d5ec0188eed11da5cdc00ddb7d99a`, the original kept clone contained all 11 migration commits, including compiler-linked declaration edits. The user's existing `uptide/react-19.3.0` contained only three earlier commits. Git rejected the export as non-fast-forward; `deliver()` swallowed the failure and left verification marked successful. - Record the verified tree for fix, pin and verify. Compare it with the clone and exported branch before success or publication; an actual mismatch exits 1, keeps the complete clone, and offers no PR command. - A fresh migration preserves any existing different tree and chooses the first unused numbered branch. Atomic ref creation prevents concurrent exports from overwriting an existing branch. The report, stored run, publication and Next hint use the new name. An existing identical tree is reused without moving its ref. Explicit `verify` retains its existing fast-forward behavior. - `uptide pr` requires the recorded tree and commit, rechecks before pushing, and pushes the verified SHA. Reports predating tree hashes need re-verification. - Count changed files from the committed diff, excluding diagnostic-only caller files. ## npm 10 investigation and correction Both npm 10.9.3 and npm 11.19.0 write lockfileVersion 3. This was **serialization loss, not different dependency resolution**: npm 10's `@npmcli/arborist/lib/shrinkwrap.js` allowlist omits `libc`; npm 11 includes it. npm 10 dropped the restriction from 23 unchanged Linux binary records. The guard recursively rejected those records, four dependents, and the root importer (28 entries). For npm <11, retain an omitted `libc` only at the same placement with the same package name, version and nonempty integrity. The persisted lockfile retains the restriction before `npm ci`; the guard itself is unchanged. A changed version, integrity, dependency resolution, or explicit platform change is still rejected. npm scope errors now include the actual npm version and records. pnpm/Yarn behavior is unchanged. See `docs/troubleshooting.md`. Captured both exact-version/range-reconciliation install phases before rollback. After retaining those 23 fields, the npm 10 and npm 11 lockfiles are identical in **all fields** ignoring JSON key order. Both pass the existing resolution guard. <details> <summary>28 originally rejected entries and their cause</summary> These 23 records kept their version and integrity; only the listed libc restriction disappeared: ```text node_modules/@braintrust/bt-linux-arm64 @ 0.12.0: ["glibc"] -> omitted node_modules/@braintrust/bt-linux-x64 @ 0.12.0: ["glibc"] -> omitted node_modules/@braintrust/bt-linux-x64-musl @ 0.12.0: ["musl"] -> omitted node_modules/@img/sharp-libvips-linux-arm @ 1.3.4: ["glibc"] -> omitted node_modules/@img/sharp-libvips-linux-arm64 @ 1.3.4: ["glibc"] -> omitted node_modules/@img/sharp-libvips-linux-ppc64 @ 1.3.4: ["glibc"] -> omitted node_modules/@img/sharp-libvips-linux-riscv64 @ 1.3.4: ["glibc"] -> omitted node_modules/@img/sharp-libvips-linux-s390x @ 1.3.4: ["glibc"] -> omitted node_modules/@img/sharp-libvips-linux-x64 @ 1.3.4: ["glibc"] -> omitted node_modules/@img/sharp-libvips-linuxmusl-arm64 @ 1.3.4: ["musl"] -> omitted node_modules/@img/sharp-libvips-linuxmusl-x64 @ 1.3.4: ["musl"] -> omitted node_modules/@img/sharp-linux-arm @ 0.35.5: ["glibc"] -> omitted node_modules/@img/sharp-linux-arm64 @ 0.35.5: ["glibc"] -> omitted node_modules/@img/sharp-linux-ppc64 @ 0.35.5: ["glibc"] -> omitted node_modules/@img/sharp-linux-riscv64 @ 0.35.5: ["glibc"] -> omitted node_modules/@img/sharp-linux-s390x @ 0.35.5: ["glibc"] -> omitted node_modules/@img/sharp-linux-x64 @ 0.35.5: ["glibc"] -> omitted node_modules/@img/sharp-linuxmusl-arm64 @ 0.35.5: ["musl"] -> omitted node_modules/@img/sharp-linuxmusl-x64 @ 0.35.5: ["musl"] -> omitted node_modules/@next/swc-linux-arm64-gnu @ 16.3.6: ["glibc"] -> omitted node_modules/@next/swc-linux-arm64-musl @ 16.3.6: ["musl"] -> omitted node_modules/@next/swc-linux-x64-gnu @ 16.3.6: ["glibc"] -> omitted node_modules/@next/swc-linux-x64-musl @ 16.3.6: ["musl"] -> omitted ``` The remaining entries were recursive consequences of those missing restrictions, with no direct content or version change: ```text importer . resolutions node_modules/@vercel/analytics node_modules/braintrust node_modules/next node_modules/sharp ``` </details> ## Reruns with the old branch present Both ran at `22aa5f1` in independent local copies with **no remote configured**, seeded with old branch `33d494366c0972fab4efb0349493bb33f8bbb1c6`. The original repository and its remote were untouched; no PR or push to alanagoyal or a fork. ```sh uptide fix react @radix-ui/react-tabs @radix-ui/react-tooltip react-resizable-panels \ --target 19.3.0 --allow-peer @emoji-mart/react \ --provider anthropic --model claude-sonnet-5-5 --keep --yes ``` | Runtime | Result | Types baseline / upgraded / fixed | Tests | Sites / changed files | LLM spend | | --- | --- | --- | --- | --- | --- | | Node 22.20.0 / npm 10.9.3 | Passed, exit 0 | 0 / 13 / 0 | 181 passed | 13 / 12 | $0.09865 | | Node 24.21.0 / npm 11.19.0 | Passed, exit 0 | 0 / 13 / 0 | 181 passed | 13 / 12 | $0.08403 | End-to-end: Node 22 **5m 10s**; Node 24 **4m 19s**. Their only byte-level difference is JSON key ordering in `package-lock.json`; all lockfile data and code files match. The development-build reports retain `uptideDirty: true` and are not intended for publication. Both preserve the original branch commit, leave main and the working tree unchanged, and print: ```text uptide/react-19.3.0 already exists with different content; created uptide/react-19.3.0-2. Next: npx uptide pr --branch uptide/react-19.3.0-2 ``` <details> <summary>Node 22: exported tree and diff</summary> Recorded tree = clone tree = exported branch tree: `d73f53229488a014e4baee5b83a334272df80151`. 11 exported commits; 1 auto-fixed and 12 agent-fixed sites. Lint: passed. Fix work: 298.8 s. `git diff --stat main..uptide/react-19.3.0-2`: ```text components/apps/calendar/event-search.tsx | 2 +- components/apps/finder/finder-app.tsx | 2 +- components/apps/finder/nav.tsx | 2 +- components/apps/messages/message-list.tsx | 2 +- components/apps/messages/search-bar.tsx | 2 +- components/apps/notes/note-content.tsx | 2 +- .../notes/presenters/notes-desktop-presenter.tsx | 2 +- .../notes/presenters/notes-mobile-presenter.tsx | 2 +- components/apps/notes/search.tsx | 2 +- components/apps/photos/photos-grid.tsx | 2 +- package-lock.json | 2706 ++++++++++++-------- package.json | 17 +- 12 files changed, 1590 insertions(+), 1153 deletions(-) ``` </details> <details> <summary>Node 24: exported tree and diff</summary> Recorded tree = clone tree = exported branch tree: `dac5933e6a018a26d06c7fc770980086ffbc30cf`. 11 exported commits; 1 auto-fixed and 12 agent-fixed sites. Lint: passed. Fix work: 248.5 s. `git diff --stat main..uptide/react-19.3.0-2`: ```text components/apps/calendar/event-search.tsx | 2 +- components/apps/finder/finder-app.tsx | 2 +- components/apps/finder/nav.tsx | 2 +- components/apps/messages/message-list.tsx | 2 +- components/apps/messages/search-bar.tsx | 2 +- components/apps/notes/note-content.tsx | 2 +- .../notes/presenters/notes-desktop-presenter.tsx | 2 +- .../notes/presenters/notes-mobile-presenter.tsx | 2 +- components/apps/notes/search.tsx | 2 +- components/apps/photos/photos-grid.tsx | 2 +- package-lock.json | 2556 ++++++++++++-------- package.json | 17 +- 12 files changed, 1515 insertions(+), 1078 deletions(-) ``` </details> ## Validation - Regression: real compiler-linked declaration edits across files, multiple agent commits, exported tree equals verified tree. - Numbered branches: -2 and -3, old refs untouched, matching-tree reuse, stored report and publication use the new branch; terminal hint matches it. - npm v2/v3 fixtures: retain omitted libc for identical immutable contents; reject version, integrity and platform changes. Installer test checks preservation before ci and rejects the same omission from npm 11 with its version in the error. - Publication refuses missing/mismatched verified trees and pushes the verified SHA only. - Local full suite: **1,513 passed, 15 existing skips** (core 1,127; CLI 386). Build, lint, typecheck and docs links passed; targeted export tests rerun after the final edit. - Private-identifier check requires the repository CI secret and was not run locally. - Signed-off commits: `3d9ab4c`, `d8f33a5`. Patch changeset included. ## Rebase onto current main Rebased onto `38ffa16` (PR #77) without merge commits. Both replayed commits retain their Signed-off-by trailers. Only `packages/cli/src/cli.ts` conflicted, in the shared action error handler. Kept main's neutral peer-plan rendering (including grouped JSON, the full Next command and exit 2) and PR #78's verified-tree mismatch exit 1. Main's suppression of LLM spend without an attempted call and neutral progress handling remain intact. `cli.test.ts` merged automatically; tests for both behaviors pass. The numbered-branch/npm-libc commit replayed unchanged. Post-rebase local checks passed: `pnpm build`, `pnpm lint`, `pnpm typecheck`, and `TMPDIR=/private/tmp pnpm test --env-mode=loose` (1,513 passed; 15 existing skips). Pushed with an explicit `--force-with-lease`; GitHub now reports MERGEABLE / CLEAN. All eight PR checks started on `d8f33a5` and passed: - [CI](https://github.com/uptide-dev/uptide/actions/runs/38172553214): test (20), test (22), smoke (20), smoke (22), docs; includes the private-material check. - [Packs](https://github.com/uptide-dev/uptide/actions/runs/38172553073): Pack test. - [DCO](https://github.com/uptide-dev/uptide/actions/runs/38172553161): signed-off. - [Changeset](https://github.com/uptide-dev/uptide/actions/runs/38172553183): changeset. --------- Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
pushed a commit
that referenced
this pull request
Oct 11, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Patch Changes - [#77](#77) [`38ffa16`](38ffa16) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Present peer blockers in fix as a pending upgrade plan, without a failure marker or error prefix. Keep exit code 2, grouped blockers, and the Next command, and omit LLM spend when no call was attempted. - [#70](#70) [`d72e285`](d72e285) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Let assisted fixes edit repository-local expected-type declarations linked by compiler diagnostics. Fix sites sharing a declaration together, while retaining program-wide type verification and strict patch scope. Identify verification diagnostics by source location, code and related locations so changed message details do not reject valid fixes. Resolve automatic type references against the target declarations, so React 19's removed global JSX namespace reaches the agent with the React pack guide. - [#78](#78) [`7662903`](7662903) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Verify the exported migration branch has the exact tree that passed verification. Refuse success and publication when export fails, preserve the complete clone, and require the recorded verified tree before pushing a stored run. Report changed-file counts from the committed diff. Export fresh migrations to numbered branches when an existing branch has different content. Preserve identical packages' libc restrictions when older npm serializers omit them, without relaxing the resolution guard. Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Peer blockers stop
fixduring planning, before cloning or attempting an LLM call. Present that result with a neutral header containing the installed version, resolved target, and blocker count. Remove the failed-migration marker anderror:prefix while retaining exit code 2, grouped blocker rows, and the exact Next command. JSON retains its grouped peers and Next fields; its message uses the same neutral header.Omit LLM spend when no call was attempted. Keep reported costs and the unavailable-spend warning for a run interrupted after an attempt.
Packaged CLI snapshot from the synthetic fixture:
Validation:
pnpm build,pnpm lint,pnpm typecheck: pass.TMPDIR=/private/tmp pnpm test --env-mode=loose: 1,492 passed, 15 existing skips.pnpm public:checkrequiresUPTIDE_PRIVATE_DENYLIST, which is unavailable locally; the PR CI runs this check with the repository secret.Patch changeset included. Signed-off commit: 805d186. No dependency-resolution or install behavior changes.