Skip to content

fix(report): say "not analyzed" without a pack, move companions with their lead - #104

Merged
lucasbraum merged 1 commit into
mainfrom
claude/happy-edison-jtdl1o
Oct 13, 2026
Merged

lucasbraum merged 1 commit into
mainfrom
claude/happy-edison-jtdl1o

Conversation

@lucasbraum

Copy link
Copy Markdown
Collaborator

UPT-19

What and why

The first check run of the Action on uptide-test/saas-starter-kit surfaced four report problems:

  1. No pack showed up as "0 breaking sites". Prisma 7, Next 16, React 19, Tailwind 4, Sentry 11 and Nodemailer 10 have no pack, and the report read as "nothing breaks". Now, when a package has no pack and nothing is confirmed breaking, the report says not analyzed: no pack yet. This applies in:

    • the job summary
    • the terminal: the row, the folded line and --details
    • the HTML report: the row is classed unverified, and the headline counts these packages
    • the verdict line

    uptide.run/v1 gains an optional analysis: "pack" | "none", which is absent when nothing was analyzed. A package without a pack whose breaks the compiler confirmed still shows its count.

  2. Companions showed as "up to date". react-dom and @types/react showed 18.3.1 → 18.3.1 (patch) up to date while react went to 19. In the Action report, a row that check returns at its installed version now takes the versions from its lead's companion or member plan, and shows moves with react. It is marked available and carries a new optional movesWith. When from == to, the summary prints one version and no kind.

  3. Empty "Breaking sites" heading. The job summary now has a ### Breaking sites section only when there are sites. Sites are listed per package, by path and line only.

  4. Unpinned runner. The generated workflow uses runs-on: ubuntu-24.04, and the goldens are updated.

schema/uptide.run.v1.json is regenerated (both new fields are additive and optional), docs/ci.md describes them, and a changeset is added.

How it was verified

  • New tests:
    • verdict.test.ts: the no-pack summary. Pack and confirmed counts are unchanged.
    • run.test.ts: an Action check run with react plus up-to-date companions, prisma without a pack, and zod with a pack. It checks the rows and the rendered summary.
    • report.test.ts: summary cells for each kind of analysis, no kind when from == to, a companion row, sites by path and line, no section when empty, and schema rejection of bad values.
    • format-check(.details).test.ts and html/render.test.ts: no-pack wording, and folding kept apart from "no impact".
    • generate.test.ts: the pinned runner.
  • pnpm lint && pnpm typecheck && pnpm test pass: core 1376 tests, CLI 433.

Checklist

  • Tests for the change
  • pnpm lint && pnpm typecheck && pnpm test pass
  • README and docs updated if behavior changed (docs/ci.md)
  • Changeset added
  • No new dependency
  • No private code, names or paths in fixtures, tests or docs
  • The rules in CONTRIBUTING.md still hold

🤖 Generated with Claude Code

https://claude.ai/code/session_01Tgjk6zS2tB55GZAbd1hHba


Generated by Claude Code

…their lead

The first check run of the Action on a real repository showed packages
with no migration pack (prisma, next, react, tailwind, sentry, nodemailer)
as "0 breaking sites", which reads as "nothing breaks".

- Without a pack and nothing confirmed breaking, the terminal, the HTML
  report and the job summary say "not analyzed: no pack yet" instead of 0.
  uptide.run/v1 gains an optional `analysis` ("pack" | "none"; absent when
  nothing was analyzed).
- A companion check reports at its installed version (react-dom,
  @types/react with react) takes the versions its lead's plan gives it and
  shows "moves with react" instead of "up to date"; uptide.run/v1 gains an
  optional `movesWith`. No upgrade kind is printed when from == to.
- The job summary lists breaking sites per package by path and line, and
  has no breaking-sites section when there are none.
- The generated workflow runs on ubuntu-24.04 instead of ubuntu-latest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tgjk6zS2tB55GZAbd1hHba
Signed-off-by: Claude <[email protected]>
@lucasbraum
lucasbraum merged commit 8fd120e into main Oct 13, 2026
10 checks passed
@lucasbraum
lucasbraum deleted the claude/happy-edison-jtdl1o branch October 13, 2026 16:29
@uptide-release uptide-release Bot mentioned this pull request Oct 13, 2026
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]>
lucasbraum pushed a commit that referenced this pull request Oct 13, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## [email protected]

### Minor Changes

