Skip to content

Merge to private-preview - #2028

Merged
zacchua-stripe merged 3 commits into
private-previewfrom
zacchua/merge-ruby-private-preview
Nov 10, 2026
Merged

zacchua-stripe merged 3 commits into
private-previewfrom
zacchua/merge-ruby-private-preview

Conversation

@zacchua-stripe

Copy link
Copy Markdown
Contributor

Why?

What?

See Also

Configuration

  • skip-changefile: This PR is not a user-facing change, so there's no changefile.

orrc and others added 3 commits November 9, 2026 18:33
#1995)

* Add error messages to help users debug signature verification failures.

The stripe-signature header may now include additional metadata about
the event destination and the event being sent. These can help narrow
down the reason why signature verification failed.

No changes are made to the verification process; this just updates how
error messages are generated, if the metadata is present in the header.

* Fix typos.

* Guard against malformed key-value pairs in signature header.
…2022)

* Fix account scoping on Event#fetch_related_object

A directly-retrieved Event#fetch_related_object fell back to the
retrieving client's own stripe_account instead of the event's own
context, because _request's combine_opts merge re-applied the Event's
retained @opts. EventNotification already avoids this by scoping its
@client to the notification's context at construction time; Event now
does the equivalent by routing _request through a context-scoped,
account-free requestor.

Fixes RUN_DEVSDK-3694 (ruby portion).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Committed-By-Agent: claude

* Add PR URL to event-context-scoping changefile

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Committed-By-Agent: claude

* Update 2026-11-06_jar_fix-event-context-scoping.change.md

* Update 2026-11-06_jar_fix-event-context-scoping.change.md

* Move Event context-scoping into a hand-maintained EventBase

Event is generated from the OpenAPI spec, so the scoped_requestor/
_request override from the previous commit lived in a generated file
with no durable home across regeneration. sdk-codegen (stripe/sdk-codegen#4349)
now generates `Event < EventBase` instead of `Event < APIResource`;
EventBase is a new hand-maintained class, autoloaded the same way as
EventNotification, that carries the scoping logic verbatim. Regenerated
via `just gen ruby --repo <this worktree>`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Committed-By-Agent: claude

* Fix retained api_key/stripe_version loss in EventBase#_request, declare EventBase RBI

EventBase#_request skipped RequestOptions.combine_opts(@opts, req_opts)
entirely, so a retained per-object api_key or stripe_version override
(e.g. from events.retrieve(id, api_key: 'rk_restricted')) was silently
dropped on fetch_related_object, falling back to the ambient
requestor's default. Restores the merge, with @opts's own
stripe_account/stripe_context forced to the safe values first so a
stale account can't leak back in through it.

Also ships a hand-maintained rbi/stripe/resources/v2/core/event_base.rbi,
mirroring event_notification.rbi, since EventBase is referenced as
Event's superclass in the generated RBI but was otherwise undeclared
anywhere in the packaged gem.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Committed-By-Agent: claude

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts:
#	stripe.gemspec
@zacchua-stripe
zacchua-stripe requested a review from a team as a code owner November 10, 2026 18:46
@zacchua-stripe
zacchua-stripe requested review from jar-stripe and removed request for a team November 10, 2026 18:46
@zacchua-stripe
zacchua-stripe merged commit 0f8d02f into private-preview Nov 10, 2026
18 checks passed
@zacchua-stripe
zacchua-stripe deleted the zacchua/merge-ruby-private-preview branch November 10, 2026 18:54
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.

4 participants