Skip to content

Add option to suppress Stripe notices - #2293

Merged
zacchua-stripe merged 6 commits into
masterfrom
zacchua/suppress-stripe-notices
Sep 17, 2026
Merged

zacchua-stripe merged 6 commits into
masterfrom
zacchua/suppress-stripe-notices

Conversation

@zacchua-stripe

@zacchua-stripe zacchua-stripe commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Why?

Stripe notices can be returned for human requests in test and sandbox environments. SDKs currently emit every notice without providing a way to suppress them, which can create repeated warning output.

What?

  • Support STRIPE_SUPPRESS_NOTICES=true for suppressing notices in non-agent environments.
  • Keep notices enabled by default.
  • Continue emitting notices for AI agents.
  • Tell human users about the environment variable when emitting a notice.
  • Add tests covering enabled, disabled, invalid, and AI-agent cases.

See Also

http://go/j/RUN_DEVSDK-2882

Configuration

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

zacchua-stripe and others added 2 commits September 15, 2026 13:45
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@zacchua-stripe
zacchua-stripe marked this pull request as ready for review September 15, 2026 20:52
@zacchua-stripe
zacchua-stripe requested a review from a team as a code owner September 15, 2026 20:52
@zacchua-stripe
zacchua-stripe requested review from jar-stripe and removed request for a team September 15, 2026 20:52
zacchua-stripe and others added 2 commits September 15, 2026 13:54
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@zacchua-stripe
zacchua-stripe enabled auto-merge (squash) September 17, 2026 00:12
@zacchua-stripe
zacchua-stripe merged commit 9585f4f into master Sep 17, 2026
19 checks passed
@zacchua-stripe
zacchua-stripe deleted the zacchua/suppress-stripe-notices branch September 17, 2026 18:33
jar-stripe added a commit that referenced this pull request Sep 23, 2026
* Fix event handler account scoping (#2294)

* Fix event handler account scoping

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Add PR URL to changefile

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

---------

Co-authored-by: codex <noreply@openai.com>

* Add option to suppress Stripe notices (#2293)

* Add option to suppress Stripe notices

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Add changelog entry for notice suppression

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Make Stripe notice integration test environment-independent

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Clarify Stripe notice suppression instructions

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

---------

Co-authored-by: codex <noreply@openai.com>

* Document Stripe notice suppression (#2297)

Committed-By-Agent: goose
Orbit-Session-Id: d60d503e-7c8a-4aa0-89d1-37cc435afc02

---------

Co-authored-by: zacchua-stripe <zacchua@stripe.com>
Co-authored-by: codex <noreply@openai.com>
Co-authored-by: jar-stripe <jar@stripe.com>
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
jar-stripe added a commit that referenced this pull request Sep 28, 2026
* Add discriminated union serialization tests (#2260)

* Add discriminated union serialization tests

Tests both request-side (params → map) and response-side (JSON → object)
serialization for discriminated unions, covering standalone and inline
variants.

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

* Add null assertions for non-selected DU variants

Assert that when one variant is selected, the other variant fields/structs
remain null in both serialization and deserialization tests.

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

* Fix response standalone DU test to use proper class hierarchy

Restructure the response-side test fixtures from a flat TestColorEntity
class (holding all variant fields) to a proper class hierarchy:
TestColorEntity (base) -> TestRgbColorEntity / TestHsvColorEntity.

Add a TestColorTypeAdapterFactory that dispatches deserialization to the
correct subclass based on the `model` discriminator field, mirroring how
the codegen will emit TypeAdapterFactory-based dispatch for real DUs.

Update assertions to use instanceof checks and typed casts rather than
checking for null fields on a flat class. Add a second test covering the
HSV variant path.

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

* fixed formatting

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Carry private-preview's CI workflow hunks on master (#2283)

private-preview's ci.yml differs from master's by exactly two additive
hunks: `private-preview` in `on.push.branches`, and a `base:` input on the
stripe-mock step mapping every private-preview context onto the beta spec.

Because those hunks live only on private-preview, every merge of master into
private-preview yields a ci.yml matching neither parent. GitHub refuses a
push from a GitHub App lacking `workflows` permission when it introduces a
workflow blob that does not already exist in the repository, so the codegen
job's push is rejected and a human has to perform the merge by hand. Holding
the hunks on master too means both sides of the merge carry the same change,
the merge result is byte-identical to master's blob, and the App only ever
carries an already-committed file forward.

Both hunks are no-ops on master:

- For a push event the workflow file comes from the pushed ref, so master's
  copy listing private-preview cannot affect pushes to master or beta.
- The base: expression falls through to `github.base_ref || github.ref_name`
  for every master-side ref, which is character-identical to the default
  declared by stripe/openapi/actions/stripe-mock.

Committed-By-Agent: claude

* Harden API requestor code against malicious URLs (#2284)

* validate that incoming urls don't redirect requests

* shorten comments

* Bump version to 33.4.1

* validate that webhook secrets are non-empty (#2286)

* Bump version to 33.4.2

* support related singleton objects (#2288)

* Migrate changelog management to `hark` (#2289)

* migrate to hark

* tweak issue template

* point the hark actions at master

* point at the renamed check-github-links action

* use the single hark/checks action in CI

* use the hark checks action and rename pr_link to pr_url

* record language and channel in versions.json metadata

* rename versions.json to releases.json

* regenerate changelogs; pad short versions

* add a minimum-runtime-version recipe

Committed-By-Agent: claude

* add print-version-info recipe

* swap from is_breaking to semver_level

* trigger CI for hark v1.0.0

* add missing changefile

* rename changefiles that don't adhere to new naming rules

* Fix event handler account scoping (#2294)

* Fix event handler account scoping

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Add PR URL to changefile

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

---------

Co-authored-by: codex <noreply@openai.com>

* Add option to suppress Stripe notices (#2293)

* Add option to suppress Stripe notices

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Add changelog entry for notice suppression

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Make Stripe notice integration test environment-independent

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Clarify Stripe notice suppression instructions

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

---------

Co-authored-by: codex <noreply@openai.com>

* Document Stripe notice suppression (#2297)

Committed-By-Agent: goose
Orbit-Session-Id: d60d503e-7c8a-4aa0-89d1-37cc435afc02

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: David Brownman <1231935+xavdid@users.noreply.github.com>
Co-authored-by: Zachary Chua <zacchua@stripe.com>
Co-authored-by: David Brownman <xavdid@stripe.com>
Co-authored-by: codex <noreply@openai.com>
jar-stripe added a commit that referenced this pull request Sep 30, 2026
* Fix event handler account scoping (#2294)

* Fix event handler account scoping

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Add PR URL to changefile

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

---------

Co-authored-by: codex <noreply@openai.com>

* Add option to suppress Stripe notices (#2293)

* Add option to suppress Stripe notices

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Add changelog entry for notice suppression

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Make Stripe notice integration test environment-independent

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Clarify Stripe notice suppression instructions

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

---------

Co-authored-by: codex <noreply@openai.com>

* Document Stripe notice suppression (#2297)

Committed-By-Agent: goose
Orbit-Session-Id: d60d503e-7c8a-4aa0-89d1-37cc435afc02

* Update tests for Endive API changes (#2301)

Committed-By-Agent: codex

Co-authored-by: codex <noreply@openai.com>

* Pin stripe-mock to the SDK OpenAPI version (#2302)

* seed the migration guide for the next major version

* fixed placeholders in migration guide (#2305)

---------

Co-authored-by: zacchua-stripe <zacchua@stripe.com>
Co-authored-by: codex <noreply@openai.com>
Co-authored-by: jar-stripe <jar@stripe.com>
Co-authored-by: David Brownman <xavdid@stripe.com>
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
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.

2 participants