- [#108](#108)
[`38dcd4b`](38dcd4b)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Uptide Action
now requires the Anthropic API key. Without `anthropic-api-key` (or with
it
empty), in any mode, it stops before doing anything: the job summary
says to add the
repository secret `ANTHROPIC_API_KEY` (Settings → Secrets and variables
→ Actions), the run
report has no upgrades and an error starting with `LLM_KEY_MISSING`, and
the job fails.
`uptide.run/v1` gains `llmKey` (`present` or `missing`; never the key).
`uptide init` no longer
writes `llm.enabled`, and refuses an existing `uptide.yml` that sets it
to `false`, which the
  Action rejects. The CLI on your own machine still runs without a key.

- [#101](#101)
[`8452329`](8452329)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - `list`, `check`,
`fix`, `plan` and the Action never target a release younger than the
repository's release-age policy: npm `min-release-age` (`.npmrc`), pnpm
`minimumReleaseAge`
with `minimumReleaseAgeExclude` (`pnpm-workspace.yaml`), or Yarn
`npmMinimalAgeGate` with
`npmPreapprovedPackages` (`.yarnrc.yml`). When none is set, the default
of the pinned package
manager version applies (pnpm 11 and 12, Yarn 4.15 and later: one day),
labelled as such.
When the newest release is too young, the newest one old enough is the
target and the output
says why (`4.6.7 is 2 days old; your policy is 7 days (min-release-age
in .npmrc); targeting
4.6.5`). When nothing newer than the installed version qualifies, the
package is skipped with
that reason, shown as `status: skipped` in `uptide.run/v1` and in the
HTML list report.
Companions and peers follow the same policy. `minReleaseAgeDays` in
`uptide.yml` applies when
the repository sets no policy itself. See `docs/config.md#release-age`.

### Patch Changes

- [#107](#107)
[`008f84a`](008f84a)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Action's
commits are authored by the Uptide App's own bot account,
`<app slug>[bot] <<bot user id>+<app
slug>[bot]@users.noreply.github.com>`, resolved with the
installation token, so GitHub links them to the App. When it cannot be
resolved they keep
  `uptide[bot] <[email protected]>` and the job log warns.

- [#107](#107)
[`008f84a`](008f84a)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide.run/v1`
gains `verification.baselineHealth`: the repository before the upgrade
in
counts only (type errors, failing test runs, and missing-module errors
under its own paths and
in packages), so the dashboard can tell a run that could only compare
from one that proved.
No module or alias name leaves the fix report. Optional; absent in older
reports.

- [#107](#107)
[`008f84a`](008f84a)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` analyzes
a package's companions at the versions its upgrade moves them to, even
when
nothing imports them or they only carry types: `check react` in a Next
app used to report
`react-dom` and `@types/react` on their own at their installed versions,
while `react` moved
to 19. They are now members of `react`'s group, linked into the compile
at 19, and the
  Action's job summary shows each one moving with `react`.

- [#102](#102)
[`78f1f7a`](78f1f7a)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide init`
writes a workflow that runs the released Uptide Action,
`uptide-dev/uptide@2045c7d # v0.9.0`,
and no longer notes that the action is not released yet.

- [#100](#100)
[`53f9f7d`](53f9f7d)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - `fix` reads pnpm
lockfiles that install a package once per version of the upgraded one
(`x@1([email protected])` next to `x@1([email protected])`) instead of failing with
"Map keys must be unique". Variants that differ only by that version are
compared as one entry; variants that differ in anything else are still
checked one by one.

- [#107](#107)
[`008f84a`](008f84a)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - When Uptide
refuses to publish a migration that did not verify, it words the reason
as the
run's verdict does: `1 type error introduced by the upgrade, 2
pre-existing` instead of
`1 new type error`, and a test run that was already failing before the
upgrade is named as
  such instead of as a failure of the migration.

- [#104](#104)
[`8fd120e`](8fd120e)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Reports no longer
show a breaking count of 0 for a package without a migration pack: the
terminal, the HTML report and the Action's job summary say `not
analyzed: no pack yet`
instead, and `uptide.run/v1` gains `analysis` (`pack` or `none`, absent
when nothing was
analyzed). A companion that `check` reports at its installed version
(`react-dom` or
`@types/react` with `react`) shows the versions it moves to and `moves
with react`, carried as
`movesWith`, instead of `up to date`; no upgrade kind is printed when
nothing moves. The job
summary lists breaking sites per package by path and line, and has no
breaking-sites section
when there are none. The generated workflow runs on `ubuntu-24.04`
instead of `ubuntu-latest`.

- [#107](#107)
[`008f84a`](008f84a)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Reports say what
the upgrade broke and what the migration left. `uptide.run/v1` gains
`verification.typecheck.afterUpgrade`, the type errors right after the
version bump and before
any fix, next to `before` and `after` (optional; absent in older
reports). The job summary
prints `types 0 → 4 with the upgrade → 0 after Uptide`, and the pull
request body and the
  terminal say `the upgrade broke 4 · Uptide left 0`.

Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants