Skip to content

fix: Make the workspace-less abstract clients abstract - #645

Merged
razor-x merged 1 commit into
mainfrom
claude/python-sdk-audit-o2iid9-12-abstract-clients
Aug 28, 2026
Merged

fix: Make the workspace-less abstract clients abstract#645
razor-x merged 1 commit into
mainfrom
claude/python-sdk-audit-o2iid9-12-abstract-clients

Conversation

@razor-x

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

Copy link
Copy Markdown
Member

What

AbstractSeamWithoutWorkspace and AbstractAsyncSeamWithoutWorkspace used @abc.abstractmethod without an ABCMeta metaclass, so the decorator set __isabstractmethod__ and nothing ever read it — both classes were directly instantiable (SDK audit finding L5b). Every other abstract base in the SDK (AbstractSeam, AbstractSeamHttpClient, the workspaces abstracts) already inherits abc.ABC; these two were the odd ones out.

Both now inherit abc.ABC, making instantiation a TypeError like their siblings. SeamWithoutWorkspace / AsyncSeamWithoutWorkspace subclass them with concrete implementations, so nothing else changes.

Testing

New test/abstract_models_test.py asserts direct instantiation of both classes raises TypeError. Revert check: with seam/models.py reverted to main, both tests fail (the classes instantiate silently). Full suite: 187 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:58
@razor-x
razor-x merged commit 5fb3c8f into main Aug 28, 2026
23 checks passed
@razor-x
razor-x deleted the claude/python-sdk-audit-o2iid9-12-abstract-clients branch August 28, 2026 00:08
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