Skip to content

docs(todo): push パイプライン改善 T13 backlog 9/10 + メトリクス永続化を順位 323-325 に起票 - #290

Merged
aloekun merged 2 commits into
masterfrom
docs/todo-backlog-9-10
Jul 18, 2026
Merged

docs(todo): push パイプライン改善 T13 backlog 9/10 + メトリクス永続化を順位 323-325 に起票#290
aloekun merged 2 commits into
masterfrom
docs/todo-backlog-9-10

Conversation

@aloekun

@aloekun aloekun commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • todo-summary.md に順位 323 (Tier 1 / S)・順位 324 (Tier 1 / XS)・順位 325 (Tier 1 / S) を追加
  • todo13.md に順位 323 の詳細エントリを起票: lib-subprocess run_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) を転記
  • todo13.md に順位 324 の詳細エントリを起票: cli-pr-monitor::push_to_remote の push 拒否検知欠落 (backlog 9)。T5 (PR fix(cli-push-runner): push 拒否検知の 40 行 truncate 依存を修正 (push T5) #282) が塞いだ silent-failure push と同型で、出力は全量取得済のため判定追加のみで済む根拠を記録
  • todo13.md に順位 325 の詳細エントリを起票: push パイプライン per-run メトリクスの JSONL 永続化。T0 の stage ログが stderr のみで消失し、T1/T3/T11/T12 の効果が落ちる決定論 stage 層を遡及分析できない可観測性ギャップの解消 (lib-telemetry 再利用、.takt/runs との join 鍵、os フィールドでクラウド run 分離)
  • push-pipeline-fix-plan.md §6 backlog 9/10 に todo 移管記録を追記 (§8 完了条件 2 の処置)

Context

Validation

  • pnpm push quality_gate: lint / test / build 全 PASS。docs-only routing (ADR-057) により rust-lint-test group を決定論 skip (gate 3.0s) — T11 の初実地 dogfood で skip ログを実測確認
  • pre-push review (pre-push-review-refute): verdict=APPROVE (simplicity / security とも、1 iteration。初回 push: takt 162s / 総計 168s、順位 325 追記後の再 push: takt 224.6s / 総計 231s、2026-07-18)
  • post_takt_regate (T12): fix 無変更のため skip を確認 (0.1s)
  • markdownlint: 編集 3 ファイルとも 0 errors (PostToolUse hook)

References

Summary by CodeRabbit

  • ドキュメント
    • プッシュ処理における拒否検知不足、タイムアウト時のプロセス残存、実行状況の追跡不足について、未対応課題として整理しました。
    • 各課題の対応方針、再現テスト、完了基準を追記しました。
    • 実行ごとのステージ別メトリクスを記録し、処理時間や振り分け結果を後から分析できる改善案を追加しました。

- 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 の処置)
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0dd4af1f-428b-43f4-b77f-8ff473b5ab3f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

プッシュパイプラインに関する3件の課題を todo13.mdtodo-summary.md へ追加し、push-pipeline-fix-plan.md に移管状況を追記した。

Changes

プッシュパイプライン課題のバックログ移管

Layer / File(s) Summary
timeout課題の起票
docs/todo13.md, docs/todo-summary.md, docs/push-pipeline-fix-plan.md
run_cmd_shell_* のtimeout後に孫プロセスが残りjoinがブロックし得る課題、再現テスト、対処方式、回帰確認をバックログへ追加した。
push拒否検知課題の起票
docs/todo13.md, docs/todo-summary.md, docs/push-pipeline-fix-plan.md
cli-pr-monitor::push_to_remote の拒否検知不足とfail-closed化の計画を追加し、T13からの移管を記録した。
パイプラインメトリクス課題の起票
docs/todo13.md, docs/todo-summary.md
stage別経過時間とrouting判定をpushごとのJSONLへ保存する計画、記録スキーマ、回帰テスト、完了基準を追加した。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 変更内容の主要点であるT13 backlog 9/10のtodo起票とメトリクス永続化の追加を具体的に示しており、題意と一致しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/todo-backlog-9-10

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Monitor 分析 (GitHub Actions バックストップ)

  • トリガー: issue_comment (created) / 実行 run
  • CI: CodeRabbit pending (review in progress、他に必須 check 無し)。mergeStateStatus: UNSTABLE はこの pending check に起因 (mergeable は MERGEABLE)
  • レビュー状況: 人間レビュー 0 件 (reviewDecision 空)。CodeRabbit はレビュー未着 (in-progress のプレースホルダーコメントのみ、指摘コメント・reviews API ともに 0 件) — 待機はしない
  • Verdict: approved (現時点で applicable な指摘 0 件のため)

Applicable Findings (Critical / High / Major)

該当なし (レビュー指摘 0 件)

