feat: FT212 dataclasses — field / asdict / astuple / replace / __post_init__#595
Merged
Conversation
未設定時は consumer FT のバースト smoke で 429 にならないようにする。 Co-authored-by: Cursor <cursoragent@cursor.com>
…_init__ (#594) 摩擦点: - F-1: astuple の戻り値型は tuple[object, ...] — 型安全な使用には dataclass ラッパーが必要 - F-2(HIGH): Infinity/NaN 非標準 JSON → FastAPI エラーシリアライザーが 500 DoS → _sanitize_value() + カスタム RequestValidationError ハンドラーで修正 クラッカーペンテスト: 10 シナリオ全て 422(修正後) バージョン: v1.8.88 → v1.8.89 Closes #594 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
概要
dataclassesモジュールの field / asdict / astuple / replace / post_init を HTTP API で実証クラッカーペンテスト発見事項
Infinity/NaNが Python 3.14 のパーサーに受け入れられ、FastAPI のエラーシリアライザーが 500 クラッシュ → DoS ベクター_sanitize_value()+ カスタムRequestValidationErrorハンドラーで 422 を返すよう修正チェックリスト
pytest25 passed(クラッカーペンテスト 10 シナリオ含む)mypy --strict0 errorsruff check0 errorsruff format --checkpassCloses #594
🤖 Generated with Claude Code