tasks.md を追加(実装タスク分割) - #4
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HM65HLN9Hi2YgBtUTAQJDr
Walkthroughnote2web の実装計画をフェーズ0〜3と仕上げに分けて追加しました。T-01〜T-28、受け入れ条件、マイルストーンを定義しました。既存記事が複数一致した場合は、ノートを Changesnote2web 実装計画と照合仕様
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
🚀 Post-Merge Actions
Comment |
There was a problem hiding this comment.
Actionable comments posted: 10
🧹 Nitpick comments (1)
tasks.md (1)
10-40: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMermaid図のタスク依存を依存表と一致させてください。
依存表にある T-10、T-12、T-13、T-22、T-23、T-24、T-26 の個別依存が図にありません。フェーズ間の矢印だけでは、同一フェーズ内で安全に並行できる範囲を判断できません。個別矢印を追加するか、図をフェーズ概要と明記して依存表を唯一の正にしてください。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tasks.md` around lines 10 - 40, Mermaid図の依存関係を依存表と一致させ、T-10、T-12、T-13、T-22、T-23、T-24、T-26の個別依存矢印を追加してください。フェーズ間の矢印だけに依存せず、同一フェーズ内の並行可能範囲も図から判断できる状態にします。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tasks.md`:
- Around line 96-98: Extend the T-05 timeout test to launch a dummy process that
creates a child process, then verify the entire process group is terminated,
SIGKILL follows SIGTERM after the configured grace period, stdout and stderr are
captured, and the resulting failure is classified and logged correctly.
- Around line 104-106: Update the T-07 StateStore acceptance criteria to test
the read-your-writes contract: verify that updates made during one execution are
immediately visible to subsequent reads, that disk loading occurs only once at
startup, and that writes occur at the specified notes and assets points. Retain
the existing validation-mismatch exit 2 and atomic-save crash requirements.
- Around line 88-90: Extend the T-03 logger acceptance tests beyond event
formats and fields to verify that every log entry is always written to stdout,
optionally appended to the configured file, and that appending preserves
existing file contents. Cover both configured and unconfigured file-output paths
while keeping the existing event-format assertions.
- Around line 131-133: Update the T-13 AssetUploader acceptance criteria to
separately verify that body placeholders are replaced with the final uploaded
URLs and that successful uploads are persisted to StateStore, in addition to
preventing duplicate uploads across first, duplicate-reference, and rerun
scenarios.
- Around line 172-178: タイトル照合による復旧では、T-22 DevtoPublisher と T-23 HatenaPublisher
の両方で一致件数がちょうど1件の場合のみ対象を採用してください。0件または複数件の場合は復旧を失敗として扱い、状態を更新せずに終了します。重複タイトルを含むHTTPモックテストを追加し、誤った記事へ紐付かないことを確認してください。
- Around line 123-125:
T-11の受け入れ条件を全変換契約に拡張し、表・チェックリストに加えて添付と描画参照のプレースホルダ化、タイトル行の除去、未対応要素のテキスト化を検証するgolden
testを追加してください。未対応要素については警告ログが出力されることもテストし、各要素の期待Markdownとログ内容を確認できるようにしてください。
- Around line 92-94: 設定 YAML ローダと zod スキーマ検証について、サービス別必須項目、`*_env`
で指定された環境変数の存在、秘匿情報の直書き拒否、`timezone`
の既定値をそれぞれ検証するテストを受け入れ条件に追加してください。各ケースで、正常系・不正系と不正キーを明示して exit 2
になることを確認できるようにしてください。
- Line 202: M1: Zenn E2Eのタスク範囲と受け入れ条件に、実機Apple
Notesから実際のZennリポジトリへPRを作成し、同一入力の2回目実行でskipされることを検証する専用タスクまたは条件を追加してください。既存のT-08、T-16、T-26のfixture・モック検証だけに依存せず、実機E2Eの完了基準として明記してください。
- Line 59: T-13(AssetUploader)の依存関係にT-11を追加し、既存のT-07依存は維持してください。
- Around line 148-150:
T-16の受け入れ条件をdesign.mdの仕様に合わせ、PR作成成功後に状態を保存し、auto_merge時のgh pr
merge失敗でも状態更新済みかつPRを残して失敗扱いと明記してください。さらに、auto_merge:
falseでPRがクローズされた場合は次回syncで再配信せず、ノート変更時までskipする受け入れ条件を追加してください。
---
Nitpick comments:
In `@tasks.md`:
- Around line 10-40:
Mermaid図の依存関係を依存表と一致させ、T-10、T-12、T-13、T-22、T-23、T-24、T-26の個別依存矢印を追加してください。フェーズ間の矢印だけに依存せず、同一フェーズ内の並行可能範囲も図から判断できる状態にします。
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
- Add T-11 as dependency of T-13 (placeholder contract) - Expand acceptance criteria for T-03/04/05/07/11/13 to cover the full implementation scope (log sinks, config validation cases, process-group timeout with child processes, read-your-writes, full conversion contract, URL replacement and asset persistence) - Align T-16 acceptance criteria with design.md state transaction (state saved at PR creation; merge failure keeps saved state; closed-PR skip behavior) - Title reconciliation: adopt only on exactly one match, fail on multiple matches (design.md updated to match); 0 matches still creates, since the article genuinely does not exist - Add T-28 real-device E2E task as the M1 gate - Mark the mermaid diagram as phase overview; dependency table is the source of truth Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HM65HLN9Hi2YgBtUTAQJDr
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tasks.md`:
- Around line 152-154: Extend T-16 acceptance tests to cover missing or empty
GH_TOKEN and authentication failure, verifying exit code 2 with no Git/gh write
operations and no StateStore updates. Reuse the T-15 GH_TOKEN validation and
assert it runs before branch creation, push, or PR creation.
- Around line 131-133: T-12
の受入条件に、正規化不変条件の検証を追加してください。キー順を変えた同値入力、CRLF/LF、NFC/NFD の入力が同一の正規化結果と SHA-256
ハッシュになること、設定済み timezone による日時文字列化が期待どおり固定されることを golden test で確認してください。
- Around line 176-178: T-22の受け入れ条件に、DevtoPublisherのwire
contractと非再試行検証を明記してください。HTTPモックで{"article":{...}}形式の本文、ヘッダ、タグ最大4個、条件付きcanonical_url、レスポンスのid/url保存を確認し、30秒タイムアウト時にPOSTが再送されず、失敗分類とログが正しいことも検証項目へ追加してください。
- Around line 180-182: 更新 T-23 HatenaPublisher の受け入れ条件に、HTTP モックで URL、POST/PUT
の使い分け、Basic 認証ヘッダ、レスポンスからの entry_id 抽出を個別検証するケースを追加してください。さらに、§13-5
の実機確認条件として、design.md への結果反映に加えて実機ブログへの Markdown 入稿成功を明記してください。
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c9088b43-528a-4a1b-8551-a3a30ecd5149
📒 Files selected for processing (2)
design.mdtasks.md
| #### T-12 正規化 serializer とコンテンツハッシュ(M) | ||
| - §5.6: キー順固定・全文字列ダブルクォートの決定的 YAML serializer、`timezone` 固定オフセットの日時文字列化、UTF-8 / LF / NFC 正規化、SHA-256 | ||
| - **受け入れ条件**: golden test(YAML 境界値: `null` / 数値 / 日時に見える文字列、`:` `#` `"` `\` 改行を含む文字列)で直列化結果とハッシュ値が固定される |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
T-12 の正規化不変条件を受入条件に追加してください。
実装範囲には、キー順固定、timezone固定オフセット、UTF-8・LF・NFC正規化、SHA-256が含まれます。現在の受入条件はYAML境界値と固定ハッシュを主に確認します。
キー順を変更した同値入力、CRLF/LF、NFC/NFDの同値入力が同じ正規化結果とハッシュになることを追加で検証してください。設定されたtimezoneで日時が期待どおりに固定されることも確認してください。変換後コンテンツのハッシュは冪等性判定に使われるため、この試験がないと不要な再配信や誤ったskipを検出できません。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tasks.md` around lines 131 - 133, T-12
の受入条件に、正規化不変条件の検証を追加してください。キー順を変えた同値入力、CRLF/LF、NFC/NFD の入力が同一の正規化結果と SHA-256
ハッシュになること、設定済み timezone による日時文字列化が期待どおり固定されることを golden test で確認してください。
| #### T-16 GitRepoPublisher 共通基盤(L) | ||
| - §5.7: `note2web/sync-<UTC時刻>` ブランチ作成、ファイル書き込み + 保留リスト、差分ゼロならブランチ破棄、コミット・push・`gh pr create`、`auto_merge` 時の `gh pr merge`、PR 作成成功後の一括状態確定、`GH_TOKEN` 検証 | ||
| - **受け入れ条件**: モック git / gh で各シナリオが design.md §5.7 どおりであること: 「差分なし」= ブランチ破棄・状態未更新、「push / PR 作成失敗」= 状態未更新で次回再試行、「PR 作成成功」= 状態保存、「auto_merge のマージ失敗」= **状態は保存済みのまま** PR を残して実行を失敗扱い。また `auto_merge: false` で PR が手動クローズされた場合、次回 sync ではハッシュ一致により skip され(再配信しない)、ノート変更時に再配信されることを検証する |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
GH_TOKEN 検証を Git 副作用の前提条件としてテストしてください。
T-16の実装範囲にはGH_TOKEN検証がありますが、受入条件に未設定・空値の場合の動作がありません。T-15のチェックを使う場合でも、検証がブランチ作成、push、PR作成より前に実行されることを確認してください。
GH_TOKENが未設定または認証に失敗した場合は、exit 2、Git/ghの書き込みなし、StateStoreの更新なしを検証してください。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tasks.md` around lines 152 - 154, Extend T-16 acceptance tests to cover
missing or empty GH_TOKEN and authentication failure, verifying exit code 2 with
no Git/gh write operations and no StateStore updates. Reuse the T-15 GH_TOKEN
validation and assert it runs before branch creation, push, or PR creation.
| #### T-22 DevtoPublisher(M) | ||
| - §5.7 の wire contract(`{"article":{...}}`、ヘッダ、カンマ区切りタグ最大4個、条件付き `canonical_url`)、レスポンス `id` / `url` の保存、タイムアウト 30 秒・POST 非リトライ、`remoteId` 欠落時のタイトル照合(**1件一致のみ採用**。0件 = 新規作成、複数一致 = failed で状態未更新) | ||
| - **受け入れ条件**: HTTP モックで新規 / 更新 / 応答不明→照合復旧のテスト。照合は「1件一致 → 採用」「0件 → 新規作成」「**重複タイトルで複数一致 → failed(誤った記事へ紐付けない・状態未更新)**」の3ケースを検証する |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Dev.to の wire contract と非再試行を受入条件に追加してください。
T-22の実装範囲には、{"article":{...}}、ヘッダ、タグ上限、条件付きcanonical_url、レスポンスのid/url保存、30秒タイムアウト、POST非リトライが含まれます。現在の受入条件は新規・更新・照合のケース名が中心です。
HTTPモックでリクエスト本文とヘッダ、保存されるid/urlを検証してください。タイムアウト時にPOSTが2回送信されず、失敗分類とログが正しいことも検証してください。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tasks.md` around lines 176 - 178, T-22の受け入れ条件に、DevtoPublisherのwire
contractと非再試行検証を明記してください。HTTPモックで{"article":{...}}形式の本文、ヘッダ、タグ最大4個、条件付きcanonical_url、レスポンスのid/url保存を確認し、30秒タイムアウト時にPOSTが再送されず、失敗分類とログが正しいことも検証項目へ追加してください。
| #### T-23 HatenaPublisher(M) | ||
| - AtomPub XML 生成(`text/x-markdown`、`category`)、Basic 認証、POST / PUT、entry_id 抽出、タイトル照合による復旧(T-22 と同じ規則: 1件一致のみ採用、複数一致は failed)。実機ブログで Markdown 入稿を確認し §13-5 を解消 | ||
| - **受け入れ条件**: XML 生成の golden test。HTTP モックで新規 / 更新 / 照合3ケース(1件・0件・重複タイトル)。実機確認結果が design.md に反映される |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Hatena の HTTP 契約を個別に検証してください。
XML golden testだけでは、Basic認証、POST/PUTの使い分け、entry_id抽出を検証できません。HTTPモックでURL、HTTPメソッド、認証ヘッダ、レスポンスから保存するIDを確認してください。
また、§13-5の実機確認は、design.mdへの結果反映だけでなく、Markdown入稿が成功したことを受入条件に含めてください。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tasks.md` around lines 180 - 182, 更新 T-23 HatenaPublisher の受け入れ条件に、HTTP モックで
URL、POST/PUT の使い分け、Basic 認証ヘッダ、レスポンスからの entry_id 抽出を個別検証するケースを追加してください。さらに、§13-5
の実機確認条件として、design.md への結果反映に加えて実機ブログへの Markdown 入稿成功を明記してください。
…ts-y7h3es tasks.md の受け入れ条件を補強(PR #4 マージ後のレビュー指摘対応)
概要
requirements.md / design.md に基づく実装タスク分割
tasks.mdを追加します。実装コードは含みません。内容
🤖 Generated with Claude Code
https://claude.ai/code/session_01HM65HLN9Hi2YgBtUTAQJDr
Generated by Claude Code
Summary by CodeRabbit
ドキュメント
仕様変更