Skip to content

feat(pr-monitor): scope_guard を enforce へ昇格 + PR #340 feedback 採用 2 件の todo 登録 - #341

Merged
aloekun merged 3 commits into
masterfrom
feat-scope-guard-enforce-batch
Aug 1, 2026
Merged

feat(pr-monitor): scope_guard を enforce へ昇格 + PR #340 feedback 採用 2 件の todo 登録#341
aloekun merged 3 commits into
masterfrom
feat-scope-guard-enforce-batch

Conversation

@aloekun

@aloekun aloekun commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • [fix.scope_guard] の mode を observe → enforce へ変更 (config 1 行 + section コメントに observe 実績と昇格日を永続記録)
  • ADR-054 に dogfood 記録を追記: observe 期間 (2026-07-12〜08-01) は post-pr-review 30 回中 fix step 実行 5 回・violation 観測 0 件 = 誤検知ゼロ、および violation 記録が stderr のみで永続化されない観測ギャップ
  • harness-improvement-plan.md の WP-11 残作業を「enforce で 3〜5 PR (fix step 発生ベース) 誤検知ゼロ → 本採用判定」へ更新
  • PR docs: ハーネス改善計画をスリム化し WP-15 系決定を ADR-063/064 へ切り出し #340 post-merge feedback の採用 2 件を todo 登録: 順位 357 (CLAUDE.md ADR index ステータスタグと ADR 本体の整合チェック、着手時の ADR-047 タグ即修正を含む) / 順位 358 (Cross-File Reference Lifecycle の dev-conventions.md 明文化)

Context

  • Why: scope_guard の observe データ蓄積は 7/20 以降停止しており (fix step 発生ゼロ)、observe 継続の情報価値がない一方、実演習 5/5 クリーン + fail-closed 設計 + kill-switch という昇格条件が揃っていたため enforce へ昇格した。
  • Trigger: WP-11 / WP-15 追補の観測状況調査で「observe はデータが増えない、enforce 昇格が合理的」と評価し、ユーザー承認を得た。todo 登録 2 件は PR docs: ハーネス改善計画をスリム化し WP-15 系決定を ADR-063/064 へ切り出し #340 の post-merge feedback 採用分。
  • Scope decision: templates/pr-monitor-config.toml は section 全体コメントアウト (派生プロジェクト default OFF、例示は元々 enforce) のため変更不要。feedback の様子見 2 件・却下推奨 4 件は未確定のまま残置 (別途判断)。

Validation

  • pnpm push quality gate: lint / test / build / rust-lint-test (clippy + cargo test) 全 PASS
  • pre-push review (takt): security-review / simplicity-review とも verdict=APPROVE (findings 0)
  • pnpm lint:docs (cross-ref / preamble / priority-inversion) / pnpm lint:md: クリーン
  • enforce の実効確認は次回 fix step 発生 PR から。誤 block 時の kill-switch: PR_MONITOR_SCOPE_GUARD_DISABLE=1

References

Summary by CodeRabbit

  • 変更

    • スコープ違反検知が監視モードから強制モードへ移行し、違反時は自動プッシュを中止して対応要求へ切り替わるようになりました。
  • ドキュメント

    • 強制モードへの移行実績、検証条件、観測上の制約を記録しました。
    • ADRのステータス整合性チェックや、一時文書から恒久文書への移行手順に関する計画を追加・更新しました。

aloekun and others added 2 commits August 1, 2026 17:41
- observe 期間 (2026-07-12〜2026-08-01) の実績: post-pr-review 30 回中 fix step 実行 5 回、violation 観測 0 件 = 誤検知ゼロを確認
- pr-monitor-config.toml の [fix.scope_guard] mode を enforce へ変更 (templates は section コメントアウト = 派生 default OFF のため変更不要)
- ADR-054 に dogfood 記録を追記 (observe 実績 / 昇格日 / violation 記録が stderr のみで永続化されない観測ギャップ)
- harness-improvement-plan.md の WP-11 残作業を「enforce で 3〜5 PR 誤検知ゼロ → 本採用判定」へ更新

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 1, 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 Plus

Run ID: 59f8d46d-11b0-4825-aa01-376da0bcd545

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

scope_guardobserve から enforce に変更した。運用実績と本採用条件を文書化した。ADR のステータス整合チェックと、永続文書への参照移管手順を計画に追加した。

Changes

scope_guard 昇格と文書運用

