Skip to content

実装: protected TEST_VERDICT producerを複数のallowlisted Issue VCへ拡張する #1848

Closed as not planned

Description

@squne121

Parent Issue

#1645

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1645"
goal_ref: "#1645 Goal: 保護された GitHub Actions producer から current-head TEST_VERDICT trust chain を再開可能にする"
change_kind: workflow

Parent Goal Ref

Current Validated Scope

Remaining Parent Gaps

Outcome

更新された workflow、producer、guard contract test(必要時のみ test plan)を含む 1 PR が default branch の versioned COMMAND_MANIFEST から #1766 用 command_id を選択し、AC1-AC3 に束縛された execution record / producer receipt を発行でき、全 fail-closed 契約テストが PASS した状態を成果物とする。

In Scope

  • protected workflow の execute/assemble-contract/build-record/build-receipt が同一の allowlisted command_id と manifest SHA を使用するようにする。
  • uv.pytest.issue-1766-native-dependencies の manifest entry を次の値で追加し、covers_acs を AC1, AC2, AC3 に固定する。
    • argv: ["uv", "run", "--locked", "pytest", "{source_root}/.claude/skills/implement-issue/tests/test_check_implementation_overlap_native_dependencies.py", "-q"]
    • cwd: repo_root
    • timeout: 300
  • workflow input は quoted env 経由で渡し、Python が command allowlist を検証する。Issue markdown は argv 選択元にしない。
  • workflow source SHA と対象 PR head SHA を別 subject として保持し、unknown command_id、AC set mismatch、manifest mismatch、head/body drift を fail closed にする。
  • target PR code job に secrets/OIDC/write token を渡さず、raw bash -c/eval を許可しない。
  • 現行の producer unit/contract tests に 実装: 回帰テスト: CLOSED native predecessor の候補外 hydration/readback 経路を固定する #1766 manifest、workflow wiring、unknown command/AC/manifest drift の deterministic tests を追加する。

Out of Scope

Acceptance Criteria

  • AC1: default branch の versioned COMMAND_MANIFEST に uv.pytest.issue-1766-native-dependencies が一意に存在し、argv/cwd/timeout/covers_acs が指定値と一致し、manifest SHA が execution record と producer receipt に同一値で記録される。
  • AC2: protected workflow の execute、assemble-contract、build-record、build-receipt が同じ allowlisted command_id を quoted env から受け取り、Issue markdown を argv source にせず、unknown command_id・AC set mismatch・manifest mismatch を fail closed する。target PR code job は secrets/OIDC/write token を持たない。
  • AC3: workflow source SHA が対象 PR head SHA と独立して subject に束縛され、head/body drift、raw bash -c/eval、任意 shell escape を拒否し、現行および追加された guard contract tests が deterministic に PASS する。

Verification Commands

# AC1
$ uv run --locked pytest scripts/agent-guards/tests/test_test_verdict_execution_record_workflow.py -q

# AC2
$ uv run --locked pytest scripts/agent-guards/tests/test_test_verdict_execution_record_workflow.py -q

# AC3
$ uv run --locked pytest scripts/agent-guards/tests/test_test_verdict_execution_record_workflow.py -q

Allowed Paths

  • .github/workflows/test-verdict-execution-record.yml
  • scripts/agent-ops/test_verdict_execution_record_producer.py
  • scripts/agent-guards/tests/test_test_verdict_execution_record_workflow.py
  • .github/ci/python-test-plan.json(必要な場合のみ)

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • command allowlist、manifest SHA、head/body binding が fail-open になる場合

Required Skills

なし

Required Design References

  • docs/dev/workflow.md
  • docs/dev/agent-skill-boundaries.md
  • schemas/test-verdict-execution-record.schema.json
  • schemas/test-verdict-producer-receipt.schema.json

Runtime Verification Applicability

decision: deferred
reason: "protected workflowの実dispatchとreceipt live readbackは、producer extensionがdefault branchへマージされた後にIssue #1766 / PR #1817のcurrent headへ束縛して実行する。"
deferred_to: "Issue #1766 Phase 4"
deferred_destination: "Issue #1766 Phase 4"
deferred_verification_condition: "default branch dispatch後にexecution-record/producer-receipt artifactをlive readbackし、current-head/body-SHA/manifest bindingを検証する"
required_after_merge:
  - workflow_dispatch on default branch with an allowlisted command_id
  - execution-record and producer-receipt artifact live readback
  - current-head/body-SHA/manifest binding verification

Delivery Rule

Scope Delta

N/A

Notes for Reviewer

