Skip to content

実装: gh api による comment body PATCH mutation の guard 対象追加 #606

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#594"
goal_ref: "guard-japanese-prose が gh api --input による REST comment PATCH body mutation を delta 検査対象に含め、AI エージェントによる英語 prose 混入を防ぐ"
change_kind: code

Parent Issue

#594

Parent Goal Ref

  • Goal: guard-japanese-prose.sh が gh api --input による公開 comment 編集経路でも英語 prose 混入を検知・阻止する
  • Desired Destination: issue comment / PR review comment の REST PATCH body mutation が delta 検査対象となり、新規英語 prose を exit 2 または structured deny で block できる。permissionDecision: "ask" は返さない

Current Validated Scope

  • .claude/hooks/guard-japanese-prose.sh への issue comment / PR review comment REST PATCH endpoint 判定ロジックの追加
  • .claude/skills/create-issue/scripts/validate_japanese_content.py の endpoint 分類拡張(/issues/comments/{comment_id} / /pulls/comments/{comment_id} 対応)
  • issue comment / PR review comment の old body を gh api ... --jq .body で取得する delta 検査経路の追加
  • .claude/hooks/tests/test_guard_api_comment_input.py の追加
  • .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py の追加

Remaining Parent Gaps

Outcome

guard-japanese-prose.sh が gh api --input + --method PATCH による issue comment / PR review comment body mutation を検査対象とし、既存 comment body を comment endpoint から取得して delta 検査できる状態。新規英語 prose の追加・実質変更は exit 2 または structured permissionDecision: "deny" で block され、permissionDecision: "ask" は返らない。対応する hook smoke test / validator unit test は fake gh を使い、実 GitHub API に依存せず PASS する。

Background

PR #600(#594)では gh api --input による Issue / PR 本文(/issues/{n} / /pulls/{n})の mutation が guard 対象化された。一方で、同 PR の B4 では issue comment / PR review comment の REST comment route は scope 外として明示されている。

現状の classifier は repos/{owner}/{repo}/issues/{number} と repos/{owner}/{repo}/pulls/{number} だけを BODY_MUTATION_* として扱い、comment endpoint は NOT_BODY_MUTATION になる。そのため guard-japanese-prose.sh も comment endpoint を pass させてしまう。

また、#605 で permissionDecision: "ask" は採用禁止になっているため、本 Issue でも ask は採用しない。borderline を含め、Claude Code 向けの repair signal は deny または exit 2 側に統一する。

本 Issue では scope を REST comment PATCH body mutation に限定し、comment 作成 POST / reply / GraphQL / -f body= / -F body= まで広げない。これらの route matrix 拡張は #646 側の follow-up に委譲する。

In Scope

  • guard-japanese-prose.sh への issue comment / PR review comment REST PATCH endpoint 判定追加
  • validate_japanese_content.py の endpoint 分類拡張(BODY_MUTATION_ISSUE_COMMENT / BODY_MUTATION_PR_REVIEW_COMMENT)
  • issue comment / PR review comment の old body 取得仕様の明記と実装
  • payload parse failure / endpoint parse failure / old body fetch failure の fail-closed 化
  • 対応する hook smoke test と validator unit test の追加

Out of Scope

Acceptance Criteria

  • AC1: PATCH /repos/{owner}/{repo}/issues/comments/{comment_id} + body:string は BODY_MUTATION_ISSUE_COMMENT:<owner>:<repo>:<comment_id> に分類される
  • AC2: PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id} + body:string は BODY_MUTATION_PR_REVIEW_COMMENT:<owner>:<repo>:<comment_id> に分類される
  • AC3: issue comment old body は gh api repos/{owner}/{repo}/issues/comments/{comment_id} --jq .body で取得される
  • AC4: PR review comment old body は gh api repos/{owner}/{repo}/pulls/comments/{comment_id} --jq .body で取得される
  • AC5: payload parse failure / endpoint parse failure / old body fetch failure は fail-closed し、安定した reason code を返す
  • AC6: GET / DELETE / body key absent は pass し、REST comment 作成 POST は本 Issue の対象外として維持される
  • AC7: 英語 prose の新規追加・実質変更は exit 2 または structured deny で block され、permissionDecision: "ask" は返らない
  • AC8: code fence / inline code / identifier / CLI command / URL / schema enum / API field name だけの差分は pass する
  • AC9: hook smoke test は fake gh を PATH 先頭に置き、実 GitHub API に依存しない
  • AC10: validator unit test が comment endpoint 分類と non-body / non-mutation pass ケースを固定する

