Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "root GitHub auth probe が github.com の active account の認証状態だけを検査し、無関係な host または inactive account の認証不整合で workflow を誤って block しないようにする。対象 repository の read capability 判定を担当する既存の _github_repo_read_probe も同一の github.com host に固定し、composite capability 全体で無関係な host(例: GH_HOST 環境変数由来)が再侵入しないようにする。"
change_kind: codeParent Issue
なし
Parent Goal Ref
- Goal: N/A(単独改善のため親 Issue なし)
- Desired Destination: N/A
Current Validated Scope
scripts/claude-gpt/workflow_capability_preflight.pyの_github_auth_probeが実行するgh auth status呼び出しコマンドをgh auth status --active --hostname github.comに変更する
Remaining Parent Gaps
なし
Outcome
scripts/claude-gpt/workflow_capability_preflight.py の _github_auth_probe(281行目付近)が実行する GitHub auth probe コマンドが ["gh", "auth", "status", "--active", "--hostname", "github.com"] に変更され、github.com の active account 認証状態のみを検査するようになった状態。同ファイルの _github_repo_read_probe(290行目付近)が実行する gh repo view コマンドの対象引数が repo(例: squne121/loop-protocol)から f"github.com/{repo}" へ変更され、ambient default host(GH_HOST 環境変数の影響を含む)ではなく github.com に明示的に固定されるようになった状態。これにより auth probe と repo-read probe の両方が同一の github.com host のみを検査する composite capability となる。current main(PR #2410 マージ後)に存在する scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_root_to_producer_transports_deadline_with_fake_external_clis の exact fake-gh invocation trace assertion が、変更後の argv [["auth", "status", "--active", "--hostname", "github.com"], ["repo", "view", "github.com/squne121/loop-protocol", "--json", "name"], ["api", "--hostname", "github.com", "repos/squne121/loop-protocol", "--jq", "{name}"]] で PASS すること、および既存の scripts/claude-gpt/tests/test_workflow_capability_preflight.py / scripts/claude-gpt/tests/test_actor_scoped_capability_probe.py が変更後も PASS していることで完了を判定する。
Runtime Verification Applicability
decision: immediate
reason: >
root capability preflight が外部 gh subprocess へ渡す argv を変更するため。
current main に存在する hermetic root-to-producer boundary test で
exact fake-gh invocation trace を検証できる。
applicable_acs:
- AC1
- AC2
- AC5
execution_environment: >
Deterministic pytest with the existing fake gh leaf CLI.
No live GitHub network, credentials, or user account state required.
skip_conditions: >
なし。本変更は常に hermetic pytest(fake gh leaf CLI)で検証可能であり、
live GitHub 環境・credential が必要になるケースは存在しない。
fallback_policy: >
runtime verification(AC1/AC2/AC5 の pytest 実行)が失敗した場合は fallback を設けず、
Stop Conditions に従い実装を完了扱いにしない。
artifact_requirements: >
AC1/AC2/AC3/AC5 の pytest 実行結果(exit code・出力)と、AC4 の `gh --version` 出力を
PR evidence として記録する。In Scope
_github_auth_probe内のgh auth statussubprocess 呼び出し引数を["gh", "auth", "status", "--active", "--hostname", "github.com"]に変更する- 変更に伴い必要な場合、同ファイル内のこのprobeに関するdocstring/コメント(17行目・29行目・327行目付近の
gh auth status記述)を更新する scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py内のtest_root_to_producer_transports_deadline_with_fake_external_clisの exact fake-gh trace 期待値の先頭要素を["auth", "status"]から["auth", "status", "--active", "--hostname", "github.com"]へ更新する(fixture 自体はargs[:2] == ["auth", "status"]で受理するため変更不要)_github_repo_read_probe内のgh repo viewsubprocess 呼び出し引数を["gh", "repo", "view", repo, "--json", "name"]から["gh", "repo", "view", f"github.com/{repo}", "--json", "name"]に変更する(GitHub CLI はHOST/OWNER/REPO形式を正式にサポートする)- 上記に伴い、同じ exact fake-gh trace 期待値の2番目の要素を
["repo", "view", "squne121/loop-protocol", "--json", "name"]から["repo", "view", "github.com/squne121/loop-protocol", "--json", "name"]へ更新する(新しい fixture・env sanitizer・host abstraction は追加しない)
Out of Scope
- Issue 実装: Address remaining capability preflight review findings #2401(PR feat: share capability preflight deadline #2394 レビュー由来の他 findings、PR fix: capability-preflight probe ordering, Spark validation, deadline test fidelity (#2401) #2410 でマージ済み)で扱った変更
_github_repo_read_probeの host 引数をf"github.com/{repo}"に固定する以外の変更(新しい env sanitizer、host abstraction layer、live GitHub test の追加は含まない)- root 以外(actor-scoped / controlled_github_read)の auth probe / repo-read probe 実装の変更
- host 名のハードコード以外の設定可能化(例: 環境変数化)
- production への GitHub CLI バージョン parser・fallback argv・二段 probe・互換レイヤーの追加(AC4 は実行環境確認のみで満たす)
Acceptance Criteria
- AC1:
_github_auth_probeがsubprocessへ渡すコマンド配列が["gh", "auth", "status", "--active", "--hostname", "github.com"]である - AC2:
scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_root_to_producer_transports_deadline_with_fake_external_clisの fake-gh exact trace が次の順序で PASS する:[["auth", "status", "--active", "--hostname", "github.com"], ["repo", "view", "github.com/squne121/loop-protocol", "--json", "name"], ["api", "--hostname", "github.com", "repos/squne121/loop-protocol", "--jq", "{name}"]] - AC5:
_github_repo_read_probeがsubprocessへ渡すコマンド配列が["gh", "repo", "view", "github.com/squne121/loop-protocol", "--json", "name"]である(AC2 の exact trace 2番目の要素と同一証跡) - AC3: 既存テストスイート
scripts/claude-gpt/tests/test_workflow_capability_preflight.pyおよびscripts/claude-gpt/tests/test_actor_scoped_capability_probe.pyが全件 PASS する - AC4: 実利用環境の GitHub CLI が
--activeフラグの最低要求バージョンである 2.57.0 以上であることをgh --versionで確認し、PR evidence に記録する(コード上の互換 fallback は追加しない)
Verification Commands
# AC4
# preflight-scope: pr_review_only
$ gh --version
# AC1
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_root_to_producer_transports_deadline_with_fake_external_clis -q
# AC2
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_root_to_producer_transports_deadline_with_fake_external_clis -q
# AC3
$ uv run --locked pytest scripts/claude-gpt/tests/test_workflow_capability_preflight.py scripts/claude-gpt/tests/test_actor_scoped_capability_probe.py scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py -q
# AC5
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_root_to_producer_transports_deadline_with_fake_external_clis -q補助確認(Acceptance Criteria の証拠にはしない):
$ grep -n "auth.*status.*--active.*--hostname.*github.com" scripts/claude-gpt/workflow_capability_preflight.pyAllowed Paths
- scripts/claude-gpt/workflow_capability_preflight.py
- scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 実行環境の GitHub CLI が 2.57.0 未満であることが判明した場合(production への互換コード追加ではなく、環境更新または Issue 再検討で対応する)
Required Skills
なし
Required Design References
- https://cli.github.com/manual/gh_auth_status
- docs/dev/runtime-verification-policy.md
Scope Delta(任意)
Scope Delta (OWNER trusted anchor, PR #2413 敵対的レビュー): PR #2413 の head c18818c に対する OWNER REQUEST_CHANGES(https://github.com/squne121/loop-protocol/pull/2413#issuecomment-5465790972)を受け、Out of Scope から _github_repo_read_probe の変更除外を撤回し、host 引数を f"github.com/{repo}" に固定する変更のみを In Scope へ追加した(AC5 / Allowed Paths は既存の workflow_capability_preflight.py に含まれるため変更なし)。理由: auth probe のみを github.com に固定しても、同一 composite capability の repo-read probe が ambient default host(GH_HOST 環境変数の影響を含む)のままでは、無関係な host の認証不整合による誤 block を防ぐという本 Issue の目的が未達成のため。
Scope Collision Note
Scope Collision (C1): related_issue=#2401 (merged via PR #2410), #420, #205; overlapping_paths=scripts/claude-gpt/workflow_capability_preflight.py.
- 実装: Address remaining capability preflight review findings #2401 / PR fix: capability-preflight probe ordering, Spark validation, deadline test fidelity (#2401) #2410 は merge 済み。PR fix: capability-preflight probe ordering, Spark validation, deadline test fidelity (#2401) #2410 が追加した
scripts/claude-gpt/tests/test_capability_preflight_review_fixes.pyに root auth probe の exact argv assertion があるため、本 Issue の Allowed Paths / Verification に反映済み(上記参照)。 - edit_intent:
_github_auth_probeのコマンド引数変更、および同一 PR で追加された exact-argv テストの期待値更新のみ(他 issue の変更と AST レベルで独立) - 実装: playtest-log の JSON Schema / validator の追加 #420 / 実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205 は
scriptsディレクトリ全体を Allowed Paths に含む広域宣言であり、_github_auth_probeの同一処理に対する競合は確認されていない。ファイル単位の排他ロックや新しい overlap harness は追加しない。 - 実装開始時に current main へ rebase し、同一 hunk の実競合だけを確認する。
Notes for Reviewer
- Source: https://github.com/squne121/loop-protocol/issues/2404#issuecomment-5465608024(OWNER による敵対的レビュー、REQUEST_CHANGES→本 Issue 契約へ反映)
- Source (Scope Delta): https://github.com/squne121/loop-protocol/pull/2413#issuecomment-5465790972(OWNER による PR fix: root github auth probe を --active --hostname github.com に限定する #2413 への敵対的レビュー、REQUEST_CHANGES。P1-1:
_github_repo_read_probeの host-scope 漏れ→ Out of Scope 撤回・AC5 追加で反映。P2-1 は non-blocking のため対応不要) - runtime_precondition: "GitHub CLI >= 2.57.0 (
gh auth status --activesupport)"(AC4 参照) --jsonへは変更しない: GitHub CLI 公式マニュアル上、JSON mode は認証不整合があっても原則 exit zero になるため、現在の exit-status probe の目的を損なう
Activity
squne121 commentedon Aug 29, 2026
敵対的レビュー結果
実装しようとしているコマンド変更自体は正しいです。
ただし、Issue #2404 は作成後に main が更新された結果、現在は Allowed Paths・Acceptance Criteria・Verification Commands が current main と矛盾しています。現状の契約のまま実装を開始すると、「既存の恒久回帰テストを壊す」か「Allowed Paths 違反で停止する」かの二択になります。
Issue #2404 は現在も open、コメントなしで、作成直後から本文が更新されていません。一方、その後に Issue #2401 が完了し、PR #2410 が main にマージされています。Issue #2404 の Scope Collision Note に残っている
#2401 (OPEN)と「どちらを先にマージしても影響しない」という記述は、現在の状態では成立していません。Findings
ID | 重要度 | 指摘 | 判定 -- | -- | -- | -- P0-1 | P0 | PR #2410 が追加した exact-argv テストの更新が必要なのに、そのテストファイルが Allowed Paths 外 | 実装着手前に Issue 修正必須 P1-1 | P1 | 現在の Verification Commands は変更対象の実 subprocess argv を証明せず、false-green になり得る | close evidence として不十分 P1-2 | 条件付き P1 | --active の最低 GitHub CLI バージョンが契約されていない | 実環境の gh が 2.57.0 以上なら解消 P2-1 | P2 | Goal が「対象リポジトリの認証状態だけ」と過剰表現している | host/account scope に修正 P2-2 | P2 | Scope Collision Note が #2401 の完了・PR #2410 の影響を反映していない | 記録更新のみ。新しいロックや直列化は不要P0-1: current main では Allowed Paths と既存テストが正面衝突する
現在の production 実装は次の argv を発行しています。
Issue #2404 はこれを次へ変える契約です。
ここまでは明確です。
しかし、Issue #2404 の作成後にマージされた PR #2410 は、real root consumer から real producer subprocess を通し、fake
ghwrapper が観測した三つの CLI 呼び出しを exact argv / exact order で照合する恒久回帰テストを追加しています。現在の期待値は次です。したがって production の一行だけを Issue #2404 の指定どおり変えると、このテストは決定的に失敗します。これは一般的な「念のためテストを追加した方がよい」という話ではなく、現在の exact-list assertion と変更後の literal argv が一致しないという直接的な衝突です。
ところが Issue #2404 の Allowed Paths は次の一ファイルだけです。
さらに Stop Conditions は Allowed Paths 外の変更が必要なら停止するよう要求しています。つまり実装者は、正しく current main を確認した時点で停止するしかありません。
必須修正
Allowed Paths に次を追加してください。
そして exact trace の先頭だけを変更します。
共有 fake
ghfixture はargs[:2] == ["auth", "status"]で受理しているため、追加フラグを許容します。fixture の変更も、新しい fake CLI も、新しい共通ハーネスも不要です。この exact trace は偶然追加されたものではありません。PR #2410 では OWNER review が一度 false-green を検出し、root→producer の deadline transport と fake CLI の exact argv/order を実際に観測するよう REQUEST_CHANGES を出した結果として追加されています。今回それを Verification から落とすのは、直前のレビュー修正を逆行させます。
P1-1: 現行 Verification は変更対象を証明していない
Issue #2404 の AC1 は、次の grep です。
これは production の subprocess argv を検証していません。Issue 自身が同じファイル内の docstring/comment 更新を許可しているため、例えばコメントに対象文字列を書き、実 argv を従来のまま残しても AC1 が PASS します。
AC2 の
test_workflow_capability_preflight.pyも exact argv の証明にはなりません。同ファイルの real-subprocess test は@pytest.mark.github_liveで、通常の pytest 設定では deselect されます。それ以外のテストは、root probe を monkeypatch するか、結果の schema・decision を確認するだけで、_github_auth_probeの argv を固定していません。AC3 の
test_actor_scoped_capability_probe.pyはさらに明確で、共通_assess()helper が_github_auth_probeと_github_repo_read_probeを monkeypatch しています。そこで捕捉している subprocess はcontrolled_github_readのgh api呼び出しであり、今回変える root auth argv ではありません。その結果、次の状態が起こり得ます。
Runtime Verification Applicability の修正
現在の
not_applicableは不適切です。これは外部 CLI subprocess の argv と、その exit status が workflow block に変換される経路を変更します。直前の Issue #2401 でも、同じ producer 境界についてdecision: immediate、かつ「fake external leaf CLI を使う hermetic pytest、live GitHub・credential 不要」と定義していました。次のようにするのが妥当です。
これはハーネス強化ではありません。既にある、今回の変更をちょうど観測できる一件のテストを更新して使うだけです。
P1-2:
--activeは GitHub CLI 2.57.0 以降という前提が抜けているGitHub CLI の公式マニュアルによれば、裸の
gh auth statusは既知の host/account を検査し、いずれかに問題があると非ゼロ終了します。--hostnameは host を、--activeは active account のみに検査対象を絞ります。公式実装でもopts.Activeの場合は active entry の検査後にcontinueし、inactive users のループへ入りません。したがって Issue #2404 の技術的な方向性は正しいです。(GitHub CLI)ただし
--activeは GitHub CLI 2.57.0 で追加されたフラグです。2.57.0 未満の
ghではこのフラグが存在しないため、該当環境では非ゼロ終了になります。現在の producer は subprocess の非ゼロをすべてPROBE_NONZERO_EXITとし、最終的にgithub:auth_unavailableとして workflow を block します。つまり「無関係な account による誤 block を減らす」変更が、古い CLI では「すべての workflow を block する」変更になります。個人趣味開発であることを考えると、ここで production に version parser、fallback argv、二段 probe、互換レイヤーを追加する必要はありません。必要なのは次だけです。
現在の実利用環境が
2.57.0以上なら、その結果を PR evidence に残してこの finding は解消。2.57.0 未満なら GitHub CLI を更新。
コード上の fallback は追加しない。
Issue の Notes または Preconditions に次を一行入れる程度で十分です。
P2-1: 「対象リポジトリの認証状態だけ」は正確ではない
現在の Goal は次の趣旨です。
しかし
gh auth status --active --hostname github.comが検査するのは、github.com の active account/token の認証状態です。リポジトリへの read capability は、その後の別 probe である次の呼び出しが確認します。したがって、Goal は次のようにした方が producer/consumer 境界を正確に表します。(GitHub CLI)
これは実装変更ではなく、将来「この auth probe 単独で repository access まで証明している」と誤解されないための契約修正です。
P2-2: Scope Collision Note を current main に合わせる
現在の記述には、少なくとも次の二点で drift があります。
#2401 は既に completed で、PR #2410 が main に exact-argv test を追加したため、実際には #2404 の Allowed Paths と Verification に影響しています。
推奨する置き換えは次です。
#420 / #205 を理由に作業を直列化したり、ファイル単位の排他ロックや新しい overlap harness を追加したりする必要はありません。
推奨する Issue 契約の最小修正版
Allowed Paths
fixture ファイルは追加しません。
Acceptance Criteria
Verification Commands
grepは補助確認として残しても構いませんが、Acceptance Criteria の証拠にはしない方がよいです。採用してよい設計判断
--active --hostname github.comの採用は正しい。current project が
github.com/squne121/loop-protocol固定である限り、host の環境変数化は不要。root auth と repository read を別 probe のまま保つのは正しい。
actor-scoped / controlled probe へ変更を波及させないのも正しい。
非ゼロ終了を fail-closed とする既存方針は維持してよい。
--jsonへ変更してはいけません。公式マニュアル上、JSON mode は認証不整合があっても原則 exit zero になるため、現在の exit-status probe の目的を損ないます。(GitHub CLI)新しい security sandbox、credential abstraction、version framework、live-account test、共通 CLI harness は不要。
既存の exact root→producer test 一件を更新するのが最も小さく、最も強い修正です。
最終判定
Issue #2404 の意図と production 変更案は approve です。
一方、現行 Issue 契約は current main に追随していないため、現状のままでは Implementation Ready ではありません。
マージ可能条件は次の三点です。
test_capability_preflight_review_fixes.pyを Allowed Paths に追加する。grep 中心の Verification を、既存 exact root→producer test 中心へ置き換える。
実環境の
gh >= 2.57.0を確認し、コード上の追加互換ハーネスは作らない。なお、今回のテスト失敗判定はローカル pytest の実行結果ではなく、current-main にある exact expected list と変更後 argv の静的比較に基づきます。ただし比較対象が完全一致 assertion なので、該当テストが変更前のまま実行された場合に失敗する点は決定的です。
# 敵対的レビュー結果実装しようとしているコマンド変更自体は正しいです。
ただし、Issue #2404 は作成後に main が更新された結果、現在は Allowed Paths・Acceptance Criteria・Verification Commands が current main と矛盾しています。現状の契約のまま実装を開始すると、「既存の恒久回帰テストを壊す」か「Allowed Paths 違反で停止する」かの二択になります。
Issue #2404 は現在も open、コメントなしで、作成直後から本文が更新されていません。一方、その後に Issue #2401 が完了し、PR #2410 が main にマージされています。Issue #2404 の Scope Collision Note に残っている
#2401 (OPEN)と「どちらを先にマージしても影響しない」という記述は、現在の状態では成立していません。Findings
--activeの最低 GitHub CLI バージョンが契約されていないghが 2.57.0 以上なら解消P0-1: current main では Allowed Paths と既存テストが正面衝突する
現在の production 実装は次の argv を発行しています。
Issue #2404 はこれを次へ変える契約です。
ここまでは明確です。
しかし、Issue #2404 の作成後にマージされた PR #2410 は、real root consumer から real producer subprocess を通し、fake
ghwrapper が観測した三つの CLI 呼び出しを exact argv / exact order で照合する恒久回帰テストを追加しています。現在の期待値は次です。したがって production の一行だけを Issue #2404 の指定どおり変えると、このテストは決定的に失敗します。これは一般的な「念のためテストを追加した方がよい」という話ではなく、現在の exact-list assertion と変更後の literal argv が一致しないという直接的な衝突です。
ところが Issue #2404 の Allowed Paths は次の一ファイルだけです。
さらに Stop Conditions は Allowed Paths 外の変更が必要なら停止するよう要求しています。つまり実装者は、正しく current main を確認した時点で停止するしかありません。
必須修正
Allowed Paths に次を追加してください。
そして exact trace の先頭だけを変更します。
共有 fake
ghfixture はargs[:2] == ["auth", "status"]で受理しているため、追加フラグを許容します。fixture の変更も、新しい fake CLI も、新しい共通ハーネスも不要です。この exact trace は偶然追加されたものではありません。PR #2410 では OWNER review が一度 false-green を検出し、root→producer の deadline transport と fake CLI の exact argv/order を実際に観測するよう REQUEST_CHANGES を出した結果として追加されています。今回それを Verification から落とすのは、直前のレビュー修正を逆行させます。
P1-1: 現行 Verification は変更対象を証明していない
Issue #2404 の AC1 は、次の grep です。
grep -n "auth.*status.*--active.*--hostname.*github.com" \ scripts/claude-gpt/workflow_capability_preflight.pyこれは production の subprocess argv を検証していません。Issue 自身が同じファイル内の docstring/comment 更新を許可しているため、例えばコメントに対象文字列を書き、実 argv を従来のまま残しても AC1 が PASS します。
AC2 の
test_workflow_capability_preflight.pyも exact argv の証明にはなりません。同ファイルの real-subprocess test は@pytest.mark.github_liveで、通常の pytest 設定では deselect されます。それ以外のテストは、root probe を monkeypatch するか、結果の schema・decision を確認するだけで、_github_auth_probeの argv を固定していません。AC3 の
test_actor_scoped_capability_probe.pyはさらに明確で、共通_assess()helper が_github_auth_probeと_github_repo_read_probeを monkeypatch しています。そこで捕捉している subprocess はcontrolled_github_readのgh api呼び出しであり、今回変える root auth argv ではありません。その結果、次の状態が起こり得ます。
Runtime Verification Applicability の修正
現在の
not_applicableは不適切です。これは外部 CLI subprocess の argv と、その exit status が workflow block に変換される経路を変更します。直前の Issue #2401 でも、同じ producer 境界についてdecision: immediate、かつ「fake external leaf CLI を使う hermetic pytest、live GitHub・credential 不要」と定義していました。次のようにするのが妥当です。
これはハーネス強化ではありません。既にある、今回の変更をちょうど観測できる一件のテストを更新して使うだけです。
P1-2:
--activeは GitHub CLI 2.57.0 以降という前提が抜けているGitHub CLI の公式マニュアルによれば、裸の
gh auth statusは既知の host/account を検査し、いずれかに問題があると非ゼロ終了します。--hostnameは host を、--activeは active account のみに検査対象を絞ります。公式実装でもopts.Activeの場合は active entry の検査後にcontinueし、inactive users のループへ入りません。したがって Issue #2404 の技術的な方向性は正しいです。(GitHub CLI)ただし
--activeは GitHub CLI 2.57.0 で追加されたフラグです。2.57.0 未満の
ghではこのフラグが存在しないため、該当環境では非ゼロ終了になります。現在の producer は subprocess の非ゼロをすべてPROBE_NONZERO_EXITとし、最終的にgithub:auth_unavailableとして workflow を block します。つまり「無関係な account による誤 block を減らす」変更が、古い CLI では「すべての workflow を block する」変更になります。個人趣味開発であることを考えると、ここで production に version parser、fallback argv、二段 probe、互換レイヤーを追加する必要はありません。必要なのは次だけです。
2.57.0以上なら、その結果を PR evidence に残してこの finding は解消。Issue の Notes または Preconditions に次を一行入れる程度で十分です。
P2-1: 「対象リポジトリの認証状態だけ」は正確ではない
現在の Goal は次の趣旨です。
しかし
gh auth status --active --hostname github.comが検査するのは、github.com の active account/token の認証状態です。リポジトリへの read capability は、その後の別 probe である次の呼び出しが確認します。したがって、Goal は次のようにした方が producer/consumer 境界を正確に表します。([GitHub CLI]1)
これは実装変更ではなく、将来「この auth probe 単独で repository access まで証明している」と誤解されないための契約修正です。
P2-2: Scope Collision Note を current main に合わせる
現在の記述には、少なくとも次の二点で drift があります。
#2401 は既に completed で、PR #2410 が main に exact-argv test を追加したため、実際には #2404 の Allowed Paths と Verification に影響しています。
推奨する置き換えは次です。
#420 / #205 を理由に作業を直列化したり、ファイル単位の排他ロックや新しい overlap harness を追加したりする必要はありません。
推奨する Issue 契約の最小修正版
Allowed Paths
fixture ファイルは追加しません。
Acceptance Criteria
Verification Commands
grepは補助確認として残しても構いませんが、Acceptance Criteria の証拠にはしない方がよいです。採用してよい設計判断
--active --hostname github.comの採用は正しい。github.com/squne121/loop-protocol固定である限り、host の環境変数化は不要。--jsonへ変更してはいけません。公式マニュアル上、JSON mode は認証不整合があっても原則 exit zero になるため、現在の exit-status probe の目的を損ないます。([GitHub CLI]1)最終判定
Issue #2404 の意図と production 変更案は approve です。
一方、現行 Issue 契約は current main に追随していないため、現状のままでは Implementation Ready ではありません。
マージ可能条件は次の三点です。
test_capability_preflight_review_fixes.pyを Allowed Paths に追加する。gh >= 2.57.0を確認し、コード上の追加互換ハーネスは作らない。なお、今回のテスト失敗判定はローカル pytest の実行結果ではなく、current-main にある exact expected list と変更後 argv の静的比較に基づきます。ただし比較対象が完全一致 assertion なので、該当テストが変更前のまま実行された場合に失敗する点は決定的です。
squne121 commentedon Aug 30, 2026
issue-refinement-loop 終了報告(approved)
OWNER の敵対的レビュー(issuecomment-5465608024)を Issue 契約へ反映しました。
反映内容
not_applicable→immediateに修正(hermetic pytest, fake gh leaf CLI で検証可能)scripts/claude-gpt/tests/test_capability_preflight_review_fixes.pyを追加gh>= 2.57.0 環境確認)を追加uv run --locked pytest中心へ置換(grep は補助確認のみ)docs/dev/runtime-verification-policy.mdを追加レビュー経緯(2 iteration)
needs-fix(Allowed Paths / RVA 不整合、Required Design References 不足を検出)→ 修正decision: immediateに runtime-verification タグ欠如、gh --versionが VC gh allowlist 外)を検出 → AC1/AC2 へ<!-- runtime-verification: true -->タグ付与、gh --versionに# preflight-scope: pr_review_onlyannotation 付与で解消VERDICT: approve(blocker 0)false(checker findings 0 件、cross-contract change なし)→ スキップrun_contract_review_once.py --mode static:status: go(AC1-AC3 の pytest 実行含め全 VC PASS、AC4 はpr_review_onlyとして pr-review-judge へ deferred)Final Gate: passed(
## Verification Commandsを実際に検証してstatus: goを取得)squne121 commentedon Aug 30, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Aug 30, 2026
implement-issue: 実装完了 (2026-08-30T00:15:10Z)
.claude/worktrees/issue-2404-gh-auth-active-hostnameworktree-issue-2404-gh-auth-active-hostnamegh --version2.98.0(要件 >= 2.57.0 満たす)squne121 commentedon Aug 30, 2026
impl-review-loop: 完了 (2026-08-30T00:26:00Z)
fix: github_repo_read_probe を github.com host に固定する (#2404)
squne121 commentedon Aug 30, 2026
impl-review-loop: 完了 (2026-08-30T01:05:00Z)
経緯: PR #2413 への OWNER REQUEST_CHANGES(
_github_repo_read_probehost-scope 漏れ)を受け、Issue #2404 を trusted anchor scope reframe(AC5 追加)→ fix_delta 実装(head ebe972a)→ PR 本文の Safety Claim Matrix 修正 → CI race(旧 workflow run の cancelled job 起因の stale failure)解消確認、を経て APPROVE。fix: root github auth probe を --active --hostname github.com に限定する (#…
squne121 commentedon Aug 30, 2026
post-merge-cleanup: 完了 (2026-08-30T01:20:00Z)