Skip to content

chore(feedback): WP-06〜08 post-merge feedback を採用 — read-only escalation(ADR-043)・convention3件・output-contract原則(ADR-048)・ADR-050 + incident_eval 堅牢化 - #255

Merged
aloekun merged 1 commit into
masterfrom
feedback-wp06-08
Jul 7, 2026
Merged

chore(feedback): WP-06〜08 post-merge feedback を採用 — read-only escalation(ADR-043)・convention3件・output-contract原則(ADR-048)・ADR-050 + incident_eval 堅牢化#255
aloekun merged 1 commit into
masterfrom
feedback-wp06-08

Conversation

@aloekun

@aloekun aloekun commented Jul 6, 2026

Copy link
Copy Markdown
Owner

概要

WP-06 / WP-07 / WP-08 (PR #250 / #252 / #254) の post-merge feedback (ADR-030) を精査し、採用価値のある候補をユーザー承認のうえ 1 PR にまとめて採用する。docs/rules の再発防止 (A) + WP-08 で確立した exe-spawn E2E テストの堅牢化 (B)。

様子見・却下推奨の候補は採用しない (feedback レポートに記録済み、.claude/feedback-reports/{250,252,254}.md)。

A. docs/rules(再発防止)

B. incident_eval.rs 堅牢化(WP-08 で書いた E2E の実ギャップ)

  • B1 cases_cover_every_incident_rule テスト追加: CASES 配列のエントリ数が deployed toml の [rules.incident] 数と一致することを fail-closed で検証。incident_fixture_coverage_check が fixture 次元を動的強制するのに対し CASES 次元が手動同期だった非対称性 (新 incident ルール追加時の E2E カバレッジ silent 欠落) を解消 (ADR-043 整合)。
  • B2 run_linter の bounded wait 化: child.wait_with_output()lib-subprocess::drain_pipe_unlimited + wait_with_timeout_safe(30s) に置換し、hang した exe が CI を無期限ブロックするのを防止。dev-conventions.md の新 convention (A) に準拠。Cargo.toml に lib-subprocess を dev-dep 追加。

検証

  • cargo test -p hooks-post-tool-linter: 146 unit + coverage gate + E2E 2 tests、全 ok
  • cargo clippy --all-targets -- -D warnings: 0 warnings
  • lint:docs OK / lint:md 0 errors
  • pre-push AI レビュー: simplicity / security とも approved

関連

  • ADR-043(原則6追記) / ADR-048(設計原則追記) / ADR-050(新規) / dev-conventions.md
  • 出典 feedback: .claude/feedback-reports/{250,252,254}.md

Summary by CodeRabbit

  • New Features

    • 反復型ワークフローで、判定に使うレポートの対象範囲を明示する運用ルールを追加しました。
    • レビュー関連の手順に、対象ファイルが存在する場合の適用条件を明確化しました。
  • Bug Fixes

    • 読み取り専用領域に対する変更提案は見落とさず、明示的に扱われるようになりました。
    • レポートの参照範囲の曖昧さによる判定ミスを防ぎやすくしました。
  • Documentation

    • 開発規約と設計判断の指針を更新しました。
  • Tests

    • 外部プロセスを使うテストの待機処理を安全化し、ハング検知を強化しました。

…ion原則(ADR-043)・convention3件(dev-conventions)・output-contract原則(ADR-048)・ADR-050 + incident_eval 堅牢化(CASES gate + bounded wait)
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a0d76d3a-38d2-4970-877d-13e6413a820e

📥 Commits

Reviewing files that changed from the base of the PR and between fd4fc96 and d84c07c.

📒 Files selected for processing (9)
  • .takt/facets/instructions/fix.md
  • .takt/facets/instructions/supervise.md
  • CLAUDE.md
  • docs/adr/adr-043-security-gates-fail-closed.md
  • docs/adr/adr-048-facet-findings-handoff-markdown-contract.md
  • docs/adr/adr-050-iteration-aware-decision-criteria.md
  • docs/dev-conventions.md
  • src/hooks-post-tool-linter/Cargo.toml
  • src/hooks-post-tool-linter/tests/incident_eval.rs

📝 Walkthrough

Walkthrough

refutation-report.mdの適用条件変更(fix.md/supervise.md)、ADR-043/ADR-048への原則追記、ADR-050新規追加とCLAUDE.mdへのリンク、dev-conventions.mdへの3規約追加を行った。また、hooks-post-tool-linterのincident_eval.rsでタイムアウト付きプロセス待機処理を導入し、incidentルールカバレッジ検証テストを新規追加した。

Changes

ドキュメント規約更新

Layer / File(s) Summary
refutation-report.md 適用条件の変更
.takt/facets/instructions/fix.md, .takt/facets/instructions/supervise.md
refutation-report.mdフィルタの適用条件を、pre-push-review-refute限定から「ファイル存在時は常に適用」へ変更。
ADR-043 read-onlyゾーンescalation原則追加
docs/adr/adr-043-security-gates-fail-closed.md
read-onlyゾーンへのreviewer提案をsilently skipせずescalateし、not_applicable分類する原則と観測事例を追記。
ADR-048 output-contract設計原則追加
docs/adr/adr-048-facet-findings-handoff-markdown-contract.md
finding テーブル列セットの統一とbuiltin security-reviewの列構造mirror規約を追記。
ADR-050新規追加とCLAUDE.mdリンク
docs/adr/adr-050-iteration-aware-decision-criteria.md, CLAUDE.md
multi-iteration workflowのdecision criteria評価scope(current-iteration-only/cumulative/sliding-window)を規定するADRを新規追加し、CLAUDE.mdのADR一覧にリンクを追加。
dev-conventions.mdへの運用規約追加
docs/dev-conventions.md
report読込の最新iteration限定、見出しと実装条件のスコープ整合、integration testでのbounded wait規定を追加。

Estimated code review effort: 2 (Simple) | ~10 minutes

hooks-post-tool-linterのタイムアウト安全なテスト

Layer / File(s) Summary
lib-subprocess依存追加
src/hooks-post-tool-linter/Cargo.toml
dev-dependenciesにlib-subprocessをパス依存として追加。
run_linterのタイムアウト付き出力回収
src/hooks-post-tool-linter/tests/incident_eval.rs
LINTER_TIMEOUT_SECS定義、drain_pipe_unlimitedとwait_with_timeout_safeによる並列ドレイン・タイムアウト監視へ変更。
incidentルールカバレッジ検証テスト追加
src/hooks-post-tool-linter/tests/incident_eval.rs
custom-lint-rules.tomlのincidentセクション数とCASES配列要素数の一致をfail-closedで検証する新規テストを追加。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
    participant Test as incident_eval.rs
    participant Linter as linter subprocess
    participant Drain as drain_pipe_unlimited
    participant Waiter as wait_with_timeout_safe

    Test->>Linter: spawn process + write payload to stdin
    Test->>Drain: start stdout/stderr drain threads
    Drain-->>Linter: read output streams in parallel
    Test->>Waiter: wait with LINTER_TIMEOUT_SECS
    alt within timeout
        Waiter-->>Test: process exit status
        Test->>Test: assert on collected output
    else timeout exceeded
        Waiter-->>Test: kill process + timeout error
        Test->>Test: fail with hang-detection message
    end
Loading

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 PRの主眼であるWP-06〜08のフィードバック採用、ADR/規約更新、incident_eval強化を概ね的確に表しています。
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feedback-wp06-08

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.

@aloekun

aloekun commented Jul 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@aloekun
aloekun merged commit 52c3823 into master Jul 7, 2026
1 check passed
@aloekun
aloekun deleted the feedback-wp06-08 branch July 7, 2026 05:55
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