Skip to content

fix(stripe): say what the changelog check covered, never "none affect your code" (UPT-115) - #243

Merged
lucasbraum merged 2 commits into
mainfrom
upt-115-stripe-changelog
Oct 19, 2026
Merged

lucasbraum merged 2 commits into
mainfrom
upt-115-stripe-changelog

Conversation

@lucasbraum

@lucasbraum lucasbraum commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

UPT-115. ADR 0017 found that round 4's dms-saas PR (uptide-bench/AntelopeJS--dms-saas#13) had the clover billing-mode entry in hand and still said "230 API changes, none affect your code". This PR fixes the wording and where that entry is shown, and the two catalog defects the ADR found. Behavior records and omits-property matching are UPT-113, not here.

What the PR body says now

Headline and Behavior cell. They say what was checked, never "none affect your code":

0 of 230 API changes matched your code by field name; 13 breaking changes can't be matched this way between 2025-08-27.basil and 2026-08-26.dahlia.

  • The Behavior cell is ⚠️ whenever that second count isn't 0. Round 4's was ✅.
  • With nothing unmatched and nothing breaking, it reads "0 of 12 API changes matched your code by field name, all additive".
  • "N breaking for surfaces you do not use" is gone. It counted breaking entries on resources the code does use.

A new list in plain view under "Stripe API changelog". It sits below the evidence list, outside the collapsed one:

13 breaking changes to resources you use that field names can't match

Each one changes a default or names no field, parameter or event, so Uptide can't tell whether your code is affected. A new default reaches every call that leaves the parameter out. Read each one against your code.

  • What goes in. A breaking entry on a resource the code uses whose title says "default", or that names no field, parameter or event.
  • Order. New defaults come first, then newest first.
  • What's left collapsed. "Other changes to resources you use (no code evidence)" keeps only the rest.
  • Old reports. It is computed when the body is rendered, from the stored section, so re-rendering an existing report.json gets it with no rerun.

The pack's own section line (on the migration page) changes from "N of M affect your code" to "N of M matched your code by name".

Stripe changelog catalog

The meter bug. entryTouches tagged a resource wherever its name appeared inside a word. "parameter" became meter, "prevent" became event, "surcharge" became charge, and "syntax" became tax. A resource name must now start a word. Plurals still match: "taxes" starts with "tax".

The 80 stale entries. At origin/main, 80 of 972 checked-in touches differed from what entryTouches computes:

  • 47 differed only because the current matcher would add a spurious meter, every one from "parameter".
  • 38 were missing real tags for resources added to the list after the catalog was generated.
  • 5 are in both groups.

Regenerated with pnpm build:stripe-changelog (2026-10-19), then biome format as before:

before after
entries 972 970
releases 142, newest 2026-09-30.preview unchanged
stale touches 80 0
entries tagged meter with no "meter" in title or URL 47 if regenerated unfixed 0
  • Tags added on 38 entries: invoice_item 14, subscription_schedule 9, subscription_item 6, meter 6 (real meter entries), billing_portal 3.
  • Tags removed on 6 entries: event 2 ("Dispute Preventions", "Prevents reusing client secrets"), charge 2 ("surcharge"), tax 2 ("syntax").
  • Stripe removed 2 entries: "Adds support for specifying place of supply scheme on IGIC tax in the EU" (2026-08-26.dahlia) and "Enforces collection of billing address parameters for non-EEA SEPA Direct Debit payments" (2026-09-30.endive). That's why a test's 502 is now 501.
  • Stripe reworded 1 title: "…with more granular fraud reasons" became "…with specific fraud reasons".
  • Nothing new: no new entries and no new API version.
  • New contract test: every checked-in touches must equal entryTouches(entry), so the next matcher change fails until the catalog is regenerated.

Fixtures and tests

