Repository navigation
Phase 1: generic mode, support tiers, uptide plan - #3
Merged
Merged
Conversation
…dget, one failure is one answer missing Every package report says its tier: verified when a pack covers the upgrade, generic otherwise. In the generic tier a finding is breaking only with evidence (the compiler, the runtime probe, a require() of an ESM-only target, an import of a removed export); the rest is kept as unverified. Dependencies are analyzed in order of likely impact (majors first, then the most imported), a time budget stops new ones from starting, and a dependency or a workspace whose analysis fails is reported as failed instead of failing the run. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…e; tiers, partial results, exit codes No --only: every direct dependency behind its latest version, ranked, within --max-time (default 60s; none with --only). The first screen names each row's tier with a one-line legend, keeps unconfirmed generic findings for --details, folds many no-impact rows into one line, and lists what the budget did not reach and what failed with how to include it. A failed dependency no longer empties the report: the others are shown, and the exit code is 2 only when nothing breaking was found. Snapshots follow in the fixture commit. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…heck report Co-Authored-By: Claude Fable 5.1 <[email protected]>
…er the same verification and gate fix --only <any dependency>: no rule, a guide made of what check found, one site at a time, an edit kept only when the site's compiler error disappears and no new one appears. Only findings with evidence are attempted. The agent stops at --max-cost (default $1 without a pack) and the run says what was not attempted. Without an agent the command refuses before anything changes. The PR opens with a note that no pack covers the package, and the risk is never Low. Co-Authored-By: Claude Fable 5.1 <[email protected]>
… says what it is Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ts and effort Core orders the upgrades from a check report and the peer ranges of installed and target manifests: what touches nothing first (one step), then least work to most, never before a peer it needs; packages whose targets need each other move together; a range nothing satisfies is named as blocked. The CLI renders it in the terminal, as JSON and as a static HTML page. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ers every dependency Co-Authored-By: Claude Fable 5.1 <[email protected]>
…; budget checked between phases vitest 5 imports chai (untyped) and declares @types/chai next to it; the overlay linked chai only, so the ambient Chai namespace was missing and every expect().not in the consumer failed to compile: 166 false findings on a real app, where the real upgrade compiles cleanly. A dependency is also abandoned between phases once the time budget is spent. Generic groups are titled by what the compiler says, and a package with dozens of changes lists its largest ones on the first screen. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ssages name packages, not machine paths Co-Authored-By: Claude Fable 5.1 <[email protected]>
…d to the machine; failures grouped by cause Co-Authored-By: Claude Fable 5.1 <[email protected]>
…lyzed dependency is not shown as clean Co-Authored-By: Claude Fable 5.1 <[email protected]>
…e repository misses is said up front Upgrading one package leaves its peers where the repository has them. The overlay fetched the peer at the version the target asks for, which compiled two copies of the peer's types against each other and reported errors no install produces (seen on a real app). The target is now compiled against the installed peer, and a range it does not meet is a warning under the package on the first screen. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…minor changeset Co-Authored-By: Claude Fable 5.1 <[email protected]>
…entries, target exports and import uses in the agent's context A dependent that has the target as a peer is renamed in pnpm's lockfile when the target moves; the lock guard compared those names literally and refused the upgrade. The guide for a missing import now lists what the target exports, and the agent's context for an import site includes the statements that use the import. Seen on a real app: the first run was refused by the lock guard, the second left the site manual after three guesses, the third migrated it and verified. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…mn; tests for titles and the rule-line cap Co-Authored-By: Claude Fable 5.1 <[email protected]>
…o vary by compiler Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Oct 4, 2026
7 tasks done
lucasbraum
added a commit
that referenced
this pull request
Oct 13, 2026
…109) UPT-19 ## What and why uptide-test/saas-starter-kit PR #3 bumped `next` 15.5.14 → 16.4.0 with no pack and no migration. The type-check passed, so it opened as if verified. Next 16 changes the build config, removes `next lint` and enforces async request APIs, and next-i18next 15 does not support it. Product rule: Uptide never opens a PR for an upgrade it could not analyze. The policy is in one place, `fix/no-pack.ts`, and every path reads it: 1. **A major upgrade with no verified pack never becomes a PR.** - `publicationBlockers`, the gate behind `fix --pr`, `uptide pr` and the Action, refuses it. - `fix --pr` refuses before migrating anything. That includes the CLI's clone-then-publish path (new `forPublication` option), so no agent budget is spent. - The Action skips it before running `fix` and reports `status: "skipped"`, `analysis: "none"`, `error: "no pack yet"`, whatever the slots or budget. A post-run guard covers the case where discovery and the engine disagree. - "Major" means a new major, or a new minor below 1.0.0 (0.4 → 0.5), since semver treats those as breaking. 2. **A minor or patch with no pack needs the repo's own build and tests.** - `fix` now runs the repo's `build` script after the bump for no-pack runs: the workspace's script, else the root's. It is recorded in `verification.build`. - A failing build fails verification. - With no build script, no tests that ran, or tests that already failed before the bump, no PR opens and the reason says which. The Action reports this as `skipped` / `analysis: "none"`. 3. **The PR body always says what verified it.** A new **Verified by** row covers the pack, type-check, build and tests. - A no-pack run shows each check as passed, failed or not run, e.g. `⚠️ no migration pack: nothing analyzed what next 16.4.0 changes · ✅ type-check ·⚠️ build not run: no build script ·⚠️ tests not run: none ran`. - A pack-covered run shows `build not required (pack-verified migration)` with no warning. The warning is only for no-pack runs, where the build is required. - The build command and its result go in the verification details. - A no-pack run is never Low risk any more. Before, a bump-only run with green tests got "types and tests verified". - "Ready for review" now requires that the run is publishable. ## How it was verified - PR #3 reproduced (major, no pack, clean type-check), each asserting that no PR opens: - `action/run.test.ts`: no `fix` call, nothing published, the row is skipped / `none` / `no pack yet`, and the summary renders it. Also covers the post-run guard. - `fix/generic.test.ts`: `--pr` refuses before any change. Without `--pr`, verification passes but `publicationBlockers` and `publishVerified` refuse. - `fix/isolate.test.ts`: the CLI `--pr` path refuses before the agent is called. This test fails without the `forPublication` pass-through. - Minor with no pack: opens when build and tests pass, is refused with no build script or no tests, and fails when the build fails (`generic.test.ts`, `action/run.test.ts`). - `no-pack.test.ts` and `build.test.ts` cover the new modules. - Report snapshots and expectations are updated for the new row, the pack-covered build wording, and the risk change. - Merged with `main` (#103, #107, #108). The conflicts in `publish.ts` and `run-report/build.ts` were independent additions, and both sides are kept. - `pnpm lint && pnpm typecheck && pnpm test` pass after the merge: core 1410, CLI 434. The one lint warning (an unused import in `report.test.ts`) is already on `main`. ## 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/ci.md`, `docs/commands/fix.md`, `docs/concepts.md`, `docs/faq.md`) - [x] Changeset added if a user would notice - [x] No new dependency, or it was agreed in an issue - [x] No private code, names or paths in fixtures, tests or docs - [x] The rules in CONTRIBUTING.md ("Rules that do not bend") still hold 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01BVrNCZBUt1KvChzeqDo7dd --------- Signed-off-by: Claude <[email protected]> Co-authored-by: Claude <[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.
What and why
Phase 1: Uptide answers for every dependency, not two, and says how much it knows about each.
checkwith no--onlyanalyzes every direct dependency that is behind, ranked by likely impact (major upgrades first, then the most imported), within--max-time(default 60 s). What it did not reach is listed with the commands that include it.tier:verified(a migration pack) orgeneric. Terminal, HTML and PR body show it, with one line explaining the difference.require()of an ESM-only target, or an import of a removed export. Everything else isunverified, in--details. The verified tier is unchanged (the storefront numbers are identical to main).--helpand the README.fix.fix --only <any dependency>: the agent alone under the existing loop and publish gate,--max-cost(default $1), a PR note that no pack covers the package. WithoutANTHROPIC_API_KEYit says what it cannot do and exits before any clone, branch or install.uptide plan. Order, target version, peer-range constraints between packages, effort estimate from findings. Implemented in core, rendered in the CLI (text, JSON) and as an HTML page.Decision record:
docs/decisions/0012-generic-tier.md. Changeset: minor.Evaluation
Four repositories: the storefront fixture, and three public TypeScript applications (not libraries) with outdated majors, one per package manager Uptide supports:
ec0ff50478e81280823edDependencies were installed with lifecycle scripts off. Every run below is the default:
uptide check, 60 s budget, on an 18 GB laptop.Every generic-tier breaking finding, and its evidence
Each was checked against a real upgrade in a scratch copy (bump, install, the repository's own
tsc).typescript6 → 7: 114 sites in 2 filests.*members missingversion; the compiler API the two scripts import is gone.@dicebear/core9 → 10:createAvatarno longer exported,Avatar.tsx:2tscafter the real upgrade reports exactly this error at this line, and nothing else new.mobx-react9 → 10: 4 sites in 3 filestscafter the real upgrade reports the same 4 errors at the same 4 lines.react-i18next12 → 17: type too deep to instantiate (TS2589), 1 sitei18next >= 26.2.0needed, 22.5.1 installed).False findings found by this evaluation, fixed before this PR
chai(untyped) and declares@types/chainext to it; the overlay compile linkedchaionly, the ambientChainamespace was missing, and everyexpect().notfailed to compile. The real upgrade compiles with zero new errors. Fixed: the@typescompanion the target declares is linked too. Now: no impact, as in reality.i18next) was fetched at the version the peer range asks for, so two copies of the peer's types met at the call sites. A real install keeps the repository's copy. Fixed: a peer is the consumer's copy; a range it does not meet is a warning under the package.Also found and fixed on the way: the budget was overrun by loading every workspace's program after the deadline (documenso: 3 m 14 s, now 1 m 10 s); compiler messages printed cache paths of the machine (now
[email protected]/lib/version); the pnpm lock guard refused any upgrade of a package that others have as a peer (their lock entries are renamed with the target's version).Outputs and timings
storefront fixture: check (10 s) and plan
umami: check, 62.6 s wall, 4.6 GB peak
With
--max-time 0(every dependency, 2 m 36 s): the same two breaking packages, and 19 upgrades with no impact.umami: plan, 73 s
outline: check, 85.2 s wall, 5.4 GB peak
documenso: check, 70.6 s wall, 7.8 GB peak
umami: generic fix of @dicebear/core (agent, $0.01, 2 m 08 s, verified)
Nothing was pushed and no pull request was opened anywhere; the branch exists only in the local scratch clone. It took three runs to get here, each fixing something in Uptide: the first was refused by the lock guard (the pnpm peer-suffix case above), the second left the site manual after three rejected guesses (the agent saw only the import line), the third had the target's export list and the statements that use the import, and its edit was kept because the compiler error disappeared and no new one appeared. That is all a generic run proves, and its summary says so.
Limits worth knowing before merging
--max-time; one that is running gets half the budget again, then is abandoned at its next phase. On these repositories the default run took 62 to 85 s.mobx-reactin one run andstyled-componentsonly in another), because the order is fixed but timing is not.UPTIDE_WORKER_HEAP_MBoverrides). documenso without this ran out of memory in several workspaces; those are reported as failed with the reason rather than failing the run.pinoin documenso once failed with "Maximum call stack size exceeded". It is reported as a failed dependency; I did not chase it.checkcompiles with the TypeScript bundled in Uptide, not the repository's. For resource-limit diagnostics (TS2589) the reported site can differ; the finding says so.How it was verified
pnpm lint,pnpm typecheck,pnpm test(core 571, CLI 174) andpnpm smoke 22pass;pnpm public:checkis clean.docs/cli.mdare updated; the README's example output is regenerated from the storefront fixture.Note: this branch and #2 (tagline) both touch the README opening and the CLI description; whichever merges second needs a small rebase.
🤖 Generated with Claude Code