Repository navigation
feat(action): the Uptide Action, its OIDC push token and the uptide.run/v1 report - #92
Merged
Merged
Conversation
…un/v1 report
action.yml becomes the Uptide Action (composite): inputs config, mode
(list | check | fix), package, anthropic-api-key and app-url. It builds the
engine of its own pinned commit from that commit's frozen lockfile (install
scripts off, its pnpm off PATH) and drives list, check or fix with the
built CLI, --agent sdk by default.
To push, the job's OIDC token (audience "uptide") is exchanged at
{app-url}/api/action/token for an installation token of the Uptide GitHub
App, masked on arrival and given only to the `uptide pr` process (private
gh config, git extraheader), so Uptide's pull requests run the repository's
CI. maxOpenPrs and maxCost hold across the run.
Each run builds an uptide.run/v1 report from named fields of the engine's
JSON only, checks it against its closed schema and for credential shapes,
writes it to the job summary and posts it to {app-url}/api/action/results
with a fresh OIDC bearer; a failed post is a warning. The schema is owned
by the engine and published as uptide/report and uptide/report/schema.json.
The generated workflow now asks for contents: read and id-token: write.
The earlier Renovate/Dependabot PR checker that lived at action.yml is
removed. UPTIDE_ACTION stays pinned and unreleased until 0.9.0 ships.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016snMocPZAsAfZPPHnQJEb3
Signed-off-by: Claude <[email protected]>
… loadUptideConfig Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
… ESM and in a browser bundle smoke:onboarding now also imports uptide/report and resolves uptide/report/schema.json under Node ESM, and bundles it with uptide/onboarding for the browser: no Node builtin may be reached. Docs say uptide/report is pure, and how to check an OIDC workflow_ref against WORKFLOW_PATH, exported from uptide/onboarding. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
…s missing --agent sdk is the Action's default executor. The frozen install carries the SDK and the platform's Claude Code binary; scripts/action-sdk.mjs proves it after the build, and CI runs the same check on Linux after the same install. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
force-pushed
the
claude/youthful-carson-1zfxfj
branch
from
October 13, 2026 03:33
59fc01b to
12b815d
Compare
…d what the Action applies The generated PR body said results go to Uptide as JSON and that nothing else leaves the runner. It now lists the run report (no source, diffs or environment values) and the OIDC token to Uptide, the npm registry, GitHub, and with the repository's own key Anthropic, where the Agent SDK can read any file in the checkout (the code around each site with executor: patch). It links https://uptide-app.vercel.app/trust. docs/config.md lists only the uptide.yml fields the Action applies; schedule is read when the workflow is written. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
Merged
lucasbraum
added a commit
that referenced
this pull request
Oct 13, 2026
…ly compare (#98) UPT-25. On a repository that does not type-check before the upgrade, `fix` printed `verification failed` with nothing to say the repository was already broken, so it read as Uptide's fault. papermark/papermark @ed19717 has 205 type errors before anything changes. ## What changes - **Baseline health** (`packages/core/src/fix/baseline.ts`), measured from what `fix` already collects before the bump: type errors, test runs that failed or timed out, and TS2307 grouped by where the specifier points (a path alias folder like `@/ee/`, or a package). - **Unhealthy baseline goes first**: one warning line at the top of the terminal summary, and a quote at the top of the PR body and migration page. - **Verdict** - healthy baseline and it passes: `verification passed`, as before - unhealthy baseline and nothing new: `no new errors` - it fails with new type errors: `verification failed: N type errors introduced by the upgrade, M pre-existing` - The Types row reads `(205 pre-existing, 56 introduced by the upgrade)`. - **Gate unchanged**: `passed` and the exit code are computed exactly as before, so it stays strict for healthy baselines. An unhealthy baseline only changes the wording. - **`check`** prints the pre-existing count on the coverage line under each compiled package. - **JSON**: `verification.baselineHealth` = `{ healthy, typeErrors, failingTests, missingModules: [{ under, errors, modules }] }`. The field is optional; stored runs without it are measured from `baseline` and `baselineTests` (`baselineHealthOf`). Files PR #92 touches (`core/src/action`, `fix/publish.ts`, `run-report/*`) are untouched. `publish.ts` still says "verification failed" when it refuses to publish; changing that wording is left for after #92. ## papermark @ed19717, `--no-llm` Run locally on a scratch clone, `uptide fix zod zod-openapi --target 4.6.7 --no-llm` (zod-openapi because check reports it as a peer blocker). Nothing pushed, no PR opened there. Before: ``` uptide fix · zod 3.25.76 → 4.6.7 (requested) · verification failed · 5m 12s Types ❌ 260 errors after the bump → 247 (205 pre-existing) ``` After: ``` uptide fix · zod 3.25.76 → 4.6.7 (requested) · verification failed: 56 type errors introduced by the upgrade, 205 pre-existing · 4m 43s ⚠ this repository does not type-check before the upgrade (205 errors, 129 from missing modules: 108 under @/ee/, 11 under @/lib/, …); verification can only compare, not prove Risk High: manual sites left; unverified sites; behavior changes Changes 57 sites · 6 changed files · 4 auto-fixed · 0 fixed by the agent (LLM) · 53 manual Types ❌ 260 errors after the bump → 247 (205 pre-existing, 56 introduced by the upgrade) Behavior⚠️ 2 schemas identical · 9 not checked · 1 with differences · 0/4 custom-message assertions Tests⚠️ no tests ran: no test script or runner configuration for the repository · lint clean (prettier, eslint) With @chronark/zod-bird 0.3.10 → 1.0.0, zod-openapi 4.2.4 → 5.1.0 Coverage 33 importing files not analyzed (memory cap); findings in them may be missed ``` PR body head: ``` ## Upgrade zod 3.25.76 → 4.6.7 >⚠️ This repository does not type-check before the upgrade (205 errors, 129 from missing modules: 108 under @/ee/, 11 under @/lib/, …); verification can only compare, not prove. ``` `check zod` on the same tree: ``` zod 57 breaking · compiled against 4.6.7: 62 new type errors compiled 275 of 275 files in 1 workspace with the repo's TypeScript 5.9.3 · 509 pre-existing type errors in these files (subtracted) ``` With `--no-llm`, 53 of 57 sites stay manual, so this run still fails on its own errors (56 introduced). It now says so instead of blaming the repository's 205. ## Notes for review - The brief's example said "129 missing modules under @/ee/". Measured: 129 TS2307 errors, 108 under `@/ee/`; the rest are `@/lib/` (11), `@react-email/components` (8) and `@/public/` (2). - The check and fix counts differ (509 vs 205) because their scopes differ. Check compiles only the files that use the package, and never writes to the checkout, so the Prisma client stays ungenerated. Fix generates clients in its clone first. Plain `tsc` on the ungenerated tree reports 1596. Check's line says "in these files" to keep the scope visible. - Failing baseline tests also make a baseline unhealthy. They were already marked `preexisting` and didn't fail the gate; now they show in the headline too. ## Tests `baseline.test.ts` builds healthy, unhealthy and missing-module repositories on disk (a `@/*` path alias and an undeclared package) and measures them with the same `diagnostics` `fix` uses. It covers health, grouping, headline, verdict, the PR body and the Types cell, plus a stored run without the field. The CLI tests cover the warning line and verdict in the fix summary and the check line. The storefront-zod snapshot gains the warning and the split Types cell. `pnpm test`, `pnpm typecheck`, `pnpm lint` and `public:check` all pass. 🤖 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 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 - [#93](#93) [`765de77`](765de77) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide fix <package>` with Anthropic selected runs assisted fixes as one Claude Agent SDK session in the temporary clone, covering the package's manual sites and their rule knowledge, gated once at the end of the session. It is the default when `@anthropic-ai/claude-agent-sdk`, an optional peer that is never bundled, is installed next to Uptide; without it, the patch executor runs and the output says what to install. Use `--agent patch` to opt out; other providers keep the patch executor. See `docs/decisions/0016-agent-sdk-executor.md`. Stripe period helpers accept both endpoint payload shapes, and both executors share the same period knowledge. - [#94](#94) [`5f54bad`](5f54bad) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide/onboarding` loads where it broke: under plain Node ESM, Vitest and Turbopack, and in a browser bundle. It no longer inlines `yaml` (its CommonJS build called `require("process")` inside an ES module); `yaml` is now a dependency of the package. The entry is pure, with no file system and no Node globals: `loadUptideConfig` and `snapshotFromDisk` move to `uptide/onboarding/node` (breaking for code that imported them from `uptide/onboarding`). The command line is unchanged. - [#92](#92) [`b21a911`](b21a911) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Uptide Action: `action.yml` at the root of this repository now runs Uptide in a repository's own GitHub Actions (`mode: list | check | fix`, `package`, `config`, `anthropic-api-key`, `app-url`). It builds the engine of its own pinned commit, migrates with `--agent sdk` by default, and opens draft pull requests with a short-lived installation token of the Uptide GitHub App, obtained for the job's OIDC token, so those pull requests run the repository's CI. Each run writes an `uptide.run/v1` report to the job summary and sends it to the Uptide app; a failed upload is a warning. It replaces the earlier Renovate/Dependabot pull-request checker that lived at the same path; workflows pinned to an earlier commit keep running that one. New `uptide/report` export: the `uptide.run/v1` types, its JSON Schema (also `uptide/report/schema.json`), a validator and the summary renderer. The report holds no source code, diffs, snippets or environment values: paths, line numbers, symbol names and counts only. `uptide init` and the "Add Uptide" pull request now write `permissions: contents: read, id-token: write`; the Action pushes with the Uptide GitHub App's token instead of `GITHUB_TOKEN`. ### Patch Changes - [#96](#96) [`b9c1d71`](b9c1d71) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Assisted fixes group two sites of one file into one task only when their fix is in the same place: the same repository declarations behind each compiler error, or none. Two React 19 `RefObject<T | null>` errors in one file whose prop types live in two components were sent as one task that could edit only the first component, and both stayed manual (a regression in 0.8.0). Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
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
UPT-19. The workflow that
uptide initand the "Add Uptide" PR generate runsuptide-dev/uptide, and this PR makes that the Uptide Action.UPTIDE_ACTIONstays pinned andreleased: false, because a release cannot contain its own tag SHA. The follow-up pins v0.9.0.action.yml(composite). Composite because the Action has to run exactly the engine of the pinned commit. Anode20action would need a bundle committed at every release tag, and this repo commits no build output; Version Packages commits would have to carrydist/.scripts/action-setup.sh) checks for Node 20 or newer.$RUNNER_TEMP, never on PATH, so the customer's package manager and Node stay as their workflow set them up. The engine checks the PATHpnpm/yarnagainst the repo's pin.configuptide.ymlmodechecklist,checkorfixpackageuptide.ymlallowsanthropic-api-keyapp-urlhttps://uptide-app.vercel.appOutput:
report, the path of the run'suptide.run/v1JSON.Auth.
uptide, requested ascore.getIDTokendoes, with no new dependency) goes to{app-url}/api/action/tokenasAuthorization: Bearer <jwt>.{ token, expiresAt }that comes back is masked with::add-mask::before anything else touches the response, even on a refusal. It is renewed when less than 5 minutes remain.uptide pr, which runs git and gh and nothing of the repository's code:ghgets it through a privateGH_CONFIG_DIR(mode 0600, removed afterwards);git pushgets it as anhttp.extraheaderthroughGIT_CONFIG_*, never in argv, a URL or.git/config.app-urlmust be https.Run.
list, thencheck(at most 10 dependencies per run) orfix(--agent sdkby default, or--no-llmwhen the key is missing orllm.enabled: false).maxOpenPrsandmaxCostapply across the whole run, and a package with an open Uptide PR is skipped.fixonly, and the engine already strips it again from installs and tests.fix, or the engine not answering. A migration that does not verify is reported, not a job failure.Report (
uptide.run/v1).core/src/run-report) and published asuptide/report(types, validator, summary renderer; 8.6 KB, no npm packages) anduptide/report/schema.json.assertSafeReportalso rejects credential shapes. It runs before the report is written and again before it is sent.$GITHUB_STEP_SUMMARYand is POSTed to{app-url}/api/action/resultswith a fresh OIDC bearer. A failed POST is a::warning::.Generator. The generated workflow now asks for
contents: readandid-token: write, and the PR body explains the App token. Goldens updated.Removed. The earlier Renovate/Dependabot PR checker:
scripts/action.ts,core/src/action/{detect,github,run},eval-actionand the example workflow.docs/ci.mdis rewritten. Workflows pinned to an older commit keep running the old checker.How it was verified
fetch: audience, bearer, mask ordering, refusals with no token in the message, renewal, https-onlyapp-url;uptide prcredentials;maxOpenPrs, an existing PR, no key, LLM off, thepatchexecutor, verification failure, publish failure, no token, an invalid config, an up-to-date package.FixReport/CheckReportfixtures contains none of their diffs, snippets, compiler messages, test output, commands, the absolute checkout path or a planted env secret. Tampered reports (extra fields, code in a symbol, absolute or..paths, multi-line or backticked errors,ghs_tokens) are rejected.uptide/reportanduptide/onboardingkeep their bundle contents, runtime imports and size budgets..git, as GitHub downloads it):action-setup.sh, thenscripts/action.ts, on the public storefront fixture.check: real breaking sites (zod 28, stripe 4).fixagainst a local mock of GitHub OIDC, the two app endpoints and the pulls API: GET OIDC (audience=uptide, runner bearer), POST token (JWT bearer), GET pulls (installation token), a fresh GET OIDC, then POST results (JWT bearer). The posted body equals the written report.::add-mask::lines.failedwith counts. That is a real result.pnpm lint && pnpm typecheck && pnpm testpass (core 122 files, CLI 39).Not covered: a hosted GitHub run, since the app endpoints are being built in parallel; e2e is out of scope here.
Checklist
pnpm lint && pnpm typecheck && pnpm testpasspnpm changeset)fixrun configured by the repo owner.🤖 Generated with Claude Code
https://claude.ai/code/session_016snMocPZAsAfZPPHnQJEb3
Generated by Claude Code