Applicable Findings (Medium 以下)

該当なし

Filtered (not applicable)

該当なし

差分概要 (軽量サマリー)

docs-only の変更で、コード実行ロジックへの変更なし (ADR-035 の docs-only 判定に合致)。

ファイル 変更 内容
docs/push-pipeline-fix-plan.md +2 backlog 9/10 (push 拒否検知欠如 / timeout wall-clock 未遵守) に「todo 移管済」の注記を追記
docs/todo-summary.md +3 順位 323〜325 の 3 行をテーブルに追加 (Tier 1)
docs/todo13.md +81 順位 323 (run_cmd_shell_* timeout 未遵守)・324 (push_to_remote 拒否検知欠如)・325 (push メトリクス JSONL 永続化) の 3 エントリを新規起票 (各: 動機/対処案/参照/作業計画/完了基準)

PR タイトルどおり、既存 push-pipeline-fix-plan.md の backlog 項目 (9・10) を todo13.md へ正式移管し、新規に T12 検証セッションで見つかったメトリクス永続化課題 (順位 325) を追加した内容で、記述内容と diff は一致している。

次のアクション

  • CodeRabbit のレビュー完了を待ち、指摘が付けば改めて本バックストップ (または次回起動) で fitness filter を適用する
  • 現時点では docs-only の起票 PR であり、内容整合性の観点で追加対応は不要

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between feeeb18 and 797a99c.

📒 Files selected for processing (3)
  • docs/push-pipeline-fix-plan.md
  • docs/todo-summary.md
  • docs/todo13.md

Comment thread docs/todo-summary.md
Comment on lines +170 to +172
| 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 着手前の実装を推奨) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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.

Comment thread docs/todo13.md
Comment on lines +1818 to +1843
### 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 の効果検証手順がコンソール出力の手動保存に依存しないこと。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ 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 欠落がないことと各終了経路での記録を検証してください。

@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Monitor 分析 (GitHub Actions バックストップ)

  • トリガー: pull_request_review (submitted) / 実行 run
  • CI: analyze check が pending(本バックストップ自身の実行中 run であり、失敗ではない)。CodeRabbit check は pass(review completed の意味で、指摘なしの意味ではない)。mergeStateStatus: UNSTABLE はこの pending check起因(mergeable: MERGEABLE
  • レビュー状況: 人間レビュー 0 件(reviewDecision 空)。CodeRabbit が review 完了(state: COMMENTED, submitted_at 2026-07-18T03:42:02Z)、actionable comments 2 件(前回 03:41:01 の分析コメント時点では未着だった新規情報)
  • Verdict: needs_fix

Applicable Findings (Critical / High / Major)

# File (Line) Reviewer Issue Recommended Action
1 docs/todo13.md (1818-1843) CodeRabbit 順位325「push メトリクス JSONL 永続化」の作業計画が、実装範囲(log.rs::timed() を計測値返却/collector API 渡しへ変更する必要、全 timed() 呼び出し元での蓄積、通常終了だけでなく早期終了・エラー・中断経路でも同一 collector を更新する必要)を明記しておらず、JSONL 行だけ生成されて stage 別 elapsed が欠落するリスクがある 作業計画に (a) src/cli-push-runner/src/log.rstimed() 変更方針、(b) 全呼び出し元での蓄積、(c) 早期終了・エラー・中断経路も同じ collector を更新する範囲、(d) 回帰テストで全 stage の elapsed 欠落無し + 各終了経路での記録を検証する旨を追記する

Applicable Findings (Medium 以下)

# File (Line) Reviewer Issue Recommended Action
2 docs/todo-summary.md (170-172) CodeRabbit サマリー見出しの最終更新日が 2026-05-10 のままで、順位 323-325 の新規追記日 (2026-07-18) と不整合 見出しの最終更新日を 2026-07-18 に更新する

Filtered (not applicable)

該当なし

次のアクション

  • docs/todo13.md の順位325エントリ「作業計画」に、log.rs 変更範囲・呼び出し元・エラー/中断経路・回帰テスト範囲を追記する(Major、次のローカルセッションで対応)
  • docs/todo-summary.md の見出し最終更新日を 2026-07-18 に修正する(Minor、上記と併せて軽微修正で対応可)
  • 修正後、再度 push して本バックストップ(または次回起動)で反映確認する

Resolved findings:
- [Minor] docs/todo-summary.md:172 サマリーの更新日も更新してください。
- [Major] docs/todo13.md:1843 メトリクス収集の変更範囲を `log.rs` と各呼び出し元まで明記してください。
@aloekun
aloekun merged commit 7194961 into master Jul 18, 2026
1 check passed
@aloekun
aloekun deleted the docs/todo-backlog-9-10 branch July 18, 2026 03:59
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.

1 participant