docs(todo): push パイプライン改善 T13 backlog 9/10 + メトリクス永続化を順位 323-325 に起票 - #290
Conversation
- todo-summary.md: 順位 323 (lib-subprocess timeout が wall-clock を縛れない) / 順位 324 (cli-pr-monitor push_to_remote の拒否検知欠落) / 順位 325 (push パイプライン per-run メトリクスの JSONL 永続化) を Tier 1 で追加 - todo13.md: 3 項目の詳細エントリを起票。計画ファイル (T99 で削除予定) に依存しないよう §6 backlog の分析要点を転記し、順位 323 には post-merge-feedback #286 の stale marker (2026-07-17 実観測、orphan report 手動復旧済) が同根の実害である旨を記録。 順位 325 は T12 後検証セッションで実測した可観測性ギャップ (stage ログ stderr のみ) の解消で、 ADR-057/058 判定期限 (2026-08-15) と T99 after 計測の前提データ基盤 - push-pipeline-fix-plan.md: §6 backlog 9/10 に todo 移管記録を追記 (§8 完了条件 2 の処置)
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughプッシュパイプラインに関する3件の課題を Changesプッシュパイプライン課題のバックログ移管
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)該当なし (レビュー指摘 0 件) Applicable Findings (Medium 以下)該当なし Filtered (not applicable)該当なし 差分概要 (軽量サマリー)docs-only の変更で、コード実行ロジックへの変更なし (ADR-035 の docs-only 判定に合致)。
PR タイトルどおり、既存 push-pipeline-fix-plan.md の backlog 項目 (9・10) を todo13.md へ正式移管し、新規に T12 検証セッションで見つかったメトリクス永続化課題 (順位 325) を追加した内容で、記述内容と diff は一致している。 次のアクション
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@docs/todo-summary.md`:
- Around line 170-172: Update the summary heading’s last-updated date from
2026-05-10 to 2026-07-18 so it matches the date of the newly added entries and
the index contents.
In `@docs/todo13.md`:
- Around line 1818-1843: 作業計画に、src/cli-push-runner/src/log.rs の timed()
を計測値を返す、または collector API へ渡す形に変更し、全 timed() 呼び出し元で stage 別 elapsed
を蓄積する工程を明記してください。main.rs の通常終了だけでなく、早期終了・エラー・中断経路でも同じ collector を更新して JSONL
を出力する範囲を含め、回帰テストでは全 stage の elapsed 欠落がないことと各終了経路での記録を検証してください。
🪄 Autofix (Beta)
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 690ff5ad-5797-4e87-85ec-0b2f8f5003e7
📒 Files selected for processing (3)
docs/push-pipeline-fix-plan.mddocs/todo-summary.mddocs/todo13.md
| | 323 | 🚀 Tier 1 | **`lib-subprocess` `run_cmd_shell_*` の timeout が wall-clock を縛れない — 孫プロセス残存で join がブロック (push-pipeline-fix-plan §6 backlog 10 移管)** | todo13.md | S | なし (quality_gate step_timeout / push timeout / cli-merge-pipeline のハング打ち切りが実質無効。#286 post-merge-feedback の orphan/stale marker と同根の実害 1 件観測済。回帰テストに経過時間 assert 必須 = T6 教訓) | | ||
| | 324 | 🚀 Tier 1 | **`cli-pr-monitor::push_to_remote` に push 拒否検知が無く post-PR re-push が無言で失敗し得る (push-pipeline-fix-plan §6 backlog 9 移管)** | todo13.md | XS | なし (T5 = PR #282 が cli-push-runner 側で塞いだ silent-failure push と同型の穴。出力は `run_cmd_direct` で全量取得済のため判定追加のみ) | | ||
| | 325 | 🚀 Tier 1 | **push パイプライン per-run メトリクスの JSONL 永続化 — stage 別 elapsed / routing 判定の遡及分析基盤 (T12 後検証セッションで欠落を実測)** | todo13.md | S | なし (T0 の stage ログは stderr のみで消失し、T1/T3/T11/T12 の効果が落ちる決定論 stage 層を遡及分析できない。ADR-057/058 判定期限 2026-08-15 と T99 after 計測の前提データ。harness-improvement-plan セクション 3 着手前の実装を推奨) | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
サマリーの更新日も更新してください。
この追加行は 2026-07-18 の変更ですが、見出しの更新日は 2026-05-10 のままです。見出しを 2026-07-18 に更新するなど、インデックスの最終更新日と内容を一致させてください。
🤖 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 `@docs/todo-summary.md` around lines 170 - 172, Update the summary heading’s
last-updated date from 2026-05-10 to 2026-07-18 so it matches the date of the
newly added entries and the index contents.
| ### push パイプライン per-run メトリクスの JSONL 永続化 — stage 別 elapsed / routing 判定の遡及分析基盤 | ||
|
|
||
| > **動機**: T12 完了後の検証セッション (2026-07-18) で、push パイプラインの可観測性が「takt 部分のみ十分」であることを実測した。takt 部分は `.takt/runs/<slug>/meta.json` + `trace.md` で全 run 永続化されており fix 発生率・レビュー時間の before/after 分析が成立する。一方、**T0 (PR #278) で追加した `stage=<name> elapsed=<秒>s` ログは stderr のみで永続化されず** (`src/cli-push-runner/src/log.rs` の `timed()` → `eprintln!`)、quality_gate の group 別時間・`pr_size` の diff 行数・docs_only skip の発火・post_takt_regate の判定・パイプライン総所要時間はセッションが閉じると消失する。**T1/T3/T11/T12 の改善効果はまさにこの決定論 stage 層に落ちる**ため、ADR-057/058 (判定期限 2026-08-15) の効果検証と push-pipeline-fix-plan T99 の after 計測が「push 時のコンソール出力を手動保存する」運用に依存している。ユーザーが直接ターミナルで push した分は記録が残らない。 | ||
| > | ||
| > **対処案**: run 終了時に 1 行の JSONL を `.claude/telemetry/` へ append する。計測点は `log.rs` の `timed()` に一元化済みのため、収集 struct を `main.rs` で蓄積し pipeline 終了時 (中断時含む) に書き出すだけで済む。器は lib-telemetry (ADR-055) を再利用し fail-open / opt-in (`[telemetry] enabled`) / kill-switch の既存原則に相乗りする — ただし ADR-055 のスコープは hook 発火イベントなので、**push run 記録への流用は ADR-055 amendment か別 record kind かの判断が要る** (プライバシー原則 = メタデータのみ、bookmark 名を含めるかも判断)。 | ||
| > | ||
| > **フィールド案**: ts / bookmark / pr_size_lines / docs_only (bool) / stage 別 elapsed / skip した gate group / post_takt_regate 判定 (skip・run・block) / takt run slug (**`.takt/runs/` と join する鍵**) / total_secs / exit_code / **os** (harness-improvement-plan WP-15 以降はクラウド Linux run が混入しハードウェアの土俵が変わるため、改善効果の判定を Windows ローカル分に限定できるよう環境を分離する)。 | ||
| > | ||
| > **着手時期の推奨**: harness-improvement-plan セクション 3 (WP-13〜16) 着手**前**。同セクションは本機での code push が 8〜15 回程度見込まれ、先に永続化しておけば全 push が自動的に after 計測コーパスになる (手動記録不要)。 | ||
| > | ||
| > **参照**: `src/cli-push-runner/src/log.rs` (`format_stage_elapsed` の doc が「before/after 比較の contract」と明記しつつ永続化されていない)、[ADR-055](adr/adr-055-firing-telemetry-collection.md)、[ADR-057](adr/adr-057-docs-only-deterministic-routing.md) / [ADR-058](adr/adr-058-post-takt-regate.md) (判定期限の消費者)、push-pipeline-fix-plan §1 計測方法 / T99。 | ||
| > | ||
| > **実行優先度**: 🚀 Tier 1 — Severity Medium (機能不具合ではないが、改善投資の定量評価が構造的に不可能になっている。判定期限 2026-08-15 が消費者として実在) / Effort S。 | ||
|
|
||
| #### 作業計画 | ||
|
|
||
| - [ ] 記録スキーマを決める (ADR-055 amendment か新 record kind か。メタデータのみ原則との整合、bookmark 名の扱いを含む)。 | ||
| - [ ] `main.rs` で stage 計測を蓄積し、pipeline 終了時に 1 行 append する (fail-open。exit 7 等の中断経路でも書く — 中断頻度自体が観測対象)。 | ||
| - [ ] 回帰テスト: base_dir 注入 (lib-telemetry の `record_to` 同型) で「1 run = 1 行」「中断時も書かれる」「kill-switch で書かれない」を assert。 | ||
| - [ ] 集計手順を ADR-057/058 の判定手順に接続する (判定期限 2026-08-15 で実際に使う形にする。手動コンソール保存への依存を撤去)。 | ||
| - [ ] 本エントリ削除 + todo-summary.md 行削除。 | ||
|
|
||
| #### 完了基準 | ||
|
|
||
| - `pnpm push` 1 回につき 1 行の JSONL が残り、stage 別 elapsed / docs_only / post_takt_regate 判定 / total_secs が事後に集計できること。 | ||
| - ADR-057/058 の効果検証手順がコンソール出力の手動保存に依存しないこと。 |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
メトリクス収集の変更範囲を log.rs と各呼び出し元まで明記してください。
ここでは log.rs::timed() が現在 eprintln! のみを行い、main.rs 側で蓄積すれば足りるように記載されています。しかし永続化には、timed() の戻り値・collector API の追加と、各 stage の呼び出し箇所からその値を渡す変更が必要です。src/cli-push-runner/src/log.rs、全 timed() 呼び出し元、早期終了・エラー経路を作業計画と回帰テスト範囲に含めないと、JSONL 行だけ生成されて stage 別 elapsed が欠落する可能性があります。
🤖 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 `@docs/todo13.md` around lines 1818 - 1843,
作業計画に、src/cli-push-runner/src/log.rs の timed() を計測値を返す、または collector API
へ渡す形に変更し、全 timed() 呼び出し元で stage 別 elapsed を蓄積する工程を明記してください。main.rs
の通常終了だけでなく、早期終了・エラー・中断経路でも同じ collector を更新して JSONL を出力する範囲を含め、回帰テストでは全 stage の
elapsed 欠落がないことと各終了経路での記録を検証してください。
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)
Applicable Findings (Medium 以下)
Filtered (not applicable)該当なし 次のアクション
|
Resolved findings: - [Minor] docs/todo-summary.md:172 サマリーの更新日も更新してください。 - [Major] docs/todo13.md:1843 メトリクス収集の変更範囲を `log.rs` と各呼び出し元まで明記してください。
Summary
lib-subprocessrun_cmd_shell_*の timeout が wall-clock を縛れない件 (backlog 10)。post-merge-feedback chore(workspace): 旧 cli-push-pipeline crate を削除 (push パイプライン改善 T2) #286 の stale marker (2026-07-17 実観測) が同根の実害である旨、detach vs process-tree kill の対処案、経過時間 assert 必須の教訓 (T6) を転記cli-pr-monitor::push_to_remoteの push 拒否検知欠落 (backlog 9)。T5 (PR fix(cli-push-runner): push 拒否検知の 40 行 truncate 依存を修正 (push T5) #282) が塞いだ silent-failure push と同型で、出力は全量取得済のため判定追加のみで済む根拠を記録.takt/runsとの join 鍵、os フィールドでクラウド run 分離)Context
.claude/feedback-reports/、gitignored) は同セッションで実施済みだが本 PR には含まれないValidation
References
.claude/feedback-reports/286.md(post-merge-feedback report Tier1 fix(hooks): stop-quality のパイプデッドロックを修正 #2 / Tier2 fix(hooks): extra_protected_files でパス付き指定をサポート #3)Summary by CodeRabbit