fix/__fixtures__/stripe-dms-saas-round-4.json. Round 4's stored Stripe section and apiChanges for dms-saas (basil → dahlia).

  • Why it's rebuilt. The run's report.json wasn't kept, so I rebuilt it from the pre-regeneration catalog and the resources dms-saas 6390f43 calls.
  • How it was checked. Rendered by origin/main, it reproduces PR chore: ignore graphify output and scope graphify scans #13's section exactly: the same 20 entries and group headers, and "Showing 20 of 105 … 85 resource changes and 125 other changelog entries omitted".
  • One caveat. A few neighbouring resource sets render the same section. I used the one that matches the repo's calls.

New report test. It renders round 4 with the new code:

  • Headline and Behavior cell read as quoted above.
  • No "none affect(s) your code" anywhere.
  • "Makes flexible billing mode the default for new subscriptions" is first of the 13 under the new heading, and absent from the collapsed list. So is "Removes postal code for card payments…" (see the field-name change below).

New catalog test. "…unrecognized API parameters" and "Prevents reusing client secrets" tag no resource. "Adds billing meters and meter events" still tags meter and event.

Updated:

  • the apiChangeSummary cases and the verdict/table test;
  • the budget test (breaking entries are now above the collapsed list);
  • the stripe snapshot (4 breaking entries move into the new list);
  • the synthetic budget fixtures (largeStripeReport and the caps test). Their breaking entries now name a field (old_field). They test grouping and caps, and with no field name all 30 would move into the new list. The longer titles let 9 fewer non-breaking lines fit in two budget snapshots.

For review

  • The count covers resources the code uses. "Can't be matched" counts breaking entries on resources the code uses: 13 for dms-saas, of 29 breaking in range. Breaking entries on products the code doesn't call are neither counted nor listed.
  • The new list follows UPT-106's rule. Whole when it fits; otherwise its count, the first 10 (new defaults first) and a pointer to the full list in report.json. It is never dropped and outranks test output. A 40-entry fixture keeps the whole list at a 20k budget, where the passed test log goes, and falls back to the compact form at 16k.
  • Field names come from the title only. URLs and link targets are stripped first. A slug like postal_code_in_card_form_for_non_us_countries named no field and kept that entry out of the new list. Regenerating from the same Stripe source changes touches on 28 entries, nearly all slug noise (cs_add_checkout_session_permissions). Three are breaking: the postal-code one, and two .preview entries no stable upgrade reaches.
  • The list title is a bold line, not a ####. That matches the evidence list above it.

Verification

  • pnpm lint: clean. One warning and one info, both pre-existing and in files this PR doesn't touch.
  • pnpm typecheck: passes.
  • pnpm build: passes.
  • pnpm --filter @uptide/core test: 2310 passed, 32 skipped.
  • pnpm --filter uptide test: 536 passed.

CI was not watched.

🤖 Generated with Claude Code

lucasbraum and others added 2 commits October 18, 2026 17:37
… your code" (UPT-115)

The PR headline and Behavior cell now say how many API changes matched the
code by field name and how many breaking changes can't be matched that way.
Breaking entries that change a default or name no field, parameter or event
get their own list in plain view, a new default first, instead of the
collapsed no-evidence list. Computed at render time, so stored reports get it.

entryTouches matches a resource only at the start of a word: "parameter" no
longer tags meter, "prevent" event, "surcharge" charge, "syntax" tax. The
catalog is regenerated (970 entries, 0 stale touches, was 80) and a contract
test keeps touches equal to entryTouches.

Round 4's dms-saas report is a fixture: the clover billing-mode entry renders
first under the new heading, with an accurate headline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
…ames from titles (UPT-115)

The list of breaking changes no field name can match follows UPT-106's rule
instead of being exempt from the budget: whole when it fits, else its count,
the first 10 with new defaults first, and where the full list is. It ranks
with the other never-dropped lists, above test output.

entryTouches reads field names from the title only, with URLs and link
targets stripped: a slug like postal_code_in_card_form_for_non_us_countries
named no field and kept that entry out of the list. The catalog is
regenerated from the same source; 28 entries lose slug-only field names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
@lucasbraum
lucasbraum merged commit f1c4a89 into main Oct 19, 2026
28 checks passed
@lucasbraum
lucasbraum deleted the upt-115-stripe-changelog branch October 19, 2026 01:01
@uptide-release uptide-release Bot mentioned this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant