Repository navigation
fix: HTTP レスポンスの charset 判別を修正し文字化けを解消 + 保存済みデータ修復 CLI - #345
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9381ab6185
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
$gh-pr-reviewer レビュー結果
検証実施内容(本レビューで実走)
Findings
Description Check
Chief Engineer Comment Resolution
Repo Fit Check
Decision
Residual Risks
最終判定APPROVE |
Merger Result
$merger |
概要
Discord daily notification に出ていた日本語タイトルの文字化け(例: 科学的に存在しうるクリーチャー娘の観察日誌 → ç§å¦ç…)を修正します。あわせて、保存済み state の化けたタイトルを一括修復する CLI を追加します。
原因
manga_watch/sources/base.pyのRequestsHttpClient.get_text()がresponse.textを返しており、championcross.jp の series RSS がContent-Type: text/xml(charset なし)で配信されるため、requests が UTF-8 を ISO-8859-1 として誤デコードしていました。変更内容
fix(sources): decode HTTP responses with explicit charset fallback—decode_response_bytes()を追加し、charset 宣言 → strict UTF-8(BOM 除去)→ apparent encoding → latin-1 の順で明示デコード。全ソース共通の修正test(sources): add byte-level charset regression for champion-cross RSS— 実フィクスチャバイト +text/xmlヘッダ経由の回帰テスト(latin-1 誤デコードで red になることを確認済み)feat: add mojibake repair for stored state titles—repair_mojibake.py(Latin-1 逆変換 + CJK 判定の安全ヒューリスティック、pending_messages の content は対象外)feat(repair): add repair_mojibake CLI with dry-run and json output—--state/--backend {json,firestore}/--dry-run/--json対応 CLI + README 手順検証
.omo/evidence/task-{1,2,3,4}-fix-mojibake-http-decode.txt/f3-fix-mojibake-http-decode.txt運用上の注意(本番適用時)
保存済み state の修復は README の手順に従い、まず
--dry-run --jsonで対象確認 → state をバックアップ → apply してください。GCP 本番は--backend firestoreです。