Conversation
There was a problem hiding this comment.
This PR successfully implements safe error handling for Substack Notes posting. The security improvements effectively prevent information leakage by sanitizing HTTP error responses and limiting exposed diagnostic data to safe, allowlisted identifiers. The implementation correctly fixes the Notes endpoint URL and removes the problematic title: null attribute. The comprehensive test coverage validates the security measures without requiring live API calls. All changes align with the stated objectives and maintain proper separation of concerns.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
追加診断版デプロイ完了
次の1回で、失敗した場合も |
|
追加更新: ChatGPTがpost_note本文をtextとして渡さないケースに対応し、text/content互換入力をtextへ正規化しました(4fe7d4c)。7回帰テスト、構文、型検査、Wrangler dry-runに成功し、Worker Version c0454f93-fa53-406f-b687-4125c7f5780bへデプロイ済みです。デプロイ後のlist_drafts(limit=1)も成功。書き込み再テストは未実施で、定期タスクは停止中です。 |
|
本番確認結果: post_note を承認済みの1回だけ実行し、公開feedでNote ID 335417972の本文反映を確認しました。重複なし。記録更新は ff106b1。定期タスク再開は別途ユーザー確認待ちです。 |
Closes #8
変更概要
post_noteの上流HTTP失敗をSubstackHTTPErrorに変換し、HTTP statusと許可リスト済み識別子だけを公開title: nullを削除検証結果
.venv/bin/python -m unittest discover -s tests -p 'test_*.py': 5件成功.venv/bin/python -m compileall -q src tests: 成功npm run type-check: 成功npm ci: 脆弱性0件npx wrangler deploy --dry-run: Worker bundleとContainer image build成功test-board impact/test-board issue --issue 8: TC-001、TC-002の影響を確認7b8978fa-fe19-482c-9da0-0c9ee514740a: デプロイ成功GET /: HTTP 200POST /mcp: HTTP 401list_drafts(limit=1): 成功(書き込み系ツール未実行)リスク
PR構成
PR #7 の本番Cloudflare実装を前提とするstacked Draft PR。自動マージしない。