Repository navigation
fix(hex,stripe): validate Hex and Stripe against their API docs - #10005
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] The PR appears safe to merge; no actionable issue was found. SummaryThis PR corrects Hex and Stripe request fields and adds pagination.
Both earlier, unnumbered findings are addressed: zero quantities are sent, and Hex run outputs declare string versions. No new actionable issue was found. Reviews (3) · Last reviewed commit: "fix(hex): only fall back to raw run stat..." · Reviewed by Greptile |
There was a problem hiding this comment.
All reported issues were addressed across 76 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 76 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…nted run trigger and pagination fields - get_project_runs no longer receives the List Projects status filter, and list users/groups/collections/data connections drop a stored List Projects sort field they reject (valid ones still pass) - get_queried_tables gains after/before cursors via dedicated subBlocks, plus after/before outputs - list_groups gains the documented userId filter via a dedicated subBlock - run status and project runs expose runTrigger; elapsedTime is milliseconds - path ids go through safeUrlPathSegment - correct documented limit ranges and the create_group createdAt output
…onor subscription item ids, guard path ids, add pagination
- Yes/No dropdowns (cancel_at_period_end, auto_advance, capture, active, prorate,
invoice_now, paid_out_of_band) gain a leading Default option that is never sent.
The UI seeded the first option ("Yes") as soon as advanced options were shown, so
merely opening them on Update Subscription scheduled a cancellation and on Pay
Invoice marked the invoice paid out of band. Stored 'true'/'false'/null map exactly
as before, and every key is now assigned so a raw '' cannot leak past the mapper.
- update_subscription sends items[i][id] (and deleted when true): Stripe adds a new
item when id is omitted, so changing a price created a duplicate billed item.
- All path ids go through safeUrlPathSegment, so an id cannot traverse to another
Stripe endpoint with the caller's key.
- create_price no longer sends unit_amount=0 for an empty field; create_subscription
no longer sends trial_period_days=0 for an empty field.
- starting_after/ending_before on every list tool and page/next_page on every search
tool, wired through new list_starting_after/list_ending_before/search_page subBlocks.
- Stripe trigger declares the documented account and context event fields.
…ck maps dedicated fields
…quantities, mark nullable event fields
661ea9c to
b1e748f
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Validated Hex and Stripe against their API docs (Hex OpenAPI spec, Stripe API reference) and fixed the gaps. Changes are additive or fix requests that were already invalid or misleading, with one deliberate exception: a blank Stripe Unit Amount used to create a $0 price and now returns Stripe's validation error.
Hex
after/beforecursors and outputs; List Groups gains the documenteduserIdfilter. Both read dedicated subBlocks.runTrigger.elapsedTimeis documented as milliseconds. Limit ranges are corrected, and Create Group'screatedAtis optional (the endpoint doesn't return it).safeUrlPathSegment.Stripe
truefrom an agent or the API is no longer read asfalse.items[i][id], so changing an item's price updates that item instead of adding a duplicate, as Stripe documents. It sendsdeletedonly when it is true.unit_amount=0for an empty field. Create Subscription no longer sendstrial_period_days=0.starting_after/ending_beforeorpage/next_page.safeUrlPathSegment.accountandcontextevent fields.Agent tool calls: when a call comes from an agent (the mapper receives a context), cursors and filters the model passes under the tool param names are kept. Canvas runs still read the dedicated fields, so stale values from other operations stay out.
Type of Change
Testing
blocks/blocks/hex.test.tsandblocks/blocks/stripe.test.ts. Each case was checked to fail on the pre-fix mapper.tools/stripe,lib/webhooks/providers/stripe.test.tsandblocks/blocks.test.ts; all pass.check-block-registry origin/staging,check:utils,check:test-patterns,check:explicit-any,check:tool-metadataandcheck:docspass.Checklist
test-auditauthoring gate)🤖 Generated with Claude Code