Repository navigation
実装: GitHub native dependency 解除の controlled executor を追加する - #1667
Conversation
closed になった blocker への stale GitHub native `blockedBy` relationship を、 全ページ readback・node-ID binding・一回限りの GraphQL mutation で安全に解除 できるよう、`CONTROLLED_SKILL_MUTATION_COMMAND_POLICY` に `issue_dependency.remove` command id と `ISSUE_DEPENDENCY_REMOVE_INPUT_V1` closed schema を追加する。 - policy: 新 command id 登録・closed-key input validator・既存 command id は不変 - executor: 固定 host/query/mutation の GraphQL 呼び出し、trusted actor 確認、 全ページ pre/post readback、no-retry の closed result status、idempotency marker - tests: 失敗経路専用テスト(unknown key / bool / duplicate / oversize / TOCTOU 等) と既存 command id の read-only compatibility gate - docs: agent-skill-boundaries.md / github-ops.md に設計・運用境界を追記 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URLPreview removed (PR #1667 closed). |
|
test |
TEST_VERDICT:
schema: TEST_VERDICT_MACHINE/v2
producer_kind: test-runner
repository: squne121/loop-protocol
issue_number: 1632
pr_number: 1667
head_sha: a409ae170cbe877e3b1a2fa24f210d1591717124
reviewed_head_sha: a409ae170cbe877e3b1a2fa24f210d1591717124
diff_head_sha: a409ae170cbe877e3b1a2fa24f210d1591717124
contract_body_sha256: "sha256:live_issue_1632_body"
run_id: test-runner-subagent-inline
run_url: https://github.com/squne121/loop-protocol/issues/1632
workflow_run_id: null
workflow_run_attempt: null
check_run_id: null
result: PASS
mergeable: MERGEABLE
merge_state_status: UNSTABLE
branch_behind_main: false
baseline_only: false
verification_commands_pass: 8
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: []Verification Commands 実行結果(AC1〜AC8)
(前のコメントの "test" は投稿ミスです。無視してください。) |
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: "a409ae170cbe877e3b1a2fa24f210d1591717124"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "UNSTABLE"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
producer_role: review_subagent
worker_report_used_as_canonical: false
violations: []レビューサマリ
- PR 本文の必須セクション(
## 受け入れ条件の達成状況/## 検証コマンド結果/## Allowed Paths 遵守)が追加され、placeholder なしで AC1〜AC8 の根拠が記載されていることを確認した。 - AC1〜AC8 を独立再検証(
rgによるコード/テスト存在確認、pytest再実行で 188 passed、ruff check再実行で All checks passed、docs へのissue_dependency.remove記載を確認)。すべて claim と一致。 - Allowed Paths 遵守:
git diff --name-status -M -z origin/main...HEADを独立実行し、変更 6 ファイルが宣言済み Allowed Paths 7 ファイルの厳密な部分集合であることを確認。逸脱・rename なし。 - Schema Consumer Inventory: 既存 command id(
termination_report.publish等)は無変更、新規issue_dependency.removeのみ追加であることを diff で確認。 - CI: branch protection の required_status_checks(
typecheck/lint/test/build/e2e/python-test)はすべて SUCCESS。唯一 FAILURE のPR Body Japanese Checkはdocs/dev/github-ops.mdの本 PR 以前から存在する既存 prose block(10 件)に起因し、本 PR が追加した17行(0削除)はすべて日本語準拠であることを diff で確認済み。required check ではないため merge-blocking としない。
blocker なし。APPROVE・merge_ready: true。
判定: REQUEST_CHANGES現HEAD 指摘事項P0:
|
PR #1667 の OWNER レビュー (REQUEST_CHANGES) を反映。 - P0: RemoveBlockedByInput の正しい field 名 `blockingIssueId` を使用する (誤った `blockedByIssueId` を修正)。mutation に `clientMutationId` を追加 - P1: mutation 応答 (RemoveBlockedByPayload) の issue/blockingIssue node ID・ number・clientMutationId を検証する closed validator を追加 - P1: mutation 前にも write-root 外の tracked changes を確認する - P1: mutation 直前に attempt marker を書き込み、全終了経路で更新する - P1: GH_TOKEN/GITHUB_TOKEN を ENV_SANITIZE_KEYS に追加し、marker に actor_permission を記録する - P1: mutation 後の tracked-changes 失敗の status を `failed` から `postcondition_rejected` (closed status set 内) に修正 - P2: idempotency marker を closed schema として完全一致で検証する Co-Authored-By: Claude Sonnet 5 <[email protected]>
TEST_VERDICT:
schema: TEST_VERDICT_MACHINE/v2
producer_kind: test-runner
repository: squne121/loop-protocol
issue_number: 1632
pr_number: 1667
head_sha: ee756baf5d83c271a60368231c567fa183d05a30
reviewed_head_sha: ee756baf5d83c271a60368231c567fa183d05a30
diff_head_sha: ee756baf5d83c271a60368231c567fa183d05a30
contract_body_sha256: "sha256:live_issue_1632_body"
run_id: control-plane-independent-verification
run_url: https://github.com/squne121/loop-protocol/issues/1632
workflow_run_id: null
workflow_run_attempt: null
check_run_id: null
result: PASS
mergeable: MERGEABLE
merge_state_status: UNSTABLE
branch_behind_main: false
baseline_only: false
verification_commands_pass: 8
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: []修正後(iteration 2, head
|
| AC | 判定 |
|---|---|
| AC1 | PASS |
| AC2 | PASS |
| AC3 | PASS |
| AC4 | PASS |
| AC5 | PASS |
| AC6 | PASS |
| AC7 | PASS(ruff check --ignore E402 で All checks passed。E402 6件は baseline/origin-main でも既発生する既知パターンで新規導入ではない) |
| AC8 | PASS |
人間レビュアー指摘(REQUEST_CHANGES)の修正内容を独立検証
rg -n "blockingIssueId" scripts/agent-guards/controlled_skill_mutation_exec.py→ 4件 match(GraphQL mutation 文字列・variables 構築部・payload query に正しいフィールド名を使用)rg -n "blockedByIssueId" scripts/agent-guards/controlled_skill_mutation_exec.py→ コメント(修正理由の説明文)1件のみ。実コードに誤フィールド名は残存しない。uv run --directory <worktree> python3 -m pytest scripts/agent-guards/tests/ -q→ 1115 passed, 1 skipped, 1 deselected(フルスイート)
CI
required_status_checks(typecheck / lint / test / build / e2e / python-test / actionlint)はすべて SUCCESS。唯一の FAILURE は branch protection 対象外の "PR Body Japanese Check"(docs/dev/github-ops.md の本 PR 以前から存在する既存日本語比率不足に起因、本 PR の差分とは無関係、既に前 iteration で確認済み)。
docs/dev/github-ops.md の見出し直下に日本語の短い要約行を追加し、 既存から fail していた 10 prose block(見出しのみで日本語比率が threshold 未満)の日本語比率を引き上げる。意味論・技術内容・見出し 文言・アンカーは変更しない。
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: "e93f67b13cf68fa177475099f8cc29dbe25bea8f"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
producer_role: review_subagent
worker_report_used_as_canonical: false
violations: []レビューサマリ(4回目・最終)
- 前回(head
ee756baf)唯一のブロッカーだった "PR Body Japanese Check" の FAILURE を、docs/dev/github-ops.mdの10個の failed prose block それぞれに日本語要約行を追加することで解消(新 heade93f67b1)。 git diff ee756baf..e93f67b1を直接確認し、追記10行のみで既存の英語文・URL・コマンド・見出しテキスト・アンカーは一切変更されていないことを確認。意味論変更なし。- 累積 Allowed Paths 遵守: 変更ファイルは Issue #1632 の Allowed Paths 7ファイルの厳密な部分集合。
- CI: required checks(typecheck/lint/test/build/e2e/python-test/actionlint)に加え "PR Body Japanese Check" も含め全 SUCCESS。
mergeStateStatus: CLEAN。 - 前回までに確認済みの P0(GraphQL
blockingIssueIdフィールド修正)/ P1×3(response 検証・audit trail・token sanitize)/ P2(idempotency marker 検証)の修正内容は今回無変更で、引き続き有効。
blocker なし。APPROVE・merge_ready: true。
Summary
closed になった blocker への stale GitHub native
blockedByrelationship を、全ページ readback・node-ID binding・一回限りの GraphQL mutation で安全に解除できるよう、CONTROLLED_SKILL_MUTATION_COMMAND_POLICYにissue_dependency.removecommand id とISSUE_DEPENDENCY_REMOVE_INPUT_V1closed schema を追加した。scripts/agent-guards/controlled_skill_mutation_policy.py: 新 command id・closed-key input validator(unknown key / bool-as-int / duplicate / unsorted / size cap / hash / trusted repo を mutation 前に拒否)を追加。既存 command id の schema/dispatch/argv/postcondition は不変。scripts/agent-guards/controlled_skill_mutation_exec.py: 固定 host(github.com)・固定 GraphQL query/mutation・gh api graphql --input -argv-list、trusted actor(login + repo permission)確認、全ページ pre/post readback、no-retry の closed result status(removed | precondition_rejected | transport_or_schema_error | postcondition_rejected | already_completed)、idempotency marker を実装。docs/dev/agent-skill-boundaries.md/docs/dev/github-ops.mdに GraphQL 選定理由・固定契約・運用境界を追記。受け入れ条件の達成状況
CONTROLLED_SKILL_MUTATION_COMMAND_POLICYにissue_dependency.removecommand id とISSUE_DEPENDENCY_REMOVE_INPUT_V1closed schema が追加されている —rg -n "ISSUE_DEPENDENCY_REMOVE_INPUT_V1" scripts/agent-guards/controlled_skill_mutation_policy.pyが line 118, 120, 143 で match。test_issue_dependency_remove_reads_all_pages_and_rejects_cursor_or_schema_drift(scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py:741)で検証済み。test_issue_dependency_remove_rejects_untrusted_or_unreadable_credential_actor(同ファイル:800)で検証済み。test_issue_dependency_remove_records_closed_status_and_never_retries_mutation(同ファイル:828)で検証済み。test_issue_dependency_remove_requires_all_page_post_snapshot_and_idempotency_marker(同ファイル:897)で検証済み。test_issue_dependency_remove_failure_paths_fail_closed_without_network_mutation(同ファイル:955)で検証済み。--ignore E402)を通過する — 下記「検証コマンド結果」参照。agent-skill-boundaries.md/github-ops.md)に運用境界・契約を追記済み —rg -n "issue_dependency.remove" docs/dev/agent-skill-boundaries.md docs/dev/github-ops.mdが両ファイル計11件で match。検証コマンド結果
uv run --directory <worktree> python3 -m pytest scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py scripts/agent-guards/tests/test_controlled_issue_metadata_exec.py -q→ 188 passeduv run --directory <worktree> ruff check --select E,F --ignore E402 scripts/agent-guards/controlled_skill_mutation_policy.py scripts/agent-guards/controlled_skill_mutation_exec.py scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py scripts/agent-guards/tests/test_controlled_issue_metadata_exec.py→ All checks passed(CI の--ignore E402gate と同一設定。E402 6件は baseline/origin-main でも同一箇所で既発生する既知パターンで、preflight-scope: pr_review_only として扱う)uv run python3 .claude/skills/create-issue/scripts/validate_japanese_content.py --file docs/dev/agent-skill-boundaries.md/--file docs/dev/github-ops.md→ PASS(新規追加セクションに既存 failed blocks を増やしていないことを確認済み)Allowed Paths 遵守
Allowed Paths(7ファイル):
scripts/agent-guards/controlled_skill_mutation_policy.pyscripts/agent-guards/controlled_skill_mutation_exec.pyscripts/agent-guards/tests/test_controlled_skill_mutation_policy.pyscripts/agent-guards/tests/test_controlled_skill_mutation_exec.pyscripts/agent-guards/tests/test_controlled_issue_metadata_exec.pydocs/dev/agent-skill-boundaries.mddocs/dev/github-ops.md実際の変更ファイル(
git diff --name-only origin/main...HEAD、6ファイル):docs/dev/agent-skill-boundaries.mddocs/dev/github-ops.mdscripts/agent-guards/controlled_skill_mutation_exec.pyscripts/agent-guards/controlled_skill_mutation_policy.pyscripts/agent-guards/tests/test_controlled_skill_mutation_exec.pyscripts/agent-guards/tests/test_controlled_skill_mutation_policy.pytest_controlled_issue_metadata_exec.pyは Allowed Paths に含まれるが本 PR では無変更(既存 #1284 command id 群の回帰テスト、全 66 件 PASS 確認済み)。変更ファイルは Allowed Paths の部分集合であり、Allowed Paths 外の変更はない。Checks
uv run --directory <worktree> python3 -m pytest scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py scripts/agent-guards/tests/test_controlled_issue_metadata_exec.py -q→ 188 passeduv run --directory <worktree> ruff check --select E,F --ignore E402 scripts/agent-guards/controlled_skill_mutation_policy.py scripts/agent-guards/controlled_skill_mutation_exec.py scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py scripts/agent-guards/tests/test_controlled_issue_metadata_exec.py→ All checks passed(CI の--ignore E402gate と同一設定)uv run python3 .claude/skills/create-issue/scripts/validate_japanese_content.py --file docs/dev/agent-skill-boundaries.md/--file docs/dev/github-ops.md→ PASS(新規追加セクションに既存 failed blocks を増やしていないことを確認済み)Schema Change Applicability
CONTROLLED_SKILL_MUTATION_COMMAND_POLICYに新 command idissue_dependency.removeと新 input schemaISSUE_DEPENDENCY_REMOVE_INPUT_V1を追加した。Schema Consumer Inventory
scripts/agent-guards/controlled_skill_mutation_exec.pyscripts/agent-guards/tests/test_controlled_skill_mutation_policy.pyscripts/agent-guards/tests/test_controlled_skill_mutation_exec.pyscripts/agent-guards/tests/test_controlled_issue_metadata_exec.py.claude/agents/*.md/ 他 skill の importSafety Claim Matrix
Notes
proceed_with_collision_evidence(全候補 C1、disjoint readback 済み)。実装開始時と push 直前の drift gate 再実行でroute/body_sha256不変を確認。