Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "Issue #1565 の OWNER anchor comment (https://github.com/squne121/loop-protocol/issues/1565#issuecomment-5009975121, High 2) が指摘した uv option grammar table と配布 uv バージョンの非同期の解消のうち、toolchain pin (uv バージョン固定・setup-uv full SHA pin) のみを扱う。grammar table / parity test は Issue #1595 へ移管する(Issue #1598 の OWNER anchor comment https://github.com/squne121/loop-protocol/issues/1598#issuecomment-5010922692 の決定)。固定 uv バージョンは PR #1618 への OWNER REQUEST_CHANGES(https://github.com/squne121/loop-protocol/pull/1618#issuecomment-5013654409)を受け 0.11.29 へ改訂した。"
change_kind: mixedParent Issue
none
Parent Goal Ref
- Goal: Issue 実装: skill-runtime target predicate を Issue #1595 の共有 launcher classifier ベースに置換する #1565 の OWNER anchor comment(High 2)が指摘した、静的 uv option grammar table と CI 上で配布される uv バージョンとの非同期のうち、toolchain pin(uv バージョン固定・GitHub Actions setup-uv の full commit SHA pin) のみを解消する。grammar table の欠落 option 追加・parity 検証テストは Issue 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 の責務とする。
- Desired Destination:
pyproject.tomlの[tool.uv].required-versionを uv バージョンの canonical source とし、GitHub Actions のastral-sh/setup-uv参照を tag ではなく full commit SHA へ pin し、repository 内の全 setup-uv consumer の explicit version 指定が canonical source と一致することを repository-wide contract test で保証する。uv バージョンは既知の parser-differential セキュリティ強化リリース以降を採用する。
Current Validated Scope
pyproject.tomlに[tool.uv]セクションとrequired-version = "==0.11.29"を追加する(uv バージョンの canonical source)。exact pin(==X.Y.Zの三点バージョンのみ)であることを contract test が fail-closed で検証する。.github/actions/setup-python-uv/action.ymlのastral-sh/[email protected](tag 参照)を、承認済み full commit SHA08807647e7069bb48b6ef5acd8ec9567f424441b(# v8.1.0コメント併記)へ pin し、version: "0.11.29"をwith:に追加する。.github/actions/setup-python-uv/action.ymlの説明コメント内「uv バージョン pin は Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 で管理」という stale な記述を、本 Issue の決定を反映した内容へ更新する。.github/workflows/check-hook-integrity.ymlの既存astral-sh/setup-uvpin(既に承認済み full commit SHA を使用)のversion:を"0.11.23"から"0.11.29"へ更新し、canonical source と同期させる。- repository 内の全
astral-sh/setup-uvconsumer(.github/actions/**配下を再帰的に走査し、.github/actions/setup-python-uv/action.yml/.github/workflows/check-hook-integrity.yml/ 将来追加される nested composite action や workflow を含む)について、(a) 承認済み full commit SHA allowlist に含まれる参照であること(tag 参照や未承認 SHA を拒否)、(b) explicitversion:指定がある場合はpyproject.tomlのrequired-versionと一致すること、を検証する repository-wide contract test を新規追加する。同テスト内で実際にインストールされているuv --versionの出力がpyproject.tomlのrequired-versionと一致することも runtime に assert する。nested composite action(.github/actions/<subdir>/<name>/action.yml形式)を検出できることを regression test で保証する。
Remaining Parent Gaps
- Issue A(共有 launcher parser
scripts/agent-guards/launcher_command_classifier.pyの抽出、および grammar table の欠落 option 追加・parity 検証テスト)は Issue 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 として起票済み。実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 の契約は「実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1598 の完了を待たず、実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1598 が宣言する canonical uv version と整合する grammar table を 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 内で実装する」と定めており、実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 は未着手(grammar table 自体が存在しない)ため、本 Issue の canonical uv version 改訂(0.11.23→0.11.29)は 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 側の既存実装に影響しない。実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 が実装着手時に本 Issue の最新 canonical version(0.11.29)を参照することを確認する。 - Issue B(実装: skill-runtime target predicate を Issue #1595 の共有 launcher classifier ベースに置換する #1565、skill-runtime target predicate の argv-aware 化)は本 Issue の完了後も残る(実装: skill-runtime target predicate を Issue #1595 の共有 launcher classifier ベースに置換する #1565 は本 Issue の完了を待たずに並行して進行可能)。
- Issue Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375(Python/uv patch-level reproducibility policy)は、本 Issue が uv version の exact pin(
required-version = "==0.11.29")を先行決定するため、Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 の decision B(patch-level pin + uv version pin採用)の一部を本 Issue が supersede する。本 Issue のクローズ時に Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 へ本 Issue との関係を明記したコメントを追加し、Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 の残り scope を「Python patch-level policy と Safety Claim Matrix の docs 整合」のみへ縮小することを Delivery Rule の必須アクションとする(Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 への comment 投稿は repo VC 対象外の GitHub 上のコーディネーション作業のため、AC ではなく Delivery Rule に位置づける)。 - Dependabot 等による pin 更新 PR の自動生成は、既存 Dependabot 設定が repo に存在しないため本 Issue の Out of Scope とする(follow-up 要否は本 Issue 完了後に別途判断)。
Outcome
pyproject.toml の [tool.uv].required-version が "==0.11.29"(parser-differential セキュリティ強化を含む安定版)として uv バージョンの canonical source に追加され、.github/actions/setup-python-uv/action.yml と .github/workflows/check-hook-integrity.yml の両方の astral-sh/setup-uv が承認済み full commit SHA + version: "0.11.29" へ揃って pin され、composite action の stale な owner コメントが修正され、repository 内の全 setup-uv consumer(.github/actions/** 再帰走査を含む full SHA allowlist 検証・explicit version の canonical source との一致検証・実際にインストールされた uv --version の一致・required-version の exact PEP 440 pin 形式検証)を検証する repository-wide contract test が追加され、Issue #375 に本 Issue との関係を明記したコメントが投稿されている状態。
In Scope
pyproject.tomlへの[tool.uv].required-version = "==0.11.29"追加(canonical source)。.github/actions/setup-python-uv/action.ymlのastral-sh/setup-uvfull commit SHA pin +version: "0.11.29"input 追加。.github/actions/setup-python-uv/action.ymlの説明コメントの owner 記述修正。.github/workflows/check-hook-integrity.ymlの既存astral-sh/setup-uvのversion:を"0.11.29"へ更新(full commit SHA は変更なし、既に承認済み値)。- repository-wide な setup-uv consumer contract test の新規追加(
.github/actions/**再帰走査・承認済み full SHA allowlist 検証・explicit version と canonical source の一致検証・runtimeuv --version検証・required-version の exact PEP 440 pin 形式の fail-closed 検証)。 - Issue Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 への coordination コメント投稿(実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1598 が uv version pin decision を supersede したことの明記)。
Out of Scope
scripts/agent-guards/launcher_command_classifier.pyの抽出(Issue A = 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 の責務)。looks_like_skill_runtime_executor_command()の argv-aware 化(Issue B = 実装: skill-runtime target predicate を Issue #1595 の共有 launcher classifier ベースに置換する #1565 の責務)。_UV_GLOBAL_VALUE_FLAGS/_UV_GLOBAL_BOOL_FLAGS/_UV_RUN_VALUE_FLAGS/_UV_RUN_BOOL_FLAGS(grammar table)自体への option 追加、および_UV_OPTION_TABLE_UV_VERSION等のバージョン定数追加(いずれも Issue 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 の責務。実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1598 はscripts/agent-guards/local_main_branch_guard.pyを一切変更しない)。scripts/agent-guards/tests/test_local_main_branch_guard.py(.claude/hooks/tests/test_local_main_branch_guard.pyの compat shim)への変更(grammar parity test は 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 がscripts/agent-guards/tests/test_launcher_command_classifier.pyに追加する)。- Dependabot 等による pin 更新 PR 自動生成の導入(既存 Dependabot 設定なし。導入要否は別途判断)。
- Issue Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 の docs 更新作業自体(policy 文書の追記・Safety Claim Matrix 例文言の修正)は Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 側の責務として残し、本 Issue では coordination コメント投稿のみを行う。
Acceptance Criteria
- AC1:
pyproject.tomlに[tool.uv]セクションとrequired-version = "==0.11.29"が追加されている - AC2:
.github/actions/setup-python-uv/action.ymlのastral-sh/setup-uvが08807647e7069bb48b6ef5acd8ec9567f424441b(# v8.1.0コメント併記)へ full commit SHA pin されている - AC3:
.github/actions/setup-python-uv/action.ymlのastral-sh/setup-uvステップにversion: "0.11.29"がwith:として追加されている - AC4:
.github/actions/setup-python-uv/action.ymlの説明コメントから「uv バージョン pin は Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 で管理」という記述が除去され、pyproject.tomlの[tool.uv].required-versionを canonical source とし本 Issue で pin を決定した旨に更新されている - AC5:
.github/workflows/check-hook-integrity.ymlのastral-sh/setup-uvステップのversion:が"0.11.29"に更新されている(full commit SHA は既存の承認済み値のまま変更しない) - AC6:
scripts/ci/tests/test_uv_toolchain_contract.pyが新規追加され、.github/actions/**を再帰的に走査した上で repository 内の全astral-sh/setup-uvconsumer(.github/actions/setup-python-uv/action.ymlおよび.github/workflows/check-hook-integrity.ymlを含む)が承認済み full commit SHA allowlist に含まれる参照(tag 参照・未承認 SHA を拒否)であることを検証するテスト(関数名にfull_shaを含む)が追加されている。.github/actions/直下ではなくネストされたディレクトリに配置された composite action(tmp_path フィクスチャで作成)に対しても mutable tag 参照が検出されることを検証する regression test を含む - AC7: 同ファイルに、explicit
version:指定を持つ setup-uv consumer が存在する場合、その値がpyproject.tomlの[tool.uv].required-versionと一致することを検証するテスト(関数名にversion_matches_required_versionを含む)が追加されている - AC8: 同ファイルに、実際にインストールされている
uv --versionの出力がpyproject.tomlのrequired-versionと一致することを subprocess 経由で runtime に assert するテスト(関数名にinstalled_uv_version_matchesを含む)が追加されている - AC9:
scripts/ci/tests/test_uv_toolchain_contract.pyに、pyproject.tomlの[tool.uv].required-versionが存在しない場合に全テストが即座に fail する(値の未設定を看過しない)ことを保証する guard テスト(関数名にrequired_version_presentを含む)が追加されている - AC10:
required-versionの値が exact な PEP 440 pin(==X.Y.Zの三点バージョンのみ)でない場合(>=X.Y.Z、~=X.Y.Z、複数 specifier のカンマ区切り、不正な文字列等)に fail-closed で reject する検証(関数名にexact_version_pinを含む)を追加し、>=と~=と malformed value を reject することを示す negative test を含める
Runtime Verification Applicability
runtime_verification_applicability:
decision: immediate
reason: "AC1-AC10 は全て静的 grep および実 pytest(実 subprocess で uv --version を実行)で決定論的に検証できる。"
applicable_acs: [AC1, AC2, AC3, AC4, AC5, AC6, AC7, AC8, AC9, AC10]
execution_environment: "WSL2 Ubuntu 24.04、uv 0.11.29、pytest(repository 標準ツールチェーン)"
skip_conditions:
- "uv が利用できず pytest を起動できない場合"
fallback_policy: "static な読解のみを runtime verification 成功として扱わず、実 pytest 実行が不能なら blocked とする。"
artifact_requirements:
- "scripts/ci/tests/test_uv_toolchain_contract.py の pytest output"Verification Commands
# AC1
$ grep -n "required-version = \"==0.11.29\"" pyproject.toml
# AC2
$ grep -En "astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0" .github/actions/setup-python-uv/action.yml
# AC3
$ grep -n "version: \"0.11.29\"" .github/actions/setup-python-uv/action.yml
# AC4
# baseline-expect: pass
$ grep -n "uv バージョン pin は #375 で管理" .github/actions/setup-python-uv/action.yml
# AC5
$ grep -n "version: \"0.11.29\"" .github/workflows/check-hook-integrity.yml
# AC6
$ uv run --locked pytest scripts/ci/tests/test_uv_toolchain_contract.py -k full_sha -v
# AC7
$ uv run --locked pytest scripts/ci/tests/test_uv_toolchain_contract.py -k version_matches_required_version -v
# AC8
$ uv run --locked pytest scripts/ci/tests/test_uv_toolchain_contract.py -k installed_uv_version_matches -v
# AC9
$ uv run --locked pytest scripts/ci/tests/test_uv_toolchain_contract.py -k required_version_present -v
# AC10
$ uv run --locked pytest scripts/ci/tests/test_uv_toolchain_contract.py -k exact_version_pin -vAllowed Paths
- pyproject.toml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/check-hook-integrity.yml
- scripts/ci/tests/test_uv_toolchain_contract.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 0.11.29 を pin した際に CI(pnpm typecheck / pnpm lint / pnpm test / pnpm build / 既存 pytest スイート)のいずれかが fail する場合(別バージョンの検討が必要になるため、本 Issue を停止し人間判断を仰ぐ)
- 0.11.29 より新しい既知のセキュリティ修正版が実装時点で判明した場合(採用バージョンの再検討が必要になるため、本 Issue を停止し人間判断を仰ぐ)
Required Skills
- GitHub Actions composite action / workflow の記述(
.github/actions/*/action.yml,.github/workflows/*.yml) - uv CLI と
pyproject.tomlの[tool.uv]設定、PEP 440 version specifier の仕様 - pytest による subprocess ベースの contract テスト設計
gh issueCLI によるクロス Issue coordination コメント投稿
Required Design References
docs/dev/agent-skill-boundaries.md.github/CLAUDE.md(「外部 action の pinning(commit SHA 指定)...の変更は別 Issue として切り出す」という編集ガード方針。本 Issue が独立 Issue として切り出される直接の根拠)- https://docs.github.com/en/actions/reference/security/secure-use (GitHub 公式: 第三者 action は full commit SHA を immutable 参照として使うべきという推奨)
- https://docs.astral.sh/uv/reference/settings/ (
required-versionによる uv 実行時バージョン制約の仕様。setup-uvはversion未指定時にpyproject.tomlのrequired-versionを探索する) - https://github.com/astral-sh/setup-uv (
setup-uvのversioninput の解決順序の説明) - https://github.com/astral-sh/uv/releases/tag/0.11.25 (tar 処理の parser-differential 対策リリースノート)
- https://github.com/astral-sh/uv/releases/tag/0.11.28 (ZIP 処理の parser-differential 対策リリースノート)
- Issue 実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1598 の OWNER anchor comment: https://github.com/squne121/loop-protocol/issues/1598#issuecomment-5010922692(本 Issue の scope 縮小・AC 再定義の根拠)
- PR 実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1618 の OWNER REQUEST_CHANGES: 実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1618 (comment) バージョン改訂・Allowed Paths 拡張・contract test 強化の根拠)
Delivery Rule
- 1 Issue = 1 PR
- 専用 worktree で作業する
- Draft PR を既定とする
- PR merge 後、Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 coordination コメント投稿を実施する(PR 内の作業ではなく Issue Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 への直接コメント。repo VC 対象外)
Notes for Reviewer
- 3分割の由来: 本 Issue は Issue 実装: skill-runtime target predicate を Issue #1595 の共有 launcher classifier ベースに置換する #1565 の OWNER anchor comment(https://github.com/squne121/loop-protocol/issues/1565#issuecomment-5009975121)の「推奨する Issue 再定義」セクションで提案された Issue C(uv / GitHub Actions toolchain pin)に対応する。squne121(OWNER)がこの3分割採用を決定済み。
- 本 Issue 自身への OWNER REQUEST_CHANGES 反映(1回目、2026-07-18): 本 Issue に対する squne121(OWNER)の anchor comment(https://github.com/squne121/loop-protocol/issues/1598#issuecomment-5010922692)が REQUEST_CHANGES を判定し、以下の構造的問題を指摘した。
- Blocker 1: 旧 AC5/AC6(grammar parity test)が、Out of Scope とした grammar table 変更なしには達成不能だった → grammar table・parity test を丸ごと Issue 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 へ移管し、本 Issue から AC5/AC6・関連 Allowed Paths(
scripts/agent-guards/local_main_branch_guard.py/scripts/agent-guards/tests/test_local_main_branch_guard.py)を削除した。 - Blocker 2: Issue A が「未起票」という記述が stale で、実際には 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 として起票済みだった → Remaining Parent Gaps を更新し、実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 への参照を明記した。
- Blocker 3: help 出力の集合比較では grammar parity を証明できないという指摘 → 本 Issue のスコープから grammar parity 検証を除去した。
- High 1〜4: テスト追加先の shim 問題・値複製問題・Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 未解決 policy の上書き問題・GitHub Actions consumer 網羅性問題 → それぞれ新規テストファイル・contract test 追加・Delivery Rule 追加で対応した。
- Blocker 1: 旧 AC5/AC6(grammar parity test)が、Out of Scope とした grammar table 変更なしには達成不能だった → grammar table・parity test を丸ごと Issue 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 へ移管し、本 Issue から AC5/AC6・関連 Allowed Paths(
- 本 Issue の実装 PR 実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1618 への OWNER REQUEST_CHANGES 反映(2回目、2026-07-19): PR 実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する #1618(head 93dca12)に対する squne121(OWNER) のレビュー(https://github.com/squne121/loop-protocol/pull/1618#issuecomment-5013654409)が REQUEST_CHANGES を判定し、以下を指摘した。本改訂はその全指摘に対応する。
- Blocker 1:
0.11.23は 2026-06-19 公開で、その後の0.11.25(2026-06-26、tar 処理の parser-differential 対策20件超)・0.11.28(2026-07-07、ZIP 処理の parser-differential 対策15件)というセキュリティ強化リリースより古い → web-researcher による独立検証で事実確認済み。採用バージョンを0.11.29(2026-07-15公開、最新安定版)へ改訂し、Allowed Paths に.github/workflows/check-hook-integrity.ymlを追加してそのversion:も同期させた(AC5 新設)。 - Blocker 2: Issue Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 への coordination コメントが未実施 → 独立確認で#375のコメント数0件を確認済み。採用バージョン確定後(本改訂後)に投稿する(Delivery Rule のまま、PR merge 後に実施)。
- High:
.github/actions/**の再帰走査を宣言しながら実装が*/action.ymlの1階層のみだった →rglobベースの再帰走査へ修正し、nested composite action の regression test を AC6 に追加した。 - Medium:
required-versionの PEP 440 exact-pin 検証が欠落し>=0.11.29等の非exact specifierを許容してしまう → AC10 として exact pin 検証(fail-closed)と negative test を新設した。 - Medium:
test_all_setup_uv_consumers_use_approved_full_shaという命名が実装(フォーマット検証のみ)と乖離 → 承認済み SHA allowlist 検証を実装に追加し、テスト名と実際の保証範囲を一致させた(AC6)。
- Blocker 1:
- 既存 OPEN Issue Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 との関係: Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375(「Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する」)は minor-level pin 維持 か patch-level pin 採用か という policy 決定が主目的で、uv version pin はその decision B が採用された場合の派生実装の一部。本 Issue は 実装: skill-runtime target predicate を Issue #1595 の共有 launcher classifier ベースに置換する #1565 レビューで判明した具体的なセキュリティ境界上の問題(grammar table と配布 uv バージョンの非同期)を発端とし、Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 の decision B の一部(uv version exact pin)を先行実施する。Delivery Rule の Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 coordination コメント投稿により両 Issue の関係を明示する。
- バージョン選定根拠(改訂):
0.11.29は 2026-07-19 時点で確認できる uv の最新安定版(2026-07-15公開)であり、0.11.25(tar parser-differential 対策)・0.11.28(ZIP parser-differential 対策)の両セキュリティ強化を含む。実装時にさらに新しいセキュリティ修正版が判明した場合は Stop Conditions に従い人間判断を仰ぐ。 - Dependabot:
.github/dependabot.yml(または同等設定)は repo に存在しないことを確認済み。導入は本 Issue の Out of Scope とし、必要であれば別途判断する。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Activity
squne121 commentedon Jul 18, 2026
判定
REQUEST_CHANGES — 現状の Issue #1598 は、そのままでは実装着手不可です。
uvのバージョン固定とsetup-uvの full commit SHA pin 自体は妥当です。GitHub は第三者 A(GitHub)mutable な参照方法として推奨しており、指定されている08807647...はsetup-uv公式が v8.1.0 の例として掲載している SHA と一致します。([GitHub Docs]2)は、toolchain pin、launcher grammar の所有権、回帰テストの検証能力が同一 Issue 内で矛盾していることです。Issue 自体にはまだレビューコメントがありません。Blocker 1 — AC5・AC6と「option table変更禁止」が両立しない
現行の uv table は、0.11.23 の grammar を網羅していません。たとえば global table には、0.11.23 で有効な以下がありません。
--managed-python--no-managed-python--no-python-downloads--system-certs--allow-insecure-host現行 table は限定的ですが、uv 0.11.23 の公式ソースにはこれらが実際の CLI option として定義されています。
uv run側も、少なくとも次が現行 table にありません。--no-extra--no-default-groups--only-group--all-groups--module--only-dev--no-editable-package--no-env-file--active--script--gui-script--python-platformこれらも 0.11.23 の公式
RunArgsに定義されています。ところが #1598 は option table への追加を Out of Scope にしています。したがって実装は次の二択になります。
後者では Issue の Goal である「table と固定 uv version の一致」を達成していません。ACを通せても Outcomeを満たさない契約です。
Blocker 2 — #1595との所有権・依存関係が直接衝突している
#1595 は、まさに uv grammar table と対応 version を新規共有モジュール
launcher_command_classifier.pyへ移動し、不足 option を追加する Issue です。#1598 は同じ version 定数を移動元のlocal_main_branch_guard.pyに追加しようとしています。さらに #1598 本文には、Issue A を「未起票」とする記述が残っていますが、Issue A は既に #1595 として起票済みです。#1595 に対する既存の敵対的レビューでも、#1598との Allowed Paths・定数配置・テスト配置の衝突が Blocker として明示されています。
現状のまま並行実装すると、次のいずれかになります。
推奨する責務分割は次です。
そのうえで #1595 depends on #1598 とすべきです。
Blocker 3 — help出力の集合比較では grammar parity を証明できない
AC5・AC6 は実質的に、「helpに表示された long option が table の和集合に含まれるか」だけを検査します。これは以下を検査できません。
--option=value-vv、-qq等の反復・cluster現行 parser にとって最重要なのは、option の存在ではなくarityです。実際、PR #1558 では
--python 3.13等の値を script operand と誤認する欠陥が OWNER レビュー後に発見され、value/bool table が導入されました。また uv の公式ソースには、
hide = trueで help に通常表示されない有効 option があります。たとえば--no-activeや--show-resolutionは parser が受理しますが、helpだけを正本にすると検査対象外になります。必要なのは単純な文字列集合比較ではなく、少なくとも以下です。
help parity test は補助検査には使えますが、security-sensitive parser の正本にはできません。
High 1 — テスト追加先が正本ではなく compat shim
指定されている
scripts/agent-guards/tests/test_local_main_branch_guard.pyは独立したテストファイルではありません。自身の docstring で canonical tests は
.claude/hooks/tests/にあると明記し、runpy.run_path()でそのテストを再実行するだけの compatibility shim です。PR #1558 の本文でも、このファイルは「変更なし、正本テストを再実行するのみ」と明記されています。
ここへ新規 parity test を置くと、
runpyimport時の namespace に依存するという問題が発生します。
grammar test は #1595 の以下へ置くべきです。
toolchain pin の検査は別途、たとえば以下へ分離すべきです。
High 2 — 「repo全体で単一の値」になっていない
#1598 は単一値への統一を掲げていますが、実際には
0.11.23を少なくとも次の4箇所へ複製します。pyproject.tomlwith.versioncheck-hook-integrity.ymlしかも composite action のコメントは現在も「uv version pin は #375 で管理」と書かれています。#1598 の AC には、このコメントの更新がありません。
既存 workflow にも独立した
version: "0.11.23"が存在します。さらに
setup-uvv8.1.0 は、version未指定時にリポジトリルートのuv.tomlまたはpyproject.tomlからrequired-versionを探索します。見つからない場合にのみ latest を使います。したがって Issue の「version未指定なら最新」という説明は不正確です。([GitHub]1)設計は次のどちらかに固定すべきです。
推奨: pyprojectを唯一の正本にする
setup-uvはversionを省略してrequired-versionを読ませます。代替: 明示値を重複させる
bootstrap の明示性を優先して
with.versionを残すなら、全 consumer、定数、pyproject.tomlの値が一致することを1つの repository contract test で検証します。現状はどちらでもなく、単なる複製です。
High 3 — #375の未解決policyを実装側から上書きしている
#375 は、minor-level pinを維持するか、patch-level Pythonとuv pinを採用するかを先に policy として決定する Issue です。現在も open です。
その起点である PR #373 も、uv version は意図的に未固定で、follow-up policy Issueへ委ねると明記しています。
#1598 が security boundary の都合で uv exact pin を先行決定すること自体は合理的です。ただし、その場合は次が必要です。
現在の Notes にある「後で人間判断を推奨」だけでは、repository policy が未確定のまま実装だけ確定します。
High 4 — verificationがGitHub Actions consumer全体を検証していない
現在 repository 内には、少なくとも以下の直接
setup-uvconsumer があります。.github/actions/setup-python-uv/action.yml.github/workflows/check-hook-integrity.ymlまた通常CIは composite action を参照します。
しかし #1598 の verification は grep と単一 pytest file だけです。これでは将来、新規 workflow が tag参照や別versionで
setup-uvを追加しても検出できません。repo-wide contract test が必要です。
加えて runtime CI では最低限、次を記録・assertすべきです。
required-versionは不一致時に uv 自身をエラー終了させるため有効ですが、CIの証跡として実際に導入された version を明示する価値があります。([Astral Docs]3)推奨するIssue再定義#1598に残すもの
[tool.uv].required-version = "==0.11.23"uv --versionassertion#1598から外して#1595へ移すもの
_UV_OPTION_TABLE_UV_VERSION_UV_GLOBAL_*/_UV_RUN_*との parity最低限追加すべきAC
最終結論
full SHA pin と
required-versionの導入方針は正しいです。しかし現在の契約は、という構造になっています。
#1598 は toolchain pinning Issue に縮小し、grammar整合は #1595 に集約するまで NO-GOです。
squne121 commentedon Jul 18, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jul 18, 2026
Contract Review Result
fix: PR #1622 の scope contamination を除去し Allowed Paths 準拠に戻す (#1619)
fix: classify_overlap に successor dependency 分岐を追加し parent_collision …
squne121 commentedon Jul 19, 2026
Contract Review Result
fix: uv バージョンを 0.11.29 に更新し contract test を再帰・厳密化 (#1598)
実装: uv バージョンを固定し GitHub Actions の setup-uv を full commit SHA へ pin する (…