Verification Commands

# AC1
$ rg -n "BODY_MUTATION_ISSUE_COMMENT" .claude/skills/create-issue/scripts/validate_japanese_content.py

# AC2
$ rg -n "BODY_MUTATION_PR_REVIEW_COMMENT" .claude/skills/create-issue/scripts/validate_japanese_content.py

# AC3
$ rg -n "issues/comments|comment_old_body_fetch_failed" .claude/hooks/guard-japanese-prose.sh

# AC4
$ rg -n "pulls/comments|comment_old_body_fetch_failed" .claude/hooks/guard-japanese-prose.sh

# AC5
$ uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q -k "payload_parse or endpoint_parse or old_body_fetch"

# AC6
$ uv run pytest .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py -q -k "non_mutation or no_body or get or delete"

# AC7
$ uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q -k "english_prose or structured_deny or ask"

# AC8
$ uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q -k "code_fence or identifier or url or enum"

# AC9
$ uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q

# AC10
$ uv run pytest .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py -q

Allowed Paths

  • .claude/hooks/guard-japanese-prose.sh
  • .claude/hooks/tests/test_guard_api_comment_input.py
  • .claude/skills/create-issue/scripts/validate_japanese_content.py
  • .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(分類ラベル / reason code / payload 取り扱い)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

  • Bash / shell scripting
  • Python(pytest / unittest)
  • GitHub REST comment endpoint の取り扱い

Scope Delta(任意)

N/A

Delivery Rule

Source(dedupe_key)

follow-up:squne121/loop-protocol:pr/600:B4-issue-comment-body-mutation

関連

Runtime Verification Applicability

rva_schema_version: v1
applicability: deferred
decision: deferred
deferred_destination: "PR マージ後の comment PATCH フロー確認(手動)"
deferred_verification_condition: "comment PATCH 時に guard が old body を取得して delta check を実行し、英語 prose を deny または structured deny できること"
reason: "hook smoke test と validator unit test は fake gh で再現できるが、実 CLI 運用での comment PATCH フロー確認は PR マージ後の確認が前提のため"

