Repository navigation
fix: preflight refusals become agent-led drafts instead of exit 2 (UPT-78) - #188
Merged
lucasbraum merged 2 commits intoOct 17, 2026
Conversation
…T-78) With an assisting agent, `fix` continues past preflight refusals on UPT-76's agentFallback path instead of exiting 2: - npm peer blockers that need a major: run as the plan's own Next command (extras and --allow-peer), decided before the clone. - Root pins without consent: updated; `updatePins: false` in uptide.yml still refuses. - Companions that cannot move together: the lead alone, before the clone. - Install scope check: out-of-scope resolutions are kept for review. Pack rules and the peer plan still apply. The reason heads the PR body and the terminal summary with feedback rounds and spend; agent-led results publish as drafts. Without an agent, with --no-llm, or on a downgrade (SafetyRefusal), fix still exits 2. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
…k stop before clone (UPT-78) - Lockfile resolutions an agent-led install kept outside the upgrade's subtree are listed under "Lockfile changes outside the upgrade: review" in the PR body (right under the agent-led line) and in the terminal summary. - Safety guards throw SafetyRefusal: downgrades, key-like settings in uptide.config.json, credentials in OPENAI_BASE_URL, unsafe run reports. Every fallback, the check catch included, rethrows by type. - The no-pack stop (no agent, or a major for a PR) runs before the clone, including when a pack exists but does not cover the installed version (pretty-quick: typescript 5.8.3 -> 7.0.2, 39 s -> 0.7 s). - An empty check for an outdated lead says so instead of "has no upgrade"; with an agent it continues as a draft. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
deleted the
lucasbraum/upt-78-preflight-refusals-become-agent-led-fallback-instead-of-exit
branch
October 17, 2026 04:51
Merged
This was referenced Oct 17, 2026
lucasbraum
added a commit
that referenced
this pull request
Oct 17, 2026
…PT-80) (#194) Fixes [UPT-80](https://linear.app/uptide/issue/UPT-80). The npm peer preflight only checked dependents that peer on a moving package. npm also refuses an install when a moving package, or a peer npm installs for it, declares a peer that rejects a package that stays installed. Example: vitest 5 peers on vite, and vite 8's optional esbuild peer rejects the repo's esbuild 0.25. These runs cloned and then failed with `ERESOLVE`. - On npm, the preflight now walks those peers. Optional peers count only when they are installed. A peer npm installs is checked at the newest stable release in its range. - The row names the chain (`vite 8.3.4 (peer of vitest 5.0.5) … rejects installed esbuild 0.25.11`), and `peerConflicts[].via` carries it. The advice is to upgrade the staying peer into range or pass `--allow-peer`, which writes the existing npm override. - Registry manifests now keep `peerDependenciesMeta`. The cache key moves to `manifests-2` so older entries can't hide it. - #188's `assistedPeerPreflight` path is unchanged: with an agent, the caught conflict still continues as an agent-led draft with the plan's `--allow-peer`. Verification: `bench/oss-sample` with `--only` on both repos from the UPT-77 sweep. `fix --no-llm` now stops in preflight with the chain named (class `expected`, no clone). New fixture tests cover both shapes (the target's own optional peer, and a peer installed one hop down) and the unchanged pnpm behaviour. The two npm cases fail on main. Full suite, typecheck and lint pass. Known limits: a peer that npm keeps from the lockfile's transitive copy, instead of picking the newest in range, is not modelled. The early "nothing peers here" return before any registry call is unchanged. 🤖 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]>
lucasbraum
added a commit
that referenced
this pull request
Oct 17, 2026
…ade (UPT-79) (#193) Fixes UPT-79. The install guard refused on lockfile churn the upgrade didn't cause, such as pnpm re-resolving optional platform packages or `picomatch` at the same version. - When the strict guard would refuse, `upgradeInstall` rebuilds the lockfile at the parent commit, in the isolated worktree with the plan's files at `HEAD` and the original lockfile. It replays the upgrade's own steps with each moving package pinned to the version it already has: exact pin, install, restore the ranges, install. It then guards the upgrade against that parent lockfile. A plain install there is a no-op, because pnpm leaves an up-to-date lockfile alone, so the churn a rewrite brings (`libc` fields, pruned entries) only shows up this way. Same manager, flags and env as the upgrade install, scripts off. This only runs when the strict check would refuse. - Churn the parent install already produces goes in `lockfile.parentChurn`. The PR body and CLI list it, and it never blocks, with or without an agent. Changes only the upgrade makes are still refused, or listed in `outOfScope` for agent-led runs (#188 kept). - If the parent install can't be produced, the run behaves as before. - `outOfScope` lists each change once (pnpm keeps package and snapshot records). - The npm 11 `libc` test now expects a pass with `parentChurn`, since the parent install drops `libc` too. Tests: `parent-churn.test.ts` uses a synthetic pnpm fixture whose mock leaves an up-to-date lockfile alone, as pnpm does, in a temp git repo. It checks that churn alone passes and is reported, that an upgrade-caused move is still refused without naming the churn, and that agent-led runs list only the upgrade's changes. 🤖 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]>
lucasbraum
pushed a commit
that referenced
this pull request
Oct 17, 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 - [#191](#191) [`db1d384`](db1d384) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The ai pack now reports AI SDK 7 renames in tests that `vi.mock('ai')` or `jest.mock('ai')` without importing it: the mock factory's `stepCountIs` key, and `onFinish` and the other renamed options read by fakes of `ai` calls such as `toUIMessageStreamResponse`. - [#196](#196) [`fa6f788`](fa6f788) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `fix` no longer runs out of memory type-checking monorepos whose root tsconfig includes every package: each workspace's program holds only the files that workspace owns, and the baseline check releases one workspace's program before building the next. When the analysis thread does run out of memory, `fix` says the repository is too large for analysis instead of crashing, and its temporary clone is removed on every exit path, a crashed or out-of-memory analysis thread included. - [#190](#190) [`cdf7f69`](cdf7f69) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check <pkg>` no longer returns nothing for an outdated dependency used only through config files (typescript through tsconfig): it is always reported, with the reason, including when its workspace's analysis fails or the time budget runs out. Analysis no longer fails with ENAMETOOLONG on a package that links itself (Yarn `link:.`). - [#186](#186) [`5e01ef3`](5e01ef3) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Keep the migration's starting branch and commit in reports and diff hints, including after re-verification. Default hints to `npx uptide`, use `uptide` only when the command on PATH resolves to the running binary, keep shared reports portable, and preserve explicit flags accepted by suggested commands, including peer retry budgets and workspace-root retries. - [#197](#197) [`b51ca9b`](b51ca9b) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Suggested commands no longer print `uptide` when the launcher found is a project-local `node_modules/.bin` entry (as under `pnpm run`/`pnpm exec` or npm scripts); only a real global install does, otherwise `npx uptide`. - [#187](#187) [`6fe81b4`](6fe81b4) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Prevent `fix` from failing with `spawnSync git ENOBUFS` when Git output exceeds 1 MiB in large repositories. Raise the buffered output limit to 256 MiB for shared Git operations and source-version status checks. - [#185](#185) [`98a3119`](98a3119) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Detect removed Zod error members on local results of schemas imported through repository modules, including awaited safeParseAsync calls, so their `.errors` reads can migrate to `.issues`. - [#193](#193) [`a68fea3`](a68fea3) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `fix` no longer refuses on lockfile changes the upgrade didn't cause. When the install guard finds resolutions outside the upgrade's subtree, it runs the same install at the parent commit and judges the upgrade against that lockfile. Churn the parent install already produces is listed as "Lockfile churn the parent commit already has" and never blocks; changes only the upgrade makes are still refused, or listed for review in agent-led runs. - [#180](#180) [`549edc3`](549edc3) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Update conflicting root pins automatically when preparing draft PRs, including App/Action runs, and list the changes at the top of the PR under "Root pins changed: review". Add `updatePins: false` in `uptide.yml` to opt out. Local runs still require explicit `--update-pins` consent. - [#188](#188) [`69b1c88`](69b1c88) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Continue `fix` as an agent-led draft instead of exiting 2 when a preflight refusal has an assisting agent: peer blockers that need a major run as the plan's suggested command, root pins without consent are updated (an explicit `updatePins: false` still refuses), companions that cannot move together leave the lead alone, and the install check reports out-of-scope resolutions for review. The reason heads the PR body and the terminal summary, next to feedback rounds and spend. Without an agent, with `--no-llm`, or on a downgrade, `fix` still refuses. - [#188](#188) [`69b1c88`](69b1c88) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `fix` makes the no-pack stop (no agent, or a major for a PR) before cloning or installing. When the check returns nothing to analyze for an outdated package, `fix` now says so instead of "has no upgrade", and an agent continues as a draft. Lockfile resolutions an agent-led install changed outside the upgrade are listed for review in the PR body and the terminal summary. Downgrades, key-like settings in `uptide.config.json`, credentials in `OPENAI_BASE_URL` and unsafe run reports throw `SafetyRefusal`, which no fallback continues past. - [#194](#194) [`7dd3259`](7dd3259) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Stop `fix` in preflight on npm when a package that moves, or a peer npm installs for it, rejects a package that stays installed: vitest 5 peers on vite, and vite 8 rejects the repository's esbuild 0.25. Before, npm refused the install after the clone. The row names the chain, and `--allow-peer` writes the override. - [`4c3dc23`](4c3dc23) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` now prints the precision of every rule with a rewrite, breaking or not, and warns when one is below 80%. It is a warning only: no pack's status and no rule's run mode changes. The compatibility matrix lists each rewrite's precision. - [#179](#179) [`9112f2b`](9112f2b) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add `fix --update-pins` to explicitly approve updates to conflicting root Yarn resolutions and npm/pnpm overrides for the target and its companions. Preserve unrelated pins, update root declarations and pnpm catalogs together, report pin changes, and reject ambiguous selectors before installation. - [#192](#192) [`3f81193`](3f81193) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The `@sentry/browser` 10 to 11 pack is verified again: 5 public upgrades, 22 real breaking sites, breaking precision 100% and recall 50%. `@sentry/react` stays a candidate: its ground truth grew to 14 public upgrades and 29 breaking sites, with 3 false positives among its breaking findings. - [#202](#202) [`51a6f70`](51a6f70) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Sentry packs now read JavaScript files that only require another Sentry package (`@sentry/core`, a sibling SDK of the same release), which the TypeScript compile scope skipped. `@sentry/browser` breaking recall on public ground truth goes from 50% to 82% with no false positives. - [#199](#199) [`08da2a7`](08da2a7) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Sentry 10 to 11 pack no longer reports `beforeSendTransaction` or `ignoreTransactions` in a `Sentry.init` that sets `traceLifecycle`: the option keeps transactions, so they still work. - [#189](#189) [`5d1d350`](5d1d350) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Avoid shared registry-cache write races during parallel checks, publish complete package extractions atomically, and print package failure reasons on stderr when check exits 2. - [#195](#195) [`15b3b3e`](15b3b3e) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The vitest pack now reads `vite.config.*` and `vitest.config.*` files and jest-dom setup files that never import `vitest` (a config that takes `defineConfig` from a shared file, a setup file that only does `import '@testing-library/jest-dom/vitest'`), so it reports their bare-directory coverage patterns and jest-dom registrations. Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
Merged
lucasbraum
added a commit
that referenced
this pull request
Oct 17, 2026
… blocker (UPT-10) When no release in a blocker's current major accepts the target, the preflight now names the first one that does and says whether a pack covers it: - Pack covers it: the blocker moves as a companion (`migration: 'pack'`), and that pack's rules run in the same fix, between the companion's own versions (`withCompanionPacks`). - No pack: the companion is marked `migration: 'own'`. The PR body gets a "Needs its own migration" section, the summary gets a Risk line, and migration risk is High. - `--allow-peer` is suggested first only when no release accepts the target. Otherwise it is named as the fallback after the major. #188's agent-led continuation and #194's `via` walk are unchanged. The continuation takes the same `also` plan, so it carries the companion pack. Also fixes a false companion conflict that stopped the preflight before any blocker was reported. A group member that declares nothing on the lead (`@casl/ability`) was never checked against the lead's own range on it (`@casl/react 5` peers `@casl/ability ^6`), so it got no move. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
added a commit
that referenced
this pull request
Oct 17, 2026
… blocker (UPT-10) (#207) Fixes [UPT-10](https://linear.app/uptide/issue/UPT-10). ## What main did On the Infisical frontend (react 18 → 19, `@headlessui/react` 1.x), main never reported the headlessui blocker. The preflight's look-ahead added `@casl/react` 4 → 5 (another react peer blocker). That move pulled `@casl/ability` into its group as a false conflict, and the preflight threw a plain error saying to keep `@casl/react` at 4. Exit 2, with no advice about headlessui. The cause is in `agreeing()` (`check/companions.ts`). It only read the member's own range on the lead. `@casl/ability` declares nothing on `@casl/react`, so the lead's range on the member was never checked (`@casl/react 5` peers `@casl/ability ^6`, and 6.8.0 is installed). The member got no move, which counted as a conflict. That case is now handled. ## What changes The preflight row for a blocker whose major rejects the target now reads `no 1.x accepts react 19, react-dom 19; 2.2.0 does (major, …)`: - **A pack covers that major.** `the <pkg> pack runs in the same fix`. The suggested command and the #188 agent-led continuation add it as a companion with `migration: 'pack'`. `fix` checks it alongside the lead and routes its sites to its own pack through `withCompanionPacks`. Rules, guide, `ruleOf` and `validateAssisted` all see the companion's own from/to. - **No pack covers it.** `no migration pack: it needs its own migration` … `or keep 1.x with --allow-peer <pkg>`. The companion is `migration: 'own'`. The PR body gets a "Needs its own migration" section, the summary gets a `Risk` line, and migration risk is High. - **No release accepts the target.** Unchanged: `--allow-peer` is the suggestion. Nothing else in the planner changes. #194's `via` walk is untouched. ## Verification - One shallow clone of the Infisical frontend, run as its own repository. Scripts were off (`npm ci --ignore-scripts`, `npm_config_ignore_scripts`), and the clone was deleted afterwards. With `fix react --no-llm`, the run now stops in preflight with exit 2. The next command adds `@headlessui/react` (and `@casl/react`) as majors, with no `--allow-peer`. The continuation plan with both added resolves with no conflicts. No repo output is included here. - Fixture tests: - pack covers the major (`express` 4 → 5) - no pack (`plugin` 1 → 2) - no accepting major (`--allow-peer` stays) - `--no-llm` through `isolatedFix`: `PeerPreflightError` before install, next command ends with the major and `--no-llm` - the `@casl` member shape (fails on main) - companion-pack routing - PR body, risk and summary - `pnpm test`, typecheck and biome pass. The one biome warning (`next/platform.test.ts`) is on main too. ## Known limits - A companion pack's `runtimeFindings` (detect rules) and inventory run over its own package and versions: `check` passes the group's members to the composite. Its scanContext and review sections are not built; it sees the lead's. This is marked with a `ponytail:` comment in `withCompanionPacks`. - Covered end to end by `fix/companion-pack.test.ts`: next 15 → 16 leads, react 18 → 19 is the pack-covered companion, and react's `use-ref-argument` rewrite lands in the same fix under react's versions. #202's runtime-findings test also runs every pack's fixtures as a companion. 🤖 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]>
lucasbraum
added a commit
that referenced
this pull request
Oct 18, 2026
…ate (UPT-102) (#220) UPT-102. From the UpgradeBench rerun (#169): on entur/enki (react 18.3.1 → 19.2.0), `fix` exited 2 before cloning because a nested override "can't be updated safely", with no agent fallback. **1. Unsafe root pin → agent-led draft.** `planRootPins` now collects every pin it cannot update safely (nested or selector keys, non-version values) into one `UnsafeRootPinError` and names them all. With an assisting agent, the run continues on #188's `agentFallback` path. The pins are left as written, and each one is named with its exact path and value in the reason at the top of the PR body. `pinConsentFallback` became `assistedRootPins`, shared by `isolatedFix` and `fix`. Exit 2 is unchanged without an agent, with `--no-llm`, with `updatePins: false`, and on `SafetyRefusal`. **2. Peer blockers named.** The preflight already picked the lowest accepting release (`compatiblePeerVersion`). The agent-led reason only listed names. It now says `X 0.0.3 → 1.0.0, the first release that accepts react 19.2.0`, or `no X release accepts …; 0.0.3 kept with a peer override`. **3. Clean-install gate.** Before delivery, an agent-led draft runs the repo's frozen install (`npm ci --ignore-scripts …`, the manager's equivalent elsewhere) in the fix clone, on the final branch. A failure goes right under the reason (`This branch does not install.`), fails `verification.passed`, and appears as an `Install` row in the terminal summary. Verified runs skip it: the upgrade step already runs the same install, and nothing after it may touch manifests or lockfiles. Tests (fixtures): an unsafe pin refuses without an agent or with `--no-llm`; with an agent it becomes a draft with the pin unchanged and named in the first lines. A failing clean install heads the PR and fails verification. The peer reason names the first accepting release when a later one rejects the target, or says none does. A root-pins unit test covers naming all unsafe pins and leaving them while the safe ones update. Two existing tests updated: the reason wording, and one extra install call. **enki rerun** (same harness, Uptide arm only, claude-sonnet-5-5, $1 cap): the pin refusal is gone. It now stops at a different, pre-existing guard: enki's vitest config writes `test-report.xml` (vitest-sonar-reporter, not gitignored), so `baseline tests modified the working tree`. No draft was delivered and $0 was spent. Checked locally on the same tree, the reasons this PR adds read: toggle 0.0.3 → 1.0.0 and react-leaflet 4.2.1 → 5.0.0 as the first releases accepting react 19.2.0, plus seven `@reach/*`/`@azure/msal-react` overrides left unchanged. The human's merged upgrade made the same choices. The clean-install gate did not run on enki because the run stopped earlier. The baseline-artifact stop is a follow-up. Not done: the agent does not edit the override. `package.json` and lockfiles stay protected from the agent, and changing them would need a reinstall loop. The draft leaves the pin and asks the reviewer to check it. 🤖 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]>
8 tasks done
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.
UPT-78. With an assisting agent,
fixno longer exits 2 on preflight refusals. It continues on UPT-76'sagentFallbackpath (no second path) as an agent-led draft:Nextcommand (extras +--allow-peer), decided before the clone. The peer plan and its companions still apply.updatePins: falseinuptide.ymlstill refuses.check.The reason heads the PR body (
Agent-led draft.) and the terminal summary (Fallback,Feedbackrows: rounds and spend). Agent-led results publish as drafts. Without an agent, with--no-llm, or on a downgrade (newSafetyRefusal),fixstill exits 2.Tests: one per refusal type (with an agent, without one) plus a safety case, in
isolate.test.ts; lock-guard unit case. The existing npm peer-stop test now asserts the no-agent case, because it encoded the old with-agent stop.Not covered: the no-pack
--prmajor stop (NO_PACK_YET), which is a publication policy rather than a planning refusal, and unsafe pin selectors or YAML anchors (still refused). UPT-77's summary (#183) is not merged, so I did not reconcile its refusal list.🤖 Generated with Claude Code