Skip to content

docs(todo): PR #222 post-merge-feedback T1-1 + T3-1 採用 entries 追加 (順位 223/224) - #223

Merged
aloekun merged 2 commits into
masterfrom
docs-pr-222-feedback-adoption
Jun 27, 2026
Merged

docs(todo): PR #222 post-merge-feedback T1-1 + T3-1 採用 entries 追加 (順位 223/224)#223
aloekun merged 2 commits into
masterfrom
docs-pr-222-feedback-adoption

Conversation

@aloekun

@aloekun aloekun commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

PR #222 (fix(merge-pipeline, stop-hook): sync_local の stale master 解消...) の post-merge-feedback (.claude/feedback-reports/222.md) で ユーザー承認された 2 採用候補docs/todo10.md + docs/todo-summary.md に登録するだけの docs-only PR。

新 PC 環境でも同 task list を確認できるよう docs を分離 (実装は別 PR で着手)。

採用 entries

順位 Tier タスク Effort Bundle
223 🔧 Tier 2 ACTIVE_RUN_FRESH_THRESHOLD_SECSORPHAN_THRESHOLD_SECS の compile-time 同期 M ★ 222-FB
224 💎 Tier 3 ADR-043 (Fail-Closed) に hooks-stop-quality error handling を具体例として追記 XS ★ 222-FB

順位 223 (Tier 2 mechanical enforcement)

hooks-stop-quality::ACTIVE_RUN_FRESH_THRESHOLD_SECS = 1500hooks-session-start::reaper::ORPHAN_THRESHOLD_SECS = 1500同値必須。非対称になると両防御層の隙間に挟まる run が漏れる。現状は hooks-stop-quality/src/main.rs:67 のコメント (「reaper の ORPHAN_THRESHOLD_SECS (= 1500s) と同値」) のみで mechanical enforcement が欠落。

precedent: cli-merge-pipeline/src/feedback.rs:60pub const ORPHAN_THRESHOLD_SECS: u64 = TAKT_TIMEOUT_SECS + 300; (derived const + 上流定数 reference)。本 task は cross-crate 版に拡張。MVP 推奨: Option C (reaper const を pub 昇格 → stop-hook から use → const _: () = assert!(...) で compile-time check)。

analyzer の Tier 1 表記は memory feedback_tier_classification per project Tier 2 (🔧) に再分類。

順位 224 (Tier 3 docs amendment)

PR #222 で hooks-stop-quality に追加した meta_is_fresh() / meta_is_active_run() / takt_subsession_active() は、4 error path (mtime 取得失敗 / clock skew / malformed JSON / file read error) すべてが false 返却 → gate effective に倒れる fail-closed pattern を踏襲。ADR-043 (Security/Quality Gate Fail-Closed) は試験運用 ADR として既存だが abstract な原則記述に留まっており、PR #222 実装は ADR-043 の concrete instantiation として追記価値あり。

Bundle 222-FB 推奨

順位 223 (mechanical) + 順位 224 (docs) の 2 層防御を 1 PR で land。cli-merge-pipeline/src/feedback.rs:60 の precedent と同じ「derived const + 1 文書 cite」構造が 1 commit に揃い、reviewer の cross-reference 検証が jj diff 内で完結する。

Pre-push review result

pre-push-review workflow: all("approved") (aggregate), 0 anomaly findings, 0 blocking issues.

Test plan

  • CodeRabbit review で findings 0 件 or Nitpick のみ確認
  • CI green 確認
  • 新 PC で git pulldocs/todo-summary.md 順位 223/224 と docs/todo10.md 末尾 2 entries が同期されることを確認
  • (将来) Bundle 222-FB を実 PR として着手する際、本 entries の design 案を base に判断

Summary by CodeRabbit

  • Documentation
    • 計画中の作業に関するタスク一覧を更新し、今後の対応項目を追加しました。
    • 品質ゲートの失敗時に安全側へ倒すための考え方や、異常時の扱いに関する説明を追記しました。

… 223/224)

PR #222 post-merge-feedback (.claude/feedback-reports/222.md) で採用承認された 2 項目を docs/todo10.md + docs/todo-summary.md に登録。Bundle 222-FB として 1 PR 推奨 (T1 mechanical + T3 docs の 2 層防御を 1 PR で land)。

- 順位 223 (🔧 Tier 2、Effort M): ACTIVE_RUN_FRESH_THRESHOLD_SECS と ORPHAN_THRESHOLD_SECS の compile-time 同期。hooks-stop-quality と hooks-session-start で 1500s magic number を別 crate 独立に持ち、現状はコメント契約のみで mechanical enforcement が欠落。cli-merge-pipeline/src/feedback.rs:60 の derived const + 上流定数 precedent を cross-crate に拡張、Option C (const re-export + const _: () = assert!(...) compile-time check) を MVP 推奨。analyzer Tier 1 = mechanical enforcement → feedback_tier_classification per project Tier 2 に再分類。

- 順位 224 (💎 Tier 3、Effort XS): ADR-043 (Security/Quality Gate Fail-Closed) に hooks-stop-quality の error handling を具体例として追記。meta_is_fresh / meta_is_active_run / takt_subsession_active の 4 error path (mtime 取得失敗 / clock skew / malformed JSON / file read error) すべてが false 返却 → gate effective に倒れる fail-closed 構造を concrete instantiation として codify。

新 PC 環境でも同 task list を確認できるよう docs-only PR として分離 (実装は別 PR で着手)。
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@aloekun, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 25 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ad7821b0-d665-4f24-98df-5b172da1e367

📥 Commits

Reviewing files that changed from the base of the PR and between c50e104 and 8d9545a.

📒 Files selected for processing (1)
  • docs/todo10.md
📝 Walkthrough

Walkthrough

docs/todo-summary.md に新規の優先順位エントリを2件追加し、docs/todo10.md に定数同期と fail-closed 実装例の追記計画を追加した。

Changes

TODO文書更新

Layer / File(s) Summary
順序表の追記
docs/todo-summary.md
推奨実行順序サマリー表に 223 と 224 の新規エントリを追加した。
定数同期の todo
docs/todo10.md
ACTIVE_RUN_FRESH_THRESHOLD_SECSORPHAN_THRESHOLD_SECS の compile-time 同期に関する設計案、作業計画、完了基準を追記した。
fail-closed 追記の todo
docs/todo10.md
ADR-043 に hooks-stop-quality の error path を fail-closed として追記する計画と具体例を追加した。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 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 PR #222 の post-merge-feedback を反映した todo エントリ追加で、順位 223/224 の追加内容を正しく要約しています。
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.

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.

@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: 1

🧹 Nitpick comments (1)
docs/todo10.md (1)

973-979: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

takt_subsession_activeread_dir エラーパスが欠落している。

Line 955 で「meta_is_fresh() / meta_is_active_run() / takt_subsession_active() はすべての error path で false を返却」と宣言しているが、Line 973-977 の列挙は meta_is_freshmeta_status_is_running(JSON/file read)のエラーのみで、takt_subsession_active 内の std::fs::read_dir エラー(runs_dir 不存在/permission denied 時の Err(_) => return false)が含まれていない。

具体例の網羅性を保つため、5 番目のパスとして追加すべき:

  • runs_dir 読み取り失敗 (std::fs::read_dir() error): Err(_) => return falsetakt_subsession_active 内)

あるいは、列挙対象を「meta_is_fresh / meta_is_active_run の内部エラーパス」と明確に限定し、takt_subsession_active は「上位 caller として全 subsession 走査失敗時も false」を補足する。

🤖 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/todo10.md` around lines 973 - 979, The error-path list is missing the
`takt_subsession_active` case for `std::fs::read_dir` failures, so update the
examples to include the `runs_dir` read failure path and its `false` return. In
`takt_subsession_active`, document that a missing or inaccessible `runs_dir`
(`read_dir` error) is also fail-closed and returns `false`, or alternatively
narrow the scope of the list to only the internal error paths of `meta_is_fresh`
and `meta_is_active_run` while clarifying the caller-level behavior of
`takt_subsession_active`.
🤖 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/todo10.md`:
- Around line 923-925: Clarify the MVP recommendation so it matches the actual
implementation approach: the current “Option Cベース” wording conflicts with the
need to add a `hooks-session-start` dependency and make `ORPHAN_THRESHOLD_SECS`
public, which is a hybrid of `Option B` and `Option C`. Update the text around
the `const _: () = assert!(...)` plan to explicitly call it an “Option B+C
ハイブリッド” and reference the `stop-hook` and
`hooks-session-start::reaper::ORPHAN_THRESHOLD_SECS` symbols so readers
understand both the compile-time assertion and the cross-crate const exposure
are required.

---

Nitpick comments:
In `@docs/todo10.md`:
- Around line 973-979: The error-path list is missing the
`takt_subsession_active` case for `std::fs::read_dir` failures, so update the
examples to include the `runs_dir` read failure path and its `false` return. In
`takt_subsession_active`, document that a missing or inaccessible `runs_dir`
(`read_dir` error) is also fail-closed and returns `false`, or alternatively
narrow the scope of the list to only the internal error paths of `meta_is_fresh`
and `meta_is_active_run` while clarifying the caller-level behavior of
`takt_subsession_active`.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3bfe7c85-65d6-4a59-b8ed-3b60d6d4f530

📥 Commits

Reviewing files that changed from the base of the PR and between b0b9197 and c50e104.

📒 Files selected for processing (2)
  • docs/todo-summary.md
  • docs/todo10.md

Comment thread docs/todo10.md
Resolved findings:
- [Major] docs/todo10.md:925 「MVP 推奨」の記述と実際のアプローチに齟齬がある。
@aloekun
aloekun merged commit 509c671 into master Jun 27, 2026
1 check passed
@aloekun
aloekun deleted the docs-pr-222-feedback-adoption branch June 27, 2026 09:11
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