Repository navigation
feat(action): require the Anthropic API key - #108
Merged
Merged
Conversation
The Action checks anthropic-api-key before anything else, in every mode. Missing or empty: no engine build, no config read, no list/check/fix, no push token. The job summary says to add the ANTHROPIC_API_KEY secret (Settings → Secrets and variables → Actions), the report carries no upgrades and an error starting with LLM_KEY_MISSING, and the job fails. uptide.run/v1 gains an optional top-level llmKey: present | missing, never the key. uptide init no longer writes llm.enabled and refuses an existing uptide.yml that sets it to false; the schema still accepts the field, and the Action rejects false with a clear message. The local CLI is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RkdTEYv6CbvC97qNzAMyBz Signed-off-by: Claude <[email protected]>
Keeps main's commit identity for engine runs and passes the required key to uptide fix alone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RkdTEYv6CbvC97qNzAMyBz Signed-off-by: Claude <[email protected]>
Merged
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>
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.
UPT-19
What and why
Product decision: Uptide without the LLM gives worse results, and no run is better than a poor one. So the Action now requires the Anthropic key.
packages/core/src/action/run.ts,scripts/action.ts,action.yml,scripts/action-setup.sh):anthropic-api-keyis checked first, in every mode (and for an invalid mode). If it is missing, empty or only whitespace, the run doesn't build the engine, readuptide.yml, list, check, fix or ask for a push token. It writes a job summary that says exactly what to add and where (Settings → Secrets and variables → Actions →ANTHROPIC_API_KEY, passed asanthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}). It posts a report with no upgrades and anerrorthat starts withLLM_KEY_MISSING, then exits non-zero. With a key,fixalways runs assisted (--llm);--no-llmis gone from the Action.uptide.run/v1: adds an optional top-levelllmKey: "present" | "missing". It is never the key or any part of it. Old reports still validate.schema/uptide.run.v1.jsonis regenerated.uptide.yml: the generator no longer writesllm.enabled, always passes the secret in the workflow, and drops "Turn the LLM off" from the "Add Uptide" PR body. The schema still acceptsenabledso old files load. The Action rejectsfalsewith a message saying to remove it.uptide init/ onboarding refuses an existing file that setsfalse(new refusal reasonllm-disabled). A provider other thananthropicis also an error in the Action now, instead of a silent rule-based run.uptide checkanduptide fixstill run without a key, andllm.enabled/--no-llmstill work locally. Only theuptide init"Next" text changed.docs/ci.mdhas a new "The Anthropic key is required" section and documentsllmKey.docs/config.mdanddocs/commands/init.mdno longer mentionllm.enabled.How it was verified
run.test.ts:llmKey: missing,LLM_KEY_MISSING, a safe report, and a summary with the Settings path;llmKey: present, and no part of the key appears in the report;llm.enabled: falseis rejected before anything runs;fixis always--llm, with the key passed tofixalone.report.test.ts:llmKeyis validated and optional, and the missing-key summary is rendered.generate.test.tsandinit.test.ts: the workflow always passes the key,uptide.ymlhas noenabled, an existingenabled: falseis refused, andenabled: truestill generates. Golden files are updated.uptide fixhonoursllm.enabled: falselocally still passes.pnpm lint && pnpm typecheck && pnpm testpass: core 1383 passed / 32 skipped, CLI 434 passed. The one lint warning is also onmain.Checklist
pnpm lint && pnpm typecheck && pnpm testpass.changeset/anthropic-key-required.md, minor)🤖 Generated with Claude Code
https://claude.ai/code/session_01RkdTEYv6CbvC97qNzAMyBz
Generated by Claude Code