Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "Issue #1468(trust-root privileged broker等の追加ハードニング)とIssue #1450(Phase B: publish lane authorization codeの信頼境界外部化)が、個人開発の脅威モデルに対して過剰と判断されnot plannedでクローズされた。Issue #1454(Phase A, PR #1457 merged)で導入されたexternal trust root一式(scripts/trust-root/)は、これらのクローズにより配線される見込みが無くなり、どこからも呼び出されない不使用コードになった。これを削除し、リポジトリを実態に合わせる"
change_kind: codeParent Issue
none(単独改善)
Parent Goal Ref
- Goal: リポジトリに、どこからも呼び出されない不使用コード(scripts/trust-root/ 一式、および関連するCI登録・docs記述)を残さない
- Desired Destination: Issue 実装: publish lane authorization codeの信頼起点となるexternal trust root(trusted hook launcher・manifest・bootstrap/rotation手順)を確立する #1454(Phase A, merged)が導入した external trust root は、Issue 実装: publish laneのauthorization code(policy/adapter)の信頼境界をhash pinningでcandidate worktree外に確立する #1450(Phase B, not planned)がそれを
.codex/hooks.jsonへ実際に配線する前提だったが、実装: publish laneのauthorization code(policy/adapter)の信頼境界をhash pinningでcandidate worktree外に確立する #1450 も 実装: publish lane trust root(#1454 Phase A)にnonce runtime state分離・trusted publisher wrapper・atomic rotation・worktree cwd解決・deployment attestationを追加する #1468 もnot plannedでクローズされたため、trust root コードは恒久的に未配線のまま残ることが確定した。本Issueはこの不使用コードを削除し、現行のpublish lane保護(Issue 実装: PreToolUse remote_write_requires_approval を publish lane 証跡で通過可能にする #1408, PR feat: PreToolUse remote_write_requires_approval を publish lane 証跡で通過可能にする #1442 merged: Issue branch限定push許可・force/tag/delete/mirror拒否、main保護はbranch protection + feat: implementation-worker SubAgent に push destination guard hook を追加する #360)のみが有効な状態にリポジトリを一致させる
Current Validated Scope
scripts/trust-root/trusted_hook_launcher.py/manifest_schema.py/install_trust_root.sh/tests/test_trusted_hook_launcher.py/tests/test_manifest_schema.pyが存在するが、.codex/hooks.jsonからも他のいかなるコードからも参照されていない.github/ci/python-test-plan.jsonのtargets配列(35-36行目)にscripts/trust-root/tests/test_manifest_schema.py/scripts/trust-root/tests/test_trusted_hook_launcher.pyが個別ファイル登録されており、notes.trust_root_tests_registration(78行目)にその経緯が記録されているdocs/dev/hook-boundaries.mdの## 12. publish lane authorization trust root(公開レーン認可の外部信頼起点)— bootstrap・rotation・managed hook registration 手順(Issue #1454)節(709行目〜ファイル末尾761行目)が、privileged operatorによるbootstrap手順・managed hook登録手順を正本として記述している
Remaining Parent Gaps
なし(単独改善)
Outcome
scripts/trust-root/ ディレクトリとその配下の全ファイルが削除され、.github/ci/python-test-plan.json から該当テストの登録エントリが除去され、docs/dev/hook-boundaries.md の該当節が削除または短い historical note に置き換えられた状態。pnpm test 相当のCI検証・uv run --locked pytest scripts/ci/tests/ が引き続きPASSしている状態。
In Scope
scripts/trust-root/ディレクトリ全体(trusted_hook_launcher.py,manifest_schema.py,install_trust_root.sh,tests/test_trusted_hook_launcher.py,tests/test_manifest_schema.py)の削除.github/ci/python-test-plan.jsonのtargets配列からscripts/trust-root/tests/test_manifest_schema.pyとscripts/trust-root/tests/test_trusted_hook_launcher.pyのエントリを削除し、notes.trust_root_tests_registrationエントリも削除するdocs/dev/hook-boundaries.mdの## 12. publish lane authorization trust root...節(709行目〜761行目)を削除するか、Issue 実装: publish lane authorization codeの信頼起点となるexternal trust root(trusted hook launcher・manifest・bootstrap/rotation手順)を確立する #1454/実装: publish lane trust root(#1454 Phase A)にnonce runtime state分離・trusted publisher wrapper・atomic rotation・worktree cwd解決・deployment attestationを追加する #1468/実装: publish laneのauthorization code(policy/adapter)の信頼境界をhash pinningでcandidate worktree外に確立する #1450 の経緯と「not plannedによりコード削除済み」である旨を記録する数行の historical note に置き換える
Out of Scope
- Issue 実装: PreToolUse remote_write_requires_approval を publish lane 証跡で通過可能にする #1408(PR feat: PreToolUse remote_write_requires_approval を publish lane 証跡で通過可能にする #1442, merged)が実装した現行のpublish lane保護ロジック(
scripts/session-recording/codex-hook-adapter.mjs,scripts/agent-guards/git_mutation_command_policy.py)の変更 .codex/hooks.jsonの変更- Issue feat: implementation-worker SubAgent に push destination guard hook を追加する #360(main/master destination guard)の変更
- 新たな信頼境界機構の設計・実装
Acceptance Criteria
- AC1:
scripts/trust-root/ディレクトリが存在しない - AC2:
.github/ci/python-test-plan.jsonにtrust-rootという文字列が出現しない - AC3:
docs/dev/hook-boundaries.mdにscripts/trust-root/という文字列が出現しない - AC4:
uv run --locked pytest scripts/ci/tests/test_python_test_plan.pyが全件PASSする(.github/ci/python-test-plan.jsonの妥当なJSONパース・plan loaderの整合性を含めて検証する)
Verification Commands
# baseline-expect: fail
$ ! rg -q "." scripts/trust-root/trusted_hook_launcher.py # AC1
# baseline-expect: fail
$ ! rg -q "trust-root" .github/ci/python-test-plan.json # AC2
# baseline-expect: fail
$ ! rg -q "scripts/trust-root/" docs/dev/hook-boundaries.md # AC3
# baseline-expect: pass
$ uv run --locked pytest scripts/ci/tests/test_python_test_plan.py # AC4Allowed Paths
- scripts/trust-root/
- .github/ci/python-test-plan.json
- docs/dev/hook-boundaries.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
.github/ci/python-test-plan.jsonのtargets/xdist/secondary_coverage等、trust-root削除に無関係な既存キーの変更が必要と判明した場合
Required Skills
- なし
Required Design References
- docs/dev/hook-boundaries.md#12(削除対象節そのもの)
- Issue 実装: publish lane authorization codeの信頼起点となるexternal trust root(trusted hook launcher・manifest・bootstrap/rotation手順)を確立する #1454(Phase A, PR feat: publish lane authorization の external trust root を確立する #1457 MERGED)
- Issue 実装: publish lane trust root(#1454 Phase A)にnonce runtime state分離・trusted publisher wrapper・atomic rotation・worktree cwd解決・deployment attestationを追加する #1468(not planned)
- Issue 実装: publish laneのauthorization code(policy/adapter)の信頼境界をhash pinningでcandidate worktree外に確立する #1450(not planned)
- Issue 実装: PreToolUse remote_write_requires_approval を publish lane 証跡で通過可能にする #1408(PR feat: PreToolUse remote_write_requires_approval を publish lane 証跡で通過可能にする #1442 MERGED、現行のpublish lane保護の正本)
Delivery Rule
- 1 Issue = 1 PR
- Dedicated worktreeを作成して実装する
- Draft PR既定
Scope Delta(任意)
N/A
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jul 11, 2026
Contract Review Result
chore: 未配線の external trust root(scripts/trust-root/)を削除する (#1469) (#1471