Skip to content

実装: CI test-lane current-state manifest と projection verifier を追加する #1782

Closed as not planned

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "CI test-lane の領域別 authority を machine-readable current-state manifest に集約し、workflow・既存 verifier・docs・Skill projection の drift を検証する"
change_kind: tooling-and-docs
depends_on:
  - 1725
  - 1760
  - 1761
  - 1762
readiness: blocked_until_dependencies_merged

Parent Issue

なし(単独改善)

Parent Goal Ref

依存 Issue の merge 後に確定する CI topology と test-lane authority を machine-readable state と projection に固定すること。

Current Validated Scope

  • python-test-plan.json、workflow、既存 lane/inventory verifier は別々の authority を持つ。
  • docs と Skill は human-readable projection とし、job topology や dedicated coverage の不変条件を再実装しない。

Remaining Parent Gaps

Dependencies

Outcome

依存 Issue の merge 後に、CI test-lane の current-state manifest、既存 verifier の workflow 接続検証、docs/Skill projection の一致検証が fixture-driven verifier として確立される。

In Scope

  • .github/ci/ci-test-performance-current-state.json の authority mapping と stable phase inventory 定義。
  • verify_ci_test_performance_contract.py による manifest、workflow 接続、docs/Skill projection の検証。
  • failure key と exit code を確認する negative fixture tests。
  • workflow から既存 verifier と projection verifier を接続する変更。
  • docs/dev/ci-performance.md、docs/dev/test-lane-policy.md、canonical Skill を manifest projection として更新する。

Out of Scope

  • job topology、pytest invocation、dedicated coverage の判定ロジック再実装。
  • python-test-plan.json schema の変更。
  • Ruff rule 設定の移管。

Acceptance Criteria

  • AC1: current-state manifest は Ruff rules、python test selection、execution topology、stable phase inventory の authority を領域ごとに一意に参照する。
  • AC2: verifier は既存 lane/inventory verifier が workflow に接続されていることだけを検証し、job topology または dedicated coverage の判定ロジックを複製しない。
  • AC3: verifier は manifest と docs/Skill projection の差分を安定した failure key と非ゼロ終了で拒否する。
  • AC4: stable phase inventory は complete inventory ではなく curated stable subset として定義し、fixture が欠落と余剰を区別して検証する。
  • AC5: negative fixtures、projection verifier、actionlint が成功する。

Verification Commands

# AC1
# baseline-expect: fail
$ uv run --locked python3 scripts/ci/verify_ci_test_performance_contract.py --root .
# AC2
# baseline-expect: fail
$ uv run --locked pytest scripts/ci/tests/test_verify_ci_test_performance_contract.py::test_rejects_missing_existing_verifier_connection
# AC3
# baseline-expect: fail
$ uv run --locked pytest scripts/ci/tests/test_verify_ci_test_performance_contract.py::test_rejects_docs_projection_drift
# AC4
# baseline-expect: fail
$ uv run --locked pytest scripts/ci/tests/test_verify_ci_test_performance_contract.py::test_rejects_stable_phase_inventory_drift
# AC5
# preflight-scope: pr_review_only
$ actionlint .github/workflows/ci.yml

Allowed Paths

  • .github/ci/ci-test-performance-current-state.json
  • .github/workflows/ci.yml
  • scripts/ci/verify_ci_test_performance_contract.py
  • scripts/ci/tests/test_verify_ci_test_performance_contract.py
  • docs/dev/ci-performance.md
  • docs/dev/test-lane-policy.md
  • .claude/skills/ci-test-performance/SKILL.md

Stop Conditions

Required Skills

  • ci-test-performance

Required Design References

  • docs/dev/workflow.md
  • docs/dev/ci-performance.md
  • docs/dev/test-lane-policy.md
  • .claude/skills/ci-test-performance/SKILL.md

Runtime Verification Applicability

decision: not_applicable
reason: repository-local verifier、fixture、workflow static validation で検証するため

