Skip to content

docs: push パイプライン不具合修正・改善の作業計画を追加 - #277

Merged
aloekun merged 1 commit into
masterfrom
docs/push-pipeline-fix-plan
Jul 16, 2026
Merged

docs: push パイプライン不具合修正・改善の作業計画を追加#277
aloekun merged 1 commit into
masterfrom
docs/push-pipeline-fix-plan

Conversation

@aloekun

@aloekun aloekun commented Jul 16, 2026

Copy link
Copy Markdown
Owner

概要

pnpm push パイプラインの遅延と不具合を調査し、対応方針を作業計画としてまとめました。実装は本 PR に含まず、計画ドキュメントの追加のみです。

背景: pre-push review が体感で 12 分超かかることがあり、(1) パイプラインのどこに時間がかかっているか (2) 不具合の有無 (3) 追加実装レベルの改善余地 (4) 根本再設計の要否、の 4 点を調査しました。

変更内容

新規ファイル docs/push-pipeline-fix-plan.md を追加。

調査結果の要約

  • 12 分超の主犯は takt の 3-phase オーケストレーション自体 (~1 分/iter) ではなく、以下 3 点:
    • quality gate 内で assert を持たない Ollama eval テストが毎 push 実行されている
    • takt builtin の 8KB checklist policy が ADR-036 の anomaly-only 設計を上書きし REJECT を誘発
    • fix step 内でのビルド/テスト重複再実行
  • 実測 (.takt/runs/ 直近 20 run): takt 部分は中央値 3.8 分・平均 5.6 分・最大 14.6 分

タスク一覧 (T0〜T13, T99)

  • 不具合修正 5 件: push 拒否検知の truncate 依存 / diff stage timeout 欠落 / Stop hook cwd 依存 / bookmark_check 誤誘導 / pnpm build 形骸ゲート
  • 改善 6 件: Ollama eval 除外 / 旧 cli-push-pipeline crate 除去 / refute facet dogfood 開始 / takt builtin policy shadow / docs-only 決定論 routing / fix 後決定論再ゲート
  • スコープ外の明記: takt 離脱・CodeRabbit 全面依存・review+fix 統合は非推奨と判断済み

ファイルの寿命

本ファイルは恒久ドキュメントではなく、全タスク完了後に削除する運用です (§8 完了条件、T99)。実装は別セッション (Opus 想定) が担う前提で、file:line 根拠付きで自己完結するよう記述しています。

テスト

  • pnpm lint:docs (cli-docs-lint) — OK
  • markdownlint-cli2 — 0 error
  • pre-push review (takt): simplicity-review / security-review ともに APPROVE (docs-only、ADR-035 適用)

Summary by CodeRabbit

  • ドキュメント
    • pnpm push の遅延・不具合に関する調査結果と、優先順位付きの対応計画を追加しました。
    • 拒否検知、タイムアウト、作業ディレクトリ依存、空の入力による誤誘導などの改善項目を整理しました。
    • 受け入れ基準、回帰テスト、計測、再検証に関する完了条件を明記しました。

pnpm push (cli-push-runner + takt pre-push-review) の遅延・不具合調査結果を
実施可能なタスクに分解。全タスク完了後に本ファイル自体を削除することを
最終目標とする。
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

pnpm push の遅延・不具合調査を基に、T0〜T13/T99の実施計画、運用規約、受け入れ基準、回帰テスト、ADR整合、完了条件を文書化しています。

Changes

Push pipeline remediation plan

Layer / File(s) Summary
計画範囲とタスク一覧
docs/push-pipeline-fix-plan.md
文書の寿命、遅延要因、運用規約、T0〜T13/T99の依存関係と優先順位を定義。
不具合修正タスク
docs/push-pipeline-fix-plan.md
拒否検知、diff stage timeout、stop hook の cwd 依存、空 @ 誘導、pnpm build に関する対応方針を記述。
計測・パイプライン改善
docs/push-pipeline-fix-plan.md
stage 別計測、Ollama eval、refute facet、workspace、review policy、docs-only/空 diff routing の改善内容を定義。
再ゲートと完了条件
docs/push-pipeline-fix-plan.md
fix 後の再ゲート、T13 backlog、スコープ外項目、after 計測、計画削除条件を定義。

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 変更内容である push パイプラインの不具合修正・改善計画を簡潔に示しており、タイトルとして適切です。
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 docs/push-pipeline-fix-plan

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

