Skip to content

fix: Send the action attempt poll id as a query - #636

Open
razor-x wants to merge 2 commits into
claude/python-sdk-audit-o2iid9-02-poll-deadlinefrom
claude/python-sdk-audit-o2iid9-03-poll-query
Open

fix: Send the action attempt poll id as a query#636
razor-x wants to merge 2 commits into
claude/python-sdk-audit-o2iid9-02-poll-deadlinefrom
claude/python-sdk-audit-o2iid9-03-poll-query

Conversation

@razor-x

@razor-x razor-x commented Aug 27, 2026

Copy link
Copy Markdown
Member

What

The action-attempt wait loop polled /action_attempts/get with a raw POST and a JSON body, while the generated action_attempts.get route uses GET with query params (SDK audit finding M1; same fix as PHP #467). The poll now sends client.get("/action_attempts/get", params={"action_attempt_id": ...}) in both the sync and async variants, which routes through the same strict URL-search-params serializer as the generated method.

Three concrete behavior fixes fall out of matching the generated route's wire shape:

  • _strict=true is now sent on every poll (it was silently absent before).
  • Polls are covered by the retry policy: GET is in the retry allowlist while POST is not, so a single transient 429/5xx mid-wait no longer aborts the whole wait after the door was already commanded.
  • Any proxy/CDN/ALB that strips GET bodies can no longer see a divergent request shape between the poll and the documented route.

Depends on #635 (contains its commit; this PR's own diff shrinks to the get_action_attempt change and its tests once #635 merges).

Testing

  • New wire-shape test via the recording server: the poll request is a GET to /action_attempts/get with the id and _strict=true in the query and no request body.
  • New retry test: a 503 on a mid-wait poll is retried and the wait still resolves (request count asserted).
  • Revert check: with the source reverted, the wire test fails with 'POST' == 'GET' and the retry test fails with the wait aborting on SeamHttpApiError — the audit's exact symptoms.
  • Full suite: 193 passed; mypy, pylint (10.00), black clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y1RzepycXEYA3LStfjt8cY


Generated by Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y1RzepycXEYA3LStfjt8cY
@razor-x
razor-x requested a review from a team as a code owner August 27, 2026 21:10
@razor-x
razor-x changed the base branch from main to claude/python-sdk-audit-o2iid9-02-poll-deadline August 28, 2026 00:15
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