Skip to content

fix(brex): leave a blank spend-limit buffer unset - #10079

Merged
waleedlatif1 merged 2 commits into
stagingfrom
sweep2/followup
Nov 16, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
sweep2/followup

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #10074 for brex_create_spend_limit.

In Brex's Budgets API OpenAPI spec, CreateAuthorizationSettings.limit_buffer_percentage (int32) and CreateSpendLimitRequest.transaction_limit (Money) are both optional and nullable. Both fields are now left out when the value is undefined, null, or a blank string. Leaving the buffer out means the same thing as the null that was sent before #10074, and an explicit 0 is still sent.

Test plan

  • tools/brex/create_spend_limit.test.ts: the 6 blank-value cases fail on the pre-fix code and pass with the fix. The explicit-0 and set-amount cases pass on both.

🤖 Generated with Claude Code

Saved Create Spend Limit workflows can carry null or '' for the optional
buffer and transaction limit. The buffer reached Number(), which turned the
blank into limit_buffer_percentage: 0, and a null transaction limit sent
{ amount: null } although Brex's Money.amount is a required integer. Both
fields are optional and nullable on CreateSpendLimitRequest, so omit them
when blank.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 16, 2026 2:52am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Leaves blank optional Brex spend-limit fields out of the request while preserving explicit values.

  • Brex spend limits leave blank optional values out of the request.

Reviews (2) · Last reviewed commit: "test(brex): narrow the spend-limit body ..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit c66bf3f into staging Nov 16, 2026
81 checks passed
@waleedlatif1
waleedlatif1 deleted the sweep2/followup branch November 16, 2026 04:00

This branch was previously deployed

1 inactive deployment
Preview — 2ec8f91a Deployed Nov 16, 2026 by vercel[bot]
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