Copy link
Copy Markdown
Contributor

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

  • トリガー: issue_comment (created) / 実行 run
  • CI: GitHub Actions のチェックは無し (docs-only diff のため未起動と推測)。ステータスチェックは CodeRabbit のみで PENDING (Review in progress、着手直後)
  • レビュー状況: CodeRabbit — レビュー未着手 (in-progress コメントのみ、findings 未投稿)。人間レビュー — 無し。インライン指摘 — 無し
  • Verdict: approved

Applicable Findings (Critical / High / Major)

(該当なし — レビュー指摘は現時点で1件も無い)

Applicable Findings (Medium 以下)

(該当なし)

Filtered (not applicable)

(該当なし)

軽量サマリー (diff 概要)

  • 変更ファイル: docs/push-pipeline-fix-plan.md (新規追加、354 行)。他ファイルの変更なし
  • 変更の性質: ADR-035 の path 基準・diff 内容基準の両方を満たす純粋な docs-only PR (実行コードロジック変更なし、除外パス .takt/facets/instructions/** / .claude/** への変更もなし)
  • 内容は push パイプラインの不具合修正・改善に関する作業計画 (T0〜T13 のタスク一覧、実測ベースライン、判定記録欄を含む) — ADR-030/ADR-036/ADR-042 等の既存 ADR を参照する形で構成されており、記載内容自体が新規 ADR 決定を含むものではない

次のアクション

  • CodeRabbit のレビュー完了を待ち、findings が投稿された時点で再分析する (本 workflow は待機・ポーリングを行わないため、次のトリガーで実施)
  • 現時点でブロッカーは無い。マージ可否はユーザー判断待ち (mergeStateStatus: UNSTABLE — 必須チェック未完了によるものと推測されるため、CodeRabbit ステータス確定後に再確認を推奨)

@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/push-pipeline-fix-plan.md (1)

95-102: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

unlimited 出力のメモリ上限を明記してください。

判定用 API が stdout 全体を保持する実装の場合、push 先から大量の出力を受け取るとメモリ使用量が無制限になります。drain_pipe_unlimited がストリームを捨てるだけなのか、全量を返すのかを確認し、必要なら拒否文字列をストリーミング検出して診断ログだけ bounded に保持してください。

🤖 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/push-pipeline-fix-plan.md` around lines 95 - 102, push
コマンドの判定処理方針に、unlimited 出力を全量保持しない明示的なメモリ上限を追加してください。drain_pipe_unlimited
の保持・破棄挙動を確認し、全量保持する場合は拒否文字列をストリーミング検出して診断ログのみ bounded にする設計へ更新してください。
🤖 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/push-pipeline-fix-plan.md`:
- Around line 152-162: Update the package.json build script to run the
repository-local TypeScript compiler via pnpm exec tsc --noEmit, remove the ||
true suppression, and add typescript to devDependencies so the build becomes a
fail-closed type-checking gate.

---

Nitpick comments:
In `@docs/push-pipeline-fix-plan.md`:
- Around line 95-102: push コマンドの判定処理方針に、unlimited
出力を全量保持しない明示的なメモリ上限を追加してください。drain_pipe_unlimited
の保持・破棄挙動を確認し、全量保持する場合は拒否文字列をストリーミング検出して診断ログのみ bounded にする設計へ更新してください。
🪄 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

Run ID: 4e6b39b8-cc2b-4c18-bec9-da9006adde68

📥 Commits

Reviewing files that changed from the base of the PR and between 968a4ab and cb6cdcc.

📒 Files selected for processing (1)
  • docs/push-pipeline-fix-plan.md

Comment on lines +152 to +162
- **現状**: `package.json:11` の `"build": "npx tsc --noEmit --pretty || true"`。
**typescript が devDependencies に無いため `npx tsc` は常に失敗**し、`|| true` で
握りつぶされる。つまり型チェックは一度も機能しておらず、quality_gate と Stop hook の
build step は時間だけ消費する見せかけゲート (2026-07-16 に `npx tsc` 単体実行で確認済み)。
- **方針**: どちらかを選ぶ。
- (a) typescript を devDependency に追加し `|| true` を外して実体化する。
既存 ts (src/logger.ts, src/sample.ts) が型エラーなら先に修正。
- (b) TS 資産が実質サンプルのみと判断するなら、quality_gate group と
stop_quality step から build を削除する。
推奨は (a)。ADR-043 (fail-closed) に整合するのは実体化の方向。
- **リスク**: 低。(a) の場合 tsconfig.json の有無・内容を確認。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Files of interest:\n'
git ls-files | rg '^(package\.json|pnpm-lock\.yaml|package-lock\.json|yarn.lock|tsconfig\.json|docs/push-pipeline-fix-plan\.md|src/logger\.ts|src/sample\.ts)$'

printf '\npackage.json:\n'
cat -n package.json

printf '\nRelevant doc excerpt:\n'
sed -n '140,175p' docs/push-pipeline-fix-plan.md

printf '\nSearch for TypeScript/tooling references:\n'
rg -n '"build"|typescript|tsc|pnpm exec tsc|npx tsc' package.json docs/push-pipeline-fix-plan.md src tsconfig.json . 2>/dev/null || true

Repository: aloekun/claude-code-hook-test

Length of output: 10700


package.json:11 の build をローカル TypeScript に固定してください
typescript が devDependencies に無いまま npx tsc --noEmit --pretty || true に頼ると、npx の解決元が環境次第になり、型チェックのゲートになりません。typescript を devDependency に追加して pnpm exec tsc --noEmit に切り替え、|| true は外してください。

🤖 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/push-pipeline-fix-plan.md` around lines 152 - 162, Update the
package.json build script to run the repository-local TypeScript compiler via
pnpm exec tsc --noEmit, remove the || true suppression, and add typescript to
devDependencies so the build becomes a fail-closed type-checking gate.

@github-actions

Copy link
Copy Markdown
Contributor

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

  • トリガー: pull_request_review (submitted) / 実行 run
  • CI: analyze (本ワークフロー自身) が pending、CodeRabbit ステータスチェックは pass (Review completed)。失敗 check なし
  • レビュー状況: CodeRabbit — レビュー完了 (COMMENTED、2026-07-16T12:29:05Z、actionable 1 件 + nitpick 1 件を投稿)。人間レビュー — 無し (reviewDecision 空)
  • Verdict: approved

Applicable Findings (Critical / High / Major)

(該当なし)

Applicable Findings (Medium 以下)

# File (Line) Reviewer Issue Recommended Action
1 docs/push-pipeline-fix-plan.md (95-102) CodeRabbit (nitpick, Trivial) T5 節の方針記述で、判定用に drain_pipe_unlimited 系を使う際のメモリ上限方針が未明記 (全量保持か診断ログのみ bounded にするか不明確) 任意対応。T5 実施 PR 側で drain_pipe_unlimited の保持挙動を確認し、必要なら本計画書の T5 節に一文追記 (blocking ではない)

Filtered (not applicable)

# File (Line) Issue Filter Reason
2 docs/push-pipeline-fix-plan.md (152-162) package.json の build スクリプトを今すぐ pnpm exec tsc --noEmit に切替え、typescript を devDependency 追加せよという指摘 (T3 節) ADR-035 docs-only / false positive: 本 PR は計画書 (docs-only, 新規 docs/push-pipeline-fix-plan.md 1 ファイルのみ) であり、T3 (package.json 変更) の実装自体は本 PR のスコープ外。計画書 §2 原則1「タスクごとに小 PR で進める」により、実装は T3 の個別実施 PR で行う設計。CodeRabbit が計画記述を実装要求と誤認している

次のアクション

  • 対応必須の指摘なし。Finding feat(hooks): 設定駆動型アーキテクチャに移行し配布自動化を実装 #1 (nitpick) は任意で、T5 実施 PR 側で拾えば十分なため本 PR のブロッカーにはならない
  • mergeStateStatus が UNSTABLE だが必須チェック未完了 (本 analyze ジョブが実行中) によるものと推測 — 完了後に再確認を推奨
  • マージ可否は人間判断待ち (人間レビューは未着手)

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