feat(push-runner): fix 後の決定論再ゲートを追加 (push パイプライン改善 T12) - #289
Merged
Conversation
takt (reviewers → fix loop) の後に post_takt_regate stage を追加し、fix が 作業コピーを書き換えた場合のみ quality_gate 全 group を再実行して push を block する。虚偽ではないが検証不足の fully_resolved (PR #224 型) を pre-push でも遮断する。post-PR gate (ADR-037 §Mitigations) の pre-push 版。 - 変化検出は diff snapshot 前後比較 (Stage 1.5 の diff を takt 前に保持し、 takt 後に再取得して比較)。metadata のみの変化に構造的に不感 (ADR-021 § commit_id 単独比較の限界)。判定は pure fn + closure 注入 (ADR-021 原則 3) - fail 方向は gate 系 fail-closed (判定不能 → 実行)。ADR-021 原則 4 の repush 系 fail-safe (判定不能 → 何もしない) とは逆向き - 再ゲート範囲は quality_gate 全 group (docs-only skip は fix 後は非適用) - fix.md (共有 facet / ADR-020) の workspace 全体 + --ignored 自己申告義務を 撤去し影響 crate の build -p + test -p に縮小。検証を決定論 gate へ委譲。 post-pr gate も rust-lint-test group (--ignored 含む) を実行済で両経路担保 - ADR-039 3 点セット: [post_takt_regate] default OFF / env POST_TAKT_REGATE_DISABLE=1 kill-switch / 本 repo enabled=true で dogfood - 新規 ADR-058 (試験運用、判定期限 2026-08-15) + ADR-037 §Mitigations 追記 回帰テスト: post_takt_regate 11 本 (decide_regate 全 5 分岐 + 統合 block/pass/ skip) + capture_diff_snapshot 2 本 (cli-push-runner 215 → 250 passed)。配布 exe で re-gate ON=block/exit 1 vs OFF=push (従来挙動) / 無変更 skip / kill-switch の 4 scenario を実機で before/after 確認 (takt は自作 pnpm.exe stub で代役)。 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 (13)
📝 WalkthroughWalkthroughpre-push 経路に post-takt re-gate stage を追加し、fix 前後の diff snapshot が変化した場合または判定不能な場合に quality_gate を再実行する。設定、パイプライン制御、判定テスト、ADR・手順書を更新した。 ChangesPost-takt 再ゲート
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Pipeline
participant DiffStage
participant Takt
participant RegateStage
participant QualityGate
Pipeline->>DiffStage: pre diff snapshot を取得
Pipeline->>Takt: takt を実行
Takt-->>Pipeline: 実行結果を返す
Pipeline->>RegateStage: pre/post snapshot を比較
RegateStage->>QualityGate: Changed または Indeterminate の場合に再実行
QualityGate-->>RegateStage: gate 結果
RegateStage-->>Pipeline: 継続または block
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)(該当なし — レビュー指摘が 0 件のため) Applicable Findings (Medium 以下)(該当なし) Filtered (not applicable)(該当なし) diff 概要 (軽量サマリー)
次のアクション
|
1 task
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.
Summary
post_takt_regatestage を追加し、fix が作業コピーを書き換えた場合のみ quality_gate 全 group を再実行して push を block する (検証不足のfully_resolved= PR refactor(cli-pr-monitor): poll/mod.rs + fix_commit.rs を 800 行以下に分割 (PR-W2) #224 型を pre-push でも遮断)[diff] commandを再取得して比較)。metadata のみの変化に不感、pure fndecide_regate+ closure 注入 (ADR-021 原則 3)。fail 方向は gate 系 fail-closed (判定不能 → 実行)fix.md(共有 facet / ADR-020) の workspace 全体 +--ignored自己申告義務を撤去し影響 crate のbuild -p+test -pに縮小。検証を決定論 gate へ委譲 (post-pr gate もrust-lint-testgroup で--ignoredを既に担保 = 方針 3 は post-pr 側変更不要)[post_takt_regate]default OFF / envPOST_TAKT_REGATE_DISABLE=1kill-switch / 本 repoenabled = trueで dogfooddocs/push-pipeline-fix-plan.md§5/§8/§3 更新Context
docs/push-pipeline-fix-plan.mdの T12。takt の fix ループがコードを書き換えた後、pre-push 経路には決定論検証が無くfix.mdの自己申告のみに依存していた。post-pr 経路は PR #224 の実害 (cargo testは通したが#[ignore]統合テスト未実行の fix が回帰を素通し) 後に決定論 gate (cli-pr-monitor) で塞がれたが、pre-push は未対応だった。本 PR がその機械的 backstop を pre-push にも導入し、あわせて fix.md の重い自己検証 (fix execute 296s の主因) を gate へ委譲して縮小する。Scope decision: 変化検出は commit_id + diff 二段構え (ADR-021 原則 1 の字面) ではなく diff snapshot 前後比較を採用 (ユーザー承認済み) — 前者は
capture_commit_id/diff_is_emptyの lib-jj-helpers 移設 + cli-pr-monitor 移行を要し PR が肥大化する (§2 原則 4)。後者は push-runner 内で完結し metadata のみの変化に構造的に不感。再ゲート範囲は quality_gate 全 group (ユーザー承認済み)。Validation
cargo test -p cli-push-runner: 215 → 250 pass (post_takt_regate 11 本 + capture_diff_snapshot 2 本)、--ignored2 本も passcargo clippy --workspace --all-targets --all-features -- -D warnings: 0 warningpost_takt_regateは「takt 前後で作業コピーに変化なし」で skip → push 成功 (新 stage が本番で正しく動作)References
docs/push-pipeline-fix-plan.mdT12🤖 Generated with Claude Code
Summary by CodeRabbit
新機能
改善
ドキュメント