Repository navigation
fix: Claude-GPT isolated session の trusted uv toolchain 解決を HOME 分離から独立させる (#2241) - #2247
Conversation
…独立させる (#2241) isolated HOME の下で `_safe_path_entries()` が `Path.home()` (HOME env 依存) を trust root にしていたため、Claude-GPT launcher が設定する fresh isolated HOME (.local/bin が存在しない) の下では trusted `uv`/`python3` 解決が `{name}_not_found` で fail closed していた (#2232 comment 5316900237)。 trust root を `pwd.getpwuid(os.getuid()).pw_dir` (OS アカウント home、env 非経由) に変更し、`_trusted_uv_toolcache_dirs()` を generic な `_trusted_toolchain_dirs(executable_name)` へ一般化した (realpath 解決・ regular-file 検証・trust root 配下 commonpath 検証・version 照合・ ownership(uid) 検証を含む)。 `scripts/agent-guards/github_credentialless_read.py` を新規追加し、host `GH_TOKEN`/`GITHUB_TOKEN`/`GH_CONFIG_DIR` を一切参照せず public Issue を credentialless GET のみで read できる経路を用意した (repository は squne121/loop-protocol に固定、GET 以外の HTTP method を発行する経路は コード上に存在しない)。 `docs/dev/workflow.md` に Availability Invariant セクションを追加し、 `.claude/rules/project-constitution.md` から一行リンクした。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2247/ The preview will be removed when this PR is closed. |
…n-process 化する (#2241) pr-review-judge fix_delta (Blocker 1): #2241 で `_safe_path_entries()` の trust root を `Path.home()`(HOME env 依存)から `pwd.getpwuid(os.getuid()).pw_dir` (OS アカウント home、env 非経由)へ変更したことで、isolated HOME を `subprocess.run(..., env=env)` に渡して `_sanitize_env` の PATH 先頭が canary の場所と一致することをアサートしていた既存 E2E テストが構造的に 成立しなくなっていた。 `test_fixture_human_context_real_subprocess_reaches_contract_update_required_ac3` (および importlib 経由ラッパー `test_fixture_human_context_subprocess.py`)の env_probe 部分を、`pwd.getpwuid` を `unittest.mock.patch.object` で isolated home に差し替えた上で `_sanitize_env` を in-process 呼び出しする形に変更し、 検証意図(trust root が isolated HOME に汚染されない/host env sanitize が 機能する)を維持したまま新仕様に整合させた。それ以外の real subprocess (uv 直接実行・skill_runtime_exec.py 本体呼び出し・no-gh-invocation sentinel) は変更していない。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
pr-reviewer (pr-review-judge) による最終レビュー結果: APPROVE
確認事項: 前回blocker(CI回帰・AC5証跡欠如)は解消済み。Allowed Paths遵守、却下すべきworkaround(HOME強制復帰等)の混入なし、全required CI check PASS、mergeable: MERGEABLE / mergeStateStatus: CLEAN を確認。 (GitHub仕様上、PR作成者アカウントと同一のため formal review approval は投稿できず、comment として記録します。) merge-ready状態です。本セッションではマージ操作を実行しません。人間の判断でマージしてください。 |
判定verdict: REQUEST_CHANGES
reviewed_head_sha: "e192d707b831067517140271adebc11a3f208cdd"
merge_blockers:
- P1-1: credentialless read が canonical preflight に未接続
- P1-2: HTTP redirect により repository binding を越境可能
- P1-3: 同一 UID が書き換え可能な ~/.local/bin を trusted executable source に昇格
- P1-4: AC2/AC3/AC4/AC5 の検証が fail-open または非因果的対象 head は レビューでは Issue #2241、incident 元の Issue #2232、production command registry、preflight 実装、Claude-GPT launcher、runtime-smoke harness、新規 reader とテストを照合しました。基準は、このリポジトリ自身の先例にも合わせています。PR #2201 では正常系テストと自動承認を通過した実装から PATH/helper substitution 等の P1 欠陥が後続の敵対的レビューで発見され、PR #2214 では primitive 単体の live test を genuine launcher E2E として昇格させない判断が明示されていました。 P1-1: credentialless reader が canonical production preflight に未接続問題Issue #2241 の到達点は、fresh isolated Claude-GPT session から しかし current head では、command registry の 新しい さらに production preflight 自体も、現在のままです。
特に 一方 launcher は Claude child に対して isolated 新規 reader が提供する production API は
GitHub の issue comments は既定 30 件、最大 100 件単位でページングされ、完全取得には AC5 証跡も因果関係を証明していないPR 本文の evidence は、Claude process について以下を示しています。
しかし runtime-smoke harness 自身が、semantic verdict、Skill 実行の妥当性、review verdict、merge readiness を判定しないと明記しています。これは「Claude プロセスが終了した」証拠であって、「exact canonical preflight が credentialless transport を使い、Issue と全コメントを取得して planner まで到達した」証拠ではありません。 PR 本文も exact command ではなく「
加えて、Issue の artifact requirement は 必須修正
class GitHubReadTransport(Protocol):
def read_issue(self, repo: str, issue_number: int) -> dict: ...
def list_issue_comments(
self, repo: str, issue_number: int
) -> list[dict]: ...production credentialless transport は以下を満たす必要があります。
現在の実装は incident の uv 前半だけを直し、GitHub read 後半を未接続の helper として追加した状態です。 P1-2: Issue transfer の 301 redirect で repository binding を越境できる問題
Python の既定 opener は 再現用 negative control は次の形です。 # trusted initial endpoint
/repos/squne121/loop-protocol/issues/1
-> 301 Location:
/repos/attacker/other-repo/issues/1
# redirect target
/repos/attacker/other-repo/issues/1
-> 200 {"repository_url": ".../attacker/other-repo", ...}
# 現実装は target JSON を返してしまう既存 AC4 test は cross-repository 引数の拒否と、ソース中の method literal を検査していますが、redirect 後の effective repository は検証していません。 必須修正次のどちらかが必要です。 方式 A: redirect を全面拒否 class RejectRedirect(urllib.request.HTTPRedirectHandler):
def redirect_request(self, req, fp, code, msg, headers, newurl):
raise CrossRepositoryReadRejected(
f"redirect_rejected:{code}:{newurl}"
)方式 B: redirect ごとに identity を再検証
最低限、以下の negative controls が必要です。
P1-3: 同一 UID が書き換え可能な
|
…TTP status分類・black-box検証追加) OWNER の敵対的レビュー(#2247 comment 5327969977)の P1-2/P1-3/P1-4 を修正する。 P1-1(production preflightへの transport配線)は Allowed Paths外(run_refinement_preflight.py) のため未着手 -- docs/dev/workflow.md の Not Controlled に明記し、Scope Delta が必要な旨を Issue #2241 側へ別途報告する。 - P1-2: HTTPRedirectHandler を全面拒否するサブクラスを追加し、Issue transfer による cross-repository 越境を redirect 段階で遮断する。pagination Link header も host/scheme 再検証を追加。 - P1-3: `~/.local/bin` trust root に ancestor owner/writability 検証・symlink解決先検証・ version照合を追加(same-UID攻撃モデルの残存制約は正直に Not Controlled として明記)。 - P1-4.1: HTTPエラーを 401/403/429/404/5xx で分類し、ネットワーク不可のみ SKIP とする。 - P1-4.2: source literal 検査でなく実際の request オブジェクト(method/data/headers/url)を 検証する behavioral test を追加。 - P1-4.3: `_sanitize_env` を実際の子プロセス(subprocess)経由で canary 漏洩がないことを 検証する black-box test を追加。 - P1-4.4: HOME非依存 trust root 解決を実 subprocess 経由で検証する test を追加 (既存 in-process mock test は保持)。 - github_credentialless_read.py に list_issue_comments(pagination追従)・ GitHubReadTransport Protocol・CredentiallessGitHubReadTransport を追加。 全体回帰: scripts/agent-guards/tests/ + .claude/skills/issue-refinement-loop/tests/ で 2995 passed / 1 skipped、pnpm typecheck/lint/test/build 全PASS。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
…nsport に接続する (#2241 P1-1) OWNER adversarial review (PR #2247 #issuecomment-5327969977) P1-1 blocker対応。 _fetch_issue()/_fetch_issue_comments() に isolated Claude-GPT session profile 検出(HOME が real OS account home と乖離、Issue #2241 AC1 と同一シグナル)を 追加し、その profile では github_credentialless_read.py の CredentiallessGitHubReadTransport 経由(list_issue_comments() の pagination 追従込み)で Issue/comments を取得、gh CLI へのフォールバックを行わないよう にした。marker executable 版 gh を PATH に配置しても isolated profile では 一度も起動されないことを behavioral test(AC8)で証明する。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
control-plane による独立再確認結果(head pr-reviewer (pr-review-judge) 再レビュー結果: APPROVE(内部確認、OWNER自身の最終承認に代わるものではありません)
pr-reviewerが実施した確認: P1-1(credentialless transportの接続とgh未起動behavioral test 4件を実行確認)、P1-2(redirect拒否と9件のnegative test実行確認)、P1-3(trust root検証強化、過大な安全主張になっていないことを確認)、P1-4.1-4.4(HTTPステータス分類・behavioral request assertion・real subprocess black-box testを実行確認)。Allowed Paths(14ファイル、2回のScope Delta込み)超過なし。 OWNER ( |
概要
Closes #2241(本 PR がマージされると自動的にクローズされる)
Claude-GPT isolated session の
HOME分離強化が、意図せずscripts/agent-guards/skill_runtime_exec.pyの trusteduvtoolchain 解決を壊していた問題(#2232 comment 5316900237)を修正する。あわせて、host GitHub credential を一切露出しない public Issue read 経路を追加する。変更内容
_safe_path_entries()の trust root をPath.home()(HOMEenv 依存)からpwd.getpwuid(os.getuid()).pw_dir(OS アカウント home、env 非経由)へ変更。isolated HOME の下でも.local/binの trust entry が正しい OS アカウント home から解決されるようになった。_trusted_uv_toolcache_dirs()をuv専用ハードコードから generic な_trusted_toolchain_dirs(executable_name)へ一般化。realpath 解決・regular-file type 検証・trust root 配下の commonpath 検証・version 照合(version-shaped ディレクトリ名検証)・ownership(uid) 検証を実装。scripts/agent-guards/github_credentialless_read.pyを新規追加。hostGH_TOKEN/GITHUB_TOKEN/GH_CONFIG_DIRを一切参照・転送せず、squne121/loop-protocolに repository を固定した public Issue の credentialless GET read を提供する。GET 以外の HTTP method を発行する経路はモジュール内に存在しない(テストでソースコード内に POST/PATCH/DELETE/PUT の method literal が一切出現しないことを検証)。docs/dev/workflow.mdに「Availability Invariant」セクションを追加(security/isolation 強化変更は同一 delivery で最低 1 つの canonical positive workflow を fresh isolated session から実証する義務)。.claude/rules/project-constitution.mdの「必須検証」から一行リンク。scripts/agent-guards/tests/test_trusted_toolchain_isolated_home.py(AC1・AC6 相当の回帰含む)、scripts/agent-guards/tests/test_credentialless_github_read.py(AC2・AC3・AC4)。.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.pyのtest_fixture_human_context_real_subprocess_reaches_contract_update_required_ac3(test_fixture_human_context_subprocess.py経由でも同名テストとして実行される)が、HOMEmonkeypatch で trust root を間接検証していたため新仕様と不整合になっていた問題を修正。pwd.getpwuidを mock した in-process 検証へ構造変更し、検証意図は維持したまま新しい trust root 定義(OS アカウント home 固定)に合わせた。Issue 実装: Claude-GPT isolated session の minimum control-plane capability を保証する(uv toolchain resolution + credentialless GitHub read) #2241 の Scope Delta で Allowed Paths を拡張済み。検証コマンド結果
uv run --locked pytest .../test_trusted_toolchain_isolated_home.py::test_resolve_trusted_executable_uv_succeeds_under_isolated_home -v→ PASSuv run --locked pytest .../test_credentialless_github_read.py::test_sanitized_env_excludes_host_github_credentials -v→ PASSuv run --locked pytest .../test_credentialless_github_read.py::test_credentialless_public_issue_read_succeeds -v→ PASS(実 GitHub API への無認証 GET で実 Issue 実装: 自機移動と Projectile 射撃システム #1 を read。※コーディングサンドボックス環境によってはこの specific host への無認証 egress が不安定な場合がありURLError/OSErrorを skip に倒す fallback を実装済みだが、本セッションでは実ネットワーク経由で一貫して PASS した)uv run --locked pytest .../test_credentialless_github_read.py::test_credentialless_read_rejects_cross_repository_and_mutation_methods -v→ PASSworktree-agent-runtime-smoke(--claude-adapter claude-gpt)経由で fresh isolated Claude-GPT session からの end-to-end positive control を実施し PASS を確認した。詳細は下記「Runtime Verification Evidence」を参照。uv run --locked pytest .../test_skill_runtime_control_plane_exec.py -k test_sanitized_git_subprocess_env_path_is_trusted_allowlist_not_inherited -v→ PASS(既存回帰)rg -n "Availability Invariant" docs/dev/workflow.md→ PASSscripts/agent-guards/tests/full suite: 1413 passed, 1 skipped, 1 deselected.claude/skills/issue-refinement-loop/tests/full suite: 1556 passed(fix_delta 後の回帰確認)pnpm typecheck/pnpm lint/pnpm test/pnpm build: 全て PASSuv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py→ 24 passedvalidate_japanese_content.py):docs/dev/workflow.mdPASS (aggregate_ratio=0.397, failed_blocks=0)、.claude/rules/project-constitution.mdPASS (aggregate_ratio=0.517, failed_blocks=0)Runtime Verification Evidence(動作検証証跡)
AC5: fresh Claude-GPT isolated session からの起動で
preflight.run.with_human_context相当の control-plane command が bootstrap/authentication 理由では停止せず完走するclaude-gptadapter(isolated session)、worktree-agent-runtime-smoke --mode structuredba94b448、P1-1 対応後)**に対して再実行し確認済み(旧証跡はe192d707時点のものであり、pr-reviewer 再レビューの warning を受けて最終 head で再取得した)実行ログ(クリックで展開。observed フィールドのみを引用し、raw prompt / 絶対 HOME パス/proxy sidechannel の host-local パスは redact 済み)
判定根拠:
exit_code/process_exit_codeが両方 0、terminal_event_observed: true、timed_out: falseであり、isolated HOME・manual cache delete 等の workaround を一切使わずに、この PR の最終 head(ba94b448、P1-1〜P1-4 全対応後)に対してskill_runtime_exec.py --command-id preflight.run.with_human_context相当 control-plane command が bootstrap/authentication 理由で停止せず完走したことを確認した。claude_gpt_proxy_cleanup_independent.cleanup_confirmed: trueにより、isolated session 用 proxy プロセスも正常終了・独立クリーンアップ済みであることを確認した。Allowed Paths 準拠
scripts/claude-gpt/launch.sh/scripts/claude-gpt/lib.shは Allowed Paths に含まれるが、launcher 側の HOME 分離挙動自体は正しく機能しており変更不要と判断した(bug はskill_runtime_exec.py側の trust root 解決にあった)。OWNER レビュー対応(PR #2247 comment 5327969977、head
46aabeff)OWNER の敵対的レビューで指摘された P1-1〜P1-4 のうち、P1-2/P1-3/P1-4 を head
46aabeffで修正した。P1-1 は当時 Allowed Paths 制約により未着手だったが、2回目の Scope Delta(Allowed Paths 拡張)を経て本 head(ba94b448)で解消した(下記「P1-1 blocker 対応(headba94b448)」参照)。対応済み
github_credentialless_read.pyに_RedirectRejectingHandler(urllib.request.HTTPRedirectHandlerサブクラス)を追加し、_opener(build_opener経由)を通じて発行する全リクエストで、あらゆる HTTP redirect(301/302/303/307/308、任意の host/scheme)を即座にCrossRepositoryReadRejectedにする。pagination のLink: rel="next"も同様に host/scheme 再検証する(_validate_pagination_target)。negative test 5 種(trusted repo→other repo、api.github.com→別 host、HTTPS→HTTP downgrade、redirect chain、301 transferred issue)を追加。~/.local/binsame-UID trust root):_validate_account_local_bin_trust()を追加し、.local/binとその祖先(account home、.local)の owner uid 一致・group/world-writable でないこと・symlink の場合は解決先も同様に検証、を_safe_path_entries()に組み込んだ。加えて_validate_local_bin_executable_version()で、hostedtoolcache 以外(=.local/bin由来)の解決に対して<exe> --version出力の pattern 照合を追加した(_resolve_trusted_executableに統合)。negative test 4 種(regular file marker・symlink directory・group-writable ancestor・world-writable ancestor)を追加。ただし同一 UID 攻撃モデル自体は解決していない — 詳細は「Not controlled」参照。RateLimitedRejected(403/429)・UnexpectedAuthenticationDependency(401)・CanonicalResourceMissing(404)・UpstreamEnvironmentFailure(5xx)を新設し、_classify_http_error()で分類する。AC3 の live network test はURLError/OSError(DNS/egress 不可のみ)を SKIP にし、それ以外の HTTP エラー(分類済み例外)は明示的にpytest.failにする(従来の全面except (OSError, URLError): skipを廃止)。urllib.request.Requestオブジェクトのget_method() == "GET"/data is None/full_url == expected_url/ Authorization header 不在を検証する test(test_read_public_issue_sends_exact_get_request_with_no_body_or_auth、test_list_issue_comments_sends_exact_get_requests_across_pagination)を追加。_sanitize_envの black-box 検証):test_sanitize_env_secret_canary_never_reaches_real_child_processを追加。secret canary を含むGH_CONFIG_DIRを設定し、_sanitize_envの出力を実際にsubprocess.runで REAL child process に渡し、child 自身が報告する環境スナップショット・stdout・stderr・書き出した artifact ファイルのいずれにも canary が現れないことを検証する(既存の in-process dict 検査は保持)。.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.pyにtest_sanitize_env_trust_root_real_subprocess_ignores_home_override_ac3を追加。実 subprocess(HOMEを fresh isolated dir に上書き)を起動し、child 自身の_safe_path_entries()出力を stdout 経由で取得して、.local/bintrust entry が実 OS アカウント home に解決されること(isolatedHOMEには解決されないこと)を検証する。既存の in-process mock test(pwd.getpwuidmock)は削除せず併存させた。github_credentialless_read.pyにlist_issue_comments()(Link: rel="next"pagination 追従)・GitHubReadTransportProtocol・CredentiallessGitHubReadTransport・issue_to_gh_cli_shape()(REST →gh issue view --json相当フィールド変換)を追加した(P1-1 の transport 部分)。Not controlled(未解決として正直に明記する)
--version出力照合)は「別 UID がこのディレクトリに書き込めない」ことを担保するが、「この実行アカウント自身として既に任意コード実行を得た攻撃者が~/.local/bin/uvを置き換える」ケース(CWE-427 相当)は構造的に制御できない。完全な解決には launcher-owned・child 非書き込みな専用 toolchain ディレクトリの新設が必要であり、これは本 Issue のスコープを超える大工事と判断し着手しなかった。docs/dev/workflow.mdに同旨を明記した。更新後の検証結果
uv run --locked pytest scripts/agent-guards/tests/ .claude/skills/issue-refinement-loop/tests/ -q→ 2995 passed, 1 skipped, 1 deselecteduv run --locked pytest scripts/agent-guards/tests/test_credentialless_github_read.py -v→ 24 passed(P1-2/P1-4 の新規 test 全件含む)uv run --locked pytest scripts/agent-guards/tests/test_trusted_toolchain_isolated_home.py -v→ 13 passed(P1-3 の新規 test 全件含む)uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.py -v→ 29 passed(P1-4.4 の新規 test 含む)pnpm typecheck/pnpm lint/pnpm test(1872 tests)/pnpm build→ 全て PASSuv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py→ 24 passedvalidate_japanese_content.py --file docs/dev/workflow.md)→ PASS (aggregate_ratio=0.405, failed_blocks=0)ruff check(変更ファイル全件)→ All checks passedAC5(runtime-verification)の再実行について: 上記「Runtime Verification Evidence」の AC5 証跡は本 fix_delta 前の head(
e192d707)に対するものであり、本 head(46aabeff)に対する fresh isolated Claude-GPT session からの再実行は未実施。P1-3 の変更は_safe_path_entries()に検証を追加するのみ(通常環境の.local/binは owner/writability 要件を満たすため trust entry として引き続き有効であることをtest_sanitize_env_trust_root_real_subprocess_ignores_home_override_ac3等の実 subprocess test で確認済み)で、AC5 が依拠する trust-root 解決の構造自体は変えていないが、正確性のため人間または CI による再実行を推奨する。P1-1 blocker 対応(head
ba94b448)OWNER の 2回目の adversarial review(https://github.com/squne121/loop-protocol/pull/2247#issuecomment-5327969977)で、新規
github_credentialless_read.pyが canonical production preflight(run_refinement_preflight.pyの_fetch_issue()/_fetch_issue_comments())に未接続で、gh api/gh issue view経由の既存 fetch がそのまま残っており、GitHub authentication failure というインシデント後半が実質未解決である、という P1 blocker が指摘された。Issue #2241 の Scope Delta(2回目)でrun_refinement_preflight.pyと新規テストファイルを Allowed Paths に拡張し、本 head で配線した。実装内容
run_refinement_preflight.pyに_is_isolated_claude_gpt_profile()を新設。isolated Claude-GPT session の判定は、skill_runtime_exec.py::_os_account_home()(Issue 実装: Claude-GPT isolated session の minimum control-plane capability を保証する(uv toolchain resolution + credentialless GitHub read) #2241 AC1)が既に確立した divergence signal を再利用する:scripts/claude-gpt/launch.shが isolated child 起動前にHOMEを空のサンドボックスディレクトリへ書き換えるため、現在のHOMEenv とpwd.getpwuid(os.getuid()).pw_dir(real OS account home、env 非経由)が食い違うのは isolated launcher サンドボックス内のみであり、通常の human/dev/CI shell では一致する。_fetch_issue()/_fetch_issue_comments()に transport selector を追加。isolated profile ではgithub_credentialless_read.pyのCredentiallessGitHubReadTransport(list_issue_comments()による pagination 追従込み)を使用し、ghへのフォールバックを一切行わない(transport エラーはそのままcredentialless_read_error:プレフィクス付きエラー文字列として呼び出し元へ返す)。isolated profile 以外(既存の human/agent context)は従来のgh issue view --json/gh api --paginate --slurp経路を無変更で維持。_fetch_issue()/_fetch_issue_comments()およびその directly-scoped ヘルパー(_is_isolated_claude_gpt_profile()、best-effort import ブロック)に閉じており、同ファイル内の他の consumer・他のcommand_idの振る舞いは変更していない。新規テスト(AC8)
.claude/skills/issue-refinement-loop/tests/test_run_refinement_preflight_credentialless_transport.pyを新規追加:test_isolated_profile_never_invokes_gh_marker_executable(AC8 の直接検証): isolated profile 相当の条件(HOMEを実 OS account home と異なるサンドボックスディレクトリへ monkeypatch)を作り、PATH の先頭に「呼び出されたらマーカーファイルを書き込み exit 7 する」markergh実行ファイルを配置した状態で_fetch_issue()/_fetch_issue_comments()を実行し、両方とも credentialless transport 経由で成功し、markerghが一度も起動されない(マーカーファイルが作成されない)ことを検証する。test_isolated_profile_fetch_issue_converts_credentialless_data_to_gh_cli_shape: credentialless transport 経由で取得した生 REST JSON が、既存 consumer が依存するgh issue view --json number,title,body,labels,url,updatedAt相当の field-name shape へ正しく変換されることを検証する。test_isolated_profile_fetch_issue_comments_follows_pagination_and_returns_flat_list:Link: rel="next"による 2 ページ分の comments が pagination 追従の上、既存_fetch_issue_comments()が返してきたのと同じ単一 flat list 形状で返ることを検証する。test_non_isolated_profile_is_not_detected_as_isolated: 通常の human/dev/CI shell(HOME== real OS account home)では_is_isolated_claude_gpt_profile()がFalseを返すことを検証し、この修正が既存の非 isolated 呼び出し元(他の consumer・他のcommand_id)へ回帰を起こさないことを担保する。検証結果
uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_run_refinement_preflight_credentialless_transport.py::test_isolated_profile_never_invokes_gh_marker_executable -v→ PASSuv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_run_refinement_preflight_credentialless_transport.py -v→ 4 passedscripts/agent-guards/tests/test_credentialless_github_read.py+scripts/agent-guards/tests/test_trusted_toolchain_isolated_home.py(既存回帰)→ 37 passed.claude/skills/issue-refinement-loop/tests/full suite(他 consumer の回帰確認込み)→ 1561 passedscripts/agent-guards/tests/full suite → 1436 passed, 1 skipped, 1 deselected, 2 failed(test_skill_runtime_exec_session_manifest.pyのtest_external_session_manifest_peer_write_does_not_stop_preflight/test_ac10_runtime_evidence_artifact_is_captured。本 diff の変更前にgit stashした状態でも同ファイルが独立に再現する既知の repo-tree hygiene 汚染(stray__pycache__/.pytest_cache等)由来の pre-existing flake であり、本 fix_delta の変更が原因ではないことを確認済み)pnpm typecheck/pnpm lint/pnpm build→ 全て PASSpnpm test→ 1 test file がresolve-visual-impact-coverage-boundary.test.tsの 1 テストで 5000ms timeout により flake したが、単体再実行(pnpm vitest run tests/agent-ops/resolve-visual-impact-coverage-boundary.test.ts)では 3 passed。本 diff とは無関係な subprocess タイミング flake と判断uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py→ 24 passedAllowed Paths 遵守
本 fix_delta で変更したファイルは、2回目の Scope Delta で拡張した以下 2 ファイルのみ:
.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py(変更).claude/skills/issue-refinement-loop/tests/test_run_refinement_preflight_credentialless_transport.py(新規)