feat(cli-push-runner): stage 別の所要時間ログを追加 (push パイプライン改善 T0) - #278
Merged
Conversation
pre_checks / quality_gate / diff / takt / push の 5 stage を `timed()` で包み、 `stage=<name> elapsed=<秒>s` の書式で所要時間を記録する。以降の改善タスク (T1 Ollama eval 除外, T10 policy shadow, T11 docs-only routing 等) の効果を before/after で比較するための計測基盤。 - 記録は stage の成否を見ずに行い、中断で終わった run でも時間が残る - 小数第 1 位まで出すことで「一瞬で終わった stage」と「未計測」を区別する - before 値は docs/push-pipeline-fix-plan.md §1 のベースライン表を使う 配布 exe を再ビルドし、サンドボックス jj リポジトリで 2 経路 (空 diff → push / diff あり → takt) を実行して全 stage の行を確認済み。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough
Changesパイプライン計測
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Contributor
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)(該当なし) Applicable Findings (Medium 以下)(該当なし) Filtered (not applicable)(該当なし — レビュー指摘自体がまだ存在しない) 診断: 変更概要 (レビュー指摘が無いための軽量サマリー)3 ファイル変更、いずれも push-pipeline-fix-plan.md の T0 タスク(stage 別所要時間ログの追加)に対応する内容:
ロジック変更は計測用ラッパーの追加のみで、既存の制御フロー(成否判定・中断処理)には手を加えていない。ADR-035 の docs-only 基準には該当しない(コード変更を含むため)。 次のアクション
|
6 tasks
aloekun
added a commit
that referenced
this pull request
Jul 16, 2026
) * docs(push-pipeline-fix-plan): T0 の初回実測を記録し T1 の前提検証を申し送り T0 (PR #278) の dogfood push で得た stage 別実測を §5 T0 に記録した。 あわせて、その実測が T1 の前提と食い違う点を T1 セクションに申し送りとして残す。 - quality_gate 実測 93.9s に対し、T1 が根拠に引く 269s は約 3 倍。 T1 の期待効果 (-2〜4.5 分/push) と受け入れ基準 (269s → 90s 未満) は そのままでは使えない可能性が高い。 - 想定原因はローカル LLM 環境の更新 (ADR-040 記録時 RTX 3070 8GB → 現 RTX PRO 5000 48GB)。ADR-040 の resource 数値は stale。 - T1 着手前に `--ignored` スイート全体と eval テスト単体を実測し、 前提が生きているかを判定してから方針を決める手順を記載。 T1 は別セッションで実施するため、そのセッションが本ファイルだけで 判断できるよう計測コマンドと判断分岐まで書き下している。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * perf(cli-finding-classifier): Ollama eval を env opt-in 化し quality_gate から除外 (push パイプライン改善 T1) assert を持たない計測専用テスト run_lint_screen_against_all_fixtures が、 quality_gate と takt fix step の `cargo test -- --ignored` に巻き込まれて 毎 push 実行されていた。LINT_SCREEN_EVALS が truthy のときだけ走るよう テスト側にガードを入れる (呼出箇所が gate / fix / 手動と複数あるため コマンド側では漏れる)。 実測 (2026-07-16, Ollama 起動状態): - --ignored スイート全体: 63s → 21s (-42s) - eval 単体: 41.3s → 0s (skip) - opt-in 経路は 15 fixture が正常実行され agreement 86.7% (GO) なお計画が根拠に引いていた 269s は再現せず 63s だった (GPU 更新により mistral:7b の推論が高速化)。期待効果を -2〜4.5 分/push → -42s/push に 下方修正し、ADR-040 の resource 数値が stale である旨を記録した。 step_timeout: 600 → 300。600 に上げた主因 (eval) が消えたため実測ベースで right-size。cold build 実測の最遅コマンドは cargo test の 28s で、約 10 倍の マージンを確保。step_timeout は group 単位でなくコマンド単位の適用。 tests/lint_screen_evals.rs は変更前から 799 行 (上限 800) でガード追加分が 入らないため、main.rs (schema/metrics) と e2e.rs (実 Ollama 呼出) に分割した。 Cargo が tests/<name>/main.rs を test target として認識するため target 名と 起動コマンドは不変。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
docs/push-pipeline-fix-plan.mdの T0 (stage 別計測ログ + before 記録) です。以降の改善タスク (T1 Ollama eval 除外 / T10 policy shadow / T11 docs-only routing /
T12 post-takt re-gate) の効果を before/after で比較するための計測基盤を先に敷きます。
before 値は同計画 §1 のベースライン表 (2026-07-16 調査、
.takt/runs/直近 20 run) をそのまま使い、再計測はしていません。
変更内容
src/cli-push-runner/src/log.rs:timed()ヘルパーを追加。f()の実行時間を計測し、stage=<name> elapsed=<秒>sの書式で記録して戻り値をそのまま返す。src/cli-push-runner/src/main.rs:run_pipelineの 5 stage(pre_checks / quality_gate / diff / takt / push) を
timed()で包む。docs/push-pipeline-fix-plan.md: §1 の計測方法にログ書式を明記、§5 T0 に実施結果、§8 判定記録に T0 の行を追加。
設計方針
after 計測に残る。
elapsed=312sだが、pre_checks のような一瞬で終わる stage が
elapsed=0sと出ると「未計測」と紛らわしいため。stage=takt行が出ないが、skip 自体は既存の「diff が空のため…」行で判別できる。
ため、
format_stage_elapsed()の doc は書式契約を自己完結して書いている(計画 §1 → コードへの一方向参照のみ)。
テスト
log.rsに書式を固定するテスト 2 件を追加 (after 計測がこの書式に依存するため)。cargo test -p cli-push-runner186 件パス /cargo clippy --all-targetsクリーン。(空 diff → push / diff あり → takt 失敗) を実行して全 stage の行を確認。
実測 (この PR 自身の
pnpm push、dogfood)follow-up (本 PR では対応せず)
計画 §1 が引く 269s の実測記録より大幅に短い。T1 実施前に
--ignoredスイートの内訳を確認し、期待効果 (-2〜4.5 分/push) の見積りを検証する必要がある
(ローカル LLM 環境が ADR-040 記録時から変わっている可能性)。
Summary by CodeRabbit