Activity

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

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-29T15:01:18Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1848
      body_sha256: "sha256:17c0d43cbab5a5d18e5d3542513cabb0b476de13569f77d7a3d3b9fafbe08d4f"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:17c0d43cbab5a5d18e5d3542513cabb0b476de13569f77d7a3d3b9fafbe08d4f","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest scripts/agent-guards/tests/test_test_verdict_execution_record_workflow.py -q","command_hash":"sha256:d966b57edaa6e8dcd133876ba3841b357cb835091bb602be43306cc1ff24f351","execution_key_hash":"sha256:0a69a7632c580744f9f40d3ac02a932171ea6be72475d592c87d42727a2afd05","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["....................................................                     [100%]","52 passed in 0.53s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":715,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC2","line":5,"raw_command":"uv run --locked pytest scripts/agent-guards/tests/test_test_verdict_execution_record_workflow.py -q","command_hash":"sha256:d966b57edaa6e8dcd133876ba3841b357cb835091bb602be43306cc1ff24f351","execution_key_hash":"sha256:d3ea126ef3c145cb15718dbb96ef73d51c25bda07fba9a9dd647c05f9ea0b512","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["....................................................                     [100%]","52 passed in 0.53s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":697,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC3","line":8,"raw_command":"uv run --locked pytest scripts/agent-guards/tests/test_test_verdict_execution_record_workflow.py -q","command_hash":"sha256:d966b57edaa6e8dcd133876ba3841b357cb835091bb602be43306cc1ff24f351","execution_key_hash":"sha256:6979bee4fbd6466c0d9aa8e8a9358b5707af67d6eafa10ef2206d35978a777ed","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["....................................................                     [100%]","52 passed in 0.54s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":717,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null}]
        declared_path_overlap: {"schema":"declared_path_overlap/v1","advisory":true,"blocking":false,"decision":"advisory_only","disjoint":true,"overlapping_prs":[],"inventory":{"schema":"OPEN_PR_INVENTORY_V1","repo":"squne121/loop-protocol","state":"open","base_ref":"main","base_sha":"7fdcfb8402d81ed35dcd6686423918efa984f473","draft_policy":"include_drafts","prs":[{"number":1528,"title":"feat(cleanup): 同一実行内の branch-only fallback を追加","base_ref_name":"main","head_ref_name":"worktree-issue-1403-post-merge-cleanup-dedicated-branch-forc","head_ref_oid":"b29007580ae225eb9676c7f32c878ee2bb9ccaa9","is_draft":false,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1528","changed_files_count_graphql":4},{"number":1817,"title":"test: CLOSED predecessor の候補外 readback を固定 (#1766)","base_ref_name":"main","head_ref_name":"worktree-issue-1766-closed-native-predecessor-regression-v2","head_ref_oid":"1f22ea7ad8556982e0e8bd8d533e63ff3ed0aada","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1817","changed_files_count_graphql":1},{"number":1819,"title":"実装:#1797_C2a-successor-structural-collisionのhuman-review-route修正","base_ref_name":"main","head_ref_name":"worktree-issue-1797-c2a-successor-collision","head_ref_oid":"02856e9c7f5ee0c9d07dcafbc67106bc1c063bc6","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1819","changed_files_count_graphql":5},{"number":1832,"title":"fix(refinement): 全終端理由で follow-up materialization 結果を出力 (#1321)","base_ref_name":"main","head_ref_name":"worktree-issue-1321-follow-up-materialization-all-reasons","head_ref_oid":"31ac20913386ef2b0a91057fbf1de491a9286af2","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1832","changed_files_count_graphql":2},{"number":1845,"title":"fix(contract-readiness): parent validation profile を分離 (#1844)","base_ref_name":"main","head_ref_name":"worktree-issue-1844-contract-readiness-check-py-run-validate","head_ref_oid":"13308fe26258bc7511f0b26fedbd4c12a238aec7","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1845","changed_files_count_graphql":2},{"number":1846,"title":"feat(refinement): missing pytest node taxonomy foundation","base_ref_name":"main","head_ref_name":"worktree-issue-1549-reviewer-checker-taxonomy","head_ref_oid":"970d18ddbd5dcd45e5198096ba371824e97bbf6e","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1846","changed_files_count_graphql":3},{"number":1847,"title":"docs: profile/provider contract capability ADR を追加 (#1821)","base_ref_name":"main","head_ref_name":"worktree-issue-1821-profile-provider-contract-capability-design","head_ref_oid":"7f21e810bc457ec24e89c80363013313e85c2ca1","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1847","changed_files_count_graphql":1}],"fetched_count":7,"totalCount":7,"has_next_page":false,"complete":true,"saturated":false,"limit":200,"page_count":1,"inventory_digest":"sha256:da066e29774208613e4eba067306d1e53c08ad873aa5f1958fc208e0105aec6f","errors":[]},"inventory_digest_extended":"sha256:f7b14f710f60d859fc3e893a75fd03aac42c4b1dbbe64fb482614082c204d0d3","errors":[],"note":"changed-file 名の単純な重なりのみを証明する advisory check。3-way merge・hunk 競合・rename/delete 競合は評価しない(実 Git merge 競合の判定は Issue #1792 の PAIRWISE_MERGE_OBSERVATION_V1 producer の責務)。単独では blocking にしない。disjoint は tri-state(true/false/null)— 観測が不完全な場合は null。"}
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: {"issue_number":1848,"contract_source_kind":"issue_comment","contract_source_id":"5119595419","contract_body_sha256":"sha256:17c0d43cbab5a5d18e5d3542513cabb0b476de13569f77d7a3d3b9fafbe08d4f","allowed_paths_normalized_sha256":"a9f469d850437bf74cc326554cedc0454416febfd63bf927581ec96d16c1be06","base_ref":"main","base_sha_at_snapshot":"7fdcfb8402d81ed35dcd6686423918efa984f473"}
  3. squne121 commented on Jul 30, 2026

    @squne121
    OwnerAuthor

    クローズ理由(owner決定)

    親Issue #1645 が issuecomment-5136560892 の理由でクローズされたため、その child である本Issue(protected TEST_VERDICT producer の allowlisted Issue VC への拡張)も同時にクローズする。

    #1860(AIエージェント運用を minimal harness へ縮退し、過剰な control-plane を廃止する)の方針、および #1856 による TEST_VERDICT の advisory 降格と整合しないため、本Issueの拡張方向は追求しない。

    決定内容は issuecomment-5136559104 に記録済み。

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