Skip to content

feat: FT212 dataclasses — field / asdict / astuple / replace / __post_init__#595

Merged
hideyukiMORI merged 2 commits into
mainfrom
feat/594-ft212-dataclasses
May 22, 2026
Merged

feat: FT212 dataclasses — field / asdict / astuple / replace / __post_init__#595
hideyukiMORI merged 2 commits into
mainfrom
feat/594-ft212-dataclasses

Conversation

@hideyukiMORI
Copy link
Copy Markdown
Owner

概要

  • dataclasses モジュールの field / asdict / astuple / replace / post_init を HTTP API で実証
  • FT212(クラッカーペンテストあり)

クラッカーペンテスト発見事項

  • F-2(HIGH): 非標準 JSON の Infinity/NaN が Python 3.14 のパーサーに受け入れられ、FastAPI のエラーシリアライザーが 500 クラッシュ → DoS ベクター
  • 修正: _sanitize_value() + カスタム RequestValidationError ハンドラーで 422 を返すよう修正

チェックリスト

  • pytest 25 passed(クラッカーペンテスト 10 シナリオ含む)
  • mypy --strict 0 errors
  • ruff check 0 errors
  • ruff format --check pass
  • FT レポート作成
  • INDEX.md・current.md 更新
  • バージョン v1.8.88 → v1.8.89

Closes #594

🤖 Generated with Claude Code

hideyukiMORI and others added 2 commits May 22, 2026 22:47
未設定時は 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>
@hideyukiMORI hideyukiMORI merged commit ce19159 into main May 22, 2026
0 of 2 checks passed
@hideyukiMORI hideyukiMORI deleted the feat/594-ft212-dataclasses branch May 22, 2026 14:11
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.

FT212: dataclasses — field / asdict / astuple / replace / __post_init__

1 participant