Layer / File(s) Summary
scope_guard の enforce 昇格記録
pr-monitor-config.toml, docs/adr/adr-054-prompt-injection-trust-boundary-defense.md, docs/harness-improvement-plan.md
scope_guardmodeenforce に変更した。observe 期間の実績、昇格日、3〜5 PR の誤検知確認による本採用判定を記録した。
ADR 管理と参照移管の計画
docs/todo-summary2.md, docs/todo14.md
ADR index と ADR 本体のステータス整合チェックを計画した。ephemeral な cross-file reference を永続文書へ移管する checklist を追加した。

Estimated code review effort: 2 (Simple) | ~10 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 タイトルはscope_guardのenforce昇格とPR #340 feedbackに基づく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 feat-scope-guard-enforce-batch

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

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

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

  • トリガー: issue_comment (created) / 実行 run
  • CI: CodeRabbit review が in progress (pending)。他の CI check はこの head commit に対して未登録。mergeStateStatus: UNSTABLE (pending check 起因、mergeable: MERGEABLE)
  • レビュー状況: CodeRabbit — レビュー未着 (処理中)。人間レビュー: なし (reviews 0件、reviewDecision 空)
  • Verdict: approved (findings 0件 — CodeRabbit レビュー未着のため現時点で applicable finding なし)

Applicable Findings (Critical / High / Major)

(該当なし)

Applicable Findings (Medium 以下)

(該当なし)

Filtered (not applicable)

(該当なし)

差分概要

5 ファイル変更、docs 中心 + 設定変更 1 件:

