feat(push-runner): push per-run メトリクスを JSONL 永続化 (push パイプライン改善 R3) - #294
Conversation
|
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:
📝 WalkthroughWalkthroughPush パイプラインのステージ計測と判定結果を ChangesPush-run telemetry
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant PushPipeline
participant RunMetrics
participant ReGate
participant TelemetryWriter
participant PushRunsJSONL
PushPipeline->>RunMetrics: measure stages and collect metadata
PushPipeline->>ReGate: run post-takt re-gate
ReGate-->>RunMetrics: return proceed and telemetry verdict
PushPipeline->>RunMetrics: finalize exit code and total duration
RunMetrics->>TelemetryWriter: write push-runs metric
TelemetryWriter->>PushRunsJSONL: append partitioned JSONL record
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)(該当なし — レビュー未着のため) Applicable Findings (Medium 以下)(該当なし) Filtered (not applicable)(該当なし) diff 概要 (軽量サマリー)feat: push-runner の per-run メトリクスを JSONL 永続化 (R3、ADR-055 amendment)。12 ファイル変更 (+662 / -83 目算)。
PR 本文の記載によれば 次のアクション
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/push-pipeline-fix-plan2.md`:
- Around line 148-150: Update the telemetry field list in the R3 plan to remove
pr_size line count and takt run slug from the implemented JSONL schema, or
explicitly mark both as deferred for a later PR, consistent with
docs/adr/adr-055-firing-telemetry-collection.md and the canonical docs/todo13.md
plan.
- Line 109: R2 セクション全体の完了状態を統一してください。見出しと §1 backfill の「マージ済み
`#293`」に合わせて、本文中の「実装済み・未 push」および「実 push 検証は未実施」の記述を完了済みの内容へ更新し、関連する記載も整合させてください。
In `@src/lib-telemetry/src/lib.rs`:
- Around line 166-177: Validate file_prefix in append_partitioned before
constructing the output path, allowing only ASCII letters, digits, hyphens, and
underscores; reject any other value, including path separators and absolute-path
forms, with an appropriate io::Error. Preserve the existing path construction
for valid prefixes.
🪄 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: 8d441e68-d166-41b8-81e1-41942bebc912
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (11)
.gitignoredocs/adr/adr-055-firing-telemetry-collection.mddocs/push-pipeline-fix-plan2.mddocs/todo-summary.mddocs/todo13.mdsrc/cli-push-runner/Cargo.tomlsrc/cli-push-runner/src/log.rssrc/cli-push-runner/src/main.rssrc/cli-push-runner/src/metrics.rssrc/cli-push-runner/src/stages/post_takt_regate.rssrc/lib-telemetry/src/lib.rs
💤 Files with no reviewable changes (1)
- docs/todo13.md
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)
Applicable Findings (Medium 以下)
Filtered (not applicable)(該当なし — 3 件とも project fitness filter (ADR 一覧照合含む) を通過し applicable) 次のアクション
|
run 終了時に stage 別 elapsed / docs_only / post_takt_regate 判定 / total_secs / exit_code / os / bookmarks / takt_workflow を 1 行 JSONL で .claude/telemetry/push-runs-*.jsonl へ append する。T0 の stage ログは stderr のみで非永続だったため、ADR-057/058 の採否判定 (期限 2026-08-15) と after 計測がコンソール手動保存に依存していた問題を解消する (todo 順位 325)。 器は lib-telemetry (ADR-055) を再利用するが、firing 集計 (firings-*.jsonl glob) を汚さないよう別 record kind = 別ファイルに書く。lib-telemetry には汎用 writer (record_metric*) のみ追加し、push-run 固有スキーマ RunRecord は cli-push-runner が保持 (責務分離)。post_takt_regate は skip/run-pass/block を区別するため RegateDecision を surface。opt-in / kill-switch / fail-open は既存 telemetry 原則に相乗り。ADR-055 に amendment を追記。 あわせて R2 (#293 マージ済) の §1 表 backfill (行追加 + 見出しをマージ済みに更新) を plan2.md に反映 (R1 と同じ doc bookkeeping)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b6b5744 to
32c47b9
Compare
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)(該当なし) Applicable Findings (Medium 以下)(該当なし) Filtered (not applicable)(該当なし) 解消済み指摘 (参考)
次のアクション
|
…r 7 日差し戻し 棚卸し (35 ファイル全件調査) の採否確定分を一括反映する。 判定確定 (bounded lifetime): - ADR-056 採用 (速度目標取り下げ、二重 miss 10 件/6 PR の実測を記録し却下条件を精緻化) - ADR-057 採用 (51 docs-only run / 誤 skip 0 / -54.2s/run。templates へ default-ON 反映) - ADR-058 採用 (changed_block 1 件は flaky 誤 block と確定、真の検出 0 件を正直に記録) - ADR-059 採用 (CLI=描画 / VSCode=非描画で defense-in-depth が代替。第 2 弾展開は見送り) - auto-push gate B1-loop NO-GO (観測手段欠落 + 経路消滅。ADR-043 amendment へ転記) - 順位 247 継続 (延長 1 回目)、順位 319 dogfood 不合格 (29 PR 実測 69% 重複) を記帳 計画書の退役: - file-length-enforcement-plan.md 削除 (全 6 PR 完了、分割制約は dev-conventions へ移設) - weekly-review-notification-plan.md 削除 (削除条件決着を ADR-059 § 確定判定へ転記) - todo2.md 退役 (ADR-032 ブロックは ADR-057 実現で廃止、残 2 タスクを todo22 へ移送) - auto-push-gate-dogfood.md 削除 (NO-GO 判定、ADR-043 amendment へ転記) 台帳整理: - ADR-030 Phase E (旧機構廃止) を撤回し順位 27 決着 (ADR-030 § 撤回記録) - 順位 51/225/11/20/21/22/333 を削除、todo14 孤児 4 件を採番 (433-436) - 新規起票 7 件 (437-443: rules 採否 / branch 回収 / gate telemetry / weekly-review 保存 / docs-lint 1:1 検査 / security facet 敵対的観点 / flaky 当たり面) - グローバル文書対象 17 エントリに旧環境実査の Status update 注記 - push-pipeline-fix-plan/plan2 の stale 記載を #292/#293/#294 マージ済みに更新 運用変更: - weekly reminder_threshold_days 30→7 差し戻し (ADR-070 の 30 日は routine 正常稼働が 前提だが成果物デリバリ未確立のため。再引き上げは保存問題解消後に再評価) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…r 7 日差し戻し (#392) 棚卸し (35 ファイル全件調査) の採否確定分を一括反映する。 判定確定 (bounded lifetime): - ADR-056 採用 (速度目標取り下げ、二重 miss 10 件/6 PR の実測を記録し却下条件を精緻化) - ADR-057 採用 (51 docs-only run / 誤 skip 0 / -54.2s/run。templates へ default-ON 反映) - ADR-058 採用 (changed_block 1 件は flaky 誤 block と確定、真の検出 0 件を正直に記録) - ADR-059 採用 (CLI=描画 / VSCode=非描画で defense-in-depth が代替。第 2 弾展開は見送り) - auto-push gate B1-loop NO-GO (観測手段欠落 + 経路消滅。ADR-043 amendment へ転記) - 順位 247 継続 (延長 1 回目)、順位 319 dogfood 不合格 (29 PR 実測 69% 重複) を記帳 計画書の退役: - file-length-enforcement-plan.md 削除 (全 6 PR 完了、分割制約は dev-conventions へ移設) - weekly-review-notification-plan.md 削除 (削除条件決着を ADR-059 § 確定判定へ転記) - todo2.md 退役 (ADR-032 ブロックは ADR-057 実現で廃止、残 2 タスクを todo22 へ移送) - auto-push-gate-dogfood.md 削除 (NO-GO 判定、ADR-043 amendment へ転記) 台帳整理: - ADR-030 Phase E (旧機構廃止) を撤回し順位 27 決着 (ADR-030 § 撤回記録) - 順位 51/225/11/20/21/22/333 を削除、todo14 孤児 4 件を採番 (433-436) - 新規起票 7 件 (437-443: rules 採否 / branch 回収 / gate telemetry / weekly-review 保存 / docs-lint 1:1 検査 / security facet 敵対的観点 / flaky 当たり面) - グローバル文書対象 17 エントリに旧環境実査の Status update 注記 - push-pipeline-fix-plan/plan2 の stale 記載を #292/#293/#294 マージ済みに更新 運用変更: - weekly reminder_threshold_days 30→7 差し戻し (ADR-070 の 30 日は routine 正常稼働が 前提だが成果物デリバリ未確立のため。再引き上げは保存問題解消後に再評価) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
.claude/telemetry/push-runs-*.jsonlへ appendfirings-*.jsonlglob) を汚さない。lib-telemetry には汎用 writer のみ追加し push-run スキーマは cli-push-runner が保持 (責務分離)post_takt_regateを bool →RegateOutcomeに変更し skip/run-pass/block を区別 (ADR-058 判定信号)RunMetrics::timedに一元化し、全終了経路 (config error / 各種 exit code 中断含む) で 1 回だけ書き出す。fail-open / opt-in / kill-switch は既存 telemetry 原則に相乗りContext
Why: T0 (#278) の
stage=... elapsed=...sログは stderr のみで非永続だったため、決定論 stage 層 (T1/T3/T11/T12 の改善効果が落ちる層) を遡及分析できず、ADR-057/058 の採否判定 (期限 2026-08-15) と R5/R6 after 計測が「push 時コンソール出力の手動保存」に依存していた。Trigger: push-pipeline-fix-plan2 §3 R3 / todo 順位 325 / ADR-055 (器の再利用元)。
Scope: takt run slug (
run_cmd_inheritが takt 出力を捕捉しない) と pr_size 行数 (stage が総行数を返さない) は完了基準の必須外のため deferred。Validation
cargo test: cli-push-runner 256 pass / lib-telemetry 18 pass / workspace 全 crate greencargo clippy --workspace --all-targets --all-features -- -D warnings: warning 0pnpm pushpre-push review (pre-push-review-refute): verdict=APPROVE (security + simplicity 両者、2026-07-18)push-runs-*.jsonlに完全な run メトリクス (stages/regate/total/exit/os) が 2 行永続化されたことを実測。kill-switch / config-error 中断経路の書き出しも確認References
Summary by CodeRabbit
新機能
ドキュメント