Repository navigation
feat(fix): plan peer blockers before install and check npm lock sync - #64
Merged
Merged
Conversation
Signed-off-by: Lucas Braum <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
Collaborator
Author
|
lucasbraum
marked this pull request as ready for review
October 10, 2026 16:32
5 tasks done
Merged
lucasbraum
pushed a commit
that referenced
this pull request
Oct 10, 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] ### Minor Changes - [#60](#60) [`7ec02e0`](7ec02e0) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` reports one breaking finding when a member the target no longer sees was declared by your own code in an augmentation: a custom matcher on the global `jest.Matchers` in a test setup file, or an interface augmented in a `declare module "x"` block. The finding is anchored at that declaration (the `declare global` block, or the augmented interface), where the one edit is, and the call sites that fail (TS2339, TS2551) are listed under it as evidence, in the terminal, the HTML report and the JSON report. Before, each call site was a breaking finding of its own next to the declaration. The README's line budget no longer counts the generated "Verified packs" table, which grows one row per pack. - [#64](#64) [`86b24d2`](86b24d2) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Plan peer blockers before cloning or installing, suggest explicit compatible peer upgrades, and add repeatable `--allow-peer` with visible package-manager overrides and PR risks. Reject npm lockfiles that disagree with committed manifests before starting a migration. Collect peer blockers across the complete upgrade group and print one complete retry command. Include explicitly allowed peer packages in the old/new lockfile subtree union while retaining strict rejection of unrelated resolution changes. Accept same-content lockfile deduplication and descriptive metadata updates only when outside resolutions stay identical, and disclose accepted housekeeping in the fix report and PR description. - [#63](#63) [`8dcf5fb`](8dcf5fb) Thanks [@lucasbraum](https://github.com/lucasbraum)! - A verified migration pack for Vitest 4 → 5, scored against votingworks/vxsuite and vitorvasc/opentelemetry-ecosystem-explorer at the commit before their own upgrade. It is verified with two public repositories and no false positive among breaking findings (recall 50%). Sites it finds: custom matchers declared on the global `jest.Matchers` or on a one-parameter `Assertion<T>`, `import '@testing-library/jest-dom/vitest'` registrations whose types stop reaching `expect`, the removed `bench` export, bare-directory `coverage.include` and `coverage.exclude` entries, and the removed `vitest/*` entry points (`vitest/coverage`, `vitest/reporters`, `vitest/environments` and `vitest/snapshot` are rewritten). What the compiler cannot see (mock history cleared by default, `testNamePattern` joined with " > ", hoisted `vi.mock` calls, un-awaited assertions, timers, report locations, browser mode) is listed for review. ### Patch Changes - [#62](#62) [`c0f8a70`](c0f8a70) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Preserve partial version ranges such as `^18`, `~18.2`, and `18.x` when fixing packages and their companions, including workspace manifests and pnpm catalogs. Reject unsupported complex ranges before cloning or spending on assisted fixes, with the declaration location and an installed-version replacement suggestion. Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
lucasbraum
added a commit
that referenced
this pull request
Oct 10, 2026
## Pack Fix React 18 → 19 rule matching from the classification in #64. Compiler-confirmed `useRef` signature findings retain the exported symbol path (`".":useRef`), so the existing TS2554-only matcher left zero-argument calls manual. The rule now recognizes that path while retaining its diagnostic-message guard. Missing global JSX namespace diagnostics (TS2503) now receive the existing agent instructions, with no automatic rewrite. ## Sources - [React 19: useRef requires an argument](https://react.dev/blog/2024/04/25/react-19-upgrade-guide#useref-requires-an-argument) - [React 19: the JSX namespace in TypeScript](https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript) ## Rules and behavior notes - `use-ref-argument`: accepts TS2554 or the confirmed `useRef` symbol plus the required-argument diagnostic; preserves the existing `undefined` initialization rewrite. - `global-jsx-namespace`: accepts TS2503 only for the missing JSX namespace, preserves existing JSX diagnostic coverage, and supplies agent guidance. - Synthetic fixtures exercise unassigned checker findings through rule selection, planning and rewriting. Negative cases cover other symbols, missing/different diagnostics, ambiguous calls, existing initializers and other missing namespaces. Both regressions failed before the matcher fixes. ## Ground-truth repositories Unchanged. No alanagoyal sites were added: its upgrade is not a completed migration. - `excalidraw/excalidraw@9ee0b8ffcbd3664a47748a93262860321a203821` — 73 expected findings. - `tldraw/tldraw@5957867a9c5c205a0b0c3665be443138b8014a79` — 60 expected findings. ## `uptide pack test` output React's breaking precision remains **100%**, with **68.99% recall unchanged** (89 true positives, 0 false positives, 40 false negatives). `use-ref-argument` rule recall improves **80% → 100%** (4/5 → 5/5); those locations were already detected, so overall site recall stays unchanged. Overall, including non-breaking findings, precision remains 92.93% and recall remains 69.70%. The existing verification record still matches; no ground truth or verification file was changed. | Pack | Result | Breaking precision | Breaking recall | |---|---|---:|---:| | ai | passed | 100% | 36.36% | | react | passed | 100% | 68.99% | | stripe | passed | 100% | 90.00% | | vitest | passed | 100% | 50.00% | | zod | passed | 100% | 71.25% | Commands: - `pnpm -s uptide pack test react --json` on the unchanged matcher baseline, then `pnpm -s uptide pack test --json` on this commit: every pack passed. The latter reruns React plus AI, Stripe, Vitest and Zod against their existing public ground truth. - `pnpm -s uptide pack test --fixtures-only --json`: all five packs passed. - React's 12 focused tests pass; the two regressions failed before the fixes. - `pnpm lint` and `pnpm typecheck`: passed. - `TMPDIR=/private/tmp pnpm test --env-mode=loose`: 1,043 core + 357 CLI tests passed; 15 opt-in network tests skipped. The macOS temporary path must be canonical, and Turbo must pass it through; the default invocation hit an unrelated `/tmp` versus `/private/tmp` assertion. - CI **test (20), test (22), smoke (20), smoke (22)**: all green, including the private-material scan in the test jobs. Local strict `public:check` cannot read the CI-only denylist; the local document-name scan passed. <details> <summary>React pack test output</summary> ``` uptide pack test react · verified fixtures 4 cases, 7 sites · pass ground truth excalidraw/excalidraw@9ee0b8ffcbd3 react 18.2.0 → 19.0.0 predicted 60, expected 73, false positives 1, false negatives 14 with @types/react 18.2.47 → 19.0.14, @types/react-dom 18.2.18 → 19.0.6, react-dom 18.2.0 → 19.0.0 tldraw/tldraw@5957867a9c5c react 18.3.1 → 19.2.1 predicted 39, expected 60, false positives 6, false negatives 26 with @types/react 18.3.23 → 19.2.18, @types/react-dom 18.3.7 → 19.2.7, react-dom 18.3.1 → 19.2.1 rule precision recall tp fp fn element-props-unknown 100% 60% 6 0 4 generic 4% 33% 1 25 2 global-jsx-namespace 100% 51% 20 0 19 mutable-ref-object 100% 100% 2 0 0 props-with-ref 100% 100% 1 0 0 ref-callback-return 100% 100% 1 0 0 ref-object-nullable 100% 37% 20 0 34 removed-react-dom 100% 100% 18 0 0 use-ref-argument 100% 100% 5 0 0 overall (sites) 93% 70% 92 7 40 breaking (sites) 100% 69% 89 0 40 false positives (7) excalidraw/excalidraw@9ee0b8ffcbd3 dev-docs/src/theme/ReactLiveScope/index.js:10 generic (unverified) tldraw/tldraw@5957867a9c5c apps/docs/components/common/newsletter-signup.tsx:32 generic (deprecated) tldraw/tldraw@5957867a9c5c apps/docs/components/docs/docs-feedback-widget.tsx:65 generic (deprecated) tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/tla/components/dialogs/TlaSignInDialog.tsx:124 generic (deprecated) tldraw/tldraw@5957867a9c5c templates/agent/client/components/ChatInput.tsx:17 generic (deprecated) tldraw/tldraw@5957867a9c5c templates/agent/client/components/ChatPanel.tsx:14 generic (deprecated) tldraw/tldraw@5957867a9c5c templates/chat/src/components/ChatInput.tsx:60 generic (deprecated) false negatives (40) excalidraw/excalidraw@9ee0b8ffcbd3 dev-docs/src/components/Homepage/index.tsx:1 generic excalidraw/excalidraw@9ee0b8ffcbd3 dev-docs/src/pages/index.tsx:1 generic excalidraw/excalidraw@9ee0b8ffcbd3 examples/excalidraw/with-nextjs/src/app/page.tsx:19 global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/ButtonIconCycle.tsx:23 global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/EyeDropper.tsx:210 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/FontPicker/keyboardNavHandlers.ts:7 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/Sidebar/Sidebar.tsx:104 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/Stack.tsx:13 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/TTDDialog/TTDDialogOutput.tsx:16 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/TTDDialog/common.ts:15 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/TTDDialog/common.ts:43 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/canvases/InteractiveCanvas.tsx:20 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/dropdownMenu/DropdownMenuContent.tsx:33 ref-object-nullable excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/hooks/useScrollPosition.ts:8 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/docs/components/content/copy-button.tsx:10 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/fairy/Fairy.tsx:99 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/fairy/fairy-ui/manual/FairyManualPanel.tsx:29 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/fairy/fairy-ui/manual/FairyManualPanel.tsx:30 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/fairy/fairy-ui/manual/FairyManualPanel.tsx:31 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/fairy/fairy-ui/manual/FairyManualPanel.tsx:64 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/fairy/fairy-ui/manual/FairyManualPanel.tsx:83 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/fairy/fairy-ui/manual/FairyManualPanel.tsx:286 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/src/pages/admin.tsx:1032 ref-object-nullable tldraw/tldraw@5957867a9c5c apps/dotcom/client/tsconfig.json:15 global-jsx-namespace tldraw/tldraw@5957867a9c5c apps/examples/src/ExampleWrapper.tsx:111 global-jsx-namespace tldraw/tldraw@5957867a9c5c packages/editor/src/lib/components/default-components/DefaultBrush.tsx:18 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/components/default-components/DefaultCollaboratorHint.tsx:33 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/components/default-components/DefaultCursor.tsx:28 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/components/default-components/DefaultSelectionBackground.tsx:15 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/components/default-components/DefaultSelectionForeground.tsx:27 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.ts:12 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/hooks/useGestureEvents.ts:78 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/hooks/usePassThroughMouseOverEvents.ts:7 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/hooks/useScreenBounds.ts:5 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/license/Watermark.tsx:49 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/editor/src/lib/license/Watermark.tsx:97 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/tldraw/src/lib/ui/components/CursorChatBubble.tsx:80 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/tldraw/src/lib/ui/components/CursorChatBubble.tsx:108 ref-object-nullable tldraw/tldraw@5957867a9c5c packages/tldraw/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx:55 ref-object-nullable tldraw/tldraw@5957867a9c5c templates/agent/client/components/ChatInput.tsx:18 ref-object-nullable reported under another rule (18) excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/App.tsx:1259 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/ButtonIcon.tsx:32 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/dropdownMenu/DropdownMenuItemContent.tsx:17 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/HelpDialog.tsx:109 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/IconPicker.tsx:221 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/MagicButton.tsx:35 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/Sidebar/SidebarTrigger.tsx:39 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/Stack.tsx:17 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/Stack.tsx:39 generic, expected global-jsx-namespace excalidraw/excalidraw@9ee0b8ffcbd3 packages/excalidraw/components/welcome-screen/WelcomeScreen.Center.tsx:22 generic, expected global-jsx-namespace tldraw/tldraw@5957867a9c5c apps/docs/components/content/code.tsx:124 generic, expected element-props-unknown tldraw/tldraw@5957867a9c5c apps/docs/components/content/code.tsx:125 generic, expected element-props-unknown tldraw/tldraw@5957867a9c5c apps/docs/components/content/code.tsx:131 generic, expected element-props-unknown tldraw/tldraw@5957867a9c5c apps/docs/components/content/code.tsx:170 generic, expected element-props-unknown tldraw/tldraw@5957867a9c5c packages/tldraw/src/lib/ui/components/HelperButtons/StopFollowing.tsx:16 generic, expected global-jsx-namespace tldraw/tldraw@5957867a9c5c packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.tsx:20 generic, expected global-jsx-namespace tldraw/tldraw@5957867a9c5c packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.tsx:14 generic, expected global-jsx-namespace tldraw/tldraw@5957867a9c5c packages/tldraw/src/lib/ui/components/primitives/TldrawUiTooltip.tsx:466 generic, expected global-jsx-namespace PASS react: verified ``` Every pack passed. </details> ## Checklist - [x] Rules come from the existing `meta.sources` - [x] Synthetic positive and negative fixtures; no ground-truth changes - [x] Patch changeset; signed-off commit; no new dependencies - [x] `pnpm lint` and `pnpm typecheck` - [x] Full test suite and all-pack ground-truth results recorded Signed-off-by: Lucas Braum <[email protected]>
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.
Changes
fixplans the complete peer upgrade set before cloning, prints every blocker and one complete retry command, and supports repeatable--allow-peerwith native npm/pnpm/Yarn overrides and visible Peer risks. npm manifest/lockfile mismatches still fail before cloning. pnpm/Yarn warn about unallowed peers; npm stops. No force or legacy-peer-deps flags are used.The lockfile guard now protects resolved contents outside the allowed union, rather than requiring the same records at the same placements:
node_moduleslookup in both trees, including unchanged dependent records and workspace importers. Nested placement alone does not imply a dependency edge; bundled children are treated separately.scripts,bin,os,cpuand related flags). Without integrity, the source locator must stay the same. Dependency chains of relocated copies are checked too.Accepted housekeeping is retained in report JSON and shown with counts and placements in a collapsed Lockfile housekeeping section of the generated PR body and HTML report. The terminal shows only counts and points to the report.
Based on
mainafter #62 merged. Minor changeset retained; signed-off feature commit 67e9f88 and merge commit 829ba22. Resolving the squash-merge history conflicts left the source tree identical to 67e9f88. Updated command and troubleshooting docs.Real-repository verification
Local reproduction only:
alanagoyal/alanagoyal@5d06422a3565eed930be9f61a3d117e8bff0ab91, Node 24.21.0, npm 11.19.0. Used the locally built CLI with the full preflight command (plus--verbosefor timings):The run completes preflight, clone, analysis, guarded npm install, rules, final types and tests in 1m 33s wall time. The install phase completes in 41s. Exit 1 reflects failed migration verification, not a planning/install/scope failure. No PR, fork or push was made on the external repository. Its checkout remains on the same commit and clean; the migration branch and preview are local only.
--no-llmfixesRemaining diagnostics: 8 TS2322 nullable-ref mismatches, 3 TS18046
node.propsunknown, 1 TS2503 missingJSXnamespace and 1 TS2554 missinguseRefargument. No LLM calls or spend. Runtime behavior was not verified. The generated PR body correctly marks review required and verification FAIL.The existing companion planner selects shared-pin Radix versions, including downgrades for some companions. This policy is unchanged by the housekeeping fix and is visible in the unedited preview below. The explicitly allowed emoji-mart peer remains a runtime compatibility risk.
Lockfile housekeeping · 5 accepted dedupe moves · 0 metadata-only changes in this run
Each removed copy resolves to the same name, version and integrity at its hoisted placement. No outside resolved package disappears.
@radix-ui/[email protected]node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-contextnode_modules/@radix-ui/react-context@radix-ui/[email protected]node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-directionnode_modules/@radix-ui/react-direction@radix-ui/[email protected]node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-callback-refnode_modules/@radix-ui/react-use-callback-ref@radix-ui/[email protected]node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-layout-effectnode_modules/@radix-ui/react-use-layout-effect@radix-ui/[email protected]node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitivenode_modules/@radix-ui/react-primitiveBaseline lockfile investigation remains valid:
npm ci --dry-runpassed; an unchanged manifest/lock-only install changed 0 records, with lockfile version 3 throughout. The earlierzodand@tiptap/suggestionremovals were caused by diagnosticlegacy-peer-deps; native scoped overrides preserve them. This implementation never uses that flag.Validation
fix --no-llm; the secret-backed private-material scan passes in both test jobs. The separate Pack test is still running as of this update and is not included in the green checks.Generated external PR body — preview only
The following is the full, unedited generated body, printed for review. It was not submitted as a PR anywhere. Its run metadata records the working-tree build used before the follow-up commit.
Full generated PR body (verification failed; no external PR opened)