Repository navigation
feat(packs): add candidate openai 4 to 7 migration pack - #130
Conversation
Candidate-pack smoke tests previously required editing verification.json to pretend the pack was verified. This adds a local-only opt-in without changing any pack record or ground truth. - Add `--allow-candidate` to `check` and `fix`, including worker requests, companion preflight and alternate leads. Only registered packs with an explicit candidate record qualify; missing, blocked and inconsistent records keep the existing behavior, and verified packs remain unchanged. - Reject the flag in `scripts/action.ts`, the Action runner, the Action subprocess boundary and CLI invocations in GitHub Actions. Reject it with `--pr`, `--yes` or publication intent before migration work. Persisted candidate runs also refuse later publication. - Show **candidate pack, not verified** in terminal output, stored report.json and the generated PR body preview. Internal reports add optional `packWarning`; the `uptide.run/v1` projection uses its existing `error` field, with no schema or enum changes. - Use the claiming pack rule id for assisted sites when no transform applies, including `--no-llm`. The regression recreates OpenAI tool-call union sites from the PR #130 smoke case synthetically; no third-party repository or pack truth was modified. - Document the smoke workflow in CONTRIBUTING “Write a pack”, README and command/pack docs; include a patch changeset. Validation: regression tests failed first (candidate eligibility, local execution/banner, Action/publication refusals and tool-call rule labels). `pnpm lint` and `pnpm typecheck` pass. `pnpm test -- --maxWorkers=4` passes: 2,097 tests passed, 31 network-gated tests skipped. The first shell run hit localhost permission errors; a host run had one existing compiler-test timeout under concurrent load. The final full run used four workers with unchanged timeouts. Created in an isolated git worktree, installed with `--frozen-lockfile --ignore-scripts`, signed off with the commit author's identity, and rebased on current main before opening this PR. Fixes https://linear.app/uptide/issue/UPT-51/fix-allow-candidate-for-local-smoke-tests-of-unverified-packs Signed-off-by: Lucas Braum <[email protected]>
… a blocker (UPT-50) (#142) ## What and why [UPT-50](https://linear.app/uptide/issue/UPT-50/plan-peers-and-dependencies-the-target-version-requires), found by the openai pack (#130). The planner moved a package's release group (#135, `companions.ts`) but never a package the **target version requires**. openai 7 peers on `zod ^3.25 || ^4.0`, yet batch-ai stayed on zod 3.24.2. This builds on #135; it does not change it. A new step, `check/required.ts`, runs after the release group: - **What a planned version declares.** Take every planned version: the lead's target and each companion it moves. When one declares a peer or dependency range the installed copy rejects, that package moves to the **lowest release of its line** that satisfies the range. A line is one major, or one minor for 0.x (what a caret range reaches). Example: zod 3.24.2 → 3.25.0. - The rule applies only when the upgrade **introduces** the violation, i.e. the installed host accepted the installed copy. A range the repository already breaks today is not this upgrade's (see morphic below). - **What depends on the lead.** A direct dependency whose own dependency range rejects the lead's target moves the same way, within its line. - **A required move across a major is never made.** - A peer or a dependent becomes a **blocker** with the exact range: `openai 7.9.0 needs zod ^4.0.0; installed 3.25.76, and only a new major satisfies it (zod 4.0.0)`. - A plain dependency gets its own nested copy. That is not a blocker. - Blockers appear in `check` (`✗ blocked: … a new major, never made by Uptide`), in the PR body, and in `pack test` (`✗ blocked: …`, and on each `with` entry they keep behind). - `fix` still runs, leaves the blocked package where it is, and rates the risk High ("a required move is blocked"). - **Shown apart from release-group companions.** A required move is a companion marked `required`, so `fix` installs it in the same single install. The PR body lists it separately, next to #135's "Left where they are": ``` Upgraded with openai, so the install stays consistent: ← release group, unchanged Moved because the new version requires it: - `zod` 3.24.2 → 3.25.0 (moved because openai 7.4.0 requires zod ^3.25 || ^4.0) Blocked: a required move only a new major makes, which Uptide never makes: - @openai/agents 0.1.11 depends on openai ^5.20.2; only a new major accepts openai 7.9.0 (@openai/agents 0.15.0, which needs zod ^4.0.0; installed 3.25.76) Left where they are (not released with it): ← #135, unchanged ``` - **The install scope guard allows exactly these moves.** The allowed set is still the lead plus its companions, so a planned move is allowed. Testing the other half turned up a gap on npm: a root dependency the user declares (`zod`) could change without the plan saying so, because npm resolves it as a moved package's peer and so it counted as inside openai's subtree. pnpm and Yarn already refused that. Now on npm too, an importer's declared dependency changes only when the plan names it (`lock-guard.ts`). Not in this PR: UPT-54 (@types stub removal) touches the same planner and comes after this. ## How it was verified **Failing tests first** (the commit `test(check): …`): 14 tests fail on main's code and pass here, plus one more added with the refinement. - `check/required.test.ts`, synthetic, modeled on #130's repositories: - batch-ai: zod 3.24.2 → 3.25.0; a prerelease is skipped. - openai-guardrails-js: `@openai/agents` 0.1.11 only reaches openai 7 at 0.15.0, a new 0.x line that needs zod 4. This is a blocker naming both, and neither package is moved. - A within-line dependent that moves, plus what its new release then requires. - A peer that needs a new major (blocker); a 0.x minor treated as a major. - A plain dependency: moves within its major, or keeps a nested copy (no blocker). - Workspace visibility (sibling vs. hoisted root). - Release-group companions unchanged next to a required move. - A requirement the install already breaks (morphic). - `fix/managers/required-scope.test.ts`, for npm, pnpm and Yarn: the lead plus the required move is allowed; the required package moving unplanned is refused (failed on npm before); anything else moving next to the plan is refused. - `fix/generic.test.ts`: - `fix` installs the required move in one install (`also`), and the PR body names it. - With a blocker, `fix` moves nothing extra, and the PR body names the blocker. - PR body and risk (`fix/report.test.ts`), `check` output (`format-check.test.ts`), and `pack test` accounting (`pack-test.test.ts`: a required move counts as moved, a blocker is attached to what it keeps behind). **Re-scored every registered pack, before (main `9ba005a`) and after (this branch).** Same truth, scripts off: | Pack | Before: breaking P / R (tp fp fn) | After: breaking P / R (tp fp fn) | Overall P / R before → after | Gate before → after | | --- | --- | --- | --- | --- | | ai | 100% / 82% (9 0 2) | 100% / 82% (9 0 2) | 100% / 89% → same | PASS → PASS | | lucide-react | 100% / 100% (11 0 0) | same | 100% / 100% → same | PASS → PASS | | next | 100% / 85% (11 0 2) | same | 100% / 80% → same | PASS → PASS | | react | 100% / 80% (57 0 14) | same | 100% / 81% → same | FAIL → FAIL ¹ | | @sentry/browser | 100% / 100% (3 0 0) | same | 100% / 100% → same | PASS → PASS | | @sentry/nextjs | 100% / 100% (8 0 0) | same | 100% / 100% → same | PASS → PASS | | @sentry/react | 100% / 100% (2 0 0) | same | 100% / 100% → same | PASS → PASS | | stripe | 100% / 90% (18 0 2) | same | 100% / 90% → same | PASS → PASS | | vitest | 100% / 50% (16 0 16) | same | 0% / 50% → same | PASS → PASS | | zod | 100% / 74% (59 0 21) | same | 100% / 85% → same | PASS → PASS | **Breaking precision does not drop for any pack.** - The only plan change: in `ai` (vercel/chatbot), `swr` 2.3.3 → 2.4.1 moves because `@ai-sdk/react` 4.0.10 requires `swr ^2.4.1`. Its scores are unchanged. - The first after-run did drop `ai` precision: in miurla/morphic, react 19.2.0 → 19.2.1 moved and produced 59 false positives, 4 of them breaking. The installed `@ai-sdk/react` 3.0.182 already declares `react ~19.1.2 || ^19.2.1`, so that violation is the repository's today, not the upgrade's. The `fix(check): plan only requirements the upgrade introduces` commit fixes it, with a regression test. Then `ai` was re-scored. - The other packs were scored on the commit before that fix, which only narrows the rule. None of them had any required move or blocker in that run. ¹ `react` fails the same way on both sides for an environmental reason: tldraw/tldraw pins `[email protected]` and this container only has Yarn 1.22. The other `react` repositories score the same. **`pack test openai` on #130's truth**, from throwaway worktrees (main + #130 and this branch + #130, merged locally, never pushed; #130 and its truth are untouched): ``` openai/openai-guardrails-js@6c13ba08ab02 openai 4.104.0 → 7.9.0 predicted 5, expected 11, false positives 4, false negatives 10 ✗ blocked: @openai/agents 0.1.11 depends on openai ^5.20.2; only a new major accepts openai 7.9.0 (@openai/agents 0.15.0, which needs zod ^4.0.0; installed 3.25.76) ✗ @openai/agents: the upgrade moved it to 0.17.2, check leaves it (blocked: …) ✗ zod: the upgrade moved it to 4.5.4, check leaves it (blocked: …) grantsingleton/batch-ai@05c7e9f132b3 openai 4.83.0 → 7.4.0 predicted 0, expected 2, false positives 0, false negatives 2 with zod 3.24.2 → 3.25.0 (moved because openai 7.4.0 requires zod ^3.25 || ^4.0) microsoft/prompty@e878b6b7789f openai 4.104.0 → 7.10.0 predicted 52, expected 0, false positives 52, false negatives 0 ✗ blocked: @azure/ai-projects 2.4.0 depends on openai ^6.16.0; no release accepts openai 7.10.0 breaking (sites) 43% 15% 3 4 17 (before: 43% 15% 3 4 17) FAIL openai: 4 false positives among breaking findings ``` - **batch-ai's zod move is no longer missed.** That is UPT-50's done condition. Its upgrade chose 4.4.3; check picks the lowest release of the same major that satisfies the range, and `with` compares names only. - **guardrails is the needs-a-major case, and it reports the blocker with the exact ranges.** Its real upgrade moved both packages across their majors (agents 0.1 → 0.17, zod 3 → 4). Uptide never makes such a move, so the pack's `with` stays unmet there, now with the reason. - **prompty gets a new, accurate blocker:** no `@azure/ai-projects` release accepts openai 7 yet. - Scores are unchanged. #130 still fails its gate on its 4 compile-scope false positives, its engine gap 2, which is outside this PR. **Repository checks:** - `pnpm lint`: only the warning and info that were already there. - `pnpm typecheck` passes. - `pnpm test`: core 1,667 passed / 32 skipped, CLI 453 passed. ## Checklist - [x] Tests for the change (a bug fix starts with a failing test) - [x] `pnpm lint && pnpm typecheck && pnpm test` pass - [x] README and docs updated if behavior changed (`docs/architecture.md` Companions, `docs/packs.md` `with`, README one line) - [x] Changeset added if a user would notice (`.changeset/required-moves.md`, minor) - [x] No new dependency, or it was agreed in an issue - [x] No private code, names or paths in fixtures, tests or docs (synthetic registries modeled on public repositories) - [x] The rules in CONTRIBUTING.md ("Rules that do not bend") still hold (installs with scripts off; nothing moves across a major) The task brief pointed to AGENTS.md, but there is no AGENTS.md in the repository; I followed CLAUDE.md and CONTRIBUTING.md. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01H9K3U7AeqmsqU2z6wKKxhw --- _Generated by [Claude Code](https://claude.ai/code/session_01H9K3U7AeqmsqU2z6wKKxhw)_ --------- Signed-off-by: Claude <[email protected]> Co-authored-by: Claude <[email protected]>
Related to [UPT-49 — Compile scope must match the repo's own tsconfig](https://linear.app/uptide/issue/UPT-49/compile-scope-must-match-the-repos-own-tsconfig). Explicit importer roots bypassed TypeScript project selection, so `check` reported compiler errors in files outside the repository's own tsconfig. In guardrails, that meant four errors in its excluded `examples/` files. ### Changes - Apply project scope only to compiler diagnostics. Pack rules, patterns, inventory/config files and build-option findings remain reportable outside a tsconfig. - Discover include/exclude/files, inherited configs, recursive references and workspace projects using the repository compiler. Membership comes from parsed config roots and lazy import edges, without building a program per config. - Check affected files in their nearest covering default project, then a named/referenced project when needed, and never again under every importing consumer's options. - Reuse the scanner's program for the workspace default config, and release alternate programs after use. - Without a tsconfig, keep importer-based compilation and say so in coverage. - Anchor missing members supplied by an unchanged dependency's augmentation (jest-dom) at the side-effect setup import, keeping the failing calls as evidence. This is required for this change: tsconfig scope now type-checks test files under the app config. Without it, the vitest pack gets **1,443 breaking false positives** on opentelemetry-ecosystem-explorer (measured with the commit removed); with it the pack matches main. Its module-level cache is registered with shared-state (the `shared-state.test.ts` failure on the previous head). - Documentation and a patch changeset. The earlier React Router `verification.json` refresh was dropped in the rebase: main already carries the identical record. ### Validation Head `02f8eb4`, rebased on main `7aa3d58`. - `pnpm lint`, `pnpm typecheck`: pass. - Focused: `vitest run src/shared-state.test.ts src/adapters/typescript src/check src/packs/stripe`: 357 passed. - Full `pnpm test` on the previous rebase (onto `0b88170`): core 1763 passed, cli 456 passed. ### Resources: `check`, main vs branch Local macOS, Node 22.20.0, `--max-old-space-size=4096`, warm offline cache. The harness calls `check` in-process with the registered pack (as pack test does). Two alternating rounds each (main, branch, main, branch). Measured on engine `3895d17` against main `0881185`. The later rebases only brought in main's own commits, so these runs were not repeated. | Repository / upgrade | main wall (mean) / peak RSS | branch wall (mean) / peak RSS | Wall | RSS | | --- | --- | --- | ---: | ---: | | Excalidraw `9ee0b8f`, React → 19.0.0 | 38.2 s / 2.73 GiB | 40.3 s / 2.79 GiB | +5.5% | +2.2% | | vxsuite `5cb3c7d`, Vitest → 5.0.2 | 133.8 s / 2.79 GiB | 134.5 s / 2.88 GiB | +0.5% | +3.2% | Both are within the ~10% target. Host load averages were 4.5–7.9 on 11 CPUs. ### Pack re-score: main vs branch Engine `3895d17` vs main `0881185`, one pack at a time with cache eviction. Breaking TP / FP / FN: | Pack | main | branch | Site-level result | | --- | --- | --- | --- | | ai | 9 / 0 / 2 | 9 / 0 / 2 | identical | | lucide-react | 11 / 0 / 0 | 11 / 0 / 0 | identical | | next | 11 / 0 / 2 | 11 / 0 / 2 | identical | | react | 89 / 0 / 40 | 89 / 0 / 40 | breaking identical; +2 `unverified` sites (below) | | react-router | 14 / 0 / 2 | 14 / 0 / 2 | identical (main then failed only on its stale record, since fixed on main) | | @sentry/browser | 3 / 0 / 0 | 3 / 0 / 0 | identical | | @sentry/nextjs | 8 / 0 / 0 | 8 / 0 / 0 | identical | | vitest | 16 / 0 / 16 | 16 / 0 / 16 | breaking identical; 3,619 fewer `unverified` FPs on opentelemetry-ecosystem-explorer, none added | | @sentry/react, stripe, zod | — | — | not compared locally (the branch-side storefront fixture had no install, and one @sentry/react repository failed to install on both sides); CI's full Pack test covers them | The react difference: excalidraw `dev-docs/` is part of the root workspace. On main, the root workspace's analysis aborts with `EEXIST` (symlinking `@types/react-dom` into `node_modules`), so main never reports these sites. The branch analyzes it and reports `dev-docs/src/components/Homepage/index.tsx:7` and `dev-docs/src/theme/ReactLiveScope/index.js:10`, both `unverified`. That `EEXIST` is an existing main bug, not changed here. ### OpenAI (#130), throwaway overlay `uptide pack test openai` on `02f8eb4` with #130 cherry-picked, in a throwaway worktree. Nothing was pushed. | | #130 as recorded | this branch + #130 | | --- | --- | --- | | Breaking TP / FP / FN | 3 / 4 / 17 (42.86% precision) | **3 / 0 / 17 (100% precision)** | | Overall FP | 56 | 52 | - The four guardrails `examples/…multiturn_with_prompt_injection_detection.ts` false positives (`:331, :413, :428, :430`) are gone. No `examples/` site is predicted. - `src/base-client.ts:368` is still reported (breaking). - The remaining 52 FPs are prompty's `unverified` sites, unchanged from #130's own run. - The run reports #130's `verification.json` as stale because it improves on the recorded precision. #130 should re-record after this lands. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Lucas Braum <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
526ff10 to
47b4307
Compare
|
Rebased on main (
It stays a candidate. The run itself measures candidate, so there is no override:
Generated by Claude Code |
…a blocker; pack test explains blocked and unrelated moves (UPT-63) (#157) Fixes UPT-63. **Engine (check).** A direct dependency whose plain dependency range rejects the lead's target no longer blocks: npm nests a copy, as the real upgrades did. It is now a stay that names the new major accepting the target, if there is one: - prompty: `@azure/ai-projects 2.4.0 keeps its own openai ^6.16.0; no release accepts openai 7.10.0` - netlify: `verdaccio 6.2.4 keeps its own express 4.21.2; …` (an exact pin, same path) - ioredis/dokunc: `@hocuspocus/extension-redis 4.7.0 keeps its own ioredis ~5.6.1; …` (the same false blocker, found by the re-score) Within-line moves of a dependent are unchanged. Peers still block. Nothing moves across a major. **pack test.** A `with` move that check leaves behind is now: - *explained* when check says why it stays: a blocker, a stay that names a new major (guardrails' `@openai/agents` and `zod`), or a peer conflict (netlify's `http-proxy-middleware 2.0.9 declares @types/express ^4.17.13`); - *the repository's choice* when its installed copy doesn't depend on the lead (openhab's `body-parser`, `serve-static`). Neither fails the gate. Anything else still does. Tests first: `required.test.ts` (prompty, verdaccio, guardrails) and `pack-test.test.ts` (explained, peer conflict, repo's choice). ### Re-score (local, main 922c5ab vs this branch) | Pack | main | this branch | Diff | | --- | --- | --- | --- | | express (#149 truth ab94e71) | fail: verdaccio blocker; http-proxy-middleware, body-parser, serve-static left behind | **pass**, P 100% R 85% (same) | moves explained / repo's choice | | openai (#130 truth 47b4307) | fail: guardrails `@openai/agents`, zod left behind; prompty blocker | **pass**, P 100% R 15% (same) | blocker → stay | | ioredis | pass, candidate | pass, candidate | dokunc blocker → stay | | ai, joi, lucide-react, next, react, react-router, redis, sentry-browser, sentry-nextjs, stripe, vitest, zod | pass | pass | identical | | sentry-react | fail | fail | identical (local npm install of owine/youth-activity-scheduler fails, MODULE_NOT_FOUND) | express and openai were scored in throwaway local merges of #149 and #130 onto each side, never pushed. No ground truth was changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Lucas Braum <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
47b4307 to
9a9ffe2
Compare
|
Rebased on main
Lint and typecheck pass. In Generated by Claude Code |
One pack for openai >=4 <5 to >=7 <8, from the openai-node migration guide and changelog pinned at v7.32.0 (read 2026-10-14): 5.0 carries the API changes, 5.12.1 the tool-call unions, 6.0 one output widening, 7.0 the Node 22 floor. RESEARCH.md classifies every change. Rewrites where unambiguous: named path parameters, del -> delete, beta.chat promoted, runner event renames, removed entry points, request-option overloads, core/* paths (deprecated). Guides for the tool-call union, httpAgent, fileFromPath and other removals, with options reported as decisions. Syntactic detects for APIError.headers, node-fetch Response members and double-encoded path ids, which the compiler cannot see through any. Decisions carry repository evidence (Node 22, zod peer and helpers, fetch/proxies, global types, client subclasses). requiresBuild: 7.x exports explicit subpaths only. Ground truth: seven public 4.x -> 7.x upgrades. The pack's own rules add no false positive, but the pack stays a candidate: check reports four breaking sites in files outside guardrails' tsconfig, and leaves behind zod and @openai/agents that two upgrades moved. Both are engine gaps, documented and left for separate changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FX2nBoNEvDh9v71yDhEzxL Signed-off-by: Claude <[email protected]>
…quired-move fixes Rebased on main after #138, #142 and #154 and re-ran pack test --write on the unchanged ground truth: breaking 3 TP / 0 FP / 17 FN (100% precision, 15% recall). It stays a candidate: check reports openai-guardrails-js blocked on a required @openai/agents major and prompty blocked on @azure/ai-projects' openai ^6 dependency. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FX2nBoNEvDh9v71yDhEzxL Signed-off-by: Claude <[email protected]>
…d-move fixes Rebased on main after #155, #156 and #157 and re-ran pack test --write on the unchanged ground truth: breaking 3 TP / 0 FP / 17 FN, and the run now measures verified. The record stays candidate (allowed since #154): seven rewrite rules are unexercised by public ground truth and recall is 15%. README table regenerated with docs:packs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FX2nBoNEvDh9v71yDhEzxL Signed-off-by: Claude <[email protected]>
9a9ffe2 to
dc18ac3
Compare
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 - [#134](#134) [`b795705`](b795705) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Packs can name alternate leads: packages a repository declares instead of the pack's own (`react-router-dom` for `react-router`). `check` and `fix` asked for either name use the pack; where only the alternate is declared, the lead is analyzed at the version installed through it, pnpm stores included, and `fix` declares it beside the alternate at the target before upgrading both. - [#149](#149) [`3303118`](3303118) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate express 4 to 5 migration pack. Route strings that path-to-regexp 8 rejects or reads differently are found on calls of an Express app or router (including lists registered in a loop); `req.params` values widened to `string | string[]`, `req.param`, `res.sendfile`, `express.static.mime` and `express.query` are claimed from the compiler; `res.redirect(url, status)`, `app.param(fn)`, `res.redirect('back')` and `res.send(<number>)` are found in the source; runtime defaults (async errors, `req.body`, the query parser, `urlencoded`, dotfiles, Node 18) go to decisions. No rule rewrites. With the pack in use, `check` no longer adds its text-matched express 5 runtime findings. - [#148](#148) [`5143c46`](5143c46) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate joi 17 to 18 migration pack. `new ValidationError(message, {}, original)`, which stops compiling for code written against joi 17.0–17.6, is rewritten to pass `[]`; the Node.js 20 requirement and the top-level domains joi 18 no longer accepts in `email()`, `domain()` and `uri()` are reported as decisions. Scored against two public repositories, one of them a negative control. - [#131](#131) [`413d3da`](413d3da) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a verified lucide-react 0.x to 1.x migration pack. Brand icons removed in 1.x are found at their imports and every use, with a guide whose replacement choice goes to the owner; icon names dropped during 0.x are renamed at the import or member; deep `dist/` imports, untyped icon lookups, the `absoluteStrokeWidth` and `IconNode` deprecations, and the `aria-hidden` default for repositories before 0.489.0 are reported. Lucide's lockstep packages move together and the consumer's build is required. Verified against three public repositories, one of them a negative control. - [#132](#132) [`107c107`](107c107) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a verified React Router 6 → 7 migration pack, which also runs for applications that declare only `react-router-dom`. It moves `react-router-dom` imports to `react-router`. It reports, with a guide for the agent, the rest of the upgrade: the removed `future` prop and router option, `react-router-dom/server`, lowercase `formMethod` comparisons and `json`/`defer` calls (found by syntax where the compiler is blind), the other removed exports, and `generatePath` calls that pass `null` for a required parameter. The six v6 future flags that become defaults are reported as decisions where the repository's router setup has not enabled them. React Router 7 → 8 is a separate upgrade. - [#142](#142) [`9c57934`](9c57934) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` and `fix` plan what the target version requires: a package the target, or anything moving with it, declares as a peer or dependency at a range the installed copy rejects moves to the lowest release of its major that satisfies it (openai 7 moves zod 3.24.2 to 3.25.0), shown apart from release-group companions ("moved because openai 7.4.0 requires zod ^3.25 || ^4.0"). A move only a new major makes is never made: it is reported as a blocker with the exact range in `check`, the PR body and `pack test`. The npm install scope guard no longer lets a declared root dependency change because a moved package peers on it. - [#128](#128) [`06f11ab`](06f11ab) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add verified Sentry JavaScript SDK 10 to 11 migration packs for `@sentry/nextjs` and `@sentry/browser`, with the SDK's lockstep release group, a required build for Next.js, and inventory-scoped decisions for data collection, span streaming, sampling and platform minimums. Mechanical rules move `withSentryConfig` to `@sentry/nextjs/config` and the removed build options under `webpack`, remove `enableLogs`/`enableMetrics: true`, and rename exports, integration names and `httpIntegration` options; privacy, sampling, profiling and OpenTelemetry choices stay assisted and are reported for the owner. Fix `uptide pack new` dropping registry entries long enough to be wrapped. - [#155](#155) [`922c5ab`](922c5ab) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` applies a stricter verified gate: at least five expected breaking sites across the public ground-truth repositories, besides two repositories and no breaking false positive. Upgrades the compiler cannot see are gated on their behavior notes instead. Mechanical rules no real site exercises are recorded as unexercised, and `check` and `fix` run their sites as assisted. `@sentry/browser` and `@sentry/react` become candidates (fewer than five real breaking sites). A pack can lower the minimum only with a written reason in its RESEARCH.md. The README packs table shows each pack's breaking-site count. The output shows the gate's class, site counts and every reason a pack is a candidate. - [#147](#147) [`0b88170`](0b88170) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` and `fix` remove a deprecated `@types` stub instead of upgrading to it. When the release the upgrade would move `@types/<pkg>` to is deprecated on npm, and `<pkg>`'s target declares its own types (`types`, `typings` or a `types` export), the plan removes it: "Removed: @types/ioredis, ioredis 5 ships its own types", in `check` and in the PR body. `check` now diffs such a package against its own target types instead of failing on a stub with no declarations, and `fix` removes the entry in the same install, with the install scope guard allowing exactly that removal. - [#150](#150) [`4c3212b`](4c3212b) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check typescript` judges a TypeScript 5 to 6 upgrade with both compilers: every project of the workspace is compiled with the installed TypeScript and with the target's, and what is new at the target is a finding; the bundled compiler never stands in, and a target without a JavaScript API (TypeScript 7) is reported as not compiled. A candidate typescript 5 to 6 pack reports the tsconfig options 6.0 deprecates where they are set, the rootDir default, module-keyword namespaces and import assertions. A peer that rejects the target (typescript-eslint on TypeScript 6) is now reported as a peer conflict even when it is not grouped with the package. - [#137](#137) [`21894d7`](21894d7) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add `verify.build` to uptide.yml: the package.json script a migration pack's required build runs. Unset, Uptide runs `build:ci`, then `build-ci`, then `build`. When a build fails before the framework's build starts because it needs an environment variable or a database (`prisma db push` without `DATABASE_URL`), the pull request and the report say so ("build needs DATABASE_URL; set verify.build") instead of a bare "build failed". `uptide init` writes the setting as a comment. ### Patch Changes - [#141](#141) [`9debb6d`](9debb6d) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` no longer reports a pre-existing type error as a breaking site when the upgrade only changes its wording, such as a type the message prints in full. An error at the same place with a different reason is still reported. - [#129](#129) [`e796e4c`](e796e4c) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate ioredis 5 to 6 migration pack: client constructions that inherit the RESP3, reconnect and keep-alive defaults ioredis 6 changed, compiler-blind sites (`mode === 'subscriber'`, commands in a `connect` listener with the offline queue off, AUTH recognized by command name), dependents that bundle ioredis 5, instrumentation that stops patching ioredis 6, and Node 20. It is scored against five public upgrades and stays a candidate: none of them has a breaking site to verify it with. - [#139](#139) [`9ba005a`](9ba005a) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Allow local check and fix smoke tests of registered candidate packs with --allow-candidate, with an explicit unverified banner. Reject candidate opt-in in the Action and with publication flags, and prevent stored candidate runs from being published. Label pack-claimed assisted sites by rule id even with --no-llm. - [#157](#157) [`f3af6a1`](f3af6a1) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` no longer reports a blocker for a direct dependency whose plain dependency range rejects the target (`@azure/ai-projects` on `openai ^6`, verdaccio pinning express 4): the package manager gives it its own nested copy, so it is listed as staying, with the new major that would accept the target when there is one. `pack test` counts a `with` move that `check` leaves and explains (a blocker, a new-major stay or a peer conflict) as explained, and one of a package that does not depend on the lead as the repository's choice; neither fails the run. - [#130](#130) [`5ced450`](5ced450) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate openai 4 to 7 migration pack: named path parameters, `del` → `delete`, promoted beta chat helpers, renamed runner events, removed entry points and request-option overloads are rewritten where unambiguous; tool-call unions, `httpAgent`, `fileFromPath` and the other removals get agent guides; `APIError.headers`, Web `Response` bodies and double-encoded path ids are detected even in code typed `any`; Node 22, zod, fetch and client-subclass decisions carry repository evidence. It stays a candidate (the dependency is still checked and fixed as generic) until two engine gaps its ground truth exposed are closed. - [#136](#136) [`578a042`](578a042) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Fold implicit-any errors (TS7006, TS7031, TS7019) inside an option the target removed into the pack finding on that option, as downstream evidence: the callbacks lost the types the option gave them, and the same edit resolves them. They no longer stand as separate breaking sites. - [#143](#143) [`883e587`](883e587) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` scores each expected site at the severity of the rule or behavior note it belongs to, so a missed note that only needs a look, or a decision, no longer counts as a missed break. Behavior-note sites get their own precision and recall in the output and in `verification.json` (`behavior`, with the counts behind each rate), false negatives show their severity, and a rate with nothing to measure prints `n/a` instead of 100%, in `pack test` and in the README's packs table. - [#154](#154) [`7aa3d58`](7aa3d58) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` fails a pack's `verification.json` only when it claims more than the run measures (recorded verified, measured candidate). A pack recorded as candidate on purpose passes, with `recorded candidate by choice; measures verified`, and a record whose numbers differ gets a note instead of a failure. A `generic` ground-truth site now counts as a true positive for the rule that claims it. - [#152](#152) [`ca31aee`](ca31aee) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` takes several packs: `uptide pack test zod ai`. - [#159](#159) [`1e157fd`](1e157fd) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test --json` times each ground-truth repository: `timing` gives the fetch, install and check wall time and the process's peak memory. - [#144](#144) [`0881185`](0881185) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Ground truth can name a site for an upgrade that only adds lines inside an existing call, such as an option added to a constructor: the site is the call's start line, so a pack finding there scores as a true positive instead of a false positive. `pnpm packs:truth` drafts these anchors from insert-only hunks for review, and docs/packs.md and CONTRIBUTING describe the rule. - [#156](#156) [`9039e3c`](9039e3c) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Public ground truth now exercises three rules that ran as assisted: zod `error-params`, stripe `api-version-unpinned` and next `stable-cache-exports`. Their rewrites run mechanically again. All three packs stay verified. - [#138](#138) [`0db5640`](0db5640) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Respect repository tsconfig file selection, recursive project references, and workspace project options when checking dependency upgrades. Compiler diagnostics outside every TypeScript project no longer produce breaking findings; pack rules and build-configuration findings retain their own scope. Repositories without a tsconfig retain importer-based compilation, with that fallback stated in the report. Anchor missing members supplied by dependency augmentations at their setup import, retaining affected calls as evidence instead of counting each call as a separate breaking edit. - [#151](#151) [`9ddaaff`](9ddaaff) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate redis (node-redis) 4 to 5 and 5 to 6 migration pack, one rule set per major: an upgrade gets the rules of the majors it crosses, so 4 to 6 gets both. 4 to 5 covers `legacyMode`, `commandOptions` and isolation, scan iterators that yield batches, string SCAN cursors, boolean replies that became numbers, enums that became constants, `keepAlive`, `@redis/graph` and internal `dist` imports; 5 to 6 covers the RESP3 client type, `unstableResp3`, and the client defaults 6 changes (RESP3, command timeout, keep-alive delay, maintenance notifications) with a decision per client. Scored against five public upgrades; it stays a candidate until the stricter verified gate lands, since the core 4 to 5 API changes have no real site yet. - [#135](#135) [`42a3b54`](42a3b54) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Move only packages released with the upgraded one. A pack's declared release group now bounds the lead's npm scope, and without one a same-scope package moves only when a pin, a peer or a release at the target relates it to the group. Packages of the scope that are versioned on their own (`@sentry/vite-plugin` 5.x, `@sentry/cli`, the old `@sentry/utils` 8.x) are reported as "stays at X" in `check`, the pull request and `pack test` instead of making `fix` refuse the whole upgrade. Registers the verified `@sentry/react` 10 to 11 pack. - [#146](#146) [`09b8682`](09b8682) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Report Stripe clients pinned to different API versions at the top of `check` and of the PR body, as a decision for the owner: every `new Stripe(...)` in TypeScript and JavaScript sources, scripts included, with the version it speaks after the upgrade (an unpinned client speaks the SDK default). The PR's decisions list, for each client behind the target, the changelog entries it would cross for the resources it calls. No pin is rewritten. - [#140](#140) [`bc428d1`](bc428d1) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Keep migration PR bodies within their size budget while preserving summaries, representative diffs, decisions, review warnings and verification ahead of changelog and transitive detail. Keep every evidenced Stripe change visible and uncapped; group and cap only other changes to used resources, link the full changelog, and identify omitted text in the retained report. - [#145](#145) [`3c8902d`](3c8902d) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The zod pack migrates `ZodError#errors` to `.issues` by rule: reads (`error.errors[0].message`, `error?.errors`) and destructuring (`const { errors } = error` becomes `const { issues: errors } = error`) where the type checker resolves the receiver to `ZodError`, and reads off an untyped catch binding of a zod parse. Writes are left to the agent. - [#127](#127) [`c4ead4f`](c4ead4f) Thanks [@lucasbraum](https://github.com/lucasbraum)! - zod: `check` now reports `ZodError#formErrors` and `#errors` read off an untyped catch binding of a zod `parse`/`parseAsync` (`catch (error: any) { return error.formErrors.fieldErrors }`), which zod 4 removed and the compiler cannot see. Files that only import a schema from the repository's own module (`@/lib/zod`) are covered too. `fix` rewrites `<err>.formErrors.fieldErrors` and `<err>.formErrors.formErrors` to `z.flattenError(<err>)`, importing `z` where it is missing; every other read goes to the agent. Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
Pack
openai>=4 <5→>=7 <8(queue entryopenai). Candidate, not verified. Kept as a draft: the gate fails on two engine gaps found while scoring (below), not on the pack's rules. The queue entry is set toblockedwith that reason.One pack covers 4 → 7, not three. 5.0 carries nearly all API changes (MIGRATION.md). 6.0's only breaking entry is one type widening; 7.0's only breaking entry is the Node 22 floor. 5.12.1 (a minor) made tool calls a function | custom union. Nothing later reverts 5.0, and every public upgrade found jumps 4.x → 7.x directly. Evidence:
packages/core/src/packs/openai/RESEARCH.md, "One pack, not three".Sources
Pinned at v7.32.0, read 2026-10-14 (all in
meta.sources):package.jsonand.d.tsof 4.104.0, 5.0.0, 5.11.0, 5.12.0, 5.12.1, 6.0.0, 6.49.0, 7.0.0 and 7.32.0Each change is classified as mechanical, assisted, behavior note, or not compiler-visible in RESEARCH.md.
Rules and behavior notes
Rules:
named-path-params(M):runs.retrieve(threadId, runId)→runs.retrieve(runId, { thread_id })for 28 methods, which includes 3 the guide's list omits (runs.poll,submitToolOutputsAndPoll,submitToolOutputsStream; taken from the 7.x.d.ts). It rewrites only inert arguments and an unambiguous third argument; anything else goes to the agent. It also has a syntactic detect, so clients typedanyare found.delete-method(M):.del()→.delete(). A barefiles.del/models.delis detected only on a known client binding.beta-chat(M):beta.chat.completions.parse|stream|runTools→chat.completions.*.runner-renames(M):functionCall*events andfinalFunctionCall*()→functionToolCall*.removed-modules(M/A): deletes a side-effectopenai/shims/*import; moves beta chat types toopenai/resources/chat/completionswhen every imported name exists there;openai/src→openai. Everything else (openai/core, deepersrcpaths) goes to the agent.core-paths(M, deprecated):openai/error|pagination|resource|streaming|uploads→openai/core/*.request-options(M):list({ headers })→list({}, { headers }). It is detected syntactically because 7.x types those keys?: never, so the compiler message doesn't name them.http-agent(A): the agent picks one ofundiciProxyAgent,undiciAgent or a custom fetch, and the choice goes to Decisions for you.file-from-path(A): the agent picksfs.createReadStreamortoFile(…, name), and the choice goes to Decisions for you.run-functions,page-helpers,page-classes,removed-exports,tool-call-union(5.12.1),function-output-union(6.0): all assisted (A).Behavior notes:
error-headers,web-response,encoded-path-params: reported as findings. Each has a syntactic detect for what the compiler can't see throughany/unknown:catch (e) { e.headers['retry-after'] }res.body.pipe(...)afterasResponse()encodeURIComponent(id)passed to an SDK methodplatform-minimums,zod-helpers,builtin-fetch,global-types,client-subclass: reported as decisions, each shown only with evidence from the repository (applies()). The evidence covers Node/TypeScript pins, zod below the^3.25 || ^4peer,openai/helpers/zodimporters, proxy agents and global dispatchers, tsconfiglibwithout DOM, andextends OpenAI.also-review: a decision pointing to the guide.Pack settings:
requiresBuild: true: 7.x exports explicit subpaths only, where 4.x exported./*. A deep import thatmoduleResolution: noderesolves from disk can therefore fail in Node or a bundler.openai, and@openai/agentsis on its own 0.x line.Ground-truth repositories
All are public, pinned at the parent of a merged upgrade, and installed with scripts off. They were drafted with
pnpm packs:truth(with--alsofor what the upgrade moved because of openai) and assigned by hand before scoring, then left unchanged.b9a476d9ef509fde+67ae240ftool-call-union6c13ba08@openai/agents0.17.2, zod 4.5.4)genericd46ec64dgenericb7308489generic05c7e9f1generic047fc448runtime/typescript)e878b6b7I found these by web search and by mining the npm registry for packages whose published manifests moved
openai ^4→^7. The screened-out candidates and the reason for each are listed in RESEARCH.md.Results
tool-call-unionThe pack's own rules and detectors add no false positive in any of the seven repositories. Every false positive comes from
check's generic findings:examples/…multiturn_with_prompt_injection_detection.ts:331, 413, 428, 430. These are real TS2345/TS2769 errors at 7.9.0. Butexamples/is outside the repository's only tsconfig, so the upgrade didn't touch it and the tsconfig-scoped truth doesn't list it. They stay false positives.@prompty/core, socheckskips the compile and lists type-diff sites asunverified.Misses:
:119: found, but asgeneric. The compiler message (Property 'name' does not exist on type '{}') names nothing of openai, so the rule does not claim it.:135: a knock-on parameter change with no diagnostic.client.ts×10: a client-subclass rework forwithOptions()cloning with no compiler error. Theclient-subclassdecision names this file, but decisions aren't scored.max_tokens→max_completion_tokens), which the pack never makes by design.What the engine could not express (why this is a candidate)
check/companions.tsmoves packages that depend or peer on the lead, but never the lead's own peers or a dependent the upgrade moved. batch-ai keeps zod 3.24.2 even though openai 7 peers onzod ^3.25 || ^4.0. guardrails'@openai/agentsand zod are left behind too. Both repos therefore failwith.checkcompiles importers outside every tsconfig, whilepacks:truthcompiles tsconfigs only. That mismatch is the source of all 4 breaking false positives above.applies()only sees the declared inventory, so the pack declares source globs to find helper imports and subclasses.--no-llm, an assisted site that wasn't rewritten is labelled in the PR body by its symbol path rather than its rule. The agent's task does use the rule.With 1 and 2 fixed and the same truth, the breaking predictions left would be the three true positives;
pack test --writethen needs a rerun.CI: the Packs workflow runs
pack testand will fail on this PR for the reasons above. It is a draft until the engine changes land.uptide pack testoutputFull output of
pnpm uptide pack test openai --offline --write(summary inline)Smoke test (not ground truth)
I ran
uptide fix openai --no-llm --keep-templocally on uptide-test/alanagoyal, upgrading openai 4.104.0 → 7.33.0.verification.jsonlocally for the run. The edit was never committed and was restored right after.tc.function.*), whichtool-call-unionclaims.PR body produced by
uptide fix openai(The test log inside is shortened here; "Tier: verified" and "Verified by ✅ the openai migration pack" reflect the local forced activation described above.)
Checklist
meta.sourceskeep)verified; otherwise the pack ships as a candidate (7 public repositories; candidate because of the 4 engine false positives and 2 left-behind upgrades)pnpm uptide pack test <package>passes and its output is pasted above;verification.jsonwritten with--write: it fails (4 breaking false positives, all fromcheck's generic compile). The output is pasted above, andverification.jsonrecordscandidatevia--write.pnpm lint && pnpm typecheck && pnpm testpass (core 1548 passed / 32 skipped, CLI 438 passed;pnpm lintreports one pre-existing warning innext/platform.test.ts)🤖 Generated with Claude Code
https://claude.ai/code/session_01FX2nBoNEvDh9v71yDhEzxL
Generated by Claude Code