fix: Leave pagination params out of the at least one parameter guard - #639
Merged
Merged
Conversation
razor-x
changed the base branch from
main
to
claude/python-sdk-audit-o2iid9-05-invalid-response
August 28, 2026 00:15
razor-x
force-pushed
the
claude/python-sdk-audit-o2iid9-06-param-guard
branch
from
August 28, 2026 19:30
15be375 to
dcf57e1
Compare
razor-x
force-pushed
the
claude/python-sdk-audit-o2iid9-06-param-guard
branch
from
August 28, 2026 20:36
dcf57e1 to
e0f0805
Compare
razor-x
force-pushed
the
claude/python-sdk-audit-o2iid9-06-param-guard
branch
from
August 28, 2026 20:43
e0f0805 to
e9b25a4
Compare
razor-x
force-pushed
the
claude/python-sdk-audit-o2iid9-06-param-guard
branch
from
August 28, 2026 21:04
e9b25a4 to
445f35e
Compare
Base automatically changed from
claude/python-sdk-audit-o2iid9-05-invalid-response
to
main
August 28, 2026 21:09
razor-x
force-pushed
the
claude/python-sdk-audit-o2iid9-06-param-guard
branch
from
August 28, 2026 21:09
445f35e to
221e523
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y1RzepycXEYA3LStfjt8cY
razor-x
force-pushed
the
claude/python-sdk-audit-o2iid9-06-param-guard
branch
from
August 28, 2026 21:12
221e523 to
2a33646
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The "at least one parameter is required" guard counted every parameter, so
seam.access_codes.list(limit=20)satisfied a guard whose purpose is to require a filter, a page cursor alone satisfied it from page two onward, andcreate_paginatorhad a second hand-written copy with the same defect (SDK audit finding M7; ports JS #1008 / PHP #474 — pagination knobs are not filters).atLeastOneParameterNameslist — the endpoint's parameters minuslimitandpage_cursor, and only for endpoints where every parameter is optional (the same computation as the JS SDK). The generated guard checks exactly those names; nothing is emitted when the list is empty.if not payloadthere was dead code (JS made the same call). Their docstrings also lose the now-wrong:raises ValueErrorline.@route_metadatacarriesat_least_one_parameter_namesinstead of the booleanhas_required_parameters, and bothcreate_paginatorguards (sync and async) consult the names, fixing the{"limit": 20}and page-cursor escapes there too.This is a template + layout change; all route-file changes are regenerated output (guard raise sites go from 50 to 20 across the tree — the other 30 were the dead blanket guards).
Stacked on #638 (both edit the same route-method template); diff shrinks as the stack merges.
Testing
New
test/required_parameters_test.py(sync + async):limit-only andpage_cursor-only calls raise with the pinned message on both the route method andcreate_paginator; a real filter passes and paginates; the unpaginatedevents.list(limit=5)raises.Revert check: with the old generated stack restored, the new tests fail with
DID NOT RAISE ValueError— the audit's silent-pass symptom.Full suite: 225 passed; mypy, pylint (10.00), black clean; regeneration is drift-free.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y1RzepycXEYA3LStfjt8cY
Generated by Claude Code