feat(cli-pr-monitor): auto-push gate-bypass 是正 PR-1 — A1 fix facet --ignored ゲート + B1 auto-push 前 quality gate (順位225) - #238
Merged
Conversation
…ignored ゲート + B1 auto-push 前 quality gate (順位225) PR #224 で takt auto-fix が #[ignore] repush テスト 2 件を破壊したまま convergence_verdict: fully_resolved を宣言し、auto-push の jj git push 直 push が cli-push-runner の quality_gate をバイパスして回帰が無検証で PR に到達した。fix 時 (A1) と push 時 (B1) の 2 層で遮断する。 A1 (.takt/facets/instructions/fix.md、pre-push/post-pr 共有 facet): - test ファイル変更 or pub/pub(crate) 関数の挙動・signature 変更時は cargo test -- --ignored --test-threads=1 の PASS を fully_resolved の 前提条件化。Honesty constraint / Test results 出力要件も更新 B1 (src/cli-pr-monitor/src/stages/gate.rs 新設): - auto-push 前に push-runner-config.toml の quality_gate group (default: rust-lint-test) を単一ソース参照で実行。config 欠落・group 不在・コマンド失敗はすべて FAIL = push 中止 + action_required (fail-closed、ADR-043) - fix diff (pre_takt_cid → @) が docs-only (ADR-035 path 基準) なら gate を skip し docs auto-fix の速度を維持。判定不能は source 扱い - [fix.gate] enabled (default true) + group、kill-switch は環境変数 PR_MONITOR_GATE_DISABLE=1。派生プロジェクト template に非 Rust 環境向け opt-out 注意書きを追加 - GateConfig は file-length gate (800 行) 回避と凝集のため config.rs でなく stages/gate.rs に配置 docs: - docs/auto-push-gate-dogfood.md 新設 (ephemeral、B1-loop GO/NO-GO 判定 完了時に削除): 観測ログ・判断基準・B1-loop 設計案 (gate-fix.yaml 方式、 N=2、空振り検知) と不採用案を保存 - todo13.md / todo-summary.md 順位225 現在地更新 - ADR-037 Mitigations + ADR-022 採用される構成要素に B1 gate を追記 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughfix.md の完了判定に --ignored 統合テストの条件付き必須ルールを追加し、cli-pr-monitor に auto-push 前の fail-closed 品質ゲート(gate.rs)を新規実装。FixConfig と設定ファイルに gate 設定を追加し、repush フローへ配線した。関連 ADR と todo ドキュメントも更新された。 ChangesAuto-push品質ゲート
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
aloekun
added a commit
that referenced
this pull request
Jul 3, 2026
…位251) (#239) PR #238 で実観測した 3 欠陥 (repo 検出失敗 / checker JSON parse 停止 / post-merge feedback silent 消失) と、GH_REPO による場当たり対処の部分故障を 構造的に解消する (ADR-045 恒久対策候補 1 の実装 + 防御 preset)。 (a) GIT_DIR 自動注入 (lib-jj-helpers::inject_git_dir_for_gh): - .git 不在 + GIT_DIR 未設定のとき .jj/repo (secondary workspace では main store への相対パスファイル) → store/git_target を辿って main の .git を導出し、プロセス env に設定 (子プロセス gh 全体へ伝播) - cli-pr-monitor / cli-merge-pipeline / check-ci-coderabbit の main() で 注入。既存 env 尊重・導出失敗は warning + 続行 (fail-soft) - tempdir 疑似 layout の unit test 6 件 + 実 jj (init --colocate + workspace add) の #[ignore] 統合テスト (d) gh-repo-env-guard preset (hooks-pre-tool-validate、恒久): - Bash / PowerShell の GH_REPO 環境変数代入を block し GIT_DIR / 自動注入 / repo 指定フラグへ誘導 (PowerShell 構文は matcher 拡張に備え先行) - GH_REPO は引数なし gh repo view に効かず silent 部分故障を招くため (b) checker 出力の stdout/stderr 分離 (run_cmd_capture 新設): - invoke_checker は stdout のみ JSON parse、stderr は log 転送。checker の fail-soft stderr 警告が JSON に連結され trailing characters で監視停止 した回帰の防止 (cmd 実プロセスの regression test 付き) (c) owner_repo 検出失敗時の .failed marker (AiStepContext::SkipWithMarker): - 従来は marker なしで skip し L2 recovery (ADR-030) が発火しなかった。 skip でも marker を書き recovery 可能に docs: ADR-045 改訂 (候補 1 実装済み化、手動 GIT_DIR を fallback に格下げ、 コマンド対応表更新)、todo13/todo-summary 順位 251 現在地更新 (dogfood 記録 と順位 225 dogfood 開始日記入を含む) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 12, 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.
概要
PR #224 で顕在化した auto-push の gate-bypass (takt auto-fix が
#[ignore]repush テスト 2 件を破壊したまま無検証で PR に到達) を、fix 時 (A1) と push 時 (B1) の 2 層で是正する。順位 225 の PR-1 (2 PR 構成の 1 本目。B1-loop は dogfood 観測後に GO/NO-GO 判定)。変更内容
A1 — fix facet の完了ゲート強化 (
.takt/facets/instructions/fix.md)pub/pub(crate)関数の挙動・signature 変更時はcargo test -- --ignored --test-threads=1の PASS をconvergence_verdict: fully_resolvedの前提条件化B1 — auto-push 前の決定論 gate (
src/cli-pr-monitor/src/stages/gate.rs新設)jj git push直 push) の前に push-runner-config.toml の[[quality_gate.groups]](default:rust-lint-test) を単一ソース参照で実行action_required(fail-closed、ADR-043)[fix.gate]enabled (default true) + group、kill-switch: 環境変数PR_MONITOR_GATE_DISABLE=1。派生プロジェクト template に非 Rust 環境向け opt-out 注意書きGateConfigは file-length gate (800 行) 回避と凝集のため config.rs でなく stages/gate.rs に配置docs
docs/auto-push-gate-dogfood.md新設 (ephemeral、B1-loop GO/NO-GO 判定完了時に削除): 観測ログ・判断基準 (期限: merge + 6 週間 / gate FAIL 2 件 / auto-push 発火 10 回)・B1-loop 設計案 (gate-fix.yaml 方式、N=2、空振り検知) と不採用案を保存検証
cargo clippy --workspace -- -D warningsPASScargo test(workspace) 全 PASS (新規 gate unit テスト 24 件含む)cargo test -- --ignored --test-threads=1(workspace) 14 件 PASSpnpm lint:docsOKDogfood 証跡 (意図的破壊テスト)
#[ignore]統合テストに意図的なassert!(false)を注入した状態で gate の第 3 コマンド (cargo test -- --ignored --test-threads=1) を実行し、exit 101 で FAIL 検出 = gate が push を中止しaction_requiredに倒す経路を実証。復元後に全テスト green を再確認済み。PR #224 と同型の回帰は auto-push 前に遮断される。🤖 Generated with Claude Code
Summary by CodeRabbit
新機能
--ignoredを含むテスト実行を必須化し、判定基準も明確になりました。バグ修正
ドキュメント