Activity

  1. added
    enhancement
    phase/implementation
    triage-required
    on Jun 2, 2026
  2. squne121 commented on Jun 4, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES

    Issue #606 の方向性は正しいです。#600 で gh api --input の Issue/PR 本文編集は guard 対象化された一方、issue comment / PR review comment の REST 編集経路は scope 外として残されており、#606 はその穴を塞ぐ follow-up です。#600 本文でも comment route は B4 として de-scope されています。([GitHub]1)

    ただし、現状の #606 仕様のまま実装すると、検証が薄い・old body 取得設計が未定義・#605 の ask 禁止方針と矛盾します。実装前に Issue 本文を修正した方がよいです。


    Blocker 1: deny or ask は #605 と衝突する

    #606 は Outcome / Parent Goal で「deny または ask」と書いていますが、#605 では permissionDecision: "ask" は採用禁止、ユーザー確認ではなく Claude Code 自己修正シグナルにする、と方針が反転しています。#605 は「ユーザー確認を要求せず」「permissionDecision: "ask" は使わない」と明記しています。([GitHub]2)

    Claude Code の公式仕様でも ask はユーザーに通常の権限プロンプトを表示する挙動です。これは今回の「既に人間が日本語優先方針を示しているので、ユーザーに再確認しない」という運用方針に反します。([Claude API Docs]3)

    修正案:

    #606 の Goal / Outcome / AC から ask を削除し、以下に統一するべきです。

    英語 prose 検出時は exit 2 + stderr reason code、または
    exit 0 + JSON permissionDecision: "deny" + permissionDecisionReason を返す。
    permissionDecision: "ask" は返さない。
    reason には japanese_prose_repair_required / comment_body_delta_failed 等の安定 reason code を含める。
    

    Blocker 2: comment の old body 取得方法が Issue に定義されていない

    #606 は delta check を要求していますが、comment 編集では issue #N / pr #N ではなく comment_id が primary key です。既存の #600 実装は Issue/PR 本文向けに repos/{owner}/{repo}/issues/{number} と repos/{owner}/{repo}/pulls/{number} だけを分類しています。現行 validator の分類もその 2 パターンのみで、issues/comments/{comment_id} / pulls/comments/{comment_id} は NOT_BODY_MUTATION になります。([GitHub]4)

    guard 側も NOT_BODY_MUTATION を受けると exit 0 で通すため、現状では comment endpoint は bypass です。([GitHub]5)

    GitHub REST API では issue comment 更新は PATCH /repos/{owner}/{repo}/issues/comments/{comment_id} で、body は必須です。([GitHub Docs]6) PR review comment 更新は別 endpoint の PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id} で、こちらも body が必須です。([GitHub Docs]7)

    修正案:

    #606 に old body 取得仕様を明記してください。

    分類結果:
    - BODY_MUTATION_ISSUE_COMMENT:<comment_id>
    - BODY_MUTATION_PR_REVIEW_COMMENT:<comment_id>
    
    old body 取得:
    - issue comment:
      gh api repos/{owner}/{repo}/issues/comments/{comment_id} --jq .body
    
    - PR review comment:
      gh api repos/{owner}/{repo}/pulls/comments/{comment_id} --jq .body
    
    old body 取得失敗:
    - fail-closed
    - reason code: comment_old_body_fetch_failed
    

    gh issue view / gh pr view で代用してはいけません。対象は本文ではなく comment body です。


    Blocker 3: test path が既存設計とずれている

    #606 の Allowed Paths は .claude/skills/create-issue/scripts/tests/ を許可していますが、hook の E2E smoke test は既存の #600 と同じく .claude/hooks/tests/ に置くべきです。#600 でも test_guard_api_input.py は .claude/hooks/tests/ に追加され、fake gh を PATH prepend して実 GitHub API 非依存で検証する設計でした。(GitHub)

    また #602 では、追加された hook test が CI に登録されていない問題が別 Issue 化されています。.github/workflows/ci.yml が個別ファイル列挙方式で auto-discovery なし、という前提も明記されています。([GitHub]8)

    修正案:

    Allowed Paths をこう直すべきです。

    Allowed Paths
    - .claude/hooks/guard-japanese-prose.sh
    - .claude/hooks/tests/test_guard_api_comment_input.py
    - .claude/skills/create-issue/scripts/validate_japanese_content.py
    - .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py
    

    さらに CI についてはどちらかを Issue に入れてください。

    Option A:
    - .github/workflows/ci.yml も Allowed Paths に追加し、新規 hook test を CI 実行対象に登録する。
    
    Option B:
    - CI 登録は別 Issue として mandatory follow-up を materialize する。
    

    #602 と同じ事故を繰り返さないため、#606 の AC に「追加 test が CI で実行される、または CI 登録 follow-up が materialize される」を入れるべきです。


    Blocker 4: Verification Commands が rg 中心で、実挙動を保証していない

    #606 の検証コマンドは rg issues/comments などが中心ですが、これは「文字列が存在する」ことしか確認できません。実際に PreToolUse hook の入力 JSON を流し、fake gh で old body を返し、delta check が block/pass することを検証しないと意味がありません。

    追加すべき smoke tests:

    uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q
    uv run pytest .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py -q

    最低限のケースは以下です。

    AC1:
    gh api repos/{owner}/{repo}/issues/comments/123 --method PATCH --input payload.json
    payload.body = "English prose should be blocked"
    old body = "既存の日本語コメント"
    期待: exit 2 または structured deny
    
    AC2:
    gh api repos/{owner}/{repo}/pulls/comments/456 --method PATCH --input payload.json
    payload.body = "English prose should be blocked"
    old body = "既存の日本語レビューコメント"
    期待: exit 2 または structured deny
    
    AC3:
    GET /issues/comments/{id} + bodyあり
    期待: pass
    
    AC4:
    PATCH /issues/comments/{id} + bodyなし
    期待: pass または API payload invalid として fail-closed。どちらにするか Issue で固定する。
    
    AC5:
    payload JSON parse failure
    期待: fail-closed + api_payload_parse_failed
    
    AC6:
    old body fetch failure
    期待: fail-closed + comment_old_body_fetch_failed
    
    AC7:
    code fence / CLI / schema enum / URL だけの差分
    期待: pass
    
    AC8:
    日本語 prose 差分
    期待: pass
    

    Blocker 5: REST comment creation を完全に scope 外にしている点は安全性上の穴

    #606 は POST / comment 作成を Out of Scope にしています。しかし gh api は REST v3 endpoint を任意に叩け、--input で request body をファイルから渡せます。公式 manual でも gh api repos/{owner}/{repo}/issues/123/comments -f body='Hi from CLI' のような issue comment 投稿例があり、--input による request body 読み込みもサポートされています。([GitHub CLI]9)

    つまり、#606 が PATCH 編集だけを塞いでも、次の経路は残ります。

    gh api repos/{owner}/{repo}/issues/{issue_number}/comments \
      --method POST \
      --input payload.json

    PR review comment 作成も REST endpoint に body を含む POST が存在します。([GitHub Docs]7)

    判断:

    #606 に含めるなら、scope を「REST comment body mutation」に広げるべきです。含めないなら、Out of Scope にするだけでなく、mandatory follow-up Issue を materialize してください。

    Follow-up:
    実装: gh api --input による REST comment 作成 body mutation を guard 対象に追加する
    
    対象:
    - POST /repos/{owner}/{repo}/issues/{issue_number}/comments
    - POST /repos/{owner}/{repo}/pulls/{pull_number}/comments
    - POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies
    

    推奨する #606 の修正版 AC

    AC1: PATCH /repos/{owner}/{repo}/issues/comments/{comment_id} + body:string は BODY_MUTATION_ISSUE_COMMENT:<comment_id> に分類される。
    
    AC2: PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id} + body:string は BODY_MUTATION_PR_REVIEW_COMMENT:<comment_id> に分類される。
    
    AC3: issue comment old body は gh api repos/{owner}/{repo}/issues/comments/{comment_id} --jq .body で取得される。
    
    AC4: PR review comment old body は gh api repos/{owner}/{repo}/pulls/comments/{comment_id} --jq .body で取得される。
    
    AC5: old body 取得失敗、JSON parse 失敗、endpoint parse 失敗、method parse 不明は fail-closed する。
    
    AC6: GET / POST / DELETE、または body key absent は本 Issue では guard 対象外として pass する。ただし POST comment creation は mandatory follow-up を起票する。
    
    AC7: 英語 prose の新規追加・実質変更は exit 2 または structured deny で block される。
    
    AC8: borderline は ask ではなく repair signal / deny / exit 2 にする。permissionDecision: "ask" は返さない。
    
    AC9: code fence / inline code / identifier / CLI command / URL / schema enum / API field name は英語許容対象として pass する。
    
    AC10: hook smoke test は fake gh を PATH 先頭に置き、実 GitHub API に依存しない。
    
    AC11: 追加 test が CI で実行される、または CI 登録 follow-up が materialize される。
    

    実装方針

    validate_japanese_content.py の classifier を拡張します。

    issue_comment_m = re.match(
        r'^repos/[^/]+/[^/]+/issues/comments/(\d+)$',
        ep,
    )
    pr_review_comment_m = re.match(
        r'^repos/[^/]+/[^/]+/pulls/comments/(\d+)$',
        ep,
    )

    返却値は既存の BODY_MUTATION_ISSUE / BODY_MUTATION_PR と混ぜず、comment 専用に分けます。

    BODY_MUTATION_ISSUE_COMMENT:<comment_id>
    BODY_MUTATION_PR_REVIEW_COMMENT:<comment_id>
    

    guard-japanese-prose.sh 側では分類ごとに old body 取得を分岐します。

    gh api "repos/${owner}/${repo}/issues/comments/${comment_id}" --jq .body
    gh api "repos/${owner}/${repo}/pulls/comments/${comment_id}" --jq .body

    ここで owner/repo は endpoint から抽出する必要があります。既存 classifier が number だけ返す設計だと old body GET に必要な owner/repo が失われるため、返却値は次のようにした方が堅いです。

    BODY_MUTATION_ISSUE_COMMENT:<owner>:<repo>:<comment_id>
    BODY_MUTATION_PR_REVIEW_COMMENT:<owner>:<repo>:<comment_id>
    

    : を owner/repo に含められない前提なら扱いやすいですが、より安全にするなら JSON 出力に変えるのがよいです。

    {
      "kind": "issue_comment",
      "owner": "OWNER",
      "repo": "REPO",
      "comment_id": 123
    }

    ただし #606 の Stop Conditions に「固定契約変更」があるため、JSON 化が大きいなら別 Issue に分け、今回は colon-separated の最小差分でも可です。


    GitHub コメント案

    ## 敵対的レビュー: REQUEST_CHANGES
    
    #606 は #600 で de-scope された REST comment body mutation を拾う follow-up として方向性は正しいです。ただし、このまま実装すると old body 取得不能・ask 方針衝突・テスト未登録の再発が起きます。
    
    ### Blockers
    
    1. `deny or ask` は #605 と衝突しています。#605 では `permissionDecision: "ask"` は採用禁止で、ユーザー確認ではなく Claude Code 自己修正シグナルへ方針転換済みです。#606 の Goal / Outcome / AC から ask を削除し、`exit 2` または structured `permissionDecision: "deny"` に統一してください。
    
    2. comment delta check の old body 取得方法が未定義です。comment endpoint は issue/pr number ではなく `comment_id` が primary key です。以下を AC に追加してください。
       - issue comment: `gh api repos/{owner}/{repo}/issues/comments/{comment_id} --jq .body`
       - PR review comment: `gh api repos/{owner}/{repo}/pulls/comments/{comment_id} --jq .body`
       - 取得失敗は fail-closed + `comment_old_body_fetch_failed`
    
    3. classifier の返却種別を comment 専用に分ける必要があります。
       - `BODY_MUTATION_ISSUE_COMMENT:<owner>:<repo>:<comment_id>`
       - `BODY_MUTATION_PR_REVIEW_COMMENT:<owner>:<repo>:<comment_id>`
    
    4. test path が弱いです。hook E2E は `.claude/hooks/tests/test_guard_api_comment_input.py` に置き、fake `gh` を PATH prepend して実 GitHub API 非依存で検証してください。validator 単体テストは `.claude/skills/create-issue/scripts/tests/` に分けてよいです。
    
    5. CI 登録の扱いを AC に入れてください。#602 と同じく、hook test が CI で実行されないまま self-report だけになるリスクがあります。`.github/workflows/ci.yml` を Allowed Paths に含めるか、CI 登録 follow-up を mandatory として materialize してください。
    
    6. REST comment creation POST を Out of Scope にするなら、`gh api --input` による comment 作成 body mutation の mandatory follow-up Issue を作ってください。PATCH だけ塞いでも `POST /issues/{issue_number}/comments` と `POST /pulls/{pull_number}/comments` が残ります。
    
    ### Minimum AC update
    
    - PATCH `/issues/comments/{comment_id}` + body:string → delta check
    - PATCH `/pulls/comments/{comment_id}` + body:string → delta check
    - GET / DELETE / body absent → pass
    - parse failure / endpoint unknown / old body fetch failure → fail-closed
    - English prose delta → block
    - borderline → ask ではなく repair signal / deny / exit 2
    - fake gh smoke test PASS
    - CI 実行または CI follow-up materialized
  3. changed the title [-]実装: gh api による comment body mutation の guard 対象追加[/-] [+]実装: gh api による comment body PATCH mutation の guard 対象追加[/+] on Jun 4, 2026
  4. squne121 commented on Jun 4, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop 適用結果

    anchor comment #issuecomment-4621039527 を反映して Issue 本文を更新しました。

    実行した deterministic checks:

    • guard-issue-body.py: pass
    • check_issue_contract.py: approve
    • contract_readiness_check.py --mode static: status go
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: issue-refinement-loop
      follow_up_issues:
        - request_dedupe_key: "follow-up:squne121/loop-protocol:issue/606:ci-registration"
          status: reused_open
          issue:
            number: 602
            url: "https://github.com/squne121/loop-protocol/issues/602"
          reason: "新規 hook smoke test の CI 登録は既存 open issue #602 に集約"
        - request_dedupe_key: "follow-up:squne121/loop-protocol:issue/606:rest-comment-route-matrix"
          status: reused_open
          issue:
            number: 646
            url: "https://github.com/squne121/loop-protocol/issues/646"
          reason: "POST comment creation / broader public mutation route matrix は既存 open parent #646 に集約"
      note_only_observations: []
  5. squne121 commented on Jun 4, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-06-04T10:39:07Z)

    • Outcome: guard-japanese-prose.sh が gh api --input + --method PATCH による issue comment / PR review comment body mutation を検査対象とし、既存 comment body を comment endpoint から取得して delta 検査できる状態。
    • Acceptance Criteria: AC1-AC10
    • Verification Commands: 10 件
    • Allowed Paths: 4 件
    • Worktree: .claude/worktrees/issue-606-gh-api-comment-body-patch-mutation
    • Branch: worktree-issue-606-gh-api-comment-body-patch-mutation
    • VC preflight: baseline fail = 10, 想定外 pass = 0, 実行不可 = 0
    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: 2026-06-04T10:39:07Z
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/606
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: true
          vc_failed_as_expected: 10
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 0
          vc_skipped: 0
          classifications:
            - ac: AC1
              command: rg -n BODY_MUTATION_ISSUE_COMMENT .claude/skills/create-issue/scripts/validate_japanese_content.py
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: 
                stderr_excerpt: 
              decision: go
            - ac: AC2
              command: rg -n BODY_MUTATION_PR_REVIEW_COMMENT .claude/skills/create-issue/scripts/validate_japanese_content.py
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: 
                stderr_excerpt: 
              decision: go
            - ac: AC3
              command: rg -n issues/comments|comment_old_body_fetch_failed .claude/hooks/guard-japanese-prose.sh
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: 
                stderr_excerpt: 
              decision: go
            - ac: AC4
              command: rg -n pulls/comments|comment_old_body_fetch_failed .claude/hooks/guard-japanese-prose.sh
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: 
                stderr_excerpt: 
              decision: go
            - ac: AC5
              command: uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q -k payload_parse or endpoint_parse or old_body_fetch
              exit_code: 4
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: no tests ran in 0.00s
                stderr_excerpt: ERROR: file or directory not found: .claude/hooks/tests/test_guard_api_comment_input.py
              decision: go
            - ac: AC6
              command: uv run pytest .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py -q -k non_mutation or no_body or get or delete
              exit_code: 4
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: no tests ran in 0.00s
                stderr_excerpt: ERROR: file or directory not found: .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py
              decision: go
            - ac: AC7
              command: uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q -k english_prose or structured_deny or ask
              exit_code: 4
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: no tests ran in 0.00s
                stderr_excerpt: ERROR: file or directory not found: .claude/hooks/tests/test_guard_api_comment_input.py
              decision: go
            - ac: AC8
              command: uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q -k code_fence or identifier or url or enum
              exit_code: 4
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: no tests ran in 0.00s
                stderr_excerpt: ERROR: file or directory not found: .claude/hooks/tests/test_guard_api_comment_input.py
              decision: go
            - ac: AC9
              command: uv run pytest .claude/hooks/tests/test_guard_api_comment_input.py -q
              exit_code: 4
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: no tests ran in 0.00s
                stderr_excerpt: ERROR: file or directory not found: .claude/hooks/tests/test_guard_api_comment_input.py
              decision: go
            - ac: AC10
              command: uv run pytest .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py -q
              exit_code: 4
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: no tests ran in 0.00s
                stderr_excerpt: ERROR: file or directory not found: .claude/skills/create-issue/scripts/tests/test_validate_api_comment_mutation.py
              decision: go
        ac_verifiability: pass
        product_spec_check:
          applicability: not_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
          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: []
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings: []
  6. squne121 commented on Jun 4, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-06-04T10:00:00Z)\n\n- PR: https://github.com/squne121/loop-protocol/pull/652\n- Worktree: \n- Branch: \n- Verification: issue VC + typecheck/lint/test/build PASS\n- 後続: PR レビュー(pr-review-judge)

  7. squne121 commented on Jun 4, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了\n\n- PR: https://github.com/squne121/loop-protocol/pull/652\n- Worktree: .claude/worktrees/issue-606-gh-api-comment-body-patch-mutation\n- Branch: worktree-issue-606-gh-api-comment-body-patch-mutation\n- Head SHA: e1e306b\n- Verification: updated head で issue VC 再実行、pnpm typecheck/lint/test/build pass、GitHub checks success\n- PR review: self-authored comment review と LOOP_VERDICT_V2 を投稿済み

  8. added 2 commits that reference this issue on Jun 4, 2026
  9. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    PR #652 が 2026-06-04 に main へ merge 済みで、#606 の AC1〜AC10 および検証ゲートを満たしているため close します。

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

    enhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions