Repository navigation
New tagline: Migrations you can merge. - #2
Merged
Merged
Conversation
The README opens with it and the one-sentence pitch; the CLI help and both package descriptions follow. Renovate and Dependabot stay as tools Uptide works alongside, named once in the README. Co-Authored-By: Claude Fable 5.1 <[email protected]>
7 tasks done
lucasbraum
added a commit
that referenced
this pull request
Oct 13, 2026
…mp; the App's bot as commit author (#107) UPT-19 ## What and why The rest of the engine work behind the first Action run on uptide-test/saas-starter-kit. There is one commit per item; each can be reviewed on its own. ### 1. Companions analyzed at the versions their lead gives them (`fix(check)`) **Cause.** No later companion plan overrode react-dom. The plan was correct: react moved `react-dom` and `@types/react` to 19. The bug was in how `check` builds the lead's group for each workspace. It built the group only from the workspace's *analyzable* packages, and that list leaves out `@types/*` and anything the workspace never imports. In a Next app, `react-dom` is never imported and `@types/react` is types-only, so both fell out of react's group before analysis. Each then hit the "type-only / never imported, skipped" early return, which reports the **installed** version as the target. That produced `18.3.1 → 18.3.1, up to date`. #104 fixed only how this was shown, not the cause. Reproduced locally on boxyhq/saas-starter-kit @abc9b68 (`npm ci --ignore-scripts`). I ran the same `check` the Action makes, with the first 10 used packages from `uptide list` (next, next-i18next, @prisma/client, react, svix, zod, stripe, react-i18next, @sentry/nextjs, nodemailer): | | before | after | | --- | --- | --- | | `react` | `18.3.1 → 19.3.0`; react-dom and @types/react only in `companions` | `18.3.1 → 19.3.0`, members `@types/react 18.3.13 → 19.3.0`, `react-dom 18.3.1 → 19.3.0` | | `react-dom` | own row, `18.3.1 → 18.3.1 not-imported` | no own row: analyzed in react's group | | `@types/react` | own row, `18.3.13 → 18.3.13 not-imported` | no own row: analyzed in react's group | | `nodemailer` | `@types/nodemailer` in `companions` only | members `nodemailer`, `@types/nodemailer 7.0.4 → 8.0.2` | **Fix.** - A lead's companions join its group whether or not the workspace imports them, and they are no longer skipped on their own. - In `checkGroup`, a companion with no usages of its own is linked into the target overlay, and the baseline, at the version the plan gives it. That is the install `fix` makes. It is also listed in the report's `members`. - A types package that the lead is typed through (`@types/react` for `react`) is linked once, as the lead's declarations. Linking it twice failed with `EEXIST` on the real repo. - The Action gives a companion analyzed this way its own row, `moves with react`, as #104 does for the old shape. ### 2. `verification.typecheck.afterUpgrade` (`feat(report)`) These are the errors right after the version bump and before any fix: the `verification.target` that `fix` already records. - `uptide.run/v1` and `schema/uptide.run.v1.json`: optional and additive, next to `before` and `after`. - Job summary: `types 0 → 4 with the upgrade → 0 after Uptide`. - PR body and terminal: `✅ the upgrade broke 4 · Uptide left 0`. When the baseline had errors, it adds `(1 pre-existing, not counted)`. "Broke" counts errors after the bump that the baseline did not have. The bump moves no source line, so they compare as they are. - README and `docs/commands/fix.md` examples are updated to the new line. ### 3. Commits authored by the App's own bot (`fix(action)`) The Action resolves the bot with the installation token: - The slug comes from the token-exchange answer (`appSlug`, read when present). Otherwise the Action tries `GET /app` with the installation token, if GitHub answers it. - The id comes from `GET /users/<slug>[bot]`, which must answer with that exact login. Commits in `fix` and in `uptide pr` are authored and committed as `<slug>[bot] <<id>+<slug>[bot]@users.noreply.github.com>`. If the identity cannot be resolved, they keep `uptide[bot] <[email protected]>` and the job log gets a `::warning`. The token never appears in a URL or message. `docs/ci.md` describes this. **Needs the app side:** GitHub documents `GET /app` as JWT-only, so the reliable source is the Uptide app adding `appSlug` to its `/api/action/token` answer. Until it does, expect the fallback and its warning. ### 4. `verification.baselineHealth` in `uptide.run/v1` (`feat(report)`) Counts only: `typeErrors`, `failingTests`, `missingModules { local, packages }`. These are the TS2307 errors among the baseline's errors, split between the repository's own paths (relative imports, path aliases) and packages. No specifier or alias group name leaves the fix report, and a test checks that. The field is optional, and the schema is regenerated. The `uptide/report` declarations embed the schema as a literal type, so items 2 and 4 together pushed `index.d.ts` to 17.3 KB. Its budget in `libs-export.test.ts` goes from 16 KB to 20 KB; the JS budget is unchanged at 9.8 of 24 KB. ### 5. Refusal wording (`fix(publish)`) `publicationBlockers` now uses #98's words: `1 type error introduced by the upgrade, 2 pre-existing` instead of `1 new type error`. A test run that was already failing before the upgrade is named `tests in X already failing before the upgrade`. Before, it was listed as a failure of the migration. ### Sample job summary: a stripe fix run Rendered by `renderSummary` from the stripe fix fixture in this repo (`packages/core/src/fix/__fixtures__/stripe.json`: 0 errors before, 4 after the bump, 0 after), with the versions set to 17.7.0 → 23.0.0: ```markdown | Package | Upgrade | Status | Breaking sites | Verification | Pull request | LLM cost | | --- | --- | --- | --- | --- | --- | --- | | `stripe` | 17.7.0 → 23.0.0 (major) | fixed | 4 | types 0 → 4 with the upgrade → 0 after Uptide, lint 0 → 0, no tests | [#2](https://github.com/acme/saas/pull/2) | $0.05 | ``` ## How it was verified - **Item 1:** `check/companion-group.test.ts` is a synthetic `ui` / `ui-dom` / `@types/ui` repo shaped like react. It checks one report with all three members at 2.0.0, `[email protected]` fetched into the overlay, and `@types/[email protected]` fetched once. It fails on main and passes here. The real-repo before and after are in the table above. `action/run.test.ts` checks companion rows when `check` returns only the lead. - **Item 2:** `run-report/report.test.ts` covers the new field, the summary wording, a report without the field, and schema rejection of a negative value. The PR-body snapshots and terminal tests are updated. - **Item 3:** `action/github.test.ts` covers the slug from the exchange, the `GET /app` fallback on a GHE API URL, and undefined for: no slug, a malformed slug, 404, network down, another login, a non-integer id. `oidc.test.ts` covers `appSlug` from the exchange and `engineEnv` / `publishEnv` with an identity. `run.test.ts` checks the bot passed to `fix` and `pr`, and the fallback with its warning. - **Item 4:** `report.test.ts` checks the counts, that no module or alias name appears, and that older reports still validate. - **Item 5:** `publish.test.ts` covers an unhealthy baseline with one new and one pre-existing failing run. - `pnpm lint && pnpm typecheck && pnpm test` pass: core 1387 passed (32 skipped), CLI 433 passed. Lint shows one warning, an unused import in `fix/report.test.ts` that is already on main. `scripts/public-tree.mjs` and `scripts/check-links.mjs` are clean. `scripts/private-material.mjs` needs the `UPTIDE_PRIVATE_DENYLIST` secret, so it runs in CI. ## 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 (`README.md`, `docs/ci.md`, `docs/commands/fix.md`) - [x] Changeset added if a user would notice (one per item) - [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_01RniwUAvitpghJF4MuodRZz --- _Generated by [Claude Code](https://claude.ai/code/session_01RniwUAvitpghJF4MuodRZz)_ --------- 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
The tagline is now Migrations you can merge. The previous one framed Uptide through another tool; it is removed everywhere.
packages/cli/package.jsondescription: the same sentence. npm shows it from the next release; nothing is published by this pull request.uptide --help) and the rootpackage.jsondescription: the tagline.PR description templates and the HTML report never carried the old tagline; a search for "Renovate updates" finds only the test that forbids it.
How it was verified
packages/cli/src/readme.test.tspins the first three lines of the README, the pitch sentence in the README and in the package description, and that Renovate is named exactly once.pnpm lint,pnpm typecheck,pnpm testpass (core 547, CLI 163);pnpm public:checkis clean.A changeset (patch) is included.
🤖 Generated with Claude Code