Repository navigation
実装: claude-gpt launcher の GitHub auth を native 同等に共有する (#2299) - #2303
Merged
Merged
Conversation
isolated Claude-GPT session 内で genuine issue-creator SubAgent が create-issue skill の通常 procedure(dedupe read を含む)を完走できるよう、 launch.sh/lib.sh の credential scrub 方針を変更した。GitHub auth (GH_TOKEN/GITHUB_TOKEN/GH_ENTERPRISE_TOKEN/GITHUB_ENTERPRISE_TOKEN/GH_HOST/ GH_REPO/GH_CONFIG_DIR)のみ ambient 値を native 同等に子プロセスへ共有し、 SSH_AUTH_SOCK/GIT_ASKPASS/SSH_ASKPASS/GIT_CREDENTIAL_HELPER 等の無関係な secret は引き続き isolate する。 create_issue_txn.py は isolation profile 分岐を持たない単一 native path の まま、Issue #2259/PR #2286 由来の salvage 対象(TransactionResult への node_id/body_sha256 フィールド、gh subprocess timeout 処理)を native path へ取り込んだ。runtime_smoke_test.sh に outcome-oriented な --scenario issue_create を追加し、genuine issue-creator SubAgent が fake gh provider 経由で create-issue workflow を完走することを live で確認する (real GitHub Issue は作成しない)。opt-in の live_issue_create_canary.sh、 credential sentinel test(scripts/claude-gpt/tests/)を追加した。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
8 tasks
Contributor
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2303/ The preview will be removed when this PR is closed. |
squne121
marked this pull request as ready for review
August 22, 2026 12:05
This was referenced Aug 22, 2026
Merged
feat: actor-scoped capability handoff と controlled GitHub read/write の credential parity を導入する
#2357
Merged
6 tasks
This was referenced Sep 10, 2026
This was referenced Sep 17, 2026
squne121
added a commit
that referenced
this pull request
Sep 19, 2026
…th 実装に一致させる (#2666) * fix: claude-gpt auto mode narrow label を actor-specific な現行 GitHub auth 実装に一致させる (#2658) `CLAUDE_GPT_AUTO_MODE_ENVIRONMENT_NARROW_LABEL` / `ALLOW_NARROW_LABEL` は PR #2299/#2303 後の実装(Claude child は native-equivalent な GitHub CLI auth、AGY delegation は github_research read-only broker 専有)と Owner Decision #2223(native GitHub client + live readback を通常 route とする) に一致していなかった。一括り記述(GitHub write credential は launcher-owned transaction broker のみが保持、通常操作は generic broker 限定、authority は permissions.deny/hook/broker に一括帰属)を、 actor-specific / operation-specific な記述へ書き換え、stale な hard_deny コメントも整理した。controlled Issue-edit transaction executor と AGY read-only broker の narrow-use 記述、`$defaults` の hard_deny 制約自体は 変更していない。`test_auto_mode_policy.py` の narrow label semantic regression test を revised semantics に合わせて更新した。 Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: auto mode narrow label のGH_CONFIG_DIR記述とhard_denyコメントをOWNER指摘に沿って修正する PR #2666 OWNER レビュー(issuecomment-5737868676)のP2/P3非ブロッキング指摘を反映する。 GH_CONFIG_DIR記述を実際のlaunch.sh resolver分岐(非空値保持/未指定時fallback)に一致させ、 hard_deny追加分コメントをOwner Decision #2223の内容(generic broker/新規enforcing hookを 追加しない)に整合させ、controlled Issue-edit transactionのraw gh除外がtransaction-local restrictionであることを明示する。test_auto_mode_policy.pyへ対応するregression assertionを 追加する。 Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Test <[email protected]> Co-authored-by: Claude Sonnet 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Closes #2299(本 PR は Issue #2299 の実装を完了する)
isolated Claude-GPT session が Claude Code 本体と同等の GitHub access で、既存の
issue-creator/create-issueworkflow を安定して完走できるようにする。変更内容
scripts/claude-gpt/launch.sh/lib.sh: isolated child プロセスの credentialscrub 方針を変更した。GitHub auth(
GH_TOKEN/GITHUB_TOKEN/GH_ENTERPRISE_TOKEN/GITHUB_ENTERPRISE_TOKEN/GH_HOST/GH_REPO/GH_CONFIG_DIR)のみ ambient 値を native 同等に子プロセスへ共有し、HOME/XDG_CONFIG_HOME/XDG_CACHE_HOMEは引き続き空の隔離ディレクトリへ差し替え、
SSH_AUTH_SOCK/GIT_ASKPASS/SSH_ASKPASS/GIT_CREDENTIAL_HELPER(GitHub auth とは無関係な secret)は引き続き isolate する。旧来の
claude_gpt_claude_isolated_gh_config_dir(空の隔離 GH_CONFIG_DIR ディレクトリ)は撤去した。
.claude/skills/create-issue/scripts/create_issue_txn.py: isolation profile分岐は元々存在しなかった(main には Issue 実装: isolated Claude-GPT の issue.create 要求を parent-mediated narrow bridge で処理する #2259/PR 実装: isolated Claude-GPT の issue.create 要求を parent-mediated narrow bridge で処理する #2286 の bridge 実装は
マージされていない)ため AC3 は変更不要で確認のみ。Issue 実装: isolated Claude-GPT の issue.create 要求を parent-mediated narrow bridge で処理する #2259/PR 実装: isolated Claude-GPT の issue.create 要求を parent-mediated narrow bridge で処理する #2286 由来の
salvage 対象(
TransactionResult.node_id/body_sha256フィールド、run_transaction_with_authoritative_readback()、ghsubprocess timeout処理改善)を native path に取り込んだ。
scripts/claude-gpt/runtime_smoke_test.sh: outcome-oriented な--scenario issue_createを追加した。genuineissue-creatorSubAgent がisolated Claude-GPT session 内で、PATH-shadowed fake
ghprovider(
scripts/claude-gpt/tests/fixtures/fake_gh.py)に対して通常のcreate-issue skill procedure(dedupe read ->
create_issue_txn.py->readback)を完走し、fake provider の state と authoritative readback が
一致することを live で確認する(real GitHub Issue は作成しない)。
Runtime Verification Applicability の fallback_policy に従い、実行不能な
場合は SKIP ではなく FAIL を返す。
scripts/claude-gpt/live_issue_create_canary.sh(新規): opt-in のdisposable-Issue live canary。明示的な opt-in(env var +
--confirm)が無い限り常に SKIP(exit 77)で終了する。
scripts/claude-gpt/tests/test_issue_create_bridge_credential_sentinel.py(新規): sentinel credential テスト。GH auth sentinel が子プロセス env へ
native 共有される一方で stdout/stderr/
CLAUDE_GPT_HOME配下の生成artifact に一切出力されないこと、SSH 系 sentinel は子プロセス env から
完全に不在のままであることを実
launch.sh起動で確認する。docs/dev/secret-policy.md: launcher の credential scrub 方針変更を明文化した(旧 実装: claude-gpt auto mode に canonical AGY/GitHub trust policy と live canary を追加する #2203 記述の一部を Issue 実装: Claude-GPT の GitHub access を compatibility-first に切り替え既存 workflow を安定化する #2299 の変更内容で補足)。
検証コマンド結果
bash scripts/claude-gpt/launch.sh --check-only--check-onlyは現行のプロキシ起動確認までのため、AC1 の GH auth passthrough 自体は credential sentinel test で実 launch.sh 起動により live 確認)bash scripts/claude-gpt/runtime_smoke_test.sh --scenario issue_createacme-test/fake-repoという trusted repo 外の名前を使っていたため autoMode second-gate classifier に拒否される flake を検出し、fake provider への repo 引数をCLAUDE_GPT_TRUSTED_REPO(squne121/loop-protocol)に固定して解消(fake_gh.py は network を一切叩かないため real GitHub には影響しない)rg -n "CLAUDE_GPT_ISOLATION_PROFILE" .claude/skills/create-issue/scripts/create_issue_txn.pyuv run --locked pytest .claude/skills/create-issue/tests/test_create_issue_txn.py -vuv run --locked pytest scripts/claude-gpt/tests/test_issue_create_bridge_credential_sentinel.py -vbash scripts/claude-gpt/live_issue_create_canary.sh(opt-in なし)bash -n構文確認、opt-in 経路自体は未 opt-in で live 実行せず)pnpm typecheckpnpm lintpnpm testpnpm builduv run --locked pytest scripts/claude-gpt/tests/ .claude/skills/create-issue/tests/ruff check(変更 python ファイル)shellcheck(変更 shell ファイル、既存箇所の pre-existing warning のみ残存)受け入れ条件の達成状況
launch.sh/lib.shが GitHub auth 関連 env var(GH_TOKEN/GITHUB_TOKEN/GH_CONFIG_DIR等)のみ native 同等に子プロセスへ共有し、SSH_AUTH_SOCK等の無関係な secret は引き続き isolate されていることを credential sentinel test(test_issue_create_bridge_credential_sentinel.py、実launch.sh起動)で live 確認したruntime_smoke_test.sh --scenario issue_createが genuineissue-creator経由で dedupe read を含む通常 procedure を認証エラーなく完走することを live 3 回連続実行で確認したcreate_issue_txn.pyに isolation profile 分岐が存在しないことをrg -n "CLAUDE_GPT_ISOLATION_PROFILE"(exit 1)で確認したTransactionResult.node_id/body_sha256フィールド、run_transaction_with_authoritative_readback()、ghsubprocess timeout 処理改善を native path に取り込んだ(test_create_issue_txn.py129 passed で回帰確認)runtime_smoke_test.sh --scenario issue_createを fake provider に対して 3 回連続 live 実行し、authoritative readback が fake provider の state と一致することを確認、flakiness なしcreate_issue_txn.pyの回帰テスト(129 passed)、pnpm typecheck/lint/test(1872 tests)/buildすべて green を維持したtest_issue_create_bridge_credential_sentinel.py(3 passed)が GH auth sentinel の子プロセスへの到達と、stdout/stderr/artifact への非露出、SSH 系 sentinel の完全不在を live 確認したlive_issue_create_canary.shが opt-in(env var +--confirm)なしでは常に SKIP(exit 77)で終了することを確認したSafety Claim Matrix
本 PR は
.claude/skills/create-issue/scripts/create_issue_txn.pyとscripts/claude-gpt/launch.sh/lib.shの credential 境界を変更する safety-sensitive な変更のため、境界の転換内容を明示する。GH_TOKEN/GITHUB_TOKEN/GH_ENTERPRISE_TOKEN/GITHUB_ENTERPRISE_TOKEN/GH_HOST/GH_REPO/GH_CONFIG_DIR)共有test_gh_auth_sentinel_shared_native_but_never_printed(3 passed)HOME/XDG_CONFIG_HOME/XDG_CACHE_HOMEは引き続き空の隔離ディレクトリに置換、SSH_AUTH_SOCK/GIT_ASKPASS/SSH_ASKPASS/GIT_CREDENTIAL_HELPERは引き続き unsettest_ssh_and_credential_helper_sentinels_remain_isolated_and_never_printed(3 passed)launch.sh起動で検証test_issue_create_bridge_credential_sentinel.py全3ケース PASScreate_issue_txn.pyの GitHub mutation correctnesstest_create_issue_txn.py(129 passed)、GitHub server-side protection(branch protection/required CI/repository permission)に委譲Runtime Verification Applicability
decision: immediate(Issue #2299 本文)。AC2/AC5 は live 実行で確認済み(3 回連続 PASS)。証跡は
scripts/claude-gpt/.evidence/issue-create-scenario-*.jsonに生成される(token/credential/raw env は含まない)。
Allowed Paths 準拠
以下の各パスへの変更が Issue #2299 の Allowed Paths 内に収まっている:
scripts/claude-gpt/launch.sh(credential scrub 方針変更)scripts/claude-gpt/lib.sh(同上)scripts/claude-gpt/runtime_smoke_test.sh(issue_create シナリオ追加)scripts/claude-gpt/live_issue_create_canary.sh(新規、opt-in canary)scripts/claude-gpt/tests/(fake provider・sentinel テスト新規).claude/skills/create-issue/scripts/create_issue_txn.py(salvage 取り込み)docs/dev/secret-policy.md(方針変更の明文化)docs/dev/workflow.mdは Required Design Reference として参照したが、本 PR の変更内容と直接関係する既存記述が無かったため変更していない。