Skip to content

実装: 未配線の external trust root(scripts/trust-root/)を削除しリポジトリを実態に合わせる #1469

Closed

Description

@squne121

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: code

Parent Issue

none(単独改善)

Parent Goal Ref

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

Out of Scope

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 # AC4

Allowed 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

Delivery Rule

  • 1 Issue = 1 PR
  • Dedicated worktreeを作成して実装する
  • Draft PR既定

Scope Delta(任意)

N/A

Activity

  1. added
    enhancement
    phase/implementation
    triage-required
    agent/implementer
    on Jul 11, 2026
  2. squne121 commented on Jul 11, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-11T14:37:04Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1469
      body_sha256: "sha256:c22a48c6b4814bff5a85469bb4b6e9be459226c85940e1bcb9e2fc27178210fd"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"! rg -q \".\" scripts/trust-root/trusted_hook_launcher.py","command_hash":"sha256:6e8b090e72218c597697d6ea9f330da3c3cdaddd7cfe70a98d969735671a84af","runner":"exec","exit_code":null,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"fix_hint":null,"annotations":{"baseline_expect":"fail","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":1,"raw":"# baseline-expect: fail"},"strict":null,"repair":null},{"ac":"AC2","line":4,"raw_command":"! rg -q \"trust-root\" .github/ci/python-test-plan.json","command_hash":"sha256:57c51228b478413ab8ade2d6c1fc9deca8ec628335829ddbe143d6a622f81f81","runner":"exec","exit_code":null,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"fix_hint":null,"annotations":{"baseline_expect":"fail","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":3,"raw":"# baseline-expect: fail"},"strict":null,"repair":null},{"ac":"AC3","line":6,"raw_command":"! rg -q \"scripts/trust-root/\" docs/dev/hook-boundaries.md","command_hash":"sha256:cdf7893a592af72f0b283657f3a0ac9753746b4da43ae084e4bbaa58a2a4647c","runner":"exec","exit_code":null,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"fix_hint":null,"annotations":{"baseline_expect":"fail","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":5,"raw":"# baseline-expect: fail"},"strict":null,"repair":null},{"ac":"AC4","line":8,"raw_command":"uv run --locked pytest scripts/ci/tests/test_python_test_plan.py","command_hash":"sha256:7e12a28ca970844fec2417463b7afc7e58592091e98b7a2951778ef0ceadd533","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 53 items","scripts/ci/tests/test_python_test_plan.py .............................. [ 56%]",".......................                                                  [100%]","============================== 53 passed in 0.23s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":415,"fix_hint":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":7,"raw":"# baseline-expect: pass"},"strict":null,"repair":null}]
      source: ensure_contract_snapshot_auto
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/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions