Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: >
Claude-GPT isolated HOME でも、bare preflight.run と repository evidence で
確定した exact workflow GitHub CLI consumer command が、launcher から渡された
GH_CONFIG_DIR を command-scoped に保持し、capability preflight と controlled
Issue transaction を config-only authentication で完了可能にする。
change_kind: workflow-runtimeParent Issue
none
Parent Goal Ref
- Goal: 実装: Claude-GPT workflow の actor-scoped capability handoff を導入し issue-refinement-loop の auth/delegation parity を安定化する #2340 が確立した Claude-GPT workflow の actor-scoped capability handoff と auth/delegation parity を、root capability preflight だけでなく実際の controlled GitHub consumer boundary まで維持する。
- Desired Destination: closed 実装: Claude-GPT workflow の actor-scoped capability handoff を導入し issue-refinement-loop の auth/delegation parity を安定化する #2340 の launcher-to-controlled-consumer credential parity を、finite で repository evidence により確定した command-id environment allowlist に限って維持する。
Current Validated Scope
scripts/agent-guards/skill_runtime_exec.py::_sanitize_env()で、caller-providedGH_CONFIG_DIRを次の exact command ID だけへ child environment として伝播できるようにする。preflight.runcontract_update.run.with_anchorcontract_update.run.with_human_contextrepair_action.applystructural_repair_action.apply
- default command と上記以外の全 command は
GH_CONFIG_DIRを strip し続ける。authority_transport.consumeは artifact-only mode と contract-update mode を同じ command ID で持つため、mode 非区別の carrier 許可をしない。 LOOP_SPARK_MODE、LOOP_SPARK_FALLBACK、LOOP_PLANNED_OPERATIONS_JSONは、従来どおり barepreflight.runだけに許可する。- actual-process isolated-HOME E2E で、root capability preflight と canonical human-context contract update の両方を検証する。後者は executor →
run_refinement_preflight.py→edit_issue_txn.py→ controlled mutation consumer の child boundary まで通し、test-ownedGH_CONFIG_DIRの presence/path identity、固定 fakeghの exact argv/order だけを観測する。
Remaining Parent Gaps
- GH token または HOME の global sharing、GitHub auth model の変更、plugin distribution は本 Issue では扱わない。
authority_transport.consumeの conditional mutation mode を command ID 単位で carrier 許可する判断は、本 Issue の inventory では unresolved としない。- 実装: agent-retrospective を optional plugin distribution として配布可能にする #2240 の optional plugin distribution scope は混在させない。
Background
- 実装: agent-retrospective を optional plugin distribution として配布可能にする #2240 の Claude-GPT isolated HOME 再現では、launcher は native
GH_CONFIG_DIRを渡す一方、productionpreflight.runの_sanitize_env()は渡さなかった。その結果、barepreflight.runからの GitHub auth/controlled read が model 開始前に失敗した。 - PR fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 の initial repair は
preflight.runだけを allowlist に追加した。current-head consumer trace で、contract_update.run.with_anchor、contract_update.run.with_human_context、repair_action.apply、structural_repair_action.applyも別 executor invocation からedit_issue_txn.pyと controlled GitHub read/PATCH/readback に到達することが確認された。 - downstream transaction helpers は受け取った
GH_CONFIG_DIRを credential carrier として保持するが、outer executor が strip 済みの値を復元できない。config-onlygh auth login環境では、entry preflight が成功した後に canonical controlled transaction が認証不能となる false-green が起こり得る。 - Operator の owner semantic judgment(2026-08-30)により、この consumer-parity finding を 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 の controlled reframe として許可する。prefix match、全 mutation command、全 human-context command、global propagation は許可しない。
Outcome
Updated skill_runtime_exec.py and focused tests preserve only the caller-provided GH_CONFIG_DIR path for the finite, evidence-backed workflow GitHub CLI consumer command set under an isolated HOME. Deterministic tests prove all non-members still strip it, LOOP_* remains bare-preflight-only, and no credential value, configuration content, or HOME absolute path is persisted.
Runtime Verification Applicability
decision: immediate
reason: The defect crosses real executor and subprocess boundaries and is only reproduced under an isolated HOME with config-only GitHub CLI authentication.
applicable_acs: AC3
execution_environment: Isolated temporary HOME plus a test-owned empty GH_CONFIG_DIR and controlled fake GitHub boundaries; GH_TOKEN, GITHUB_TOKEN, GH_ENTERPRISE_TOKEN, and GITHUB_ENTERPRISE_TOKEN are absent; no live GitHub mutation.
skip_conditions: The runtime VC returns exit 77 when its isolated fixture/process environment cannot be constructed.
fallback_policy: A result that reaches a controlled transaction without the required path-identity marker, or that uses token/HOME global sharing, is FAIL.
artifact_requirements: PR evidence records only PASS/FAIL/SKIP, command identity, opaque path-identity/presence match, fixed argv, and order assertions; it must not retain token values, HOME absolute paths, or GitHub config contents.In Scope
- Add
GH_CONFIG_DIRto_sanitize_env()only for the exact five command IDs listed in Current Validated Scope. - Keep the
LOOP_*capability-request allowlist exclusive topreflight.run. - Add or update focused command-matrix tests for the exact members, non-members, and unset/empty behavior.
- Extend the existing actual-process contract-update coverage to prove a test-owned
GH_CONFIG_DIRreaches the controlled GitHub CLI consumer without token fallback, config reads, network, or live mutation. - Tighten the existing root capability fake
ghto reject unexpected complete argv while preserving current production argv semantics. - Keep runtime evidence and fixtures secret-free; do not persist credential values or configuration contents.
Out of Scope
- Changes to
scripts/claude-gpt/launch.sh, GitHub authentication model, root GitHub probe host/account semantics, or controlled GitHub mutation behavior. - Global
GH_CONFIG_DIR,HOME,GH_TOKEN, orGITHUB_TOKENpropagation. - Prefix-based allowlists, all mutation-command allowlists, all human-context-command allowlists, and
authority_transport.consumemode-independent carrier propagation. - New command IDs, command-registry semantic changes, a live GitHub API verification, plugin distribution, release/source archive work, or a generic test harness.
- 実装: agent-retrospective を optional plugin distribution として配布可能にする #2240 plugin distribution work and 実装: gemini route の gh_commands 実行に環境変数 scrub / GH_CONFIG_DIR isolation / streaming byte cap / process-group kill を追加する #2002 Gemini
gh_commandsisolation.
Acceptance Criteria
- AC1:
_sanitize_env()retains the caller-providedGH_CONFIG_DIRpath identity only forpreflight.run,contract_update.run.with_anchor,contract_update.run.with_human_context,repair_action.apply, andstructural_repair_action.apply; it does not read or expose configuration contents. - AC2: Default commands and every command ID outside that finite set, including all preflight siblings and
authority_transport.consume, omitGH_CONFIG_DIR; unset/empty values are not synthesized; no token value or HOME sharing is introduced;LOOP_*remains bare-preflight.runonly. - AC3: Actual-process isolated-HOME E2E covers both executor →
workflow_start_entry→root_entry_router→ root capability probe and executor →contract_update.run.with_human_context→run_refinement_preflight.py→edit_issue_txn.py→ controlled mutation consumer. It observes onlyGH_CONFIG_DIRpresence/path identity, exact fake-ghargv, and ordering; it requires no token, configuration content, network, or live GitHub mutation. - AC4: Focused regression suites pass without live GitHub access or mutation and without SKIP/exit 77.
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/issue-refinement-loop/scripts/tests/test_skill_runtime_exec_env_allowlist.py# AC2
$ uv run --locked pytest scripts/agent-guards/tests/test_trusted_toolchain_isolated_home.py -k sanitize_env# AC2
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.py::test_fixture_human_context_real_subprocess_reaches_contract_update_required_ac3# AC3
$ uv run --locked pytest .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry_canonical_executor.py# AC3
$ uv run --locked pytest scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py -k contract_update_phase# AC4
$ uv run --locked pytest scripts/agent-guards/tests/test_isolated_anchor_single_authority.pyAllowed Paths
scripts/agent-guards/skill_runtime_exec.pyscripts/agent-guards/tests/.claude/skills/issue-refinement-loop/scripts/tests/.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合。ただし、この Issue で owner authorization 済みの exact P0 process-test path は controlled reframe により先に Allowed Paths へ追加してから扱う。
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合。
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)。ただし P1 host/account probe は 実装: root GitHub auth probe を対象host限定(--active --hostname github.com)に変更する #2404/fix: root github auth probe を --active --hostname github.com に限定する #2413 の独立 owner を優先し、本 Issue の completion blocker としない。
- 後続 Phase / 別スコープへの波及が判明した場合。
- nested SubAgent delegation が必要になった場合。
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合。
- A required GitHub CLI consumer cannot be classified from an executor → actual child → consumer trace.
- A newly discovered command ID outside the finite inventory requires
GH_CONFIG_DIR, or a listed conditional command requires mode-specific propagation that command-ID policy cannot express. - secret / credential value または GitHub configuration content の取得・表示・保存が必要になった場合。
- destructive operation、live GitHub mutation、または remote mutation outcome が不明な再試行が必要になった場合。
- active parallel work が同一 logic に対して意味的に相反し、安全に reconcile できない場合。
- 動作検証 AC の VC が SKIP(exit 77)を返した場合、または fallback 経由でのみ成功する場合。
- repository canonical workflow が、この owner authorization とは別の genuine semantic owner judgment を要求する場合。
Required Skills
- Python
- pytest subprocess fixtures
Required Design References
docs/dev/runtime-verification-policy.mddocs/dev/secret-policy.mddocs/dev/agent-runtime-ops.md
Scope Delta(任意)
- Current-head P0 consumer inventory established that the initial bare-only repair permits root capability preflight while stripping the same caller-provided config-only credential carrier from four separately invoked controlled GitHub consumer commands. Under the 2026-08-30 operator owner authorization, this is a controlled reframe of 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403’s credential-parity goal, not a global propagation policy.
- The finite set is limited to actual consumer traces.
preflight.run.with_human_contextuses credentialless reads;authority_transport.consumehas unresolved mixed modes; all other candidates remain stripped. Functional distribution ownership, producer artifact scope, and wrapper scope remain unchanged.
Delivery Rule
1 Issue = 1 PR. Continue existing PR #2407 and its existing worktree/branch; do not open a second PR for #2403. Coordinate line-level edits with open #2393 and open PR #2409 before push. #2393’s future contract-update runtime migration and #2409’s retired launch-ledger removal do not change this finite carrier policy and are not dependencies.
Source
- Follow-up source: closed 実装: Claude-GPT workflow の actor-scoped capability handoff を導入し issue-refinement-loop の auth/delegation parity を安定化する #2340; reproduction: open 実装: agent-retrospective を optional plugin distribution として配布可能にする #2240; P0 context: PR fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 OWNER comment 5465605053.
- dedupe_key:
follow-up:squne121/loop-protocol:issue-2340:workflow-github-consumer-gh-config-dir-propagation - Current-head inventory was completed before this reframe; it traced
_sanitize_env, the executor child boundary, command registry, canonical procedures,run_refinement_preflight.py,edit_issue_txn.py, and controlled mutation execution.
Scope Overlap Note
- Scope Collision (C1): 実装: Migrate contract_update control-plane mutation profiles to the dedicated runtime worktree #2393 may later migrate contract-update execution location, but does not change its credential-consumer requirement. Preserve this finite carrier set during that migration.
- 実装: structural_repair_action.apply を root skill runtime executor へ配線する #2402’s structural-repair dispatcher is already merged. The
structural_repair_action.applyentry is included only because its actual child reuses the same controlled transaction core; this Issue does not modify structural-repair semantics. - 実装: root GitHub auth probe を対象host限定(--active --hostname github.com)に変更する #2404/fix: root github auth probe を --active --hostname github.com に限定する #2413 own root GitHub probe host/account scoping; no root producer argv semantics are changed here.
Notes for Reviewer
- The E2E assertions may inspect only presence/path identity, exact fixed argv, and ordering. They must not print, serialize, retain, or compare token values, HOME absolute paths, or GitHub configuration content.
- The fake
ghmust reject unexpected argv. Its PATCH behavior is local fixture-only; no live GitHub mutation is permitted. - Plugin installation, distribution artifact, GitHub generated source archive, release asset, SBOM, signing, attestation, and OS matrix concerns are non-applicable to this runtime environment propagation Issue.
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Activity
squne121 commentedon Aug 29, 2026
Issue #2403 敵対的レビュー
総合判定:REVISE
問題設定そのものには実装価値がありますが、現状のまま着手すると「内部の構造検査は通るが、実際に配布・導入された環境では機能しない」状態を完成条件として認める危険があります。
最大の問題は、セキュリティ不足ではありません。次の三点です。
生成側の検証と、実際の消費側の動作確認が分離されている
関連Issue・既存契約との所有権と優先順位が曖昧
リポジトリ内資産、GitHubの自動生成source archive、明示的なrelease asset、Claude Codeのplugin導入物が同じものとして扱われかねない
したがって、重いハーネスを増やすのではなく、利用者が実際に使う配布物を隔離環境へ導入し、本物のconsumerを一度起動する薄いスモークテストを完成条件に加えるべきです。Issue本文・コメント・timeline・明示参照された関連Issue/PRとリポジトリ資産を対象に照合しました。
1. P0:producerの成功を確認しても、consumerの成功は証明できない
Issueの完成条件は、生成されたファイル、メタデータ、セクション、ガード出力などの存在・形状へ寄りすぎています。
しかし、実際に壊れやすいのはその後です。
配布物にはファイルが入っているが、consumerが別の場所を読む
リポジトリルートでは解決できる相対パスが、plugin導入後には解決できない
新しい契約を書き出すproducerと、旧契約を優先するconsumerが混在する
source checkout上のテストだけ通り、release assetには必要資産が含まれない
導入済みpluginのキャッシュやplugin rootを考慮していない
Claude Codeのpluginでは、plugin manifest、marketplace定義、plugin rootを基準とするコンポーネント配置が導入時の契約になります。したがって、リポジトリ内でファイルを直接読めることは、導入後の動作保証にはなりません。(Claude)-end確認を追加します。
新しい汎用ハーネスは不要です。既存テストの隣に、配布物を対象とする一本のスモークテストを置けば十分です。
2. P0:どの配布物を保証するIssueなのか固定されていない
少なくとも次は別物です。
Git checkout
GitHubが自動生成するZIP/tarball
workflow artifact
GitHub Releaseへ明示的に添付するasset
Claude Code marketplaceから取得・展開されるplugin
開発用のローカルplugin参照
GitHub Releaseには追加assetを添付できますが、GitHubはそれとは別にタグからsource archiveを自動生成します。この二つを区別しなければ、「テストしたもの」と「利用者がダウンロードしたもの」が異なる状態になります。(GitHub Docs)査する
2. 利用者はRelease画面の自動生成source archiveを取得する
3. 自動生成archiveには、生成工程で追加される資産が存在しない
4. CIはgreenだが、利用者の導入は失敗する
最小修正
Issue本文に次を明記してください。
GitHub autogenerated source archives are not installation artifacts.source archive自体を正式配布物にするなら、生成工程に依存する資産を要求してはいけません。
3. P0:関連Issueとのownershipとprecedenceが不十分
今回の契約を追加するだけでは、既存のproducer、consumer、preflight、repair action、document contractのどれが権威を持つか決まりません。
特に危険なのは、次のような二重SSOTです。
この状態では、正しく生成された入力を渡しても、古いconsumerが無視したり、別のrequired section不足として人間判断へ戻したりします。ガードを追加しても解決せず、むしろ「どのガードが正しいか」という新しい問題が増えます。
最小修正
Issue本文に次の表を追加してください。
セキュリティ上の一般論ではなく、誤ったrepository mutationや契約更新を防ぐ場合だけ停止させるのが妥当です。
5. P1:Acceptance Criteriaが内部表現に寄りすぎると変更コストが高い
固定文字列、巨大snapshot、ファイル行数、特定の内部関数呼び出しなどを完成条件にすると、利用者の挙動を変えていないリファクタリングでもテストが壊れます。
重視すべきなのは次です。
正式な配布物が作れる
正式な方法で導入できる
実consumerが読める
代表的な利用経路が成功する
壊れた入力では部分更新を残さない
エラーから人間が復旧できる
manifestやJSONの構造検査は一本あってよいですが、それを主たる成功条件にしない方がよいです。
6. P2:新しい恒久ハーネスを増やす費用対効果が低い
今回必要なのは、以下だけです。
既存unit/contract test
配布物のファイル一覧検査
一時ディレクトリへの導入
実consumerを一度動かすsmoke test
必須ファイル一つを欠損させるfailure test
以下は現段階では後回しで構いません。
全OSの互換性マトリクス
全旧バージョンとの組み合わせ検証
property-based testの大量追加
新しいglobal preflight framework
署名・SBOM・attestation
すべてのエラー文面を固定するsnapshot
任意ファイルの欠損パターン総当たり
公開範囲が広がり、第三者が不特定のartifactを取得する段階になってから、署名などを再検討すれば十分です。
Issue本文へ入れるAcceptance Criteria案
代表的なhappy-path一件が、期待するobservable resultを生成する。
expected exit code:
expected output/artifact:
expected repository mutation:
必須資産を一つ欠損させた場合は、部分更新を残さず、単一の診断と復旧方法を返す。
同じ配布物を二度導入しても、設定や登録が重複しない。
既存テストと上記smoke testが成功する。
このIssueのためだけの新しいglobal guard、別SSOT、恒久的なpreflight layerは追加しない。
- Issue #2403 敵対的レビュー全文
- 安全な検証コマンドの実行ログ
# Issue #2403 敵対的レビューレビューと調査証跡一式総合判定:REVISE
問題設定そのものには実装価値がありますが、現状のまま着手すると「内部の構造検査は通るが、実際に配布・導入された環境では機能しない」状態を完成条件として認める危険があります。
最大の問題は、セキュリティ不足ではありません。次の三点です。
したがって、重いハーネスを増やすのではなく、利用者が実際に使う配布物を隔離環境へ導入し、本物のconsumerを一度起動する薄いスモークテストを完成条件に加えるべきです。Issue本文・コメント・timeline・明示参照された関連Issue/PRとリポジトリ資産を対象に照合しました。
1. P0:producerの成功を確認しても、consumerの成功は証明できない
Issueの完成条件は、生成されたファイル、メタデータ、セクション、ガード出力などの存在・形状へ寄りすぎています。
しかし、実際に壊れやすいのはその後です。
Claude Codeのpluginでは、plugin manifest、marketplace定義、plugin rootを基準とするコンポーネント配置が導入時の契約になります。したがって、リポジトリ内でファイルを直接読めることは、導入後の動作保証にはなりません。([Claude]1)-end確認を追加します。
新しい汎用ハーネスは不要です。既存テストの隣に、配布物を対象とする一本のスモークテストを置けば十分です。
2. P0:どの配布物を保証するIssueなのか固定されていない
少なくとも次は別物です。
GitHub Releaseには追加assetを添付できますが、GitHubはそれとは別にタグからsource archiveを自動生成します。この二つを区別しなければ、「テストしたもの」と「利用者がダウンロードしたもの」が異なる状態になります。([GitHub Docs]2)査する
2. 利用者はRelease画面の自動生成source archiveを取得する
3. 自動生成archiveには、生成工程で追加される資産が存在しない
4. CIはgreenだが、利用者の導入は失敗する
最小修正
Issue本文に次を明記してください。
source archive自体を正式配布物にするなら、生成工程に依存する資産を要求してはいけません。
3. P0:関連Issueとのownershipとprecedenceが不十分
今回の契約を追加するだけでは、既存のproducer、consumer、preflight、repair action、document contractのどれが権威を持つか決まりません。
特に危険なのは、次のような二重SSOTです。
この状態では、正しく生成された入力を渡しても、古いconsumerが無視したり、別のrequired section不足として人間判断へ戻したりします。ガードを追加しても解決せず、むしろ「どのガードが正しいか」という新しい問題が増えます。
最小修正
Issue本文に次の表を追加してください。
「関連Issueを参照する」だけでは不足です。どのIssueがどの契約を所有し、#2403が何を所有しないかまで書く必要があります。
4. P1:失敗時の分類と復旧方法が完成条件に入っていない
すべてをfail-closedにすると、個人開発では日常的な実行を止めるだけのガードになりやすいです。一方、必須資産が壊れているのに無言で継続すると誤った書き込みを行います。
少なくとも次を分類すべきです。
セキュリティ上の一般論ではなく、誤ったrepository mutationや契約更新を防ぐ場合だけ停止させるのが妥当です。
5. P1:Acceptance Criteriaが内部表現に寄りすぎると変更コストが高い
固定文字列、巨大snapshot、ファイル行数、特定の内部関数呼び出しなどを完成条件にすると、利用者の挙動を変えていないリファクタリングでもテストが壊れます。
重視すべきなのは次です。
manifestやJSONの構造検査は一本あってよいですが、それを主たる成功条件にしない方がよいです。
6. P2:新しい恒久ハーネスを増やす費用対効果が低い
今回必要なのは、以下だけです。
以下は現段階では後回しで構いません。
公開範囲が広がり、第三者が不特定のartifactを取得する段階になってから、署名などを再検討すれば十分です。
Issue本文へ入れるAcceptance Criteria案
生成された配布物には、consumerが必要とする資産が含まれる。
配布物には次が含まれない。
..による展開先外参照空の一時環境へ、READMEに記載した正式手順だけで導入できる。
リポジトリルートをcurrent directoryにせず、実consumerを起動できる。
代表的なhappy-path一件が、期待するobservable resultを生成する。
必須資産を一つ欠損させた場合は、部分更新を残さず、単一の診断と復旧方法を返す。
同じ配布物を二度導入しても、設定や登録が重複しない。
既存テストと上記smoke testが成功する。
このIssueのためだけの新しいglobal guard、別SSOT、恒久的なpreflight layerは追加しない。
squne121 commentedon Aug 29, 2026
推奨は、#2403 をいきなりアンカーコメントの内容へ全面 reframe せず、まず controlled reframe で指摘の適用可否を再検証し、その後そのまま実装まで進めることです。
アンカーコメントは
REVISEですが、主張のかなりの部分が「正式配布 artifact」「GitHub source archive」「Claude Code plugin 導入」「producer / consumer の配布契約」に寄っています。 一方、現在の #2403 はskill_runtime_exec.py::_sanitize_env()における barepreflight.runだけのGH_CONFIG_DIRcommand-scoped propagation が本体で、AC3 には isolated HOME で executor →workflow_start_entry→root_entry_router→workflow_capability_preflightを actual process で通す検証まで既に入っています。また、GitHub CLI の公式仕様でも
GH_CONFIG_DIRはghが設定ファイルを置き、参照するディレクトリを指定する環境変数です。したがって isolated HOME でこのパスだけを command-scoped に維持する、という #2403 の問題設定自体は筋が通っています。(GitHub CLI)特にアンカーコメントの plugin 配布論は #2240 がまさに所有しており、#2240 では
plugins/agent-retrospective/、${CLAUDE_PLUGIN_ROOT}、claude --plugin-dir、clean-install smoke まで明示されています。これを #2403 へ持ち込むのは ownership の改善ではなく scope 混入になる可能性が高いです。並行作業についても、#2403 本文の現在の整理の方が妥当です。#2402 は同じ
skill_runtime_exec.pyを触りますが、編集意図は structural repair dispatch です。 #2393 も同ファイルを触るものの contract-update dedicated runtime migration で、しかも #2199 待ちを明示しています。 したがって 「同じファイルだから実装禁止」ではなく、同じ関数・同じ分岐・相反する意味変更が発生しているかを確認するべきです。私なら次の判定で進めます。
項目 | 推奨 -- | -- plugin / release asset / source archive 対応 | Reject as non-applicable。#2240 側の責務 consumer まで実動確認せよ | 趣旨のみ採用。ただし #2403 AC3 の actual-process E2E で満たす。plugin install smoke には拡張しない producer / consumer SSOT 表追加 | 原則不要。この Issue は配布フォーマットを生成しない #2402 / #2393 との競合 | 実装前に semantic / line-level conflict を確認。ファイル一致だけでは停止しない #2403 実装 | controlled reframe 後、契約が implementation-ready ならそのまま実施 PR | dedicated worktree、Closes #2403、Draft PR、レビュー修正まで。merge はしないClaude-GPT には、アンカーコメントを「OWNER だから無条件に正しい」と扱わせず、repository evidence による claim-by-claim validation を先にやらせるのが重要です。
#2403 (comment)
を起点に、Issue #2403 の controlled reframe → 必要なら実装 → テスト → Draft PR → レビュー修正まで進めてください。
人間承認は通常の調査・refinement・実装・テスト・コミット・Draft PR 作成・レビュー修正には不要です。
merge は行わず、merge-ready の直前で停止してください。
重要:
アンカーコメントは OWNER の敵対的レビューですが、その内容を無条件に Issue contract へ転記しないでください。
Issue #2403 の実スコープ、関連 Issue / PR、現在の main の実装、既存テストを照合し、各 finding を independently verified / partially applicable / non-applicable / superseded に分類してから controlled reframe してください。
特に、アンカーコメントには Claude Code plugin distribution、GitHub autogenerated source archive、release asset、正式配布 artifact、plugin install smoke 等の論点があります。
これらが本当に #2403 の goal / outcome / consumer boundary に属するのかを検証してください。
#2240 等の別 Issue が所有している distribution scope を #2403 に混在させないでください。
#2403 の現在の中心契約は以下です。
scripts/agent-guards/skill_runtime_exec.py::_sanitize_env()caller-provided
GH_CONFIG_DIRを command idpreflight.runのときだけ child environment に保持するbare
preflight.run以外の default / sibling command では引き続き strip するGH_TOKEN/GITHUB_TOKEN/ HOME の global sharing を導入しないconfiguration content や token value をログ・artifact に保存しない
isolated HOME で actual-process E2E を行い、
executor
→
workflow_start_entry→
root_entry_router→
workflow_capability_preflightを通して、model start 前に GitHub probe availability を確認する
観測するのは
GH_CONFIG_DIRの presence / path identity と capability outcome のみlive credential や live GitHub mutation は要求しない
GitHub CLI の
GH_CONFIG_DIRは gh の configuration directory を指定する環境変数であるため、この command-scoped propagation 自体を plugin distribution 問題へ拡張しないでください。最初に SubAgent を fan-out してください。
最低でも以下の独立 SubAgent を起動してください。
A. anchor-review-validator
実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 本文と anchor comment を claim-by-claim で比較する
実装: Claude-GPT workflow の actor-scoped capability handoff を導入し issue-refinement-loop の auth/delegation parity を安定化する #2340、実装: agent-retrospective を optional plugin distribution として配布可能にする #2240、必要な関連 Issue / PR を確認する
アンカーコメントの distribution / producer-consumer / smoke-test 指摘が 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 に本当に適用可能か検証する
適用不能な指摘を明示する
mutation は行わない
B. runtime-boundary-investigator
current main の
scripts/agent-guards/skill_runtime_exec.py_sanitize_env()preflight.runworkflow_start_entryroot_entry_routerworkflow_capability_preflightと関連テストを読む
GH_CONFIG_DIR がどこで失われ、どの subprocess boundary まで渡す必要があるかを確認する
現在の 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 AC3 が genuine consumer-equivalent / actual-process verification になっているか確認する
最小 implementation delta を提示する
mutation は行わない
C. overlap-concurrency-auditor
実装: structural_repair_action.apply を root skill runtime executor へ配線する #2402、実装: Migrate contract_update control-plane mutation profiles to the dedicated runtime worktree #2393、実装: control-plane preflight を dedicated linked worktree の identity probe と command class 分離で 4 production profile へ移行する #2199、および現在の open PR / local worktree / branch を確認する
skill_runtime_exec.pyが共有されていることだけを理由に conflict と判定しない同じ関数・同じ分岐・同じ semantic behavior に対して相反する変更を行う場合だけ実 conflict とする
実装: structural_repair_action.apply を root skill runtime executor へ配線する #2402 の structural repair wiring と 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 の
_sanitize_env()GH_CONFIG_DIR allowlist が line-level / semantic に独立なら並行可能と判定する実装: Migrate contract_update control-plane mutation profiles to the dedicated runtime worktree #2393 についても実際の active work と edit intent を確認する
mutation は行わない
必要なら追加 SubAgent を使って構いません。
重要:
全 SubAgent を起動した後、必ず terminal completion まで待ってください。
一部の SubAgent が未完了の状態で refinement / implementation の最終判断をしないでください。
SubAgent に nested SubAgent delegation はさせないでください。
SubAgent 全完了後に結果を統合してください。
anchor comment の各 finding を少なくとも以下に分類してください。
verified_and_applicable
partially_applicable
non_applicable
already_satisfied
contradicted_by_repository_evidence
特に以下を明示判定してください。
「正式配布 artifact を一つに固定すべき」
「GitHub autogenerated source archive を supported / unsupported と明記すべき」
「Claude Code plugin を一時 HOME に install する smoke test が必要」
「producer / consumer / distribution / migration ownership table が必要」
「actual consumer まで検証すべき」
distribution / plugin 論点が #2240 等の別 scope であり #2403 に producer artifact 自体が存在しないなら、non_applicable として拒否してください。
レビューコメントだからという理由だけで In Scope / AC / Allowed Paths を膨張させないでください。
一方、「内部 shape test だけでなく実 subprocess boundary を通すべき」という一般論が #2403 に適用できる場合は、現在の AC3 actual-process isolated-HOME E2E が既に満たしているかを確認し、不足がある場合だけ最小 delta を提案してください。
Issue 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 に対して issue-refinement-loop を実行してください。
anchor human context:
#2403 (comment)
canonical main root / default branch 等、skill が要求する preflight 条件を満たして実行してください。
controlled reframe の原則:
repository evidence を優先する
anchor の意図を尊重するが、技術的に別 Issue の scope である finding は取り込まない
実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 の goal を plugin distribution 問題へ変更しない
preflight.run以外へ GH_CONFIG_DIR propagation を広げないlive credential / token / configuration content を要求しない
HOME global sharing を導入しない
新しい global guard / generic preflight framework を作らない
必要なら Issue 本文へ「distribution artifact applicability: N/A。本 Issue は runtime environment propagation であり配布 artifact を生成しない」程度の最小 clarification を加えてよい
既存 AC3 で十分なら不要な AC 追加をしない
refinement mutation を行った場合は、必ず fresh preflight を再実行し、最新 Issue contract を source of truth としてください。
fresh preflight が typed structural repair / operator intervention / genuine human semantic judgment を要求した場合は、その taxonomy に従ってください。
ただし、単なる同一ファイル編集、並行 worktree の存在、一般的な merge conflict の可能性だけを implementation prohibition にしないでください。
controlled reframe 後、Issue が implementation-ready なら 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 を実装してください。
専用 worktree / branch を使用してください。
実装前に main と active worktree / PR の最新状態を再確認してください。
#2402 / #2393 と同一ファイルを触っていても、edit intent が独立しているなら進めて構いません。
実際に同一 logic へ相反する変更が存在する場合だけ、その conflict を解消してから進めてください。
実装は最小差分にしてください。
期待する中心 delta:
_sanitize_env()が command idpreflight.runの場合だけ caller のGH_CONFIG_DIRを child env へ保持caller に
GH_CONFIG_DIRが存在しない場合に値を生成しないdefault / sibling commands では strip を維持
GH_TOKENGITHUB_TOKENHOME
等の propagation を新規に許可しない
config contents / credential values を読んだり evidence に保存したりしない
「preflight.run.with_anchor」「preflight.run.with_human_context」等へ自動的に allowlist を拡張しないでください。
Issue contract が明示的に bare
preflight.runのみを所有している限り、その exact scope を維持してください。テストしてください。
Issue #2403 の Verification Commands を source of truth とし、少なくとも以下を実行してください。
uv run --locked pytest scripts/agent-guards/tests/test_trusted_toolchain_isolated_home.py -k sanitize_envuv run --locked pytest .claude/skills/issue-refinement-loop/scripts/tests/test_skill_runtime_exec_env_allowlist.pyuv run --locked pytest .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry_canonical_executor.pyuv run --locked pytest scripts/agent-guards/tests/test_isolated_anchor_single_authority.pyAC3 は test double の内部関数呼び出しだけではなく、Issue が指定する actual-process boundary を通していることを確認してください。
isolated fixture が作れず exit 77 / SKIP になる場合は PASS に変換しないでください。
runtime evidence には次を保存しないでください。
token value
GitHub config contents
credential contents
HOME absolute path
必要なのは PASS / FAIL / SKIP、command identity、redacted な path presence / identity 程度です。
回帰を確認してください。
変更対象周辺の focused regression を実行してください。
新しい broad harness や全 OS matrix は作らないでください。
既存テストで十分なものを新しい恒久 framework へ置換しないでください。
Draft PR を作成してください。
1 Issue = 1 PR
Closes #2403Draft PR
Summary
implementation delta
anchor review finding disposition
実装: structural_repair_action.apply を root skill runtime executor へ配線する #2402 / 実装: Migrate contract_update control-plane mutation profiles to the dedicated runtime worktree #2393 overlap check 結果
Verification Commands と実測結果
Runtime Verification Evidence
secret-free であること
を記載してください。
アンカーコメントのうち rejected / non-applicable とした finding についても、PR 本文に簡潔に理由を残してください。
特に plugin distribution / release asset / autogenerated source archive を #2403 に取り込まなかった場合は、「#2403 does not produce or distribute such an artifact; #2240 owns plugin distribution」のように scope authority を明記してください。
PR 作成後は impl-review-loop または repository の canonical review workflow を使用してください。
レビューは現行 PR head に対して実施してください。
REQUEST_CHANGES があれば verified finding だけを fix delta として実装し、再テストしてください。
レビューコメントが別 Issue の scope を混入させている場合は再び repository evidence で採否判定してください。
全 review SubAgent / reviewer invocation の完了を待ってから次 iteration に進んでください。
merge はしないでください。
最終的に以下を報告して停止してください。
final Issue contract / reframe の有無
anchor finding の採否
implementation summary
changed files
verification result
runtime verification result
overlap / concurrency judgment
Draft PR URL
PR head SHA
unresolved review findings
merge-ready か否か
停止条件は以下に限定してください。
destructive operation が必要
secret / credential value の取得・表示・保存が必要
Issue の Allowed Paths 外変更が本質的に必要
fixed schema / contract の変更が不可避
live GitHub mutation を runtime verification として必要とする
preflight.run以外にも GH_CONFIG_DIR を許可しないと goal を達成できないことが repository evidence で判明同一 logic に対して active parallel work が意味的に相反し、安全に reconcile できない
repository の canonical workflow が genuine semantic owner judgment を要求する
単なる「同じファイルを別 Issue も編集する」「別 worktree が存在する」「将来 merge conflict の可能性がある」は停止条件ではありません。
このプロンプトは、レビューの妥当性検証 → controlled reframe → 実装 → review loop を一続きにしています。特に今回は、アンカーコメントの誤った scope 拡張をそのまま Issue に取り込まないことを強く固定しています。
推奨は、**#2403 をいきなりアンカーコメントの内容へ全面 reframe せず、まず controlled reframe で指摘の適用可否を再検証し、その後そのまま実装まで進める**ことです。アンカーコメントは
REVISEですが、主張のかなりの部分が「正式配布 artifact」「GitHub source archive」「Claude Code plugin 導入」「producer / consumer の配布契約」に寄っています。 一方、現在の #2403 はskill_runtime_exec.py::_sanitize_env()における barepreflight.runだけのGH_CONFIG_DIRcommand-scoped propagation が本体で、AC3 には isolated HOME で executor →workflow_start_entry→root_entry_router→workflow_capability_preflightを actual process で通す検証まで既に入っています。また、GitHub CLI の公式仕様でも
GH_CONFIG_DIRはghが設定ファイルを置き、参照するディレクトリを指定する環境変数です。したがって isolated HOME でこのパスだけを command-scoped に維持する、という #2403 の問題設定自体は筋が通っています。([GitHub CLI]1)特にアンカーコメントの plugin 配布論は #2240 がまさに所有しており、#2240 では
plugins/agent-retrospective/、${CLAUDE_PLUGIN_ROOT}、claude --plugin-dir、clean-install smoke まで明示されています。これを #2403 へ持ち込むのは ownership の改善ではなく scope 混入になる可能性が高いです。並行作業についても、#2403 本文の現在の整理の方が妥当です。#2402 は同じ
skill_runtime_exec.pyを触りますが、編集意図は structural repair dispatch です。 #2393 も同ファイルを触るものの contract-update dedicated runtime migration で、しかも #2199 待ちを明示しています。 したがって 「同じファイルだから実装禁止」ではなく、同じ関数・同じ分岐・相反する意味変更が発生しているかを確認するべきです。私なら次の判定で進めます。
Closes #2403、Draft PR、レビュー修正まで。merge はしないClaude-GPT には、アンカーコメントを「OWNER だから無条件に正しい」と扱わせず、repository evidence による claim-by-claim validation を先にやらせるのが重要です。
#2403 (comment)
を起点に、Issue #2403 の controlled reframe → 必要なら実装 → テスト → Draft PR → レビュー修正まで進めてください。
人間承認は通常の調査・refinement・実装・テスト・コミット・Draft PR 作成・レビュー修正には不要です。
merge は行わず、merge-ready の直前で停止してください。
重要:
アンカーコメントは OWNER の敵対的レビューですが、その内容を無条件に Issue contract へ転記しないでください。
Issue #2403 の実スコープ、関連 Issue / PR、現在の main の実装、既存テストを照合し、各 finding を independently verified / partially applicable / non-applicable / superseded に分類してから controlled reframe してください。
特に、アンカーコメントには Claude Code plugin distribution、GitHub autogenerated source archive、release asset、正式配布 artifact、plugin install smoke 等の論点があります。
これらが本当に #2403 の goal / outcome / consumer boundary に属するのかを検証してください。
#2240 等の別 Issue が所有している distribution scope を #2403 に混在させないでください。
#2403 の現在の中心契約は以下です。
scripts/agent-guards/skill_runtime_exec.py::_sanitize_env()GH_CONFIG_DIRを command idpreflight.runのときだけ child environment に保持するpreflight.run以外の default / sibling command では引き続き strip するGH_TOKEN/GITHUB_TOKEN/ HOME の global sharing を導入しないexecutor
→
workflow_start_entry→
root_entry_router→
workflow_capability_preflightを通して、model start 前に GitHub probe availability を確認する
GH_CONFIG_DIRの presence / path identity と capability outcome のみGitHub CLI の
GH_CONFIG_DIRは gh の configuration directory を指定する環境変数であるため、この command-scoped propagation 自体を plugin distribution 問題へ拡張しないでください。最低でも以下の独立 SubAgent を起動してください。
A. anchor-review-validator
B. runtime-boundary-investigator
scripts/agent-guards/skill_runtime_exec.py_sanitize_env()preflight.runworkflow_start_entryroot_entry_routerworkflow_capability_preflightと関連テストを読む
C. overlap-concurrency-auditor
skill_runtime_exec.pyが共有されていることだけを理由に conflict と判定しない_sanitize_env()GH_CONFIG_DIR allowlist が line-level / semantic に独立なら並行可能と判定する必要なら追加 SubAgent を使って構いません。
重要:
全 SubAgent を起動した後、必ず terminal completion まで待ってください。
一部の SubAgent が未完了の状態で refinement / implementation の最終判断をしないでください。
SubAgent に nested SubAgent delegation はさせないでください。
anchor comment の各 finding を少なくとも以下に分類してください。
特に以下を明示判定してください。
distribution / plugin 論点が #2240 等の別 scope であり #2403 に producer artifact 自体が存在しないなら、non_applicable として拒否してください。
レビューコメントだからという理由だけで In Scope / AC / Allowed Paths を膨張させないでください。
一方、「内部 shape test だけでなく実 subprocess boundary を通すべき」という一般論が #2403 に適用できる場合は、現在の AC3 actual-process isolated-HOME E2E が既に満たしているかを確認し、不足がある場合だけ最小 delta を提案してください。
anchor human context:
#2403 (comment)
canonical main root / default branch 等、skill が要求する preflight 条件を満たして実行してください。
controlled reframe の原則:
preflight.run以外へ GH_CONFIG_DIR propagation を広げないrefinement mutation を行った場合は、必ず fresh preflight を再実行し、最新 Issue contract を source of truth としてください。
fresh preflight が typed structural repair / operator intervention / genuine human semantic judgment を要求した場合は、その taxonomy に従ってください。
ただし、単なる同一ファイル編集、並行 worktree の存在、一般的な merge conflict の可能性だけを implementation prohibition にしないでください。
専用 worktree / branch を使用してください。
実装前に main と active worktree / PR の最新状態を再確認してください。
#2402 / #2393 と同一ファイルを触っていても、edit intent が独立しているなら進めて構いません。
実際に同一 logic へ相反する変更が存在する場合だけ、その conflict を解消してから進めてください。
実装は最小差分にしてください。
期待する中心 delta:
_sanitize_env()が command idpreflight.runの場合だけ caller のGH_CONFIG_DIRを child env へ保持GH_CONFIG_DIRが存在しない場合に値を生成しないGH_TOKENGITHUB_TOKEN等の propagation を新規に許可しない
「preflight.run.with_anchor」「preflight.run.with_human_context」等へ自動的に allowlist を拡張しないでください。
Issue contract が明示的に bare
preflight.runのみを所有している限り、その exact scope を維持してください。Issue #2403 の Verification Commands を source of truth とし、少なくとも以下を実行してください。
uv run --locked pytest scripts/agent-guards/tests/test_trusted_toolchain_isolated_home.py -k sanitize_envuv run --locked pytest .claude/skills/issue-refinement-loop/scripts/tests/test_skill_runtime_exec_env_allowlist.pyuv run --locked pytest .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry_canonical_executor.pyuv run --locked pytest scripts/agent-guards/tests/test_isolated_anchor_single_authority.pyAC3 は test double の内部関数呼び出しだけではなく、Issue が指定する actual-process boundary を通していることを確認してください。
isolated fixture が作れず exit 77 / SKIP になる場合は PASS に変換しないでください。
runtime evidence には次を保存しないでください。
必要なのは PASS / FAIL / SKIP、command identity、redacted な path presence / identity 程度です。
変更対象周辺の focused regression を実行してください。
新しい broad harness や全 OS matrix は作らないでください。
既存テストで十分なものを新しい恒久 framework へ置換しないでください。
Closes #2403を記載してください。
アンカーコメントのうち rejected / non-applicable とした finding についても、PR 本文に簡潔に理由を残してください。
特に plugin distribution / release asset / autogenerated source archive を #2403 に取り込まなかった場合は、「#2403 does not produce or distribute such an artifact; #2240 owns plugin distribution」のように scope authority を明記してください。
レビューは現行 PR head に対して実施してください。
REQUEST_CHANGES があれば verified finding だけを fix delta として実装し、再テストしてください。
レビューコメントが別 Issue の scope を混入させている場合は再び repository evidence で採否判定してください。
全 review SubAgent / reviewer invocation の完了を待ってから次 iteration に進んでください。
merge はしないでください。
最終的に以下を報告して停止してください。
停止条件は以下に限定してください。
preflight.run以外にも GH_CONFIG_DIR を許可しないと goal を達成できないことが repository evidence で判明単なる「同じファイルを別 Issue も編集する」「別 worktree が存在する」「将来 merge conflict の可能性がある」は停止条件ではありません。
このプロンプトは、レビューの妥当性検証 → controlled reframe → 実装 → review loop を一続きにしています。特に今回は、アンカーコメントの誤った scope 拡張をそのまま Issue に取り込まないことを強く固定しています。
squne121 commentedon Aug 29, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Aug 29, 2026
推奨は、別Issueを切らず、#2403 を最小 controlled reframe して PR #2407 内で stale test を直すです。
#2403 の契約は「bare
preflight.runだけがGH_CONFIG_DIRを保持し、すべての non-bare command は strip」と明記しています。一方、現在の main にはpreflight.run.fixture.with_human_contextだけGH_CONFIG_DIRを許可する旧例外が残っており、問題の既存テストもその旧挙動を明示的に期待しています。したがってこれは新しい機能スコープではなく、#2403 が意図的に変更する旧挙動に結合している regression test の追随修正です。しかも test-only の別PRにすると、#2403 がマージされる前の main では旧実装と新テストが矛盾します。逆順では現在の #2407 と同様に実装と旧テストが矛盾します。コードとテストを同じPRで原子的に変更するのが自然です。
現在の #2407 は Draft・open で head
d95748b5...、レビューコメントも「実装VCは通っており、Allowed Paths 外の stale assertion が required CI の blocker」と特定しています。具体的には、Allowed Paths にディレクトリ丸ごとではなく
.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.pyだけを追加するのがよいです。テストではeffective_env["GH_CONFIG_DIR"] == ...を non-presence assertion に変更し、直前の「GH_CONFIG_DIR isolation is still preserved」という古い説明も修正します。ラッパーテスト側は同じテストを呼んでいるだけなので、実際に変更が不要なら触らない方がよいです。以下をそのまま Claude-GPT に渡すのを推奨します。
PR #2407 の停止状態を解消し、Issue #2403 を merge-ready にしてください。
対象:
fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 (comment)
d95748b5cd4cd6fcc9ace3116df6756f46ab63f9merge は行わないでください。
通常の調査、controlled reframe、Issue更新、実装、テスト、commit、push、CI確認、review-loop 修正には人間承認を要求しないでください。
今回の目的は、新しい機能を追加することではありません。
#2403 の intended behavior と、既存 regression test の旧 expectation の不整合を解消し、PR #2407 を required CI green / review clear の状態まで持っていくことです。
0. 最初に fresh state を確認する
ローカルの古い状態やこのプロンプトに記載した SHA を無条件に信用せず、最初に以下を fresh に確認してください。
.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.pyscripts/agent-guards/skill_runtime_exec.py::_sanitize_env()PR head がすでに進んでいる場合は、最新 head を source of truth としてください。
1. SubAgent を fan-out する
最初に独立した SubAgent を最低3つ起動してください。
A. contract-scope-auditor
確認事項:
特に以下を検証してください。
#2403 は、
preflight.runだけに caller-provided
GH_CONFIG_DIRを保持し、preflight.run.fixture.with_human_contextpreflight.run.with_human_contextpreflight.run.with_anchorでは strip する契約になっているか。
mutation は行わないでください。
B. regression-test-investigator
以下を調査してください。
.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.pytest_fixture_human_context_real_subprocess_reaches_contract_update_required_ac3.claude/skills/issue-refinement-loop/tests/test_fixture_human_context_subprocess.py_sanitize_env()の current main / PR head behavior確認したい中心点:
現在の
assert effective_env["GH_CONFIG_DIR"] == ...が #2403 の intended semantics に対して stale なのか。
stale なら、
GH_CONFIG_DIRが存在しないことを assert する最小変更と、その周辺コメント/docstringの意味修正だけで、
テスト本来の trust-root / no-gh-invocation / routing coverage を維持できるか。
ラッパーファイルまで編集する必要があるかも独立判定してください。
不要なら編集しないでください。
mutation は行わないでください。
C. ci-pr-state-auditor
確認事項:
mutation は行わないでください。
必要なら追加 SubAgent を使用して構いません。
重要:
全 SubAgent を起動した後、必ず全員が terminal completion になるまで待ってください。
一部の SubAgent が running / background / pending の状態で controlled reframe や実装修正へ進まないでください。
SubAgent に nested SubAgent delegation はさせないでください。
2. SubAgent 結果を統合して scope 判定する
今回の第一候補は次です。
「新しい別Issueを作る」のではなく、
#2403 に対する最小 controlled reframe として、
.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.pyだけを Allowed Paths に追加する。
ただし、これを結論ありきで実行せず repository evidence で確認してください。
次の条件が成立するなら、この方針を採用してください。
_sanitize_env()behavior の旧 expectation そのものであるpreflight.run以外へのGH_CONFIG_DIRpropagation は不要であるこの場合、これは semantic scope expansion ではなく、
allowed-path repair for an existing regression test directly coupled to AC2として扱ってください。
3. Issue #2403 を controlled reframe する
repository の canonical
issue-refinement-loop/ contract-update workflow を使用してください。human context として PR blocker review:
#2407 (comment)
を参照してください。
必要な Issue delta は最小にしてください。
推奨 delta:
Allowed Paths
既存 Allowed Paths に次の exact file を追加:
.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.py.claude/skills/issue-refinement-loop/tests/ディレクトリ全体を雑に許可しないでください。
Scope Delta
必要なら、次の趣旨を短く記録してください。
GH_CONFIG_DIRexception を期待する既存 regression assertion が存在した必要なら Verification Commands に targeted regression を追加してください。
Issue mutation 後は fresh preflight / contract review を再実行してください。
GO / implementation-ready を確認してから PR 修正へ進んでください。
4. PR #2407 を最小修正する
既存 PR branch / worktree を継続利用してください。
新しいPRを作らないでください。
問題のテストを repository evidence に沿って修正してください。
想定される中心 delta は:
旧:
assert effective_env["GH_CONFIG_DIR"] == str(home / "empty-gh-config")新:
assert "GH_CONFIG_DIR" not in effective_envまたは同等の明確な non-presence assertion。
ただし実ファイルを読んで、最も自然な pytest assertion にしてください。
同時に直前の古い説明、
GH_CONFIG_DIR isolation ... is still preserved等が新しい契約と矛盾するなら更新してください。
説明すべき新しい意味は、
HOME/ PATH trust-root invariant のテストであることpreflight.run.fixture.with_human_contextは 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 の契約に従ってGH_CONFIG_DIRを受け取らないことghinvocation を隠してはいけないことです。
テストの本来の意味に不要な rewrite はしないでください。
以下には触れないでください。
preflight.run以外へGH_CONFIG_DIRを再許可する修正GH_TOKENGITHUB_TOKENラッパー側
.claude/skills/issue-refinement-loop/tests/test_fixture_human_context_subprocess.pyは、underlying test の修正だけで pass するなら変更しないでください。
5. focused verification を行う
まず blocker の直接再現を実行してください。
少なくとも以下の2 node を実行してください。
次に #2403 の既存 Verification Commands をすべて再実行してください。
さらに変更した regression file の focused suite を実行してください。
SKIP / exit 77 を PASS と扱わないでください。
runtime evidence については既存 #2403 契約を維持し、
を保存・表示しないでください。
6. commit / push して required CI を確認する
focused test が green なら既存 PR branch に commit / push してください。
commit 後は新 head SHA を取得してください。
required CI が起動したら、主要 check がまだ running の状態で結論を出さず、required CI が terminal completion になるまで確認してください。
failure が出た場合:
required CI 全体が green になるまで review-ready と判定しないでください。
7. impl-review-loop を再実行する
最新 PR head に対して repository canonical
impl-review-loopを実行してください。reviewer / review SubAgent を起動した場合も、
全 reviewer / SubAgent が terminal completion になるまで待ってください。
古い head
d95748...に対する REQUEST_CHANGES をそのまま新 head の verdict として流用しないでください。fresh head で確認してください。
特に確認すること:
preflight.runのみGH_CONFIG_DIRを保持REQUEST_CHANGES があれば、repository evidence で verified な finding のみ fix delta としてください。
8. 完了条件
次をすべて満たしたら merge-ready と判定してください。
Closes #2403を維持merge はしないでください。
Draft解除については repository の canonical workflow に従ってください。
merge-ready 判定に Draft解除が必要なら Ready for Review にして構いません。
単に「merge可能な状態を報告して停止」が canonical なら Draft のままでも構いません。
停止条件
次の場合だけ停止してください。
preflight.run以外にもGH_CONFIG_DIRを許可しないと goal を達成できない単なる同一ファイル利用、別 worktree の存在、通常の merge conflict の可能性は停止条件にしないでください。
最終報告
最後に以下を報告してください。
merge-ready: yes なら mergeせず停止してください。
このケースでは「Allowed Paths 外だから別Issue」という機械的分割より、契約が変更対象としている旧挙動のテストを同じトランザクションで直す方が、1 Issue = 1 PR の意味にも整合します。#2403 の機能範囲自体は広げない、という線引きが重要です。
fix: PR #2460 owner review 指摘を反映し AC3 の env 構築を minimal-env 化し AC6 の …
fix: Claude-GPT lib.sh が canonical runtime root を export し self-launc…
fix: preserve GH_CONFIG_DIR for bare preflight.run (#2407)