File 変更内容
docs/adr/adr-054-prompt-injection-trust-boundary-defense.md scope_guard dogfood 記録を追記 (+6 行): observe 期間 (2026-07-12〜08-01、fix step 5回) 誤検知ゼロ、enforce 昇格の経緯と観測ギャップ
docs/harness-improvement-plan.md WP-11 残作業の表現更新 (observe→enforce 昇格済みへ反映)
docs/todo-summary2.md 新規 todo 2 件 (#357 ADR index 整合チェック Tier2、#358 Cross-File Reference Lifecycle 明文化 Tier3) を追加
docs/todo14.md 上記 2 件の詳細セクション追加 (+44 行)
pr-monitor-config.toml [fix.scope_guard]mode"observe""enforce" へ変更 (ADR-054 の bounded lifetime 手順に沿った昇格。コメントも同期更新)

pr-monitor-config.toml の mode 変更は唯一の非 docs 変更 (実行時挙動に影響する設定変更) だが、diff 内の ADR-054 更新箇所に判定根拠 (observe 期間の誤検知ゼロ実績) が明記されており、ADR-054 本文の decision trigger 記載と整合している。

次のアクション

  • CodeRabbit のレビュー結果を待ち、findings が到着次第の次回分析で project fitness filter を適用する。
  • enforce 昇格後の 3〜5 PR (fix step 発生ベース) の誤検知観測を継続し、todo14.md の当該残作業 (WP-11) の進捗を追跡する。

@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

🧹 Nitpick comments (1)
docs/adr/adr-054-prompt-injection-trust-boundary-defense.md (1)

90-94: 🗄️ Data Integrity & Integration | 🔵 Trivial

scope_guard の判断根拠を CI artifact などへ永続化してください。

scope_guard.rs には violationlog_info / ObservedViolationdecide_violation 経路のみで出しますが、ADR-054 と WP-11 は 3-5 PR / 誤検知ゼロ を採否判定に使います。現行だと PR / fix step / mode 単位の実行結果が ephemeral な stderr に留まるため、判定根拠として保存先と retention を明記してください。

ADR-054 には 観測ギャップ の文言があるため、observed 0 を正式根拠にするなら 観測ギャップを解消します も同時に更新します。WP-11 も 判定基準・kill-switch は ADR-054 を参照 とあるため、永続化方針は ADR-054 へ統一して追加してください。

🤖 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/adr/adr-054-prompt-injection-trust-boundary-defense.md` around lines 90
- 94, docs/adr/adr-054-prompt-injection-trust-boundary-defense.md の dogfood
記録と「観測ギャップ」を更新し、scope_guard の PR・fix step・mode 別判断結果と violation を CI artifact
などへ永続化する保存先、形式、retention、実施方針を明記してください。永続化後に observed 0
を正式な判定根拠として扱う場合は、観測ギャップ解消の記述も更新してください。docs/harness-improvement-plan.md
の該当する判定基準・kill-switch 記述は ADR-054 の統一方針を参照する内容に合わせ、直接の重複定義は追加しないでください。
🤖 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-summary2.md`:
- Line 115: Clarify the overlapping ADR index work by separating
responsibilities: in docs/todo-summary2.md at lines 115-115, limit rank 272 to
duplicate numbering and identifier consistency, and limit rank 357 to comparing
index status tags with the corresponding ADR body status (or merge both items).
Apply the same separation to the detailed plan and completion criteria in
docs/todo14.md at lines 631-650, including the appropriate scope for each item.

In `@pr-monitor-config.toml`:
- Around line 56-62: execute_repush_flow の ScopeGuardOutcome::BlockedViolation
経路をテストで固定し、mode="enforce" では run_push
が実行されないことを検証してください。併せて、PR_MONITOR_SCOPE_GUARD_DISABLE=1 の kill-switch と
mode="observe" では push が継続されることを確認し、enforce 昇格時の回帰ケースを網羅してください。

---

Nitpick comments:
In `@docs/adr/adr-054-prompt-injection-trust-boundary-defense.md`:
- Around line 90-94: docs/adr/adr-054-prompt-injection-trust-boundary-defense.md
の dogfood 記録と「観測ギャップ」を更新し、scope_guard の PR・fix step・mode 別判断結果と violation を CI
artifact などへ永続化する保存先、形式、retention、実施方針を明記してください。永続化後に observed 0
を正式な判定根拠として扱う場合は、観測ギャップ解消の記述も更新してください。docs/harness-improvement-plan.md
の該当する判定基準・kill-switch 記述は ADR-054 の統一方針を参照する内容に合わせ、直接の重複定義は追加しないでください。
🪄 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 Plus

Run ID: 61881154-d4f7-4cb7-a035-c0edb158655b

📥 Commits

Reviewing files that changed from the base of the PR and between 3f4c88a and 44b2401.

📒 Files selected for processing (5)
  • docs/adr/adr-054-prompt-injection-trust-boundary-defense.md
  • docs/harness-improvement-plan.md
  • docs/todo-summary2.md
  • docs/todo14.md
  • pr-monitor-config.toml

Comment thread docs/todo-summary2.md Outdated
| 354 | 💎 Tier 3 | **todo ファイル削除・更新時のチェックリストを dev-conventions.md に追加 (#332 post-merge feedback T3-8 採用)** | todo14.md | XS | なし (PR #332 で todo16.md 複数セクション削除時に lint:md を 3 回以上再実行。段階削除+都度 lint:md+順位番号本文混入注意の checklist 化、専用スクリプト化 (Tier2 様子見) と独立の即応策。順位334 と相補) |
| 355 | 💎 Tier 3 | **新規スキル作成チェックリストを dev-conventions.md に追加 (#332 post-merge feedback T3-9 採用)** | todo14.md | XS | なし (PR #332 で monthly-review skill 作成時に weekly-review を都度参照する手戻り。SKILL.md/evals.json/trigger_eval.json の 3 点セット + Phase 構成 + deploy 前 sync check を checklist 化) |
| 356 | 🔧 Tier 2 | **weekly/monthly staleness 判定の共通 fixture parametrized test を追加 (#331 post-merge feedback T2-1 採用)** | todo14.md | S | なし (monthly_review.rs の staleness 判定が weekly_review.rs と逐語重複、片方修正で挙動乖離するリスク。同一 fixture〔threshold 境界/Missing/Stale/Unreadable/未来値/main-root canonical〕で両流路を検証、inline test module に配置) |
| 357 | 🔧 Tier 2 | **CLAUDE.md の ADR index ステータスタグと ADR 本体の整合チェックを追加 (#340 post-merge feedback T1-1 採用)** | todo14.md | M | なし (ADR-047 の index タグが `試験運用` のまま本体の `却下` と乖離した実害が残存。ADR-007 の 2 層は単一ファイル起点のため独立 doc-consistency チェックとして実装、順位 272 と同居実装候補。着手時に ADR-047 タグ即修正を含む) |

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

順位 272 と順位 357 の重複を解消してください。

両項目が CLAUDE.md の ADR 索引整合を扱うため、実装責務が不明確です。

  • docs/todo-summary2.md#L115-L115: 順位 272 を重複採番・識別子整合に限定し、順位 357 を index status tag と ADR 本体 status の比較に限定するか、2 項目を統合してください。
  • docs/todo14.md#L631-L650: 同じ責務分離を詳細計画と完了基準へ反映してください。

根拠: docs/todo-summary2.md の順位 272/357 と docs/todo14.md の詳細計画です。

📍 Affects 2 files
  • docs/todo-summary2.md#L115-L115 (this comment)
  • docs/todo14.md#L631-L650
🤖 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-summary2.md` at line 115, Clarify the overlapping ADR index work by
separating responsibilities: in docs/todo-summary2.md at lines 115-115, limit
rank 272 to duplicate numbering and identifier consistency, and limit rank 357
to comparing index status tags with the corresponding ADR body status (or merge
both items). Apply the same separation to the detailed plan and completion
criteria in docs/todo14.md at lines 631-650, including the appropriate scope for
each item.

Comment thread pr-monitor-config.toml
Comment on lines +56 to +62
# bounded lifetime (ADR-054): observe 期間 (2026-07-12〜08-01、fix step 実行 5 回) で誤検知
# ゼロを確認し、2026-08-01 に enforce へ昇格。enforce で 3-5 PR 誤検知ゼロなら本採用、
# 誤検知頻発なら enabled = false で kill。
# 緊急バイパス (kill-switch): 環境変数 PR_MONITOR_SCOPE_GUARD_DISABLE=1
[fix.scope_guard]
enabled = true
mode = "observe"
mode = "enforce"

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 | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C4 \
  'PR_MONITOR_SCOPE_GUARD_DISABLE|evaluate_scope_guard|BlockedViolation|run_push|scope_guard' \
  src/cli-pr-monitor .takt pr-monitor-config.toml || true

Repository: aloekun/claude-code-hook-test

Length of output: 25212


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- Cargo features/runners ---\n'
git ls-files 'src/cli-pr-monitor/**' | sed -n '1,120p'
printf '\n--- tests mentions ---\n'
rg -n '#\[test\]|#\[module\]|#\[cfg\(test\)\]|mod tests|fn test_|scope_guard_disabled|observe|BlockedViolation|run_push\(' src/cli-pr-monitor -C 3 || true

printf '\n--- files with test dirs ---'
git ls-files | grep -E '(^|/)(tests?|test|spec)/' | sed -n '1,200p'

printf '\n--- scope_guard key tests ---\n'
sed -n '240,370p' src/cli-pr-monitor/src/stages/scope_guard.rs
sed -n '96,135p' src/cli-pr-monitor/src/stages/repush.rs
sed -n '185,215p' src/cli-pr-monitor/src/stages/scope_guard.rs

Repository: aloekun/claude-code-hook-test

Length of output: 258


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- Cargo features/runners ---'
git ls-files 'src/cli-pr-monitor/**' | sed -n '1,160p'

printf '%s\n' ''
printf '%s\n' '--- tests mentions ---'
rg -n -C3 '#\[test\]|#\[module\]|#\[cfg\(test\)\]|mod tests|fn test_|scope_guard_disabled|observe|BlockedViolation|run_push\(' src/cli-pr-monitor || true

printf '%s\n' ''
printf '%s\n' '--- test directories/files ---'
git ls-files | grep -E '(^|/)(tests?|test|spec)/' | sed -n '1,200p' || true

printf '%s\n' ''
printf '%s\n' '--- key source snippets ---'
sed -n '96,135p' src/cli-pr-monitor/src/stages/repush.rs
sed -n '185,245p' src/cli-pr-monitor/src/stages/scope_guard.rs
sed -n '240,368p' src/cli-pr-monitor/src/stages/scope_guard.rs

Repository: aloekun/claude-code-hook-test

Length of output: 50386


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- scope_guard relevant tests ---'
rg -n -C 4 '#\[test\]|scope_guard|evaluate_scope_guard|scope_guard_disabled|observe|BlockedViolation|run_push\(' src/cli-pr-monitor/src/stages/scope_guard.rs src/cli-pr-monitor/src/stages/repush.rs pr-monitor-config.toml || true

printf '%s\n' ''
printf '%s\n' '--- scope_guard config fields and parse ---'
sed -n '36,56p' src/cli-pr-monitor/src/stages/scope_guard.rs
rg -n -C 3 'fix\.scope_guard|scope_guard|enabled = true|mode = "enforce"' pr-monitor-config.toml || true

printf '%s\n' ''
printf '%s\n' '--- execute_repush_flow call around scope violation and run_push ---'
sed -n '93,132p' src/cli-pr-monitor/src/stages/repush.rs

Repository: aloekun/claude-code-hook-test

Length of output: 42550


scope guard の BlockedViolation 経路を統合的に固定してください。

execute_repush_flow 側では ScopeGuardOutcome::BlockedViolationrun_push 未実行になる構造です。このケースを execute_repush_flow(...) の test に固定し、kill-switch と observe での push 継続も含め、enforce 昇格の回帰網羅を補ってください。

🤖 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 `@pr-monitor-config.toml` around lines 56 - 62, execute_repush_flow の
ScopeGuardOutcome::BlockedViolation 経路をテストで固定し、mode="enforce" では run_push
が実行されないことを検証してください。併せて、PR_MONITOR_SCOPE_GUARD_DISABLE=1 の kill-switch と
mode="observe" では push が継続されることを確認し、enforce 昇格時の回帰ケースを網羅してください。

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

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

  • トリガー: pull_request_review (submitted) / 実行 run
  • CI: CodeRabbit check は SUCCESS (Review completed)。analyze check は本 run 自体で IN_PROGRESS。mergeStateStatus: UNSTABLE (pending check である analyze 起因のみ、mergeable: MERGEABLE)
  • レビュー状況: CodeRabbit — レビュー提出済み (COMMENTED, 2026-08-01T09:58:09Z)、Actionable 2 件 + Nitpick 1 件。人間レビュー: なし (reviewDecision 空)
  • Verdict: user_decision (Critical/High/Major の applicable finding なし、Minor の applicable finding が 2 件存在)

Applicable Findings (Critical / High / Major)

(該当なし)

Applicable Findings (Medium 以下)

# File (Line) Reviewer Issue Recommended Action
1 docs/todo-summary2.md:115 (+ docs/todo14.md:631-650) CodeRabbit (Minor) 新規追加した順位 357 (ADR index status tag と ADR 本体 status の整合チェック) が、既存の順位 272 (cli-docs-lint の ADR 重複採番 + CLAUDE.md 索引整合チェック) と責務が重複しうる。順位 272 の説明文には別の既存項目 (順位135) との非重複理由は明記されているが、順位 357 との切り分けは diff 内に記載がない 順位 272 を「重複採番・識別子整合」に、順位 357 を「index status tag と ADR 本体 status の比較」に限定するスコープ文言を追記するか、2 項目を統合する (todo-summary2.md / todo14.md 双方)
2 pr-monitor-config.toml:56-62 (実体は src/cli-pr-monitor/src/stages/repush.rs run_auto_push) CodeRabbit (Minor) mode = "enforce" へ昇格したが、run_auto_pushScopeGuardOutcome::BlockedViolation 経路 (push 未実行) を固定する統合テストが repush.rs / scope_guard.rs に存在しない (scope_guard.rs 側の単体テストのみ確認)。kill-switch (PR_MONITOR_SCOPE_GUARD_DISABLE=1) や observe モードでの push 継続との回帰比較も同様に未整備 run_auto_push (または同等の統合経路) に対し、enforce+BlockedViolation→push 未実行、kill-switch→push 継続、observe→push 継続、の3ケースを固定するテストを追加

Filtered (not applicable)

# File (Line) Issue Filter Reason
1 docs/adr/adr-054-prompt-injection-trust-boundary-defense.md:90-94 scope_guard の判断根拠 (violation ログ) を CI artifact 等へ永続化すべき Scope mismatch: docs/adr/ は read-only zone (analyze-coderabbit.md Step 2)。加えて diff 内で ADR-054 自体が「観測ギャップ: 機械化が必要になれば lib-telemetry 計装が候補」と既に明記しており、現段階では意図的に手動 (stderr ログ + dogfood 目視) 判定を選択している

次のアクション

  • 順位 272/357 のスコープ重複は次回ローカルセッションで文言修正 (docs 変更のみ、低コスト)。
  • scope_guard 統合テスト (BlockedViolation / kill-switch / observe の3経路) の追加は Tier 2 相当の作業として別 PR で検討 (本 PR は enforce 昇格の記録が主目的のため、テスト追加は本 PR のスコープ外としてブロックしない判断も妥当)。
  • CI の analyze check が完了 (本 run 終了) すれば mergeStateStatus の UNSTABLE は解消見込み。

… 責務分界

- 指摘 2 (BlockedViolation 経路): run_auto_push の判定を decide_auto_push (gate 遅延評価の DI) へ分離し、BlockedViolation → run_push 不到達 + 短絡順序をテスト 4 本で machine-enforce (decide_repush と同型のパターン)
- ファイル長 gate (800 行) 超過に伴い auto-push 実行層を stages/auto_push.rs へ module 分割 (run_auto_push / mark_* / should_auto_push + 既存テストを移動、挙動不変)
- 指摘 1 (順位 272/357 重複): 両 entry の責務分界を明文化 — 272 = 採番重複/索引存在/番号一致、357 = ステータスタグ整合のみ。summary 行・詳細エントリ・完了基準へ相互参照付きで反映
- 検証: cargo test -p cli-pr-monitor 266 pass / clippy clean / lint:docs / lint:md クリーン

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aloekun
aloekun merged commit 2b2b37c into master Aug 1, 2026
1 check passed
@aloekun
aloekun deleted the feat-scope-guard-enforce-batch branch August 1, 2026 10:47
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