Repository navigation
feat(fix): verify.build chooses the required build script; say why a build could not start - #137
Merged
Merged
Conversation
… not start Required builds ran the repository's `build`, which often needs a database or secrets: saas-starter-kit's runs `prisma db push` and stops on a missing DATABASE_URL before `next build` starts, reported as a bare "build failed". - uptide.yml `verify.build` (new, optional): the package.json script to run. Unset: build:ci, then build-ci, then build. A named script the repository does not have is a missing build, never another script. Read from the CLI's settings and, in the clone, from the repository's own uptide.yml. - When the build fails before the framework's build starts and its output names an environment variable or an unreachable database, the PR body and the report say so: "build needs DATABASE_URL; set verify.build". - Schema (loader and schema/uptide.v1.json), docs/config.md and the uptide.yml that `uptide init` writes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017jCcVb5eG7CEZjc2FE2aTE Signed-off-by: Claude <[email protected]>
Resolve the report.test.ts conflict by keeping both new tests: the required-build cause wording and the "Left where they are" section from #135. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017jCcVb5eG7CEZjc2FE2aTE Signed-off-by: Claude <[email protected]>
Merged
lucasbraum
added a commit
that referenced
this pull request
Oct 15, 2026
…140) Stripe upgrade descriptions could spend the PR body on hundreds of changelog entries and omit the verification output a reviewer needs. Large site histories could also drop the entire diff block. Fixes https://linear.app/uptide/issue/UPT-59/pr-body-exceeds-githubs-size-limit-on-stripe-upgrades - Keep the 60,000-character body budget, with the documented GitHub 65,536-character limit and 5,536-character margin cited in code. Measure after command expansion, including wrappers and omission notices. - Reserve the summary, representative diffs for every rule group, Decisions for you and Worth a look. Keep verification before additional file/attempt history, changelog lists and transitive details. If required evidence alone cannot fit, refuse rather than silently remove it. - Keep every concrete Stripe evidence entry visible above What changed, outside all details blocks and exempt from every cap. Resource overlap alone is not relevance: put it under “Other changes to resources you use (no code evidence)”, grouped by resource, capped at five per resource and twenty overall, breaking first. One plain line gives exact shown/omitted counts and points to report.json; it stays accurate when the entire resource list yields to the budget. Link Stripe’s full changelog with the API range. Read current lists and legacy stored sections without mutating the report. - Name omitted content and its location. Actions job summaries show verification results; full text stays in report.json. - Add a patch changeset, command documentation and snapshots. Fixtures extend the existing stripe.json: 420 synthetic changelog entries (90 touching used resources, including 24 with code evidence), plus 500 sites across two rule groups in another pack. Tests also cover 1,500 transitive changes, the global entry cap, unchanged small output, intact Markdown, and stored pr-body preview/update. Built on main `9ba005a`, including #137; rebased on origin/main before publication. Commit sign-off matches Lucas Braum <[email protected]>. Validation: - `pnpm lint`: passed (one existing warning and one info in unrelated code). - `pnpm typecheck`: passed, including the core build. - `pnpm --filter @uptide/core exec vitest run src/fix/report-budget.test.ts src/fix/report.test.ts src/fix/budget.test.ts src/fix/pr-body.test.ts src/fix/review-evidence.test.ts src/packs/stripe/stripe.test.ts`: **75 passed**, 6 files. - `pnpm test --continue -- --maxWorkers=4`: completed both packages; **2,100 passed, 7 failed, 31 skipped**. Core: 1,654 passed / 1 failed / 31 skipped. CLI: 446 passed / 6 failed. The seven failures are the local-server tests in core `src/list/registry.test.ts` and CLI `src/list-registry.test.ts`, `src/peer-worker.test.ts`, `src/telemetry/sender.test.ts`: sandbox `listen EPERM 127.0.0.1` errors and resulting timeouts. No remaining renderer or snapshot failures. - Not run: network-enabled tests (the 31 skipped tests), Docker smoke suites, or public-repository pack re-scoring. Used existing local dependencies and repository fixtures; no dependency installation, repository clone or registry fetch was performed for this task. The review regression test failed before the fix. It now proves all 24 evidenced entries appear exactly once, outside every `<details>` and above What changed, at both 60,000 and 16,000 characters. At 16,000 the resource-only entries yield while all evidence, both representative diffs, decisions, warnings and the test log survive. Updated the legacy Stripe and large-fixture snapshots; the small Zod snapshot stays byte-for-byte unchanged. Kept draft until CI is green, including **Pack test**, **smoke (20)** and **smoke (22)** on the new head `55cd4de`. The complete before/after bodies below use the **same 25,000-character stress budget** so both can be pasted into this PR without exceeding GitHub’s limit. Before (main): **24,865** characters; after: **24,644** characters. The after body is also the complete production-budget body. All 24 evidenced changes are now visible above the diffs. Entry names and URLs in these fixture bodies are synthetic test data. <details> <summary>Before — large Stripe fixture, main renderer, 25,000-character budget</summary> ## Upgrade stripe 14.25.0 → 22.6.2 **Review required before merging.** The code was migrated to stripe 22. Types compile; runtime behavior needs review. 24 of 420 API changes affect your code · 90 touch resources you use (30 breaking) between 2024-12-18.acacia and 2026-09-30.clover. | | | |---|---| | **Verified by** | ✅ type-check · build not required (pack-verified migration) · ✅ tests (1 run) | | **Risk** | High: behavior changes | | **Changes** | 4 sites in 1 file · 0 auto-fixed · 4 fixed by the agent (LLM) | | **Types** | ✅ the upgrade broke 4 · Uptide left 0 | | **Behavior** | ⚠️ 24 of 420 API changes affect your code · 90 touch resources you use (30 breaking) | | **Tests** | ✅ 1 workspace passed | ### What changed **1. Stripe API version** · 2 sites · by the agent (LLM) API literals now match the target SDK; types compile, but response and webhook compatibility needs review. <details><summary>Diff and reasoning</summary> ```diff diff --git a/src/billing.ts b/src/billing.ts index 9f1cd8e..a3b1536 100644 --- a/src/billing.ts +++ b/src/billing.ts @@ -6,7 +6,7 @@ function subscriptionPeriodEnd(s: Stripe.Subscription): number { } export const version: Stripe.LatestApiVersion = '2026-08-26.dahlia'; -const stripe = new Stripe('sk_test_fixture', { apiVersion: '2023-10-16' }); +const stripe = new Stripe('sk_test_fixture', { apiVersion: '2026-08-26.dahlia' }); export async function checkout(customer: string) { return stripe.checkout.sessions.create({ ``` - `src/billing.ts` (2) **src/billing.ts:4 · attempt 1 (accepted)** The compiler error is on line 9, column 48: the `apiVersion` literal `'2023-10-16'` is no longer assignable to the new Stripe SDK's required type `'2026-08-26.dahlia'`. The fix is to update the string literal to the target API version `'2026-08-26.dahlia'`. The `subscriptionPeriodEnd` helper already exists in the file (lines 4–6) with the correct multi-item semantics (max of all item `current_period_end` values, returning 0 for empty items), so no changes are needed there. Only the `apiVersion` string literal on line 9 is patched. No casts, no type suppressions, no semantic changes. Diagnostics: 3 → 2. ```diff diff --git a/src/billing.ts b/src/billing.ts index 7cfe01b..9f1cd8e 100644 --- a/src/billing.ts +++ b/src/billing.ts @@ -1,6 +1,11 @@ import Stripe from 'stripe'; -export const version: Stripe.LatestApiVersion = '2023-10-16'; +// same value for single-item subscriptions; max item end for multi-item subscriptions; empty items return 0 +function subscriptionPeriodEnd(s: Stripe.Subscription): number { + return s.items.data.reduce((end, item) => Math.max(end, item.current_period_end), 0); +} + +export const version: Stripe.LatestApiVersion = '2026-08-26.dahlia'; const stripe = new Stripe('sk_test_fixture', { apiVersion: '2023-10-16' }); export async function checkout(customer: string) { ``` **src/billing.ts:3 · attempt 1 (accepted)** The compiler error is straightforward: the string literal '2023-10-16' is no longer assignable to Stripe.LatestApiVersion, which is now '2026-08-26.dahlia'. The fix is to update the literal to match the new LatestApiVersion value. However, the migration guide explicitly warns: "Never update the literal mechanically or cast it to LatestApiVersion merely to compile. Confirm response and request field migrations." The guide also documents a breaking changelog entry (2025-03-31.basil) that removes subscription-level current_period_end/current_period_start and moves them to item level — and evidence shows src/billing.ts lines 18 and 24 access Stripe.Subscription#current_period_end. Those accesses must be migrated alongside the version bump. The guide prescribes a specific deterministic non-throwing helper for current_period_end: function subscriptionPeriodEnd(s: Stripe.Subscription): number { return s.items.data.reduce((end, item) => Math.max(end, item.current_period_end), 0); } with a comment explaining: same value for single-item subscriptions; max item end for multi-item subscriptions; empty items return 0. Since I can only see lines 1, 3, 18, and 24 of billing.ts from the evidence (the enclosing function context only shows lines 1 and 3), I must: 1. Update the version literal on line 3. 2. Insert the subscriptionPeriodEnd helper immediately before line 3 (the enclosing context anchor is lines 1-3, so I insert after the import). 3. Replace the two current_period_end accesses on lines 18 and 24 with calls to the helper. For lines 18 and 24, the snippets are not fully shown, but the evidence tells us `s.current_period_end` (or equivalent) is accessed. I'll apply the helper substitution at those lines. Because the exact surrounding code isn't shown, I'll anchor each hunk to the line numbers given by the evidence and replace `.current_period_end` with `subscriptionPeriodEnd(...)` — but since I don't know the variable name, I must be conservative. The evidence says `Stripe.Subscription#current_period_end` is accessed at lines 18 and 24; the most common pattern is `subscription.current_period_end` or `sub.current_period_end`. Without the full source I cannot safely patch lines 18/24. The guide says "Patch ONLY the current reported site" for the version literal, and the current reported finding is line 3 col 30. The current_period_end sites are listed as evidence for the changelog entry but are not the "current reported site" of the finding. I will therefore patch only line 3 (the reported site) and insert the helper, per the guide's instruction to "Patch ONLY the current reported site." Re-reading: the guide says the helper should be inserted and the evidence sites (18, 24) use it. But the instruction also says "Patch ONLY the current reported site. When adding a helper, insert immediately before the enclosing function shown in the context." The enclosing function context is lines 1-3. The helper insertion is required alongside updating line 3 because the basil changelog removes current_period_end from Subscription — so upgrading the version without fixing those accesses would cause compile errors at 18/24. But those are separate findings. I'll patch line 3 and insert the helper (the guide explicitly tells me to add it), but leave lines 18/24 for their own reported findings since I don't have their source text. Final decision: update line 3 literal + insert the helper after the import block (before line 3). Diagnostics: 4 → 3. </details> **2. Subscription billing period moved to items** · 2 sites · by the agent (LLM) One shared helper takes the item that ends last and returns start and end from that same item (undefined with no items), preserving the single-item values; multi-item and no-item behavior needs your decision. <details><summary>Diff and reasoning</summary> ```diff diff --git a/src/billing.ts b/src/billing.ts index f60fe68..a19c39f 100644 --- a/src/billing.ts +++ b/src/billing.ts @@ -26,7 +26,7 @@ export async function subscription(id: string) { export function webhook(payload: Buffer, signature: string, secret: string) { const event = stripe.webhooks.constructEvent(payload, signature, secret); if (event.type === 'customer.subscription.updated') { - return event.data.object.current_period_end; + return subscriptionPeriodEnd(event.data.object); } return null; } ``` - `src/billing.ts` (2) **src/billing.ts:24 · attempt 1 (accepted)** The Stripe 2025-03-31 (basil) API change moved billing period tracking from the Subscription level to individual SubscriptionItem level, removing `current_period_end` from `Stripe.Subscription`. The guide specifies using a deterministic, non-throwing helper that calls `reduce` over `s.items.data` to find the max `current_period_end` across all items (returning 0 for empty items). The enclosing function context shows the helper `subscriptionPeriodEnd` already exists in the file (lines 4-6). The fix is to replace the direct property access `event.data.object.current_period_end` with a call to the existing `subscriptionPeriodEnd(event.data.object)` helper. Multi-item decision: using `Math.max` across all items' `current_period_end` values ensures correctness for both single-item subscriptions (same result as the old field) and multi-item subscriptions (returns the latest period end). No throws, nulls, or new failure modes are introduced; the existing `return null` branch is preserved unchanged. Diagnostics: 1 → 0. ```diff diff --git a/src/billing.ts b/src/billing.ts index a3b1536..f60fe68 100644 --- a/src/billing.ts +++ b/src/billing.ts @@ -20,7 +20,7 @@ export async function checkout(customer: string) { export async function subscription(id: string) { const subscription = await stripe.subscriptions.retrieve(id); - return subscription.current_period_end; + return subscriptionPeriodEnd(subscription); } export function webhook(payload: Buffer, signature: string, secret: string) { ``` **src/billing.ts:18 · attempt 1 (accepted)** The Stripe API version 2025-03-31.basil removed `current_period_end` from `Stripe.Subscription` and moved billing periods to the item level (`Stripe.SubscriptionItem#current_period_end`). The guide specifies a deterministic, non-throwing helper using `reduce` over `s.items.data` with `Math.max`, returning 0 for empty items. This helper is already present in the enclosing function context (lines 4-6), so I reuse it instead of adding a duplicate. The fix replaces the direct `subscription.current_period_end` access at line 23 with a call to the existing `subscriptionPeriodEnd(subscription)` helper. Multi-item decision: `Math.max` across all items' `current_period_end` values is used, which equals the single value for single-item subscriptions and returns the latest period end for multi-item subscriptions. This is consistent with the guide's prescribed approach. Diagnostics: 2 → 1. </details> ### Worth a look - Runtime behavior was not checked; smoke-test billing and webhook responses against the target API version. ### Decisions for you - Confirm the latest-ending item is the desired billing rule: items ending `[100, 200]` → that item's `{ start, end }`; a single item is unchanged. - Confirm what no items means (Stripe never returns that): the webhook keeps fetching the full subscription, API routes throw "subscription has no items". Check pagination: only returned `items.data` are considered. - Coordinate the API-version rollout with dashboard webhook endpoints and other services. <details><summary>Verification details</summary> Type errors: baseline 0; target 4; after 0; 0 new. Verification: PASS. | Workspace | Baseline tests | Target tests | |---|---|---| | . | missing | passed | **Tests: .** _Test output (passed) left out: this description is at GitHub's size limit._ **Run notes** - SDK 14.25.0 → 22.6.2. API pin 2023-10-16 → 2026-08-26.dahlia. SDK releases pin an API date; the date can also change within a major. - Changing apiVersion can change response shapes and webhook payloads. It is never a mechanical fix. **Stripe API changelog** 24 changes with evidence in your code - 2026-09-30.clover: [subscription change 0: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-0.md) — breaking; Billing — evidence: `src/billing-0.ts:1` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 1: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-1.md) — breaking; Billing — evidence: `src/billing-1.ts:2` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 2: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-2.md) — breaking; Billing — evidence: `src/billing-2.ts:3` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 3: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-3.md) — breaking; Billing — evidence: `src/billing-3.ts:4` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 4: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-4.md) — breaking; Billing — evidence: `src/billing-4.ts:5` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 5: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-5.md) — breaking; Billing — evidence: `src/billing-5.ts:6` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 6: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-6.md) — breaking; Billing — evidence: `src/billing-6.ts:7` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 7: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-7.md) — breaking; Billing — evidence: `src/billing-7.ts:8` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 8: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-8.md) — breaking; Billing — evidence: `src/billing-8.ts:9` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 9: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-9.md) — breaking; Billing — evidence: `src/billing-9.ts:10` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 10: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-10.md) — breaking; Billing — evidence: `src/billing-10.ts:11` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 11: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-11.md) — breaking; Billing — evidence: `src/billing-11.ts:12` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 12: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-12.md) — breaking; Billing — evidence: `src/billing-12.ts:13` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 13: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-13.md) — breaking; Billing — evidence: `src/billing-13.ts:14` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 14: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-14.md) — breaking; Billing — evidence: `src/billing-14.ts:15` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 15: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-15.md) — breaking; Billing — evidence: `src/billing-15.ts:16` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 16: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-16.md) — breaking; Billing — evidence: `src/billing-16.ts:17` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 17: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-17.md) — breaking; Billing — evidence: `src/billing-17.ts:18` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 18: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-18.md) — breaking; Billing — evidence: `src/billing-18.ts:19` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 19: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-19.md) — breaking; Billing — evidence: `src/billing-19.ts:20` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 20: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-20.md) — breaking; Billing — evidence: `src/billing-20.ts:21` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 21: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-21.md) — breaking; Billing — evidence: `src/billing-21.ts:22` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 22: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-22.md) — breaking; Billing — evidence: `src/billing-22.ts:23` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 23: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-23.md) — breaking; Billing — evidence: `src/billing-23.ts:24` (field `Stripe.Subscription#current_period_end`) <details> <summary>66 other changes to resources you use (6 breaking): subscription, customer, invoice</summary> - 2026-09-30.clover: [subscription change 24: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-24.md) — breaking; Billing - 2026-09-30.clover: [customer change 25: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-25.md) — breaking; Billing - 2026-09-30.clover: [invoice change 26: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-26.md) — breaking; Billing - 2026-09-30.clover: [subscription change 27: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-27.md) — breaking; Billing - 2026-09-30.clover: [customer change 28: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-28.md) — breaking; Billing - 2026-09-30.clover: [invoice change 29: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-29.md) — breaking; Billing - 2026-09-30.clover: [subscription change 30: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-30.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 31: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-31.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 32: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-32.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 33: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-33.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 34: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-34.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 35: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-35.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 36: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-36.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 37: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-37.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 38: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-38.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 39: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-39.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 40: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-40.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 41: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-41.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 42: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-42.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 43: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-43.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 44: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-44.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 45: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-45.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 46: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-46.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 47: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-47.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 48: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-48.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 49: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-49.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 50: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-50.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 51: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-51.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 52: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-52.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 53: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-53.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 54: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-54.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 55: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-55.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 56: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-56.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 57: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-57.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 58: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-58.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 59: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-59.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 60: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-60.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 61: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-61.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 62: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-62.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 63: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-63.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 64: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-64.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 65: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-65.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 66: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-66.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 67: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-67.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 68: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-68.md) — non-breaking; Billing - … 21 resource changes omitted. </details> - … 330 other changes omitted. </details> <details><summary>Run details</summary> Uptide version not retained · claude-sonnet-4-6 · 6.5k/2.2k tokens · $0.05 · 1 min Uptide commit: `not retained` Branch: `uptide/stripe-22.6.2` </details> </details> <details> <summary>After — large Stripe fixture, 25,000-character budget (also full production output)</summary> ## Upgrade stripe 14.25.0 → 22.6.2 **Review required before merging.** The code was migrated to stripe 22. Types compile; runtime behavior needs review. 24 of 420 API changes affect your code · 90 touch resources you use (30 breaking) between 2024-12-18.acacia and 2026-09-30.clover. | | | |---|---| | **Verified by** | ✅ type-check · build not required (pack-verified migration) · ✅ tests (1 run) | | **Risk** | High: behavior changes | | **Changes** | 4 sites in 1 file · 0 auto-fixed · 4 fixed by the agent (LLM) | | **Types** | ✅ the upgrade broke 4 · Uptide left 0 | | **Behavior** | ⚠️ 24 of 420 API changes affect your code · 90 touch resources you use (30 breaking) | | **Tests** | ✅ 1 workspace passed | ### Stripe API changelog **24 changes with evidence in your code** - 2026-09-30.clover: [subscription change 0: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-0.md) — breaking; Billing — evidence: `src/billing-0.ts:1` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 1: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-1.md) — breaking; Billing — evidence: `src/billing-1.ts:2` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 2: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-2.md) — breaking; Billing — evidence: `src/billing-2.ts:3` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 3: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-3.md) — breaking; Billing — evidence: `src/billing-3.ts:4` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 4: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-4.md) — breaking; Billing — evidence: `src/billing-4.ts:5` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 5: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-5.md) — breaking; Billing — evidence: `src/billing-5.ts:6` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 6: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-6.md) — breaking; Billing — evidence: `src/billing-6.ts:7` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 7: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-7.md) — breaking; Billing — evidence: `src/billing-7.ts:8` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 8: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-8.md) — breaking; Billing — evidence: `src/billing-8.ts:9` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 9: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-9.md) — breaking; Billing — evidence: `src/billing-9.ts:10` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 10: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-10.md) — breaking; Billing — evidence: `src/billing-10.ts:11` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 11: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-11.md) — breaking; Billing — evidence: `src/billing-11.ts:12` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 12: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-12.md) — breaking; Billing — evidence: `src/billing-12.ts:13` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 13: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-13.md) — breaking; Billing — evidence: `src/billing-13.ts:14` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 14: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-14.md) — breaking; Billing — evidence: `src/billing-14.ts:15` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 15: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-15.md) — breaking; Billing — evidence: `src/billing-15.ts:16` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 16: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-16.md) — breaking; Billing — evidence: `src/billing-16.ts:17` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 17: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-17.md) — breaking; Billing — evidence: `src/billing-17.ts:18` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 18: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-18.md) — breaking; Billing — evidence: `src/billing-18.ts:19` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 19: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-19.md) — breaking; Billing — evidence: `src/billing-19.ts:20` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 20: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-20.md) — breaking; Billing — evidence: `src/billing-20.ts:21` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [subscription change 21: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-21.md) — breaking; Billing — evidence: `src/billing-21.ts:22` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [customer change 22: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-22.md) — breaking; Billing — evidence: `src/billing-22.ts:23` (field `Stripe.Subscription#current_period_end`) - 2026-09-30.clover: [invoice change 23: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-23.md) — breaking; Billing — evidence: `src/billing-23.ts:24` (field `Stripe.Subscription#current_period_end`) [Stripe's changelog](https://docs.stripe.com/changelog), 2024-12-18.acacia → 2026-09-30.clover. <details><summary>Other changes to resources you use (no code evidence)</summary> Showing 15 of 66 other changes to resources you use, grouped by resource; 51 resource changes and 330 other changelog entries omitted. Full list in report.json. **customer · 22 changes (2 breaking)** - 2026-09-30.clover: [customer change 25: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-25.md) — breaking; Billing - 2026-09-30.clover: [customer change 28: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-28.md) — breaking; Billing - 2026-09-30.clover: [customer change 31: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-31.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 34: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-34.md) — non-breaking; Billing - 2026-09-30.clover: [customer change 37: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/customer-37.md) — non-breaking; Billing **invoice · 22 changes (2 breaking)** - 2026-09-30.clover: [invoice change 26: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-26.md) — breaking; Billing - 2026-09-30.clover: [invoice change 29: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-29.md) — breaking; Billing - 2026-09-30.clover: [invoice change 32: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-32.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 35: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-35.md) — non-breaking; Billing - 2026-09-30.clover: [invoice change 38: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/invoice-38.md) — non-breaking; Billing **subscription · 22 changes (2 breaking)** - 2026-09-30.clover: [subscription change 24: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-24.md) — breaking; Billing - 2026-09-30.clover: [subscription change 27: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-27.md) — breaking; Billing - 2026-09-30.clover: [subscription change 30: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-30.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 33: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-33.md) — non-breaking; Billing - 2026-09-30.clover: [subscription change 36: review response compatibility](https://docs.stripe.com/changelog/clover/2026-09-30/subscription-36.md) — non-breaking; Billing </details> ### What changed **1. Stripe API version** · 2 sites · by the agent (LLM) API literals now match the target SDK; types compile, but response and webhook compatibility needs review. <details><summary>Diff and reasoning</summary> ```diff diff --git a/src/billing.ts b/src/billing.ts index 9f1cd8e..a3b1536 100644 --- a/src/billing.ts +++ b/src/billing.ts @@ -6,7 +6,7 @@ function subscriptionPeriodEnd(s: Stripe.Subscription): number { } export const version: Stripe.LatestApiVersion = '2026-08-26.dahlia'; -const stripe = new Stripe('sk_test_fixture', { apiVersion: '2023-10-16' }); +const stripe = new Stripe('sk_test_fixture', { apiVersion: '2026-08-26.dahlia' }); export async function checkout(customer: string) { return stripe.checkout.sessions.create({ ``` - `src/billing.ts` (2) **src/billing.ts:4 · attempt 1 (accepted)** The compiler error is on line 9, column 48: the `apiVersion` literal `'2023-10-16'` is no longer assignable to the new Stripe SDK's required type `'2026-08-26.dahlia'`. The fix is to update the string literal to the target API version `'2026-08-26.dahlia'`. The `subscriptionPeriodEnd` helper already exists in the file (lines 4–6) with the correct multi-item semantics (max of all item `current_period_end` values, returning 0 for empty items), so no changes are needed there. Only the `apiVersion` string literal on line 9 is patched. No casts, no type suppressions, no semantic changes. Diagnostics: 3 → 2. ```diff diff --git a/src/billing.ts b/src/billing.ts index 7cfe01b..9f1cd8e 100644 --- a/src/billing.ts +++ b/src/billing.ts @@ -1,6 +1,11 @@ import Stripe from 'stripe'; -export const version: Stripe.LatestApiVersion = '2023-10-16'; +// same value for single-item subscriptions; max item end for multi-item subscriptions; empty items return 0 +function subscriptionPeriodEnd(s: Stripe.Subscription): number { + return s.items.data.reduce((end, item) => Math.max(end, item.current_period_end), 0); +} + +export const version: Stripe.LatestApiVersion = '2026-08-26.dahlia'; const stripe = new Stripe('sk_test_fixture', { apiVersion: '2023-10-16' }); export async function checkout(customer: string) { ``` **src/billing.ts:3 · attempt 1 (accepted)** The compiler error is straightforward: the string literal '2023-10-16' is no longer assignable to Stripe.LatestApiVersion, which is now '2026-08-26.dahlia'. The fix is to update the literal to match the new LatestApiVersion value. However, the migration guide explicitly warns: "Never update the literal mechanically or cast it to LatestApiVersion merely to compile. Confirm response and request field migrations." The guide also documents a breaking changelog entry (2025-03-31.basil) that removes subscription-level current_period_end/current_period_start and moves them to item level — and evidence shows src/billing.ts lines 18 and 24 access Stripe.Subscription#current_period_end. Those accesses must be migrated alongside the version bump. The guide prescribes a specific deterministic non-throwing helper for current_period_end: function subscriptionPeriodEnd(s: Stripe.Subscription): number { return s.items.data.reduce((end, item) => Math.max(end, item.current_period_end), 0); } with a comment explaining: same value for single-item subscriptions; max item end for multi-item subscriptions; empty items return 0. Since I can only see lines 1, 3, 18, and 24 of billing.ts from the evidence (the enclosing function context only shows lines 1 and 3), I must: 1. Update the version literal on line 3. 2. Insert the subscriptionPeriodEnd helper immediately before line 3 (the enclosing context anchor is lines 1-3, so I insert after the import). 3. Replace the two current_period_end accesses on lines 18 and 24 with calls to the helper. For lines 18 and 24, the snippets are not fully shown, but the evidence tells us `s.current_period_end` (or equivalent) is accessed. I'll apply the helper substitution at those lines. Because the exact surrounding code isn't shown, I'll anchor each hunk to the line numbers given by the evidence and replace `.current_period_end` with `subscriptionPeriodEnd(...)` — but since I don't know the variable name, I must be conservative. The evidence says `Stripe.Subscription#current_period_end` is accessed at lines 18 and 24; the most common pattern is `subscription.current_period_end` or `sub.current_period_end`. Without the full source I cannot safely patch lines 18/24. The guide says "Patch ONLY the current reported site" for the version literal, and the current reported finding is line 3 col 30. The current_period_end sites are listed as evidence for the changelog entry but are not the "current reported site" of the finding. I will therefore patch only line 3 (the reported site) and insert the helper, per the guide's instruction to "Patch ONLY the current reported site." Re-reading: the guide says the helper should be inserted and the evidence sites (18, 24) use it. But the instruction also says "Patch ONLY the current reported site. When adding a helper, insert immediately before the enclosing function shown in the context." The enclosing function context is lines 1-3. The helper insertion is required alongside updating line 3 because the basil changelog removes current_period_end from Subscription — so upgrading the version without fixing those accesses would cause compile errors at 18/24. But those are separate findings. I'll patch line 3 and insert the helper (the guide explicitly tells me to add it), but leave lines 18/24 for their own reported findings since I don't have their source text. Final decision: update line 3 literal + insert the helper after the import block (before line 3). Diagnostics: 4 → 3. </details> **2. Subscription billing period moved to items** · 2 sites · by the agent (LLM) One shared helper takes the item that ends last and returns start and end from that same item (undefined with no items), preserving the single-item values; multi-item and no-item behavior needs your decision. <details><summary>Diff and reasoning</summary> ```diff diff --git a/src/billing.ts b/src/billing.ts index f60fe68..a19c39f 100644 --- a/src/billing.ts +++ b/src/billing.ts @@ -26,7 +26,7 @@ export async function subscription(id: string) { export function webhook(payload: Buffer, signature: string, secret: string) { const event = stripe.webhooks.constructEvent(payload, signature, secret); if (event.type === 'customer.subscription.updated') { - return event.data.object.current_period_end; + return subscriptionPeriodEnd(event.data.object); } return null; } ``` - `src/billing.ts` (2) **src/billing.ts:24 · attempt 1 (accepted)** The Stripe 2025-03-31 (basil) API change moved billing period tracking from the Subscription level to individual SubscriptionItem level, removing `current_period_end` from `Stripe.Subscription`. The guide specifies using a deterministic, non-throwing helper that calls `reduce` over `s.items.data` to find the max `current_period_end` across all items (returning 0 for empty items). The enclosing function context shows the helper `subscriptionPeriodEnd` already exists in the file (lines 4-6). The fix is to replace the direct property access `event.data.object.current_period_end` with a call to the existing `subscriptionPeriodEnd(event.data.object)` helper. Multi-item decision: using `Math.max` across all items' `current_period_end` values ensures correctness for both single-item subscriptions (same result as the old field) and multi-item subscriptions (returns the latest period end). No throws, nulls, or new failure modes are introduced; the existing `return null` branch is preserved unchanged. Diagnostics: 1 → 0. ```diff diff --git a/src/billing.ts b/src/billing.ts index a3b1536..f60fe68 100644 --- a/src/billing.ts +++ b/src/billing.ts @@ -20,7 +20,7 @@ export async function checkout(customer: string) { export async function subscription(id: string) { const subscription = await stripe.subscriptions.retrieve(id); - return subscription.current_period_end; + return subscriptionPeriodEnd(subscription); } export function webhook(payload: Buffer, signature: string, secret: string) { ``` **src/billing.ts:18 · attempt 1 (accepted)** The Stripe API version 2025-03-31.basil removed `current_period_end` from `Stripe.Subscription` and moved billing periods to the item level (`Stripe.SubscriptionItem#current_period_end`). The guide specifies a deterministic, non-throwing helper using `reduce` over `s.items.data` with `Math.max`, returning 0 for empty items. This helper is already present in the enclosing function context (lines 4-6), so I reuse it instead of adding a duplicate. The fix replaces the direct `subscription.current_period_end` access at line 23 with a call to the existing `subscriptionPeriodEnd(subscription)` helper. Multi-item decision: `Math.max` across all items' `current_period_end` values is used, which equals the single value for single-item subscriptions and returns the latest period end for multi-item subscriptions. This is consistent with the guide's prescribed approach. Diagnostics: 2 → 1. </details> ### Worth a look - Runtime behavior was not checked; smoke-test billing and webhook responses against the target API version. ### Decisions for you - Confirm the latest-ending item is the desired billing rule: items ending `[100, 200]` → that item's `{ start, end }`; a single item is unchanged. - Confirm what no items means (Stripe never returns that): the webhook keeps fetching the full subscription, API routes throw "subscription has no items". Check pagination: only returned `items.data` are considered. - Coordinate the API-version rollout with dashboard webhook endpoints and other services. <details><summary>Verification details</summary> Type errors: baseline 0; target 4; after 0; 0 new. Verification: PASS. | Workspace | Baseline tests | Target tests | |---|---|---| | . | missing | passed | **Tests: .** ```text PASS billing scenario 0: invoice and subscription response compatibility verified PASS billing scenario 1: invoice and subscription response compatibility verified PASS billing scenario 2: invoice and subscription response compatibility verified PASS billing scenario 3: invoice and subscription response compatibility verified PASS billing scenario 4: invoice and subscription response compatibility verified PASS billing scenario 5: invoice and subscription response compatibility verified PASS billing scenario 6: invoice and subscription response compatibility verified PASS billing scenario 7: invoice and subscription response compatibility verified PASS billing scenario 8: invoice and subscription response compatibility verified PASS billing scenario 9: invoice and subscription response compatibility verified PASS billing scenario 10: invoice and subscription response compatibility verified PASS billing scenario 11: invoice and subscription response compatibility verified PASS billing scenario 12: invoice and subscription response compatibility verified PASS billing scenario 13: invoice and subscription response compatibility verified PASS billing scenario 14: invoice and subscription response compatibility verified PASS billing scenario 15: invoice and subscription response compatibility verified PASS billing scenario 16: invoice and subscription response compatibility verified PASS billing scenario 17: invoice and subscription response compatibility verified PASS billing scenario 18: invoice and subscription response compatibility verified PASS billing scenario 19: invoice and subscription response compatibility verified PASS billing scenario 20: invoice and subscription response compatibility verified PASS billing scenario 21: invoice and subscription response compatibility verified PASS billing scenario 22: invoice and subscription response compatibility verified PASS billing scenario 23: invoice and subscription response compatibility verified PASS billing scenario 24: invoice and subscription response compatibility verified PASS billing scenario 25: invoice and subscription response compatibility verified PASS billing scenario 26: invoice and subscription response compatibility verified PASS billing scenario 27: invoice and subscription response compatibility verified PASS billing scenario 28: invoice and subscription response compatibility verified PASS billing scenario 29: invoice and subscription response compatibility verified PASS billing scenario 30: invoice and subscription response compatibility verified PASS billing scenario 31: invoice and subscription response compatibility verified PASS billing scenario 32: invoice and subscription response compatibility verified PASS billing scenario 33: invoice and subscription response compatibility verified PASS billing scenario 34: invoice and subscription response compatibility verified PASS billing scenario 35: invoice and subscription response compatibility verified PASS billing scenario 36: invoice and subscription response compatibility verified PASS billing scenario 37: invoice and subscription response compatibility verified PASS billing scenario 38: invoice and subscription response compatibility verified PASS billing scenario 39: invoice and subscription response compatibility verified PASS billing scenario 40: invoice and subscription response compatibility verified PASS billing scenario 41: invoice and subscription response compatibility verified PASS billing scenario 42: invoice and subscription response compatibility verified PASS billing scenario 43: invoice and subscription response compatibility verified PASS billing scenario 44: invoice and subscription response compatibility verified PASS billing scenario 45: invoice and subscription response compatibility verified PASS billing scenario 46: invoice and subscription response compatibility verified PASS billing scenario 47: invoice and subscription response compatibility verified PASS billing scenario 48: invoice and subscription response compatibility verified PASS billing scenario 49: invoice and subscription response compatibility verified PASS billing scenario 50: invoice and subscription response compatibility verified PASS billing scenario 51: invoice and subscription response compatibility verified PASS billing scenario 52: invoice and subscription response compatibility verified PASS billing scenario 53: invoice and subscription response compatibility verified PASS billing scenario 54: in … output truncated; full output is retained in report.json. ``` **Run notes** - SDK 14.25.0 → 22.6.2. API pin 2023-10-16 → 2026-08-26.dahlia. SDK releases pin an API date; the date can also change within a major. - Changing apiVersion can change response shapes and webhook payloads. It is never a mechanical fix. </details> <details><summary>Run details</summary> Uptide version not retained · claude-sonnet-4-6 · 6.5k/2.2k tokens · $0.05 · 1 min Uptide commit: `not retained` Branch: `uptide/stripe-22.6.2` </details> </details> --------- Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
pushed a commit
that referenced
this pull request
Oct 15, 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 - [#134](#134) [`b795705`](b795705) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Packs can name alternate leads: packages a repository declares instead of the pack's own (`react-router-dom` for `react-router`). `check` and `fix` asked for either name use the pack; where only the alternate is declared, the lead is analyzed at the version installed through it, pnpm stores included, and `fix` declares it beside the alternate at the target before upgrading both. - [#149](#149) [`3303118`](3303118) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate express 4 to 5 migration pack. Route strings that path-to-regexp 8 rejects or reads differently are found on calls of an Express app or router (including lists registered in a loop); `req.params` values widened to `string | string[]`, `req.param`, `res.sendfile`, `express.static.mime` and `express.query` are claimed from the compiler; `res.redirect(url, status)`, `app.param(fn)`, `res.redirect('back')` and `res.send(<number>)` are found in the source; runtime defaults (async errors, `req.body`, the query parser, `urlencoded`, dotfiles, Node 18) go to decisions. No rule rewrites. With the pack in use, `check` no longer adds its text-matched express 5 runtime findings. - [#148](#148) [`5143c46`](5143c46) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate joi 17 to 18 migration pack. `new ValidationError(message, {}, original)`, which stops compiling for code written against joi 17.0–17.6, is rewritten to pass `[]`; the Node.js 20 requirement and the top-level domains joi 18 no longer accepts in `email()`, `domain()` and `uri()` are reported as decisions. Scored against two public repositories, one of them a negative control. - [#131](#131) [`413d3da`](413d3da) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a verified lucide-react 0.x to 1.x migration pack. Brand icons removed in 1.x are found at their imports and every use, with a guide whose replacement choice goes to the owner; icon names dropped during 0.x are renamed at the import or member; deep `dist/` imports, untyped icon lookups, the `absoluteStrokeWidth` and `IconNode` deprecations, and the `aria-hidden` default for repositories before 0.489.0 are reported. Lucide's lockstep packages move together and the consumer's build is required. Verified against three public repositories, one of them a negative control. - [#132](#132) [`107c107`](107c107) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a verified React Router 6 → 7 migration pack, which also runs for applications that declare only `react-router-dom`. It moves `react-router-dom` imports to `react-router`. It reports, with a guide for the agent, the rest of the upgrade: the removed `future` prop and router option, `react-router-dom/server`, lowercase `formMethod` comparisons and `json`/`defer` calls (found by syntax where the compiler is blind), the other removed exports, and `generatePath` calls that pass `null` for a required parameter. The six v6 future flags that become defaults are reported as decisions where the repository's router setup has not enabled them. React Router 7 → 8 is a separate upgrade. - [#142](#142) [`9c57934`](9c57934) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` and `fix` plan what the target version requires: a package the target, or anything moving with it, declares as a peer or dependency at a range the installed copy rejects moves to the lowest release of its major that satisfies it (openai 7 moves zod 3.24.2 to 3.25.0), shown apart from release-group companions ("moved because openai 7.4.0 requires zod ^3.25 || ^4.0"). A move only a new major makes is never made: it is reported as a blocker with the exact range in `check`, the PR body and `pack test`. The npm install scope guard no longer lets a declared root dependency change because a moved package peers on it. - [#128](#128) [`06f11ab`](06f11ab) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add verified Sentry JavaScript SDK 10 to 11 migration packs for `@sentry/nextjs` and `@sentry/browser`, with the SDK's lockstep release group, a required build for Next.js, and inventory-scoped decisions for data collection, span streaming, sampling and platform minimums. Mechanical rules move `withSentryConfig` to `@sentry/nextjs/config` and the removed build options under `webpack`, remove `enableLogs`/`enableMetrics: true`, and rename exports, integration names and `httpIntegration` options; privacy, sampling, profiling and OpenTelemetry choices stay assisted and are reported for the owner. Fix `uptide pack new` dropping registry entries long enough to be wrapped. - [#155](#155) [`922c5ab`](922c5ab) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` applies a stricter verified gate: at least five expected breaking sites across the public ground-truth repositories, besides two repositories and no breaking false positive. Upgrades the compiler cannot see are gated on their behavior notes instead. Mechanical rules no real site exercises are recorded as unexercised, and `check` and `fix` run their sites as assisted. `@sentry/browser` and `@sentry/react` become candidates (fewer than five real breaking sites). A pack can lower the minimum only with a written reason in its RESEARCH.md. The README packs table shows each pack's breaking-site count. The output shows the gate's class, site counts and every reason a pack is a candidate. - [#147](#147) [`0b88170`](0b88170) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` and `fix` remove a deprecated `@types` stub instead of upgrading to it. When the release the upgrade would move `@types/<pkg>` to is deprecated on npm, and `<pkg>`'s target declares its own types (`types`, `typings` or a `types` export), the plan removes it: "Removed: @types/ioredis, ioredis 5 ships its own types", in `check` and in the PR body. `check` now diffs such a package against its own target types instead of failing on a stub with no declarations, and `fix` removes the entry in the same install, with the install scope guard allowing exactly that removal. - [#150](#150) [`4c3212b`](4c3212b) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check typescript` judges a TypeScript 5 to 6 upgrade with both compilers: every project of the workspace is compiled with the installed TypeScript and with the target's, and what is new at the target is a finding; the bundled compiler never stands in, and a target without a JavaScript API (TypeScript 7) is reported as not compiled. A candidate typescript 5 to 6 pack reports the tsconfig options 6.0 deprecates where they are set, the rootDir default, module-keyword namespaces and import assertions. A peer that rejects the target (typescript-eslint on TypeScript 6) is now reported as a peer conflict even when it is not grouped with the package. - [#137](#137) [`21894d7`](21894d7) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add `verify.build` to uptide.yml: the package.json script a migration pack's required build runs. Unset, Uptide runs `build:ci`, then `build-ci`, then `build`. When a build fails before the framework's build starts because it needs an environment variable or a database (`prisma db push` without `DATABASE_URL`), the pull request and the report say so ("build needs DATABASE_URL; set verify.build") instead of a bare "build failed". `uptide init` writes the setting as a comment. ### Patch Changes - [#141](#141) [`9debb6d`](9debb6d) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` no longer reports a pre-existing type error as a breaking site when the upgrade only changes its wording, such as a type the message prints in full. An error at the same place with a different reason is still reported. - [#129](#129) [`e796e4c`](e796e4c) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate ioredis 5 to 6 migration pack: client constructions that inherit the RESP3, reconnect and keep-alive defaults ioredis 6 changed, compiler-blind sites (`mode === 'subscriber'`, commands in a `connect` listener with the offline queue off, AUTH recognized by command name), dependents that bundle ioredis 5, instrumentation that stops patching ioredis 6, and Node 20. It is scored against five public upgrades and stays a candidate: none of them has a breaking site to verify it with. - [#139](#139) [`9ba005a`](9ba005a) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Allow local check and fix smoke tests of registered candidate packs with --allow-candidate, with an explicit unverified banner. Reject candidate opt-in in the Action and with publication flags, and prevent stored candidate runs from being published. Label pack-claimed assisted sites by rule id even with --no-llm. - [#157](#157) [`f3af6a1`](f3af6a1) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` no longer reports a blocker for a direct dependency whose plain dependency range rejects the target (`@azure/ai-projects` on `openai ^6`, verdaccio pinning express 4): the package manager gives it its own nested copy, so it is listed as staying, with the new major that would accept the target when there is one. `pack test` counts a `with` move that `check` leaves and explains (a blocker, a new-major stay or a peer conflict) as explained, and one of a package that does not depend on the lead as the repository's choice; neither fails the run. - [#130](#130) [`5ced450`](5ced450) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate openai 4 to 7 migration pack: named path parameters, `del` → `delete`, promoted beta chat helpers, renamed runner events, removed entry points and request-option overloads are rewritten where unambiguous; tool-call unions, `httpAgent`, `fileFromPath` and the other removals get agent guides; `APIError.headers`, Web `Response` bodies and double-encoded path ids are detected even in code typed `any`; Node 22, zod, fetch and client-subclass decisions carry repository evidence. It stays a candidate (the dependency is still checked and fixed as generic) until two engine gaps its ground truth exposed are closed. - [#136](#136) [`578a042`](578a042) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Fold implicit-any errors (TS7006, TS7031, TS7019) inside an option the target removed into the pack finding on that option, as downstream evidence: the callbacks lost the types the option gave them, and the same edit resolves them. They no longer stand as separate breaking sites. - [#143](#143) [`883e587`](883e587) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` scores each expected site at the severity of the rule or behavior note it belongs to, so a missed note that only needs a look, or a decision, no longer counts as a missed break. Behavior-note sites get their own precision and recall in the output and in `verification.json` (`behavior`, with the counts behind each rate), false negatives show their severity, and a rate with nothing to measure prints `n/a` instead of 100%, in `pack test` and in the README's packs table. - [#154](#154) [`7aa3d58`](7aa3d58) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` fails a pack's `verification.json` only when it claims more than the run measures (recorded verified, measured candidate). A pack recorded as candidate on purpose passes, with `recorded candidate by choice; measures verified`, and a record whose numbers differ gets a note instead of a failure. A `generic` ground-truth site now counts as a true positive for the rule that claims it. - [#152](#152) [`ca31aee`](ca31aee) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test` takes several packs: `uptide pack test zod ai`. - [#159](#159) [`1e157fd`](1e157fd) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack test --json` times each ground-truth repository: `timing` gives the fetch, install and check wall time and the process's peak memory. - [#144](#144) [`0881185`](0881185) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Ground truth can name a site for an upgrade that only adds lines inside an existing call, such as an option added to a constructor: the site is the call's start line, so a pack finding there scores as a true positive instead of a false positive. `pnpm packs:truth` drafts these anchors from insert-only hunks for review, and docs/packs.md and CONTRIBUTING describe the rule. - [#156](#156) [`9039e3c`](9039e3c) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Public ground truth now exercises three rules that ran as assisted: zod `error-params`, stripe `api-version-unpinned` and next `stable-cache-exports`. Their rewrites run mechanically again. All three packs stay verified. - [#138](#138) [`0db5640`](0db5640) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Respect repository tsconfig file selection, recursive project references, and workspace project options when checking dependency upgrades. Compiler diagnostics outside every TypeScript project no longer produce breaking findings; pack rules and build-configuration findings retain their own scope. Repositories without a tsconfig retain importer-based compilation, with that fallback stated in the report. Anchor missing members supplied by dependency augmentations at their setup import, retaining affected calls as evidence instead of counting each call as a separate breaking edit. - [#151](#151) [`9ddaaff`](9ddaaff) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Add a candidate redis (node-redis) 4 to 5 and 5 to 6 migration pack, one rule set per major: an upgrade gets the rules of the majors it crosses, so 4 to 6 gets both. 4 to 5 covers `legacyMode`, `commandOptions` and isolation, scan iterators that yield batches, string SCAN cursors, boolean replies that became numbers, enums that became constants, `keepAlive`, `@redis/graph` and internal `dist` imports; 5 to 6 covers the RESP3 client type, `unstableResp3`, and the client defaults 6 changes (RESP3, command timeout, keep-alive delay, maintenance notifications) with a decision per client. Scored against five public upgrades; it stays a candidate until the stricter verified gate lands, since the core 4 to 5 API changes have no real site yet. - [#135](#135) [`42a3b54`](42a3b54) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Move only packages released with the upgraded one. A pack's declared release group now bounds the lead's npm scope, and without one a same-scope package moves only when a pin, a peer or a release at the target relates it to the group. Packages of the scope that are versioned on their own (`@sentry/vite-plugin` 5.x, `@sentry/cli`, the old `@sentry/utils` 8.x) are reported as "stays at X" in `check`, the pull request and `pack test` instead of making `fix` refuse the whole upgrade. Registers the verified `@sentry/react` 10 to 11 pack. - [#146](#146) [`09b8682`](09b8682) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Report Stripe clients pinned to different API versions at the top of `check` and of the PR body, as a decision for the owner: every `new Stripe(...)` in TypeScript and JavaScript sources, scripts included, with the version it speaks after the upgrade (an unpinned client speaks the SDK default). The PR's decisions list, for each client behind the target, the changelog entries it would cross for the resources it calls. No pin is rewritten. - [#140](#140) [`bc428d1`](bc428d1) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Keep migration PR bodies within their size budget while preserving summaries, representative diffs, decisions, review warnings and verification ahead of changelog and transitive detail. Keep every evidenced Stripe change visible and uncapped; group and cap only other changes to used resources, link the full changelog, and identify omitted text in the retained report. - [#145](#145) [`3c8902d`](3c8902d) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The zod pack migrates `ZodError#errors` to `.issues` by rule: reads (`error.errors[0].message`, `error?.errors`) and destructuring (`const { errors } = error` becomes `const { issues: errors } = error`) where the type checker resolves the receiver to `ZodError`, and reads off an untyped catch binding of a zod parse. Writes are left to the agent. - [#127](#127) [`c4ead4f`](c4ead4f) Thanks [@lucasbraum](https://github.com/lucasbraum)! - zod: `check` now reports `ZodError#formErrors` and `#errors` read off an untyped catch binding of a zod `parse`/`parseAsync` (`catch (error: any) { return error.formErrors.fieldErrors }`), which zod 4 removed and the compiler cannot see. Files that only import a schema from the repository's own module (`@/lib/zod`) are covered too. `fix` rewrites `<err>.formErrors.fieldErrors` and `<err>.formErrors.formErrors` to `z.flattenError(<err>)`, importing `z` where it is missing; every other read goes to the agent. 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
Found by the Sentry pack smoke test (#128). A pack's required build ran the repository's
buildscript. Those often need a database or secrets: uptide-demo/saas-starter-kit's isprisma generate && prisma db push && next build. It stops on a missingDATABASE_URLbeforenext buildstarts, and the PR said only "❌ build".verify.buildin uptide.yml (new, optional): the package.json script the required build runs. Unset, Uptide usesbuild:ci, thenbuild-ci, thenbuild, per workspace, else the root's.verify.buildnaming a script the repository does not have is a missing build. It blocks publication and never falls back to another script.fixandverifyfrom the CLI's settings, and in the clone from the repository's own rootuptide.yml, so the Action gets it too.Environment variable not found: X,X is not set) or an unreachable database (P1001,ECONNREFUSED :5432), the result carries acause. A failure after▲ Next.js/vite v…/building for productionis the build's own and gets no cause.❌ build (build needs DATABASE_URL; set verify.build).verify.buildin uptide.yml to a script that builds without it (build-ci)."schema/uptide.v1.json,docs/config.md("Required builds"), and theuptide.ymlthatuptide initwrites (a commentedverify:block; goldens updated).How it was verified
Unit tests (
fix/build.test.ts):uptide.yml;Integration tests:
fix/required-build.test.ts:fixforwardsbuildScriptfrom the option and from the repository'suptide.yml.fix/report.test.ts: the PR-body wording.onboarding/config.test.ts: parsing, rejecting a command (next build) and unknown keys.Real runs of the built CLI on a local clone of uptide-demo/saas-starter-kit (
@sentry/nextjs10.52.0 → 11.7.0, no--pr; theuptide.ymledits were local commits, nothing pushed):(`build-ci` script): `next build` — passed(the repo hasbuild-ci)verify.build: build`prisma generate && prisma db push && next build` — failed: the build needs DATABASE_URL before the framework build started. Set `verify.build` in uptide.yml to a script that builds without it (`build-ci`).verify.build: build-ci(`build-ci` script): `next build` — passedBefore this change, the same repository's run ended "❌ build" with no reason.
pnpm lint(only the pre-existing warning/info),pnpm typecheck,pnpm test: core and CLI pass. The release test failed once after I had enabled corepack shims locally; it passes with them restored.Checklist
pnpm lint && pnpm typecheck && pnpm testpassdocs/config.md, schema, generated uptide.yml)pnpm changeset)🤖 Generated with Claude Code
https://claude.ai/code/session_017jCcVb5eG7CEZjc2FE2aTE
Generated by Claude Code