Notes for Reviewer

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    on Jul 26, 2026
  2. squne121 commented on Aug 12, 2026

    @squne121
    OwnerAuthor

    Blocked by および既存Issueを見直して。
    ClaudeCodeおよびCodexCLIのフックスにおいて、個人趣味開発においては、過剰な作業制約は行わない方針を決定としました。

    その上で、このIssueに設定されているブロックドIssue、および同様の理由で不採用になるであろうIssueを確認してクローズしてください。

  3. squne121 commented on Aug 12, 2026

    @squne121
    OwnerAuthor

    結論

    #1782 は現行契約のままなら CLOSED / NOT_PLANNED が妥当です。ただし、指定コメントの「Blocked by と同様の理由の Issue を確認してクローズ」という指示を機械的に適用するのは危険です。直接依存には「過剰な control-plane」「既に実装済み」「現在も実在する CI/test defect」が混在しています。指定コメント自体は方針として正しいものの、close の分類規則が不足しています。

    リポジトリ内には既に #1860 で、個人趣味開発では live Issue/PR・実 diff・実 test・current-head CI・独立 review を authority とし、新しい graph policy / packet schema / ledger / digest / checker / enforcing hook を増やさない、というほぼ同一の Owner Decision が存在します。#1782 の「current-state manifest + projection verifier」は、この決定後に維持するには二次的な control-plane が強すぎます。

    P0-1 — #1782 は「不具合を直す verifier」ではなく「既存 verifier を監視する verifier」になっている

    #1782 は .github/ci/ci-test-performance-current-state.json を新たな authority mapping とし、既存 verifier が workflow に接続されているか、docs/Skill が manifest と一致するか、stable phase inventory が一致するかをさらに verifier で監視します。つまり、実テストや workflow の correctness を直接直すものではなく、既存 SSOT → manifest → verifier → docs projection という追加層です。しかも依存する #1761/#1762 が未実装なので、想定した最終 topology 自体が成立していません。

    さらに #1760 / PR #1824 では既に verify_python_test_lane.py が導入され、Node/Codex の再混入、plan 外 pytest、job 欠落、verifier 無効化等を直接検証しています。PR は merge 済みです。ここに #1782 を載せると、実際の CI invariant を検査するコードの上に「その verifier が存在し配線され docs と同期していることを検査する verifier」を置くことになります。

    したがって #1782 は not planned とし、必要な invariant は実 workflow / 実 verifier の近傍で直接テストする方が #1860 の minimal harness と整合します。

    P0-2 — 直接 Blocked-by 4件を一括 close してはいけない

    ここが指定コメントの最大の欠陥です。

    Issue | 推奨 disposition | 判定 -- | -- | -- #1782 | CLOSE / not_planned | verifier-of-verifiers / manifest projection 層が過剰 #1760 | CLOSE / completed | PR #1824 が既に merged。成果物は維持するべき #1761 | CLOSE / not_planned | 全 field strict schema + unknown-key fatal + owner/Issue/期限/removal condition 必須 quarantine は hobby repo には統治コストが大きい #1762 | CLOSE / not_planned(現行設計) | 全 Python test の exactly-one-lane inventory、provider artifact、head SHA、集約 required gate は real defect を一般化しすぎている #1725 | KEEP / reframe | 現在実際に「plan にはあるが job が実行していない」1ファイルを直す具体的 defect。#1762 依存・「一般解」記述だけ撤去する #1828 | KEEP | #1725 対象テストの Stop/SubagentStop fixture / stderr / 環境分離という実 test defect #1765 | CLOSE / not_planned | base/head 各20回=40 run、独自 evidence schema、fingerprint、artifact digest、P50/P95 verifier まで常設するのは明白に過剰

    特に #1735 は「Hook Issue だから close」という判定の反例です。Claude の sibling-hook 並列性は現在の公式仕様そのものです。加えて local secret leakage は GitHub branch protection では防げません。したがって secret boundary のような local-only risk guard は残してよい一方、worktree/branch/task routing のような repository correctness enforcement は GitHub/CI/executor に寄せる、という境界が適切です。 (Claude)

    P1 — repository integrity は GitHub-native enforcement を優先する

    GitHub の protected branch / ruleset は、PR 必須化、required status checks、review、conversation resolution、force-push/delete 制限などを merge boundary で強制できます。repository integrity に関しては、ローカル LLM hook で raw command grammar を推測して遮断するより、actual diff + tests + required CI + branch/ruleset に authority を置く方が構造的に単純です。 (GitHub Docs)

    これは #1860 の既存方針とも完全に一致します。重要なのは「fail-close を全廃する」のではなく、fail-close を実際に authority を持つ境界へ寄せることです。executor が branch/path/repository を検証する、CI が test failure なら失敗する、GitHub が required check 未成功なら merge させない、という形です。

    指定コメントへの敵対的レビュー判定

    判定: REQUEST_CHANGES。方針は APPROVE、実行指示が粗い。

    「過剰な作業制約を行わない」は #1860 と整合し、#1782/#1761/#1762/#1765 や enforcement Hook 復帰系を整理する根拠として十分です。問題は「Blocked by および同様の Issue を close」としか書かれておらず、completed、not_planned、keep/reframe、real defect を区別していないことです。

    適用すべき判定規則は、**「制約を作ること自体が目的の control-plane は not_planned」「既に merge 済みは completed」「Hook がなくても再現する concrete bug/test failure は維持」「破壊的操作を安全に行う executor-level validation は維持」「local-only secret protection は維持可能」**です。この規則なら、今回の方針転換で有益な実装まで誤って捨てません。

    最終的には、#1782 / #1761 / #1762 / #1765 / #1684 / #1689 / #1738 / #1147 → not planned、#1760 / #1690 → completed、#1725 / #1828 → keep、#1137 / #1735 → reframe を推奨します。

    現時点ではレビューのみ行い、Issue の close/edit は実行していません。

    ## 結論

    #1782 は現行契約のままなら CLOSED / NOT_PLANNED が妥当です。ただし、指定コメントの「Blocked by と同様の理由の Issue を確認してクローズ」という指示を機械的に適用するのは危険です。直接依存には「過剰な control-plane」「既に実装済み」「現在も実在する CI/test defect」が混在しています。指定コメント自体は方針として正しいものの、close の分類規則が不足しています。

    リポジトリ内には既に #1860 で、個人趣味開発では live Issue/PR・実 diff・実 test・current-head CI・独立 review を authority とし、新しい graph policy / packet schema / ledger / digest / checker / enforcing hook を増やさない、というほぼ同一の Owner Decision が存在します。#1782 の「current-state manifest + projection verifier」は、この決定後に維持するには二次的な control-plane が強すぎます。

    P0-1 — #1782 は「不具合を直す verifier」ではなく「既存 verifier を監視する verifier」になっている

    #1782 は .github/ci/ci-test-performance-current-state.json を新たな authority mapping とし、既存 verifier が workflow に接続されているか、docs/Skill が manifest と一致するか、stable phase inventory が一致するかをさらに verifier で監視します。つまり、実テストや workflow の correctness を直接直すものではなく、既存 SSOT → manifest → verifier → docs projection という追加層です。しかも依存する #1761/#1762 が未実装なので、想定した最終 topology 自体が成立していません。

    さらに #1760 / PR #1824 では既に verify_python_test_lane.py が導入され、Node/Codex の再混入、plan 外 pytest、job 欠落、verifier 無効化等を直接検証しています。PR は merge 済みです。ここに #1782 を載せると、実際の CI invariant を検査するコードの上に「その verifier が存在し配線され docs と同期していることを検査する verifier」を置くことになります。

    したがって #1782 は not planned とし、必要な invariant は実 workflow / 実 verifier の近傍で直接テストする方が #1860 の minimal harness と整合します。

    P0-2 — 直接 Blocked-by 4件を一括 close してはいけない

    ここが指定コメントの最大の欠陥です。

    Issue 推奨 disposition 判定
    #1782 CLOSE / not_planned verifier-of-verifiers / manifest projection 層が過剰
    #1760 CLOSE / completed PR #1824 が既に merged。成果物は維持するべき
    #1761 CLOSE / not_planned 全 field strict schema + unknown-key fatal + owner/Issue/期限/removal condition 必須 quarantine は hobby repo には統治コストが大きい
    #1762 CLOSE / not_planned(現行設計) 全 Python test の exactly-one-lane inventory、provider artifact、head SHA、集約 required gate は real defect を一般化しすぎている
    #1725 KEEP / reframe 現在実際に「plan にはあるが job が実行していない」1ファイルを直す具体的 defect。#1762 依存・「一般解」記述だけ撤去する
    #1828 KEEP #1725 対象テストの Stop/SubagentStop fixture / stderr / 環境分離という実 test defect
    #1765 CLOSE / not_planned base/head 各20回=40 run、独自 evidence schema、fingerprint、artifact digest、P50/P95 verifier まで常設するのは明白に過剰

    #1725 を残す根拠は特に強いです。pytest の公式仕様でも通常 invocation は対象テストを実行する一方、--collect-only は収集対象を得る用途です。したがって「collect/plan 上では存在するが provider job が実行していない」という差は実質的です。単に manifest 整合を取る話ではありません。 (pytest)

    したがって #1762 を close する場合、#1725 のタイトル・Outcome・Remaining Gaps から「一般解は #1762」を除去し、既知 false-green 1件を直接直して終了する契約にするのが適切です。

    P0-3 — Hook 系は「全廃」ではなく enforcement と useful local guard を分離すべき

    外部仕様を確認すると、Claude Code の PreToolUse は permission check より先に発火し、deny は bypassPermissions や --dangerously-skip-permissions でも tool call を停止します。また sibling hooks は並列実行され、一つが deny しても他 hook の side effect は既に実行され得ます。過去の local_main_branch_guard / worktree_scope_guard の誤分類が作業全体を停止させたのは、この仕様上自然な結果です。 ([Claude]2)

    Codex も現在の upstream main には PreToolUse 実装がありますが、Claude と完全互換ではありません。例えば現在の parser は permissionDecision: "ask" を unsupported とし、allow も updatedInput を伴う場合に限定して処理しています。Claude/Codex 共通の強い enforcement layer を repo 側で独自に抽象化し続けると、upstream semantic drift を追跡するコストが増えます。 ([GitHub]3)

    この観点から、関連 Issue は次のように扱うのが妥当です。

    Issue 推奨
    #1690 「Hook を無効化/縮小/維持する方針調査」 CLOSE / completed。今回の Owner Decision で問いへの答えが出た
    #1684 local_main_branch_guard 誤ブロック修正 CLOSE / not_planned。disabled enforcement を修理して復帰させる理由が消えた
    #1689 worktree binding 不能を Hook 制約下で解決 CLOSE / not_planned
    #1738 shadow mode + Hook re-enable readiness CLOSE / not_planned。目的そのものが再有効化
    #1147 cleanup worker が local_main_branch_guard に block CLOSE / not_planned/obsolete。原因となった enforcement を採用しない
    #1137 cleanup contract / guard arbitration KEEP して executor-only に reframe。cleanup_exec 自身の PR merged/head/issue/worktree/clean-state validation は有用だが Hook allowlist・nonce/TTL/hash contract 等は撤去候補
    #1735 Hook parallel semantics + secret guard portability CLOSE しない。reframe/split。secret_boundary_guard の grep portability 等は残す価値がある

    特に #1735 は「Hook Issue だから close」という判定の反例です。Claude の sibling-hook 並列性は現在の公式仕様そのものです。加えて local secret leakage は GitHub branch protection では防げません。したがって secret boundary のような local-only risk guard は残してよい一方、worktree/branch/task routing のような repository correctness enforcement は GitHub/CI/executor に寄せる、という境界が適切です。 (Claude)

    P1 — repository integrity は GitHub-native enforcement を優先する

    GitHub の protected branch / ruleset は、PR 必須化、required status checks、review、conversation resolution、force-push/delete 制限などを merge boundary で強制できます。repository integrity に関しては、ローカル LLM hook で raw command grammar を推測して遮断するより、actual diff + tests + required CI + branch/ruleset に authority を置く方が構造的に単純です。 ([GitHub Docs]4)

    これは #1860 の既存方針とも完全に一致します。重要なのは「fail-close を全廃する」のではなく、fail-close を実際に authority を持つ境界へ寄せることです。executor が branch/path/repository を検証する、CI が test failure なら失敗する、GitHub が required check 未成功なら merge させない、という形です。

    指定コメントへの敵対的レビュー判定

    判定: REQUEST_CHANGES。方針は APPROVE、実行指示が粗い。

    「過剰な作業制約を行わない」は #1860 と整合し、#1782/#1761/#1762/#1765 や enforcement Hook 復帰系を整理する根拠として十分です。問題は「Blocked by および同様の Issue を close」としか書かれておらず、completed、not_planned、keep/reframe、real defect を区別していないことです。

    適用すべき判定規則は、**「制約を作ること自体が目的の control-plane は not_planned」「既に merge 済みは completed」「Hook がなくても再現する concrete bug/test failure は維持」「破壊的操作を安全に行う executor-level validation は維持」「local-only secret protection は維持可能」**です。この規則なら、今回の方針転換で有益な実装まで誤って捨てません。

    最終的には、#1782 / #1761 / #1762 / #1765 / #1684 / #1689 / #1738 / #1147 → not planned、#1760 / #1690 → completed、#1725 / #1828 → keep、#1137 / #1735 → reframe を推奨します。

    現時点ではレビューのみ行い、Issue の close/edit は実行していません。

  4. squne121 commented on Aug 12, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop 結果: CLOSE / not_planned

    対象コメント(#1782 コメント)の分析を独立に fact-check した上で、本 Issue を not planned として close する。

    独立検証結果

    • #1860(実在確認済み、OPEN): 「個人趣味開発においては過剰な control-plane(新しい graph policy / packet schema / ledger / digest / checker / enforcing hook 等)を増やさない」旨の Owner Decision を確認。
    • #1760 は CLOSED、対応 PR #1824 は MERGED 済みであることを確認。verify_python_test_lane.py が既に workflow に接続され、CI invariant を直接検証している。
    • #1761 / #1762 は現時点で OPEN。

    判断根拠

    #1782 は .github/ci/ci-test-performance-current-state.json を新たな authority mapping とし、「既存 verifier が workflow に接続されているか」「docs/Skill が manifest と一致するか」を さらに verifier で監視する 設計であり、実際の CI/test defect を直接検証するものではない。対象コメントの指摘通り、これは「verifier の存在・配線・docs 同期を検証する verifier」という二次的な control-plane 層であり、#1860 の minimal harness 方針(live diff / 実 test / current-head CI / 独立 review を authority とし、新規 graph policy / packet schema / ledger / digest / checker / enforcing hook を増やさない)と整合しない。

    加えて依存する #1761 / #1762 も同種の過剰統治コストを理由に見直し対象とされており、本 Issue が前提とする最終 topology(current-state manifest + projection verifier)自体が成立しない可能性が高い。

    review-issue 側でも VC preflight allowlist 違反(AC1 のコマンドが許可パターン外)が blocker として検出されているが、上記の disposition 判断(not_planned)が優先されるため、この VC 修正は行わない。

    disposition

    CLOSED / NOT_PLANNED

    依存 Issue(#1761 / #1762 / #1765 等)の disposition は別途、それぞれの Issue 単位で確認する(本 Issue の scope 外)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions