Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "ローカルの反復 VC 実行について、実測 success duration と timeout の right-censored lower-bound から、既存 static timeout policy を自動的に引き上げる advisory・raise-only な local command-level timeout history estimator を実装する。可変 store は root-owned producer が実行開始時に一度だけ読んで immutable snapshot 化し、全 consumer が同一 snapshot から同一 canonical VC plan(同一 plan_digest)を生成する。history が利用不能・stale・破損している場合は workflow を止めず既存 static_policy / static_fallback へ non-blocking に劣化する。CI job/step 単位の ci_runtime_baseline_v1 との統合はスコープ外とする。"
change_kind: codeParent Issue
none
Parent Goal Ref
- Goal: なし(単独改善)
- Desired Destination: なし(単独改善)
Current Validated Scope
.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.pyのcommand_timeout_budget/v1生成ロジックに、ローカル per-repository の history-based(nearest_rank_v1percentile)estimator source を追加する設計・実装- history 永続化・percentile 計算・snapshot 生成ロジックを
baseline_vc_preflight.pyに詰め込まず、新規モジュール.claude/skills/issue-contract-review/scripts/vc_runtime_history.pyへ分離して実装する - immutable history snapshot 方式: root-owned producer が実行開始時に history store を一度だけ読み、
history_snapshot/v1の canonical JSON(snapshot_as_of_utc/ 対象 record / environment fingerprint / snapshot digest を含む)を確定し、全 consumer(contract_readiness_check.py/run_contract_review_once.py/run_root_review_pipeline.py)にその同一 snapshot(または snapshot file と digest)を配線して渡す実装。plan 確定後に発生した command 実行結果は現在実行中の plan に反映せず、次回 invocation からのみ利用する - timeout censored サンプルの扱い: timeout は「除外すべき汚染データ」ではなく right-censored data(真の実行時間 >
applied_timeout_msという下限のみ判明しているデータ)として扱い、timeout_backoff_floor = min(MAX_PER_COMMAND_TIMEOUT_SECONDS, previous_applied_timeout_seconds * 2)による bounded backoff を次回 budget に反映する実装 - raise-only precedence:
resolved = min(MAX_PER_COMMAND_TIMEOUT_SECONDS, max(static_base, history_candidate, timeout_backoff_floor))(explicit_overrideが優先)を実装し、history がstatic_policy/static_fallbackの値を引き下げないことを保証する実装 command_group_key(command 種別のグルーピング)とenvironment_fingerprint(sample 互換性判定)とexecution_id(1 回の実 launch を一意識別)を別概念として分離実装し、compute_execution_key_hash()(timeout 等の実行パラメータを含む既存の execution-identity 概念)を history grouping key に流用しない実装- 過去実測 execution time を永続化するための history store の設計・実装(ローカル per-repository SQLite。
$XDG_STATE_HOME/loop-protocol/vc-runtime-history/<sha256(realpath(git-common-dir))>.sqlite3、XDG_STATE_HOME未設定時は~/.local/stateを使用し、repo-tracked path 外・Allowed Paths guard 対象外の runtime state として扱う) - history-based source が信頼できない場合(sample 不足・stale・schema 不明・破損・fingerprint 不一致等)に
static_fallbackへ確実に non-blocking フォールバックする deterministic な cold-start / degradation 経路の実装 - 上記に対応する pytest(
.claude/skills/issue-contract-review/scripts/tests/配下への新規テストファイル追加、既存test_command_timeout_budget.pyへの追加、および 4 consumer 配線の scaled runtime integration test)
Remaining Parent Gaps
なし
Outcome
command_timeout_budget/v1(.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py の compute_canonical_vc_plan() が生成する canonical VC plan の一部、Issue #2233 / PR #2245 で導入)に、既存の explicit_override / static_policy(STATIC_PER_COMMAND_TIMEOUT_POLICY による exact-match 値)/ static_fallback(DEFAULT_TIMEOUT_SECONDS)に加えて、ローカル per-repository SQLite に永続化された過去実測 execution time に基づく history_estimate source(nearest_rank_v1 percentile + timeout backoff)が実装され、.claude/skills/issue-contract-review/scripts/tests/ 配下の新規/既存 pytest が全て PASS している状態。
history-based source は、immutable_history_snapshot(producer が一度だけ読み、全 consumer が同一 plan_digest を再計算できる)、command_group_key / environment_fingerprint / execution_id の identity 分離、nearest_rank_v1(minimum 5 eligible success samples、TTL 30 日、最新 50 件、1.5 倍 safety margin、整数演算 rounding)、timeout の right-censored lower-bound backoff、raise-only precedence(historyは既存 static timeout を引き下げない)、1 actual subprocess launch = 1 sample、DB locked/corrupt/stale/unknown-schema 時の non-blocking static fallback を満たしたときのみ採用される。
Runtime Verification Applicability
decision: immediate
reason: >
本 Issue は単なるパーセンタイル計算関数の追加ではなく、実際の subprocess duration 採取・並行書き込み・lock
contention・atomic commit・producer から 4 consumer への snapshot 伝播・timeout 後の次回 budget
backoff・store 破損時の degradation を扱う。fixture JSON からの percentile 計算 unit test だけでは
production wiring を証明できないため、`not_applicable` は不正確と判断する。ただし 20-run CI calibration
のような長期性能実験までは不要である。
applicable_acs:
- AC9
execution_environment: >
ローカルの一時ディレクトリ(`tmp_path` 等の pytest fixture)に隔離した SQLite history store と、実 subprocess
(短時間コマンド)を 1 回起動する開発ローカル環境。ネットワーク・外部サービスへの依存はない。
skip_conditions: >
SQLite(Python 標準ライブラリ `sqlite3`)または subprocess 起動が利用できない実行環境では SKIP exit 77 とし、
`_fallback: true` を記録する。SKIP はテスト失敗として扱わずに証跡へ理由を残す。
fallback_policy: >
history store 不在・SQLite 不可時は VC 内で degraded fallback 経路(static へのフォールバック)を FAIL 判定
として明示的に検証し、無条件の SKIP exit 0 による骨抜きを行わない。
artifact_requirements: >
VC 実行ログ(PASS/FAIL/SKIP・Exit Code・Reason)を artifacts/ 配下に保存し、pr-review-judge が引用できる形で
PR 本文 `## Runtime Verification Evidence` セクションへ inline 化する。- if immediate: AC9(Production wiring)を動作検証 AC とし、
<!-- runtime-verification: true -->タグを付与する。対応 VC は実 subprocess を 1 回起動して sample を保存し、次 invocation で productioncompute_canonical_vc_plan()が history snapshot を反映して budget を変化させることを確認する(正常系)。history store が存在しない cold-start 状態からの degraded fallback(異常系)を同一テストモジュール内の別ケースとして含める。証跡保存・Stop Condition 連動はdocs/dev/runtime-verification-policy.mdに従う。
In Scope
- ローカル per-repository SQLite history store(
vc_runtime_history.py)の設計・実装。schema は最小限(sample_id/command_group_key/environment_fingerprint/observed_at_utc/status(success|failed|timed_out|cancelled) /duration_ms/applied_timeout_ms/command_hash/writer_version)とし、汎用的なprovenance_json箱を作らない - immutable history snapshot(
history_snapshot/v1)の生成と、contract_readiness_check.py/run_contract_review_once.py/run_root_review_pipeline.pyへの snapshot 伝播 additive wiring(4 consumer 配線ロジック全体の再設計ではなく、同一 snapshot を受け渡す最小限の追加配線) command_group_key(argv・repo-relative cwd・command family から算出。option 順序や shell 構文を勝手に正規化しない)とenvironment_fingerprint(platform/arch/runner class/command family に応じた lock digest・tool version のみを対象とし、全環境変数・token・credential・temporary path・GITHUB_RUN_ID・PID・日時等の volatile 値は含めない)の分離実装nearest_rank_v1percentile 契約の固定実装: eligible samples は exit 0 の成功 sample のみ、window は同一environment_fingerprintかつ TTL 30 日以内の新しい順最大 50 件、minimum success samples は 5、P95 = sorted_samples[ceil(0.95 * n) - 1]、candidate_seconds = ceil(observed_p95_ms * 1.5 / 1000)(整数演算での丸め方式を固定する)- timeout サンプルの right-censored lower-bound 扱いと
timeout_backoff_floor = min(MAX_PER_COMMAND_TIMEOUT_SECONDS, previous_applied_timeout_seconds * 2)の実装。cancelled/ process launch failure サンプルは estimator から除外し、failed(non-zero exit)サンプルは診断用に記録するが duration percentile からは除外する - raise-only precedence の実装:
resolved = explicit_override if explicit_override is not None else min(MAX_PER_COMMAND_TIMEOUT_SECONDS, max(static_base, history_candidate, timeout_backoff_floor))。history が static_base 以下の場合は provenance のsourceをstatic_policyまたはstatic_fallbackのまま維持し、history_estimateを name-only で名乗らない - 1 actual subprocess launch = 1 sample の保証(同一 execution を複数 AC が参照しても history row は 1 件のみ。
execution_idの一意性実装) - SQLite の atomic write semantics(1 execution につき短い INSERT 1 トランザクション、busy timeout 0.25〜1 秒、既定 rollback journal mode、lock 時は待たず non-blocking で static fallback)の実装
- history store の非 cryptographic な健全性チェック(schema version 不明時は history を無視、型・status・duration range 検証、duplicate
sample_id拒否、負数・異常に大きい値の拒否、command_group_key/environment_fingerprint不一致の拒否、DB 破損・lock・permission error は advisory 扱いで static へフォールバック、history は最大MAX_PER_COMMAND_TIMEOUT_SECONDSまでの raise-only、history 障害だけを理由に review を block しない) docs/dev/ci-performance.md(ci_runtime_baseline_v1schema の正本)との関係整理: 本 Issue の history store はci_runtime_baseline_v1の schema・store を再利用せず独立実装とする(粒度が per-job/per-step と per-command で異なるため)。この判断理由を.claude/skills/issue-contract-review/references/vc-preflight.mdに明文化する.claude/skills/issue-contract-review/references/vc-preflight.mdへのhistory_estimatesource 契約(identity 分離・percentile 契約・raise-only precedence・snapshot 方式・degradation 経路)の記載
Out of Scope
command_timeout_budget/v1schema 自体の破壊的変更(既存explicit_override/static_policy/static_fallbacksource と provenance フィールド構造は維持し、history_estimateを新規 source として追加する)- PR feat: canonical VC plan に command-level timeout budget を追加する (#2233) #2245 の iteration 過程で production schema から明示的に除去された当時の
history_estimate実装をそのまま復活させること(当時の実装はsample_count=1/observed_p95_ms=estimated_seconds*1000という実際の evidence を伴わない provenance を偽装していたため、OWNER レビューで reject された。本 Issue は genuine な evidence(実サンプル収集・最小 5 sample・staleness 判定・right-censoring backoff を満たした上での算出)に基づくhistory_estimateを新規設計する) MAX_PER_COMMAND_TIMEOUT_SECONDS/MAX_TOTAL_VERIFICATION_BUDGET_SECONDS等の hard policy ceiling 値そのものの変更(既存の policy ceiling 機構は変更せず、history-based estimate もこの ceiling を超えられない前提を維持する)STATIC_PER_COMMAND_TIMEOUT_POLICYの削除、または history による自動的な timeout 引き下げ(history は raise-only のみ。既に確立された static policy 値(例: 420 秒)を history が下回る値で置き換えることは本 Issue のスコープ外とし、別 Issue に分離する)- CI history との統合: GitHub Actions run をまたぐ history 永続化、
ci_runtime_baseline_v1(docs/dev/ci-performance.md)の schema 変更、GitHub cache/artifact を用いた cross-run collector の実装は本 Issue のスコープ外とする。本 Issue は ローカル command-level のみ をスコープとし、CI 実行では history が存在しないため常にstatic_policy/static_fallbackへ non-blocking に劣化する。CI cross-run persistence が必要と判明した場合は実需要を確認した上で別 Issue に分離する ci_runtime_baseline_v1の bootstrap-3-runs / decision-baseline-20-runs ポリシー自体の再設計- HMAC・署名・秘密鍵管理を用いた cryptographic tamper-proofing(同一ユーザー権限で動くローカル DB に対して cryptographic guarantee を提供することはできないため、本 Issue では簡易な整合性チェック(schema version・型・range・重複排除)のみを実装する)
- third-party statistics library への依存追加(
nearest_rank_v1は標準ライブラリの範囲で実装する) contract_readiness_check.py/run_contract_review_once.py/run_root_review_pipeline.pyの配線ロジック全体の再設計(Issue 実装: canonical VC plan に command-level timeout budget を追加し、全 review wrapper に同一 budget を配線する #2233 / PR feat: canonical VC plan に command-level timeout budget を追加する (#2233) #2245 で確立済みの「同一 plan-derived budget を消費する」契約は維持し、本 Issue は immutable snapshot を伝播させる最小限の additive wiring のみを追加する)
Acceptance Criteria
- AC1: Snapshot determinism: 同一 pinned Issue body +同一 history snapshot から
contract_readiness_check.py/run_contract_review_once.py/run_root_review_pipeline.pyを含む全 4 consumer が同一plan_digestを生成し、snapshot 生成後に history store が更新される、または TTL 境界を通過しても、既に確定した plan のplan_digestが変化しないことを検証する pytest が存在する - AC2: Identity separation:
command_group_key/environment_fingerprint/execution_idが別概念として実装コード上で分離され、applied_timeout_msなどの実行パラメータ変更がcommand_group_keyを変化させない(同一 command の history が引き続き参照できる)ことを検証する pytest が存在する - AC3: Estimator contract:
nearest_rank_v1(eligible = exit 0 成功 sample のみ、TTL 30 日、最新 50 件、minimum success samples 5、P95 = sorted_samples[ceil(0.95 * n) - 1]、candidate_seconds = ceil(observed_p95_ms * 1.5 / 1000)の整数演算)が固定契約としてコード・vc-preflight.md・pytest で一致して検証されている - AC4: Raise-only precedence:
explicit_override > max(static_base, history_candidate, timeout_backoff_floor)(MAX_PER_COMMAND_TIMEOUT_SECONDSで clamp)が実装され、history_candidate が static_base を下回る場合に resolved timeout が static_base 未満へ下がらないことを検証する pytest が存在する - AC5: Timeout censoring:
timed_outstatus のサンプルが right-censored lower-bound としてtimeout_backoff_floor = min(MAX_PER_COMMAND_TIMEOUT_SECONDS, previous_applied_timeout_seconds * 2)に反映され、次回 invocation の resolved timeout が増加すること、およびcancelled/ launch failure サンプルが estimator から除外されfailed(non-zero exit)サンプルが duration percentile を汚染しないことを検証する pytest が存在する - AC6: One launch, one sample: 同一
execution_idの subprocess 実行結果が複数 AC(複数 command occurrence)から参照されても、history store には 1 件の sample row のみが保存されることを検証する pytest が存在する - AC7: Atomic local persistence: SQLite history store への 2 プロセス並行 INSERT 後も、全 sample が保存され DB schema が有効であること、および lock 発生時に待機せず non-blocking で static fallback することを検証する pytest が存在する
- AC8: Non-blocking degradation: history store が missing / locked / corrupt / unknown schema / invalid row /
environment_fingerprint不一致 / stale のいずれの場合でもstatic_policy/static_fallbacksource へ deterministic にフォールバックし、history 障害だけを理由に review 全体が block されないことを検証する pytest が存在する - AC9 : Production wiring: 実 command を 1 回起動し、sample 保存後の次 invocation で production
compute_canonical_vc_plan()が history snapshot を利用して budget を変化させる runtime integration test が.claude/skills/issue-contract-review/tests/test_history_snapshot_production_wiring.pyに存在し、history store 不在時の degraded fallback(異常系)も同一テストモジュールで検証されている - AC10: Scope boundary:
ci_runtime_baseline_v1の schema・store を再利用しない判断理由(粒度が per-job/per-step と per-command で異なること)が.claude/skills/issue-contract-review/references/vc-preflight.mdに明文化され、CI cross-run history 永続化が Out of Scope であることが同ドキュメントおよび実装 PR 本文に記載されている
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_budget_history_estimate.py -v -k snapshot_determinism# AC2
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_budget_history_estimate.py -v -k identity_separation# AC3
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_history_store.py -v -k nearest_rank# AC4
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_budget_history_estimate.py -v -k raise_only_precedence# AC5
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_budget_history_estimate.py -v -k timeout_censoring_backoff# AC6
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_history_store.py -v -k one_launch_one_sample# AC7
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_history_store.py -v -k atomic_concurrent_write# AC8
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_history_store.py -v -k non_blocking_degradation# AC9
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/test_history_snapshot_production_wiring.py -v# AC10
$ rg -n "ci_runtime_baseline_v1" .claude/skills/issue-contract-review/references/vc-preflight.mdAllowed Paths
- .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py
- .claude/skills/issue-contract-review/scripts/vc_runtime_history.py
- .claude/skills/issue-contract-review/scripts/contract_readiness_check.py
- .claude/skills/issue-contract-review/scripts/run_contract_review_once.py
- .claude/skills/issue-refinement-loop/scripts/run_root_review_pipeline.py
- .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_budget.py
- .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_budget_history_estimate.py
- .claude/skills/issue-contract-review/scripts/tests/test_command_timeout_history_store.py
- .claude/skills/issue-contract-review/tests/test_run_contract_review_once_wrapper_wiring.py
- .claude/skills/issue-contract-review/tests/test_history_snapshot_production_wiring.py
- .claude/skills/issue-contract-review/references/vc-preflight.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
nearest_rank_v1percentile 契約・raise-only precedence の固定値の変更が必要になった場合- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- CI cross-run history(GitHub Actions run をまたぐ永続化)の実装が必要と判明した場合は、本 Issue のスコープに含めず別 Issue に分離する
- HMAC・署名・秘密鍵管理を用いた cryptographic tamper-proofing が必要と判明した場合は実装前に Issue コメントで理由を明記してから進める(本 Issue の想定では不要と判断している)
Required Skills
なし
Required Design References
- .claude/skills/issue-contract-review/references/vc-preflight.md
- docs/dev/ci-performance.md
- docs/dev/runtime-verification-policy.md
Scope Delta(任意)
N/A
Background
Issue #2233(実装: canonical VC plan に command-level timeout budget を追加し、全 review wrapper に同一 budget を配線する、CLOSED、PR #2245 でマージ済み)は、固定 150 秒の per-command timeout が正当な長時間 VC(実測 271.31 秒の uv run --locked pytest .claude/skills/issue-refinement-loop/tests -v)を誤って kill する構造的バグを、STATIC_PER_COMMAND_TIMEOUT_POLICY という trusted・hand-curated な static policy テーブル(例: 420 秒)と、決定論的な static_fallback source によって解消した。
#2233 の ## Out of Scope はこの history-based estimator の完全実装を明示的に別 Issue へ分離することを述べている:
history-based(過去実測 P50/P95 等)estimator の完全実装(command identity・環境 fingerprint・minimum samples・TTL・poisoning 防止を含む calibration 基盤は別 Issue に分離する)
さらに PR #2245 の Safety Claim Matrix は、271.31 秒問題の解消について「history-based estimator(P50/P95 calibration)自体は Out of Scope(static policy が代替の trusted authority)」「別 Issue(history-based estimator)」と follow-up を明記している。
本 Issue はその follow-up として、static_fallback / static_policy を補完しうる history-based estimator を設計・実装する。なお PR #2245 の iteration 過程では、history_estimate source が一度実装されたが、sample_count=1 / observed_p95_ms=estimated_seconds*1000 という実際の evidence を伴わない provenance を偽装していたため production schema から明示的に除去された経緯がある。本 Issue はこの反省を踏まえ、genuine な evidence に基づく history_estimate を設計してから再導入する。
2026-08-29 全面改訂の経緯(issue-refinement-loop Step 2 REQUEST_CHANGES)
issue-refinement-loop の Step 2 review(issue-reviewer subagent)で、OWNER が以下の anchor comment を通じて本 Issue に REQUEST_CHANGES を投稿した:
指摘された P0 blocker(要約):
- mutable history を各 consumer が独立に読むと
compute_canonical_vc_plan()の純粋性が崩れ、参照タイミング差でvc_plan_digest_mismatchが発生しうる(immutable snapshot 方式が必要) - timeout サンプルを単純除外すると、実際に既存 timeout を超過し続けているコマンドが永遠に history から学習されず cold-start ループに陥る(right-censored lower-bound として backoff に反映する必要)
static_policy/static_fallbackと history-based estimator の優先順位が未定義であり、history が既存の trusted static policy(例: 420 秒)を引き下げうる(raise-only precedence を明示する必要)- 本文の Allowed Paths が CI infra を含まない一方で
ci_runtime_baseline_v1(docs/dev/ci-performance.md、GitHub Actions job/step 粒度)との統合可否が曖昧(ローカル command-level のみへスコープを明確化し、CI history 統合は Out of Scope とする必要)
本改訂では、上記 P0 に加え、compute_execution_key_hash() を history grouping key に流用しない identity 分離(P1)、nearest_rank_v1 percentile 契約の明文化(P1)、tampering 防止を cryptographic guarantee から簡易整合性チェックへ縮小(P1)、1 launch = 1 sample の重複カウント防止(P1)も反映した。
Delivery Rule
1 Issue = 1 PR とする。worktree を作成して作業し、PR は Draft で作成する。
Notes for Reviewer
- history store の永続化先はローカル per-repository SQLite(
$XDG_STATE_HOME/loop-protocol/vc-runtime-history/<sha256(realpath(git-common-dir))>.sqlite3)であり、repo にコミットされる state ではない。Allowed Paths guard の対象外である runtime state として扱う設計判断の妥当性を確認すること。 command_group_keyの算出方法(argv・repo-relative cwd・command family)とenvironment_fingerprintの算出方法(command family ごとに Python 系/pnpm 系で異なる lock digest・tool version を使う)は実装過程で技術的に確定する。全環境変数や volatile 値(GITHUB_RUN_ID・PID・日時等)を fingerprint に含めないことが必須。ci_runtime_baseline_v1(docs/dev/ci-performance.md)は CI ジョブ/ステップ単位の elapsed_ms 記録用スキーマであり、本 Issue が扱う per-command ローカル VC execution time history とは粒度・利用時点・更新方法が異なるため、schema・store は再利用せず独立実装とする。この判断理由はvc-preflight.mdに明文化すること。- Scope Collision (C1, advisory): overlap preflight(
check_issue_overlap.py)により.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py/ 関連テストへのallowed_paths重複を検出(related_issue=実装: baseline_vc_preflight/v1 に重複 non-pure VC コマンド検出の diagnostics フィールドを追加する #2232, 実装: guard-issue-body.py の AC/VC alignment を共有パーサーへ統合し VC grammar parity/LP010/authoring reference を同期する #1719, 実装: overlap pagination の read-only runtime smoke を controlled VC として追加する #1610, 実装: Issue MRC 追加 key の検証ロスを塞ぐ #1396, 実装: issue-contract-review scripts の CLI alias compatibility を追加する #1053, feat(agent-ops): broad regex VC を検出する vc_text_assert.py を追加し、positive assertion の unexpected_pass を事前に潰す #996, 実装: issue-refinement-loop の rewrite routing が既存 blocker contract を consume して non-body-author-fixable blocker を早期停止できるようにする #944, 実装: check_blockers.sh の条件付き依存記述による false positive を改善する #265)。いずれも別 concern(重複VC診断・VC grammar統合・overlap pagination smoke・MRC検証・CLIエイリアス・broad regex VC検出・rewrite routing・check_blockers.sh)であり、本 Issue の edit_intent(command_timeout_budget/v1の local history-based estimator 追加)は non-conflicting と判断し起票を継続する。マージ順序が交錯する場合は rebase 時にbaseline_vc_preflight.pyの該当箇所を両立させること。
Activity
squne121 commentedon Aug 28, 2026
判定
REQUEST_CHANGES— 現在の Issue 契約のまま実装へ渡すべきではありません。狙い自体は有用です。しかし現状は、可変な履歴データを canonical plan の生成途中で読む設計と、4 consumer が同一
plan_digestを再計算・照合する既存契約が衝突しています。さらに、timeout サンプルを除外できる AC6 では、この機能が解決したい「実行時間が既存 timeout を超えるコマンド」を履歴から学習できません。2026年8月29日時点で、Issue #2254 は open、コメントはなく、#2254 を紐づけた実装 PR も見つかりませんでした。したがって、以下はコードレビューではなく Issue 契約・設計の実装前レビューです。
主要判定
重要度 | 問題 | 現状の影響 -- | -- | -- P0 | mutable history と plan_digest が両立しない | 履歴機能自身が vc_plan_digest_mismatch を起こし得る P0 | timeout を通常統計から除外するだけ | 150秒で kill される271秒コマンドを永遠に学習できない P0 | static_policy と history の優先順位が未定義 | 既に直した420秒 policy をhistoryが引き下げ得る P0 | local履歴かCI横断履歴か未決定 | Allowed Paths内ではCI永続化を実装できない P1 | runtime verification が not_applicable | 並行書き込み・実配線・lock時劣化をfixtureだけで済ませている P1 | identity/fingerprint が過剰かつ曖昧 | cohort断片化、秘密・volatile env混入、自己参照が起き得る P1 | P95の算出法が未定義 | 実装者ごとに異なるtimeoutが生成される P1 | tamper防止が過剰設計 | workflowを止めるハーネスへ発展しやすい P1 | 1実行と複数command occurrenceの区別がない | 同じ実行結果を複数sampleとして水増しできるRuntime Verification は
immediateまたはscaledに変更するのが妥当です。P1-2.
compute_execution_key_hash()をhistory grouping keyに使ってはいけない既存ドキュメントでは、
command_identity_hashとcompute_execution_key_hash()は別概念です。command_identity_hash: command text の識別compute_execution_key_hash(): argv、cwd、env、timeout、state epochなどを含む実行単位の識別compute_execution_key_hash()に timeout が含まれるなら、historyでtimeoutを150秒から300秒へ変更した瞬間に別keyになります。これは自己破壊的です。
推奨する3層分離
推奨形は次です。
注意点は以下です。
全環境変数をfingerprintへ入れない。
token、credential、temporary pathを保存しない。
GITHUB_RUN_ID、PID、日時などvolatile値を入れない。Python commandだけにPython/uv/pytest/
uv.lockを使う。pnpm commandにはNode/pnpm/
pnpm-lock.yamlを使う。option順序やshell構文を勝手に正規化しない。
exact HEAD SHAはgroupingではなくprovenanceに置く。
現在のIssueはPython系fingerprintを全commandへ要求しており、pnpm commandのhistoryが無関係なpytest更新で無効になる設計です。command familyごとのfingerprintが必要です。
P1-3. 「P95」の計算法が未定義
Python標準の
statistics.quantiles()は既定でexclusive法を使い、inclusive法とは結果が異なります。また公式ドキュメントは、意味のある結果にはデータ点数が区間数nより多いことを推奨しています。n=100のP95を少数sampleへそのまま適用する設計は不適切です。(Python documentation)Issueには以下がありません。
percentile method
sample window
minimum sample count
inclusive/exclusive
rounding
safety margin
P50とP95のどちらをbudgetに使うか
status eligibility
同一run重複の扱い
推奨する固定契約
趣味開発用timeout estimatorなら、複雑な補間は不要です。
n=5〜19ではnearest-rank P95は実質的に最大値になるため、少数sample時にも保守的です。しかもhistoryはtimeoutを引き下げないので、sample数が少なくてもworkflow safetyを悪化させません。float誤差を避けるなら、整数演算にしてください。
P50はobservabilityには有用ですが、timeoutの決定値としては不要です。既存
command_timeout_budget/v1に無理にP50 fieldを追加せず、snapshot/evidence側へ置く方が安全です。P1-4. AC8 の tampering 防止は、現状の表現だと過剰設計
同一ユーザー権限で動くlocal DBに、秘密鍵や外部trust rootを置かず「改竄を証明」することはできません。row hash chainやHMACを追加しても、鍵やcodeを変更できる主体には再計算されます。
この個人趣味開発で必要なのは cryptographic tamper-proofing ではなく、破損・異常値・誤書き込みでworkflowを壊さないことです。
AC8は次へ置き換えるべきです
history障害だけを理由にreviewをblockしないファイルpermissionを0600相当にするのは妥当ですが、HMAC、key management、署名基盤は不要です。
P1-5. 同じsubprocess実行を複数sampleとして数える危険がある
canonical plan は command occurrence を持ち、pure command の重複実行をまとめる経路があります。
history writer がresult itemごとに記録すると、1回しか起動していないcommandが、複数ACに現れただけで複数sampleになります。
必須修正
1sampleは 1 actual subprocess launch。
execution_idを一意にする。複数occurrenceが同じexecutionを参照しても、history rowは1件。
retryは別sampleだが、同じretry結果のaliasは重複させない。
sample_countはeligibleな一意成功execution数。P1-6. 壊れたhistoryがhard blockerを発火させてはいけない
現在は、解決されたtimeoutが600秒を超えると
CommandTimeoutExceedsPolicyErrorを subprocess起動前に返します。これはrepo-ownedなexplicit override/static policyには妥当です。しかしhistory rowの異常値をそのままresolverへ渡すと、履歴DBの破損だけでレビュー全体をblockできます。
history sourceについては、次のように扱うべきです。
historyは trusted policy authority ではなく、あくまで advisory input です。history failureが既存static fallbackより悪い結果を作らないことをAC化してください。
推奨実装
Store は local SQLite が最も妥当
JSON file+renameでも単一writerのatomicityは作れますが、複数プロセスのread-modify-writeでは更新消失を防ぐためのlock処理が別途必要です。SQLiteのtransactionはprogram crash、OS crash、電源断でもall-or-nothingを保証します。Python標準ライブラリだけで利用できます。(SQLite)
この用途ではWALは不要です。
writeはcommand完了時の小さな1 transactionだけ
readはinvocation開始時の1回
lock時は待たずstatic fallbackできる
throughputは不要
SQLite公式も、WALはreader/writer concurrencyを高める一方、同一host制約や追加管理を持ち、writerは同時に1つだけと説明しています。さらに2026年には、複数connectionで同時write/checkpointした場合の稀なWAL bugが3.51.3等で修正されています。デフォルトrollback journalの方が、この用途では単純です。(SQLite)
推奨設定
Pythonの
sqlite3.connect(timeout=...)は、lock時にOperationalErrorを出すまでの待機時間を設定できます。既定5秒はこのworkflowには長いため、短く明示する方がよいです。(Python documentation)保存場所
repo外のper-repository stateを推奨します。
XDG_STATE_HOMEがなければ~/.local/stateを使います。これにより、
git statusを汚さない
worktree間で共有できる
clone間では混ざらない
Allowed Paths guardの対象外であるruntime stateとして扱える
という利点があります。
最小schema
provenance_jsonを何でも入る箱として最初から作るより、必要なfieldだけ固定した方が破損・driftを防げます。Snapshot
estimator_input_digestはDB file bytes、mtime、SQLite page layoutではなく、この canonical evidence object をhashしてください。Issue #2254 の推奨スコープ差し替え
Revised Goal
Revised In Scope
scaled runtime integration testsRevised Out of Scope
third-party statistics dependency必須Allowed Paths追加
巨大な
baseline_vc_preflight.pyにstore、schema、migration、percentile、snapshot処理をすべて詰め込まず、vc_runtime_history.pyへ分離すべきです。改訂版Acceptance Criteria
Snapshot determinism
同一Issue body+同一history snapshotから全4 consumerが同一
plan_digestを生成し、snapshot生成後にDB更新またはTTL境界通過があっても現在のplanが変わらない。Identity separation
command_group_key、environment_fingerprint、execution_idが別概念として実装され、timeout変更でhistory groupが変わらない。Estimator contract
nearest_rank_v1、minimum 5、TTL 30日、最新50件、1.5倍margin、integer roundingがコード・docs・testで固定される。Raise-only precedence
explicit_override > max(static_base, history, timeout_backoff)が検証され、historyがstatic timeoutを引き下げない。Censoring
timeoutが lower-bound/backoffとして次回budgetを引き上げ、cancelledとnon-zero failureが成功percentileを汚染しない。
One launch, one sample
同一executionを複数ACが参照してもsampleは1件だけ保存される。
Atomic local persistence
2プロセス並行INSERT後も全sampleが保存され、DB schemaが有効である。
Non-blocking degradation
missing、locked、corrupt、unknown schema、invalid row、fingerprint mismatch、staleのすべてでstatic sourceへ戻り、history障害だけではreviewをblockしない。
Production wiring
実commandを1回起動し、sample保存後の次invocationでproduction
compute_canonical_vc_plan()がhistoryを利用するintegration testがある。Scope boundary
ci_runtime_baseline_v1はprovenance慣習のみ参照し、schema/storeは再利用しない理由と、CI cross-run persistenceがOut of ScopeであることをdocsとPR本文に記載する。最終評価
このIssueを全面的に捨てる必要はありません。ただし、現在の「P50/P95 calibration基盤、CI baseline再利用、tampering防止、atomic store」を一括で実装すると、個人趣味開発としては基盤コストが高く、既存workflowを止める新しい故障点を増やします。
最も有用な形は次です。
scaled_runtime_integration推奨は #2254 を「local adaptive timeout cache」に狭めて全面改訂することです。
# 判定その改訂を行わないなら、現在のtrusted static policyを維持して
not plannedにする方が、現行契約のまま複雑なhistory基盤を実装するより品質・有用性ともに上です。REQUEST_CHANGES— 現在の Issue 契約のまま実装へ渡すべきではありません。狙い自体は有用です。しかし現状は、可変な履歴データを canonical plan の生成途中で読む設計と、4 consumer が同一
plan_digestを再計算・照合する既存契約が衝突しています。さらに、timeout サンプルを除外できる AC6 では、この機能が解決したい「実行時間が既存 timeout を超えるコマンド」を履歴から学習できません。2026年8月29日時点で、Issue #2254 は open、コメントはなく、#2254 を紐づけた実装 PR も見つかりませんでした。したがって、以下はコードレビューではなく Issue 契約・設計の実装前レビューです。
主要判定
plan_digestが両立しないvc_plan_digest_mismatchを起こし得るstatic_policyと history の優先順位が未定義not_applicableP0 findings
P0-1. mutable history を各 consumer が直接読むと canonical plan が非決定的になる
PR #2245 で確立された現行契約は、
baseline_vc_preflight.py、contract_readiness_check.py、run_contract_review_once.py、run_root_review_pipeline.pyが、同一の pinned Issue body から同じ canonical plan を作り、full-envelope のplan_digestを照合するものです。現在の実装コメントにも、4 consumer が同じ producer を使い、digest 不一致を subprocess 起動前に拒否する契約が明記されています。Issue #2254 は、その
compute_canonical_vc_plan()内で history を選択するとしています。しかし各プロセスが mutable store を別々の時点で読むと、次の競合が発生します。書き込みがなくても、TTL の境界をまたぐだけで同じ問題が起きます。
これは推論ですが、既存 digest 契約と #2254 の TTL 要件から直接導かれる構造的な競合です。
必須修正
canonical plan を次の純粋関数にしてください。
推奨フローは以下です。
history_snapshot/v1の canonical JSON を生成する。snapshot_as_of_utc、対象 record、environment fingerprint、snapshot digest を固定する。この修正には少なくとも次のファイル変更が必要です。
したがって、現在の「4 consumer 配線は再設計しない」という Out of Scope と、狭すぎる Allowed Paths は成立しません。配線全体を作り直す必要はありませんが、snapshot を伝播させる最小限の additive wiring は必須です。
P0-2. timeout は「除外すべき汚染データ」ではなく右打ち切りデータ
AC6 は timeout/cancelled を P50/P95 から除外、または別集計にするとしています。しかし timeout は単なる失敗値ではありません。
150秒で timeout した場合、観測できた事実は次です。
統計上、これは右打ち切りデータです。NIST は、固定時間まで観測してそれより長い値が不明になるケースを right-censored data と説明しています。SciPy の定義でも、右打ち切り時の観測値は真の未知値の下限です。(NIST)
今回の起点となったコマンドは、実測約271秒に対して150秒で kill されていました。PR #2245 では、この問題を exact static policy の420秒で解消しています。
timeout sample を完全除外すると、未知の遅いコマンドは次のループに入ります。
つまり history-based estimator が、最も必要なケースで永久に cold-start のままになります。
必須修正
status ごとの意味を明示してください。
success/ exit 0failed/ non-zerotimed_outlower_bound_ms = applied_timeout_msとして記録し、次回budgetをbackoffcancelled趣味開発向けの単純で安全な backoff は次で十分です。
したがって150秒で timeout したコマンドは、次回300秒になります。これで約271秒のコマンドは、historyがまだ成功sampleを持っていなくても次回完走できます。
Survival analysis や SciPy 依存を導入する必要はありません。右打ち切りを下限として扱う bounded backoff だけで、実用上の問題は解消できます。
P0-3.
static_policyとstatic_fallbackが Issue 内で混同されている現在の production source は明確に分かれています。
explicit_overridestatic_policystatic_fallbackSTATIC_PER_COMMAND_TIMEOUT_POLICYに exact match したコマンドはstatic_policyです。どの policy にも一致しない場合の150秒がstatic_fallbackです。現在の precedence は、明示 override、static policy、fallback の順です。一方、Issue #2254 の Outcome では
static_fallback(STATIC_PER_COMMAND_TIMEOUT_POLICY)と書かれており、2つの source が混同されています。このままでは、次のどちらも「ACを満たした実装」と主張できます。
Aを採用すると、既に271秒問題を直した420秒の trusted policy を、少数のwarm-cache sampleから算出した300秒前後の値で引き下げる可能性があります。
必須の precedence
この Issue では historyはtimeoutを引き下げず、引き上げ専用 にするべきです。
source 判定は次です。
これにより、履歴が少ない、偏っている、stale、破損している場合でも既存挙動を悪化させません。
STATIC_PER_COMMAND_TIMEOUT_POLICYの削除や、historyによる自動縮小は別 Issue に分離すべきです。P0-4. local history と CI cross-run history が同じ Issue に混在している
ci_runtime_baseline_v1は、GitHub Actions の job/step 単位の elapsed time を artifact として保存する既存契約です。run ID、job、runner image、step ID、elapsed time を持ち、性能比較用に20 runのP50/P95を使います。VC command単位のmutable lookup storeとは、粒度・利用時点・更新方法が異なります。GitHub Actions の cache は既存keyの内容を更新できず、新しいkeyが必要です。また、別workflow runのartifact取得にはtokenとrun identifierが必要です。したがって、cacheやartifactを単純なmutable history DBとして扱うことはできません。([GitHub Docs]2)
現行 Allowed Paths には
.github/workflows/、collector、artifact schema が含まれていません。よってCI runをまたぐhistoryは、現契約内では実装不能です。推奨スコープ
Issue #2254 は local-first に限定してください。
これは「CIでは機能しない欠陥」ではありません。今回解決したい主なワークフローがローカルのエージェント実行なら、むしろ余計なworkflow・token・artifact処理を入れない方が有用です。
P1 findings
P1-1.
Runtime Verification Applicability: not_applicableは不正確この Issue は、単なるパーセンタイル関数の追加ではありません。
を扱います。fixture JSONからP95を算出するunit testだけでは、production wiringを証明できません。
PR #2245 でも、一度はテストがPASSしていたにもかかわらず、後の敵対的レビューで「4 consumerが実際には新budgetを使っていない」「271秒問題が直っていない」「production wiringを通っていない」と判定され、
REQUEST_CHANGESになっています。また、このリポジトリの性能系Issueでは、固定SHA・raw sample・same-clock・immutable manifestなど、集計値だけでなく実測経路の検証を要求する方向に改善されています。
ただし20-run CI検証までは不要
このIssueで必要なのは長期性能実験ではなく、scaled runtime integrationです。
最低限、次を実プロセスで検証してください。
Runtime Verification は
immediateまたはscaledに変更するのが妥当です。P1-2.
compute_execution_key_hash()をhistory grouping keyに使ってはいけない既存ドキュメントでは、
command_identity_hashとcompute_execution_key_hash()は別概念です。command_identity_hash: command text の識別compute_execution_key_hash(): argv、cwd、env、timeout、state epochなどを含む実行単位の識別compute_execution_key_hash()に timeout が含まれるなら、historyでtimeoutを150秒から300秒へ変更した瞬間に別keyになります。これは自己破壊的です。
推奨する3層分離
推奨形は次です。
注意点は以下です。
GITHUB_RUN_ID、PID、日時などvolatile値を入れない。uv.lockを使う。pnpm-lock.yamlを使う。現在のIssueはPython系fingerprintを全commandへ要求しており、pnpm commandのhistoryが無関係なpytest更新で無効になる設計です。command familyごとのfingerprintが必要です。
P1-3. 「P95」の計算法が未定義
Python標準の
statistics.quantiles()は既定でexclusive法を使い、inclusive法とは結果が異なります。また公式ドキュメントは、意味のある結果にはデータ点数が区間数nより多いことを推奨しています。n=100のP95を少数sampleへそのまま適用する設計は不適切です。([Python documentation]3)Issueには以下がありません。
推奨する固定契約
趣味開発用timeout estimatorなら、複雑な補間は不要です。
n=5〜19ではnearest-rank P95は実質的に最大値になるため、少数sample時にも保守的です。しかもhistoryはtimeoutを引き下げないので、sample数が少なくてもworkflow safetyを悪化させません。float誤差を避けるなら、整数演算にしてください。
P50はobservabilityには有用ですが、timeoutの決定値としては不要です。既存
command_timeout_budget/v1に無理にP50 fieldを追加せず、snapshot/evidence側へ置く方が安全です。P1-4. AC8 の tampering 防止は、現状の表現だと過剰設計
同一ユーザー権限で動くlocal DBに、秘密鍵や外部trust rootを置かず「改竄を証明」することはできません。row hash chainやHMACを追加しても、鍵やcodeを変更できる主体には再計算されます。
この個人趣味開発で必要なのは cryptographic tamper-proofing ではなく、破損・異常値・誤書き込みでworkflowを壊さないことです。
AC8は次へ置き換えるべきです
ファイルpermissionを0600相当にするのは妥当ですが、HMAC、key management、署名基盤は不要です。
P1-5. 同じsubprocess実行を複数sampleとして数える危険がある
canonical plan は command occurrence を持ち、pure command の重複実行をまとめる経路があります。
history writer がresult itemごとに記録すると、1回しか起動していないcommandが、複数ACに現れただけで複数sampleになります。
必須修正
execution_idを一意にする。sample_countはeligibleな一意成功execution数。P1-6. 壊れたhistoryがhard blockerを発火させてはいけない
現在は、解決されたtimeoutが600秒を超えると
CommandTimeoutExceedsPolicyErrorを subprocess起動前に返します。これはrepo-ownedなexplicit override/static policyには妥当です。しかしhistory rowの異常値をそのままresolverへ渡すと、履歴DBの破損だけでレビュー全体をblockできます。
history sourceについては、次のように扱うべきです。
historyは trusted policy authority ではなく、あくまで advisory input です。history failureが既存static fallbackより悪い結果を作らないことをAC化してください。
推奨実装
Store は local SQLite が最も妥当
JSON file+renameでも単一writerのatomicityは作れますが、複数プロセスのread-modify-writeでは更新消失を防ぐためのlock処理が別途必要です。SQLiteのtransactionはprogram crash、OS crash、電源断でもall-or-nothingを保証します。Python標準ライブラリだけで利用できます。(SQLite)
この用途ではWALは不要です。
SQLite公式も、WALはreader/writer concurrencyを高める一方、同一host制約や追加管理を持ち、writerは同時に1つだけと説明しています。さらに2026年には、複数connectionで同時write/checkpointした場合の稀なWAL bugが3.51.3等で修正されています。デフォルトrollback journalの方が、この用途では単純です。(SQLite)
推奨設定
Pythonの
sqlite3.connect(timeout=...)は、lock時にOperationalErrorを出すまでの待機時間を設定できます。既定5秒はこのworkflowには長いため、短く明示する方がよいです。([Python documentation]6)保存場所
repo外のper-repository stateを推奨します。
XDG_STATE_HOMEがなければ~/.local/stateを使います。これにより、
という利点があります。
最小schema
provenance_jsonを何でも入る箱として最初から作るより、必要なfieldだけ固定した方が破損・driftを防げます。Snapshot
{ "schema": "vc_command_runtime_snapshot/v1", "as_of_utc": "2026-08-29T00:00:00Z", "estimator_version": "nearest_rank_v1", "groups": [ { "command_group_key": "...", "environment_fingerprint": "...", "eligible_success_count": 8, "timeout_count": 1, "observed_p50_ms": 266100, "observed_p95_ms": 274500, "timeout_backoff_floor_seconds": 300 } ] }estimator_input_digestはDB file bytes、mtime、SQLite page layoutではなく、この canonical evidence object をhashしてください。Issue #2254 の推奨スコープ差し替え
Revised Goal
Revised In Scope
Revised Out of Scope
必須Allowed Paths追加
巨大な
baseline_vc_preflight.pyにstore、schema、migration、percentile、snapshot処理をすべて詰め込まず、vc_runtime_history.pyへ分離すべきです。改訂版Acceptance Criteria
Snapshot determinism
同一Issue body+同一history snapshotから全4 consumerが同一
plan_digestを生成し、snapshot生成後にDB更新またはTTL境界通過があっても現在のplanが変わらない。Identity separation
command_group_key、environment_fingerprint、execution_idが別概念として実装され、timeout変更でhistory groupが変わらない。Estimator contract
nearest_rank_v1、minimum 5、TTL 30日、最新50件、1.5倍margin、integer roundingがコード・docs・testで固定される。Raise-only precedence
explicit_override > max(static_base, history, timeout_backoff)が検証され、historyがstatic timeoutを引き下げない。Censoring
timeoutが lower-bound/backoffとして次回budgetを引き上げ、cancelledとnon-zero failureが成功percentileを汚染しない。
One launch, one sample
同一executionを複数ACが参照してもsampleは1件だけ保存される。
Atomic local persistence
2プロセス並行INSERT後も全sampleが保存され、DB schemaが有効である。
Non-blocking degradation
missing、locked、corrupt、unknown schema、invalid row、fingerprint mismatch、staleのすべてでstatic sourceへ戻り、history障害だけではreviewをblockしない。
Production wiring
実commandを1回起動し、sample保存後の次invocationでproduction
compute_canonical_vc_plan()がhistoryを利用するintegration testがある。Scope boundary
ci_runtime_baseline_v1はprovenance慣習のみ参照し、schema/storeは再利用しない理由と、CI cross-run persistenceがOut of ScopeであることをdocsとPR本文に記載する。最終評価
このIssueを全面的に捨てる必要はありません。ただし、現在の「P50/P95 calibration基盤、CI baseline再利用、tampering防止、atomic store」を一括で実装すると、個人趣味開発としては基盤コストが高く、既存workflowを止める新しい故障点を増やします。
最も有用な形は次です。
推奨は #2254 を「local adaptive timeout cache」に狭めて全面改訂することです。
その改訂を行わないなら、現在のtrusted static policyを維持して
not plannedにする方が、現行契約のまま複雑なhistory基盤を実装するより品質・有用性ともに上です。squne121 commentedon Aug 28, 2026
issue-refinement-loop 終了報告(Issue #2254)
結果: approved
anchor comment(OWNER, https://github.com/squne121/loop-protocol/issues/2254#issuecomment-5456836854)の REQUEST_CHANGES を反映し、3 iteration で本文を全面改訂した。
-kフィルタで pytest exit 5 hard-block になっていた)Final Gate:
CONTRACT_REVIEW_RESULT_V1.status: go(execute mode, all_checks_pass, readiness_status: go, vc_preflight_status: pass)squne121 commentedon Aug 28, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Aug 28, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Aug 28, 2026
implement-issue: 実装完了 (2026-08-28T20:40:00Z)
.claude/worktrees/issue-2254-history-timeout-estimatorworktree-issue-2254-history-timeout-estimatorVerification Commands 結果(全 AC PASS)
pytest ... -k snapshot_determinismpytest ... -k identity_separationpytest ... -k nearest_rankpytest ... -k raise_only_precedencepytest ... -k timeout_censoring_backoffpytest ... -k one_launch_one_samplepytest ... -k atomic_concurrent_writepytest ... -k non_blocking_degradationpytest test_history_snapshot_production_wiring.py -vrg -n "ci_runtime_baseline_v1" vc-preflight.md回帰確認: 既存
test_command_timeout_budget.py(15件)+ 新規回帰4件 = 19件 PASS。.claude/skills/issue-contract-review/scripts/tests/全体 421 passed, 1 skipped(無回帰)。.claude/skills/issue-contract-review/tests/全体 549 passed(無回帰)。run_root_review_pipeline.py関連のissue-refinement-loop/tests97 passed(無回帰)。ruff check: 変更ファイル全件 PASS。fix: OWNER REQUEST_CHANGES対応 — history snapshot伝播・repo_root正規化・schema…
feat: command_timeout_budget/v1 に history-based (nearest_rank_v1) tim…