Skip to content

実装: AGY認証surfaceを最小化しOAuth credentialの真正read-only境界を実装する #1779

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1265"
goal_ref: "AGY (Antigravity CLI) provider migration: 実 AGY 認証 surface を必要最小限へ縮小し、read-only 主張を実装で裏付ける"
change_kind: code

Parent Issue

#1265

Parent Goal Ref

Current Validated Scope

  • .claude/skills/gemini-cli-headless-delegation/scripts/agy_permission_policy.py の materialize_isolated_agy_workspace() / _expose_gcloud_adc_read_only() / _expose_agy_oauth_token_read_only() / _WORKSPACE_DENY_GATE_HOOK_SOURCE / IsolatedAgyWorkspace を対象に、認証 surface 最小化と read-only 境界の真正実装のみを行う。
  • .claude/skills/gemini-cli-headless-delegation/scripts/run_gemini_headless.py の _run_agy() 内、実際に agy subprocess を起動している箇所(subprocess.run(command, ...))に限り、上記モジュールが返す bwrap 起動 prefix を消費する最小限の配線を行う(_run_agy() の他のロジック・provenance hook 配線・fallback 分岐には手を入れない)。

Remaining Parent Gaps

  • AGY_GROUNDED_RESEARCH_MODEL の exact model hardcode を capability-driven routing へ置換する(別 Issue C、未起票)。
  • grounded_research の clean-room review と causal claim drift gate(別 Issue D、未起票)。
  • AGY auth surface と因果主張の machine-readable baseline(別 Issue A、未起票。audit_agy_auth_surface.py 等の audit script は本 Issue の必須依存ではないが、既に merge 済みなら活用する)。

Scope Collision

check_issue_overlap.py の preflight は decision: overlap_requires_comment(policy_class C1)を返した(候補: #1774 / #420 / #205 / #14)。目視確認の結果、以下の理由で本 Issue は scope が異なることを確認し、そのまま新規起票する(3 択の 3 番目を選択):

Outcome

.claude/skills/gemini-cli-headless-delegation/scripts/agy_permission_policy.py の materialize_isolated_agy_workspace() が既定でデフォルト露出する認証 surface を agy_oauth_token_path のみへ最小化し、DBus / gcloud ADC 系 surface は明示的な opt-in profile に分離した状態で PR がマージされる。_expose_agy_oauth_token_read_only() は bwrap 利用可能環境では実際に kernel-enforced read-only bind(--ro-bind 相当)を使用し、bwrap 不可能な環境では関数名・戻り値・ログから「read_only」という未実証の主張を除去して degraded_symlink_reachability を明示する状態になる。_WORKSPACE_DENY_GATE_HOOK_SOURCE は実行コードを持つ実効な hook として実装されるか、機能しないことが確定した場合は no-op placeholder として明示ドキュメント化される。tool deny 機構(PROFILE_ALLOWED_TOOLS ベースの静的 allowlist)が最小化・修正後も継続して機能することが pytest で回帰確認され、read-only 境界が実際に書込みを失敗させることがダミー fixture の統合テストで検証されている状態を完了とする。

In Scope

  1. materialize_isolated_agy_workspace() から、DBUS_SESSION_BUS_ADDRESS / XDG_RUNTIME_DIR / GOOGLE_APPLICATION_CREDENTIALS / gcloud_adc_path(_expose_gcloud_adc_read_only() 経由)のデフォルト露出を削除する。将来これらが必要になる環境を想定し、完全削除ではなく明示的な opt-in profile(例: materialize_isolated_agy_workspace(profile, *, auth_profile=AGY_AUTH_PROFILE_MINIMAL) のように AGY_AUTH_PROFILE_MINIMAL / AGY_AUTH_PROFILE_EXTENDED を区別する引数)へ分離する。既定値は AGY_AUTH_PROFILE_MINIMAL(新4surfaceを露出しない)とし、既存呼び出し元(run_gemini_headless.py::_run_agy() 経由の build_agy_run_context() / materialize_isolated_agy_workspace() 呼び出し)は明示的に auth_profile を指定しない限り minimal で動作するよう更新する。agy_oauth_token_path は既定のまま維持する(AGY_AUTH_ABLATION_V1 で認証成功に必要十分と実証済み)。実装: AGY profile別isolated permission policyとno-tools negative evidenceを導入する #1705 の tool_profile(no_tools / local_asset_research / grounded_research / proposal_only)とは別軸のパラメータであることを docstring で明記し、混同を防ぐ。
  2. _expose_agy_oauth_token_read_only() を、bwrap が利用可能な環境では実際に --ro-bind を用いた kernel-enforced read-only bind を行うよう修正する。具体的には、agy_permission_policy.py 側に bwrap 利用可否を判定する関数(例: _bwrap_available() -> bool、shutil.which("bwrap") ベース)と、bwrap 起動 prefix(--ro-bind <token_file> <link_path> 等を含む argv リスト)を組み立てる関数を追加し、IsolatedAgyWorkspace に「read-only が kernel-enforced か degraded か」を示すフィールド(例: agy_oauth_token_readonly_mode: str、値は kernel_enforced_ro_bind | degraded_symlink_reachability | absent)を追加する。run_gemini_headless.py::_run_agy() の subprocess.run(command, ...) 呼び出し箇所のみ、kernel_enforced_ro_bind の場合に bwrap prefix を command へ前置する最小限の配線を追加する。bwrap 不可能な環境では、関数名・戻り値・ログ出力から「read_only」という主張を除去し、degraded_symlink_reachability という用語を明示的に使う。security-sensitive profile(no_tools / local_asset_research)では bwrap 不可能な場合に fail-closed(materialize_isolated_agy_workspace() が明示的な例外を送出し、workspace を作らない)をデフォルトとする。grounded_research プロファイルは、bwrap 不可能でも degraded モードでの続行を許容してよいか実装時に判断し、判断根拠を docstring とテストに残す。
  3. _WORKSPACE_DENY_GATE_HOOK_SOURCE について、以下いずれかを実施する: (a) AGY 公式ドキュメント(https://antigravity.google/docs/cli/reference / https://antigravity.google/docs/cli/using 等)を再調査し、実際に機能する permissions.allow/deny または hooks.PreToolCall 相当のスキーマが判明すれば実行コードを実装する。(b) 機能しないと判明した場合は、PROFILE_ALLOWED_TOOLS ベースの静的 allowlist(resolve_tool_permission() / build_workspace_permission_policy())が tool deny の唯一の実効的な防御であることをモジュール docstring とコメントに明記し、_WORKSPACE_DENY_GATE_HOOK_SOURCE を生成する hook_path.write_text(...) 呼び出しを削除するか、生成する場合はファイル冒頭コメントに no-op placeholder である旨を明示する。
  4. 上記変更後も tool deny 機構(no_tools / local_asset_research 全 deny、grounded_research allowlist 限定、実装: AGY profile別isolated permission policyとno-tools negative evidenceを導入する #1705 実装)が引き続き機能することを確認する回帰テストを追加・実行する。
  5. read-only boundary が実際に機能する(bwrap ro-bind 経由の書込み試行が失敗する)ことを、ダミー fixture を使った統合テストで検証する(実 credential は使わない)。
  6. surface 最小化後も既存の E2E fan-out(調査: fan-out orchestrator の実AGY/Serena MCP/WebSearch並列実行E2E検証を行う #1494 相当のシナリオ)が引き続き成功することを、hermetic テストの範囲で確認する(live 確認の要否は Runtime Verification Applicability を参照)。
  7. .claude/skills/gemini-cli-headless-delegation/references/runtime-portability.md の該当箇所を、最小化後の設計(auth_profile 分離、bwrap ro-bind、degraded contract)に合わせて更新する。歴史的な finding(実装: AGY isolated workspaceが既存認証済みセッションへ値露出なしで到達できるようにする #1726/実装: AGY isolated workspaceがgcloud ADC認証キャッシュへ値露出なしで到達できるようにする #1730/実装: AGY isolated workspaceがagy固有OAuthトークンファイルへ値露出なしで到達できるようにする #1740/実装: AGY OAuthトークンのisolated workspace内symlink配置先をXDG_CONFIG_HOMEからHOME配下に修正する #1743 の診断過程)は削除せず、superseded_by として本 Issue 番号と検証日時を追記する形で残す。

Out of Scope

Acceptance Criteria

  • AC1: materialize_isolated_agy_workspace(profile) を既定引数(auth_profile 省略)で呼んだ場合、返る env に DBUS_SESSION_BUS_ADDRESS / XDG_RUNTIME_DIR / GOOGLE_APPLICATION_CREDENTIALS のいずれも含まれず、workspace.gcloud_adc_path が None である。
  • AC2: materialize_isolated_agy_workspace(profile) を既定引数で呼んだ場合でも、workspace.agy_oauth_token_path は実ホストにトークンファイルが存在すれば従来どおり non-None になる(認証成功に必要十分な surface は維持される)。
  • AC3: 明示的な auth_profile=AGY_AUTH_PROFILE_EXTENDED(または同等の opt-in 引数)を指定した場合のみ、DBUS_SESSION_BUS_ADDRESS / XDG_RUNTIME_DIR / GOOGLE_APPLICATION_CREDENTIALS / gcloud_adc_path が従来どおり露出される。
  • AC4: bwrap が利用可能な環境で _expose_agy_oauth_token_read_only()(またはその後継関数)を経由して生成された workspace は、agy_oauth_token_readonly_mode(または同等フィールド)が kernel_enforced_ro_bind を示す。
  • AC5: bwrap が利用可能な環境で、生成された bwrap prefix 経由でトークンファイルの symlink 先へ書込みを試みると失敗する(読み取りは成功する)ことをダミー fixture(実 credential ではない)で検証する。
  • AC6: bwrap が利用不可能な環境をシミュレートした場合、agy_oauth_token_readonly_mode は degraded_symlink_reachability を示し、モジュール内のどの関数名・戻り値・ログ文字列にも「read_only」という未実証の主張が残っていない。
  • AC7: bwrap 利用不可能な環境で no_tools または local_asset_research profile を指定して materialize_isolated_agy_workspace() を呼ぶと、明示的な例外で fail-closed する(workspace が作られない)。
  • AC8: _WORKSPACE_DENY_GATE_HOOK_SOURCE が実行コードを持つ実効な hook として実装されているか、no-op placeholder であることが明示コメント化されているかのいずれかである(トリプルクォート docstring のみの無表示ファイルのまま放置されていない)。
  • AC9: 修正後も no_tools / local_asset_research の全 tool deny、grounded_research の allowlist 限定(search_web / read_url_content のみ許可)が既存 pytest で回帰確認される。
  • AC10: find_credential_like_files() が、最小化後の workspace でも意図しない credential-like ファイルを検出しない(既存不変条件の維持)。
  • AC11: .claude/skills/gemini-cli-headless-delegation/references/runtime-portability.md に、最小化後の auth_profile 設計・bwrap ro-bind・degraded contract の説明が追記され、過去の finding には superseded_by 参照が付与されている。
  • AC12: 既存の test_agy_permission_policy*.py / test_agy_provider.py を含む gemini-cli-headless-delegation 配下の pytest が全て PASS する。

Verification Commands

# AC1
# baseline-expect: pass
$ rg -n -e DBUS_SESSION_BUS_ADDRESS -e XDG_RUNTIME_DIR -e GOOGLE_APPLICATION_CREDENTIALS .claude/skills/gemini-cli-headless-delegation/scripts/agy_permission_policy.py
# AC2
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_oauth_token.py -q
# AC3
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_env_allowlist.py -q
# AC4
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py -q -k kernel_enforced
# AC5
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py -q -k write_fails
# AC6
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py -q -k degraded
# AC7
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py -q -k fail_closed
# AC8
# baseline-expect: pass
$ rg -n -e "no-op placeholder" -e PreToolCall .claude/skills/gemini-cli-headless-delegation/scripts/agy_permission_policy.py
# AC9
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy.py -q
# AC10
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy.py -q -k isolated_workspace_does_not_copy_credential_files
# AC11
$ rg -n -e degraded_symlink_reachability -e kernel_enforced_ro_bind -e superseded_by .claude/skills/gemini-cli-headless-delegation/references/runtime-portability.md
# AC12
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/ -q

Allowed Paths

  • .claude/skills/gemini-cli-headless-delegation/scripts/agy_permission_policy.py
  • .claude/skills/gemini-cli-headless-delegation/scripts/run_gemini_headless.py(_run_agy() 内、agy subprocess 起動箇所への bwrap prefix 配線のみ。他ロジックは変更しない)
  • .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy.py
  • .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_env_allowlist.py
  • .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_gcloud_adc.py
  • .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_oauth_token.py
  • .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py(新規)
  • .claude/skills/gemini-cli-headless-delegation/tests/test_agy_provider.py
  • .claude/skills/gemini-cli-headless-delegation/references/runtime-portability.md

実装前に上記パスの実在・過不足を再確認し、乖離があれば ## Scope Delta に記録すること。

Stop Conditions

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

Issue 固有の追加 Stop Conditions:

  • IsolatedAgyWorkspace のキー集合・auth_profile の enum 値・agy_oauth_token_readonly_mode の enum 値の変更が必要になった場合(In Scope の固定契約変更に該当)
  • Issue A/C/D(未起票または未 merge)への波及が判明した場合(後続 Phase / 別スコープへの波及に該当)
  • bwrap が CI 実行環境に存在しない可能性が判明した場合。bwrap 不在時の hermetic テスト分岐(skip ではなく degraded モード検証への切替)を必ず設計し、CI green を bwrap の存在に依存させないこと(外部サービス利用・既存テスト大規模改変に準ずる判断が必要な場合に該当)

Required Skills

  • Python(pathlib / subprocess / dataclasses)
  • Linux namespace sandboxing(bwrap / bubblewrap の --ro-bind セマンティクス)
  • pytest(fixture-based negative test 設計)

Required Design References

  • .claude/skills/gemini-cli-headless-delegation/references/runtime-portability.md
  • .claude/skills/gemini-cli-headless-delegation/references/isolated-cwd-rationale.md
  • docs/dev/secret-policy.md

Scope Delta(該当時のみ記載)

N/A(実装前に Allowed Paths を再確認し、乖離があれば追記する)

Runtime Verification Applicability

本 Issue は認証 surface・read-only 境界という security-sensitive な runtime 挙動を扱うため、静的検証のみでは不十分な部分が含まれる。

decision: immediate
reason: "bwrap ro-bind の kernel-enforced read-only 強制、および degraded モードでの fail-closed 挙動は、hermetic pytest 内でダミー fixture を使い実プロセス実行(bwrap起動+書込み試行)で検証する必要があるため。実 AGY credential を使った live 確認まではAC/VCの必須範囲に含めない(AGY_AUTH_ABLATION_V1で必要十分性は既に実証済みのため)。"
applicable_acs:
  - AC4
  - AC5
  - AC6
  - AC7
execution_environment: "hermetic pytest プロセス内。bwrap 利用可能な Linux 環境(CI runner 相当)でダミー fixture を用いて bwrap 実プロセスを起動し、kernel-enforced read-only bind の書込み試行を行う。実 AGY credential・外部ネットワークは使用しない。"
skip_conditions: "SKIP(exit 77)は使用しない。bwrap が実行環境に存在しない場合は degraded_symlink_reachability 分岐が正しく選択されることを検証するテストへ切り替える(Stop Conditions 参照)。"
fallback_policy: "bwrap 不在環境では degraded_symlink_reachability 検証系テスト(AC6/AC7 相当)のみを実行し、kernel_enforced_ro_bind 系テスト(AC4/AC5)は bwrap 利用可能環境でのみ実行する設計とする。CI green を bwrap の存在に依存させない。"
artifact_requirements: "test_agy_permission_policy_readonly_boundary.py の pytest 実行結果(exit code・stdout)を PR コメントまたは test-runner 証跡として記録する。"
  • 対応 AC: AC4 / AC5 / AC6 / AC7(bwrap の実プロセス起動と書込み試行を伴う hermetic 統合テスト)
  • 証跡: test_agy_permission_policy_readonly_boundary.py の pytest 実行結果(exit code)を VC として記録する
  • bwrap が CI/実装環境に存在しない場合は SKIP(exit 77)ではなく、degraded_symlink_reachability 分岐が正しく選択されることを検証するテストへ倒す(Stop Conditions 参照)

Security Claim Matrix

主張 現状(PR前) 変更後 実装で担保する機構 検証方法
DBus session bus reachability が認証に必要 常時露出(環境変数伝播) 既定で非露出、auth_profile=EXTENDED 時のみ露出 materialize_isolated_agy_workspace() の auth_profile 分岐 AC1/AC3 VC
gcloud ADC read-only exposure が認証に必要 常時露出(symlink、chmod 制御なし) 既定で非露出、auth_profile=EXTENDED 時のみ露出(symlink のまま、read-only は未強制のまま明示) materialize_isolated_agy_workspace() の auth_profile 分岐 AC1/AC3 VC
GOOGLE_APPLICATION_CREDENTIALS path 伝播が認証に必要 常時露出 既定で非露出、auth_profile=EXTENDED 時のみ露出 materialize_isolated_agy_workspace() の auth_profile 分岐 AC1/AC3 VC
agy_oauth_token_path の "read only" 露出 関数名は read_only を主張するが実装は Path.symlink_to() のみで OS レベルの強制なし(symlink 経由の書込みが実際に成功することを確認済み) bwrap 利用可能環境では --ro-bind による kernel-enforced read-only。不可能な環境では degraded_symlink_reachability と明示し、no_tools/local_asset_research では fail-closed _bwrap_available() 判定 + bwrap prefix 組み立て + agy_oauth_token_readonly_mode フィールド AC4/AC5/AC6/AC7 VC
_WORKSPACE_DENY_GATE_HOOK_SOURCE による tool-call deny docstring のみで実行コードなし。機能する裏付けなし 実効な hook として実装、または no-op placeholder と明示(実効防御は PROFILE_ALLOWED_TOOLS allowlist のみと明記) (a) hook 実装 または (b) docstring 修正 + allowlist が唯一の防御である旨の明記 AC8/AC9 VC
tool deny(no_tools/local_asset_research全deny、grounded_researchallowlist限定) PROFILE_ALLOWED_TOOLS により機能(既存実装、#1705) 変更なし(回帰確認のみ) resolve_tool_permission() / build_workspace_permission_policy()(既存、変更しない) AC9 VC

Schema Change Applicability

本 Issue は producer-consumer 境界をまたぐ machine-readable contract(schemas/catalog.yaml 登録対象)を変更しない。ただし IsolatedAgyWorkspace(dataclass、agy_permission_policy.py 内部の呼び出し元契約)にフィールド追加(例: agy_oauth_token_readonly_mode)が発生するため、実装 PR の本文では .github/pull_request_template.md の ## Schema Change Applicability セクションで uncertain または not_schema_change のいずれかを判定し、IsolatedAgyWorkspace の consumer(run_gemini_headless.py::_run_agy() / build_agy_run_context())を Schema Consumer Inventory 相当として明記すること。

  • decision(本 Issue 起票時点の暫定判定): uncertain
  • reason: IsolatedAgyWorkspace は schemas/catalog.yaml に未登録の内部 dataclass だが、run_gemini_headless.py という別ファイルの consumer を持つため、PR 実装時に実差分を見て pr-review-judge の基準で確定判定する。

Dependencies

Notes for Reviewer

Delivery Rule

  • 1 Issue = 1 PR
  • 実装は worktree で行い、Draft PR を既定とする
  • 実装 PR の本文には Closes #<本 Issue 番号> を必ず含める(本 Issue 番号は起票後に GitHub が採番する)

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    on Jul 26, 2026
  2. squne121 commented on Jul 26, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-26T01:58:58Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1779
      body_sha256: "sha256:3cc508f04577f3d2695921fbb31e4103cf528f9d3a38176eb4fcd799f26786c6"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:3cc508f04577f3d2695921fbb31e4103cf528f9d3a38176eb4fcd799f26786c6","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":3,"raw_command":"rg -n -e DBUS_SESSION_BUS_ADDRESS -e XDG_RUNTIME_DIR -e GOOGLE_APPLICATION_CREDENTIALS .claude/skills/gemini-cli-headless-delegation/scripts/agy_permission_policy.py","command_hash":"sha256:761406032fef0555c8c3ae503a561660d52c6db946c9b067dc2e454ccc6467c0","execution_key_hash":"sha256:19883c4c3a8034bdd22ebfd4ff016a7ee3028d8b232d700ebc72641f07752cb1","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["305:# DBUS_SESSION_BUS_ADDRESS / XDG_RUNTIME_DIR endpoint pointers in Issue #1726).","306:GOOGLE_APPLICATION_CREDENTIALS_ENV = \"GOOGLE_APPLICATION_CREDENTIALS\"","579:    # - DBUS_SESSION_BUS_ADDRESS: the well-known D-Bus session bus address,","585:    # - XDG_RUNTIME_DIR: the per-user runtime directory","597:        \"DBUS_SESSION_BUS_ADDRESS\",","598:        \"XDG_RUNTIME_DIR\",","604:    # Issue #1730 AC2: GOOGLE_APPLICATION_CREDENTIALS, when already set in the","609:    google_application_credentials = os.environ.get(GOOGLE_APPLICATION_CREDENTIALS_ENV)","611:        env[GOOGLE_APPLICATION_CREDENTIALS_ENV] = google_application_credentials"],"stdout_truncated":false,"stdout_original_line_count":10,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC2","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_oauth_token.py -q","command_hash":"sha256:c8d1b7a3b9f1f6b5108c8126ab6d6bb434d4d35c9e7727d47702b47cac4a8acb","execution_key_hash":"sha256:c6ca4ff555f0ea3ba419312fdc484308a5d0492630b4ed885c5110d794bc25b5","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":[".........                                                                [100%]","9 passed in 0.07s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":245,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC3","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_env_allowlist.py -q","command_hash":"sha256:70ea2f64f161efb82c7b960db2a4e615ae03b86348918a808b83f20b88e35c24","execution_key_hash":"sha256:aa03d9e1b114fe79611d885d76fbe98a077df0d290db6a53d9cbc55b997ede7b","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["........                                                                 [100%]","8 passed in 0.05s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":221,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC4","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py -q -k kernel_enforced","command_hash":"sha256:99555c2e252d2f5928cb0eb8b40bfd6bf48a353ef45d2acdf50f39a988c9425e","execution_key_hash":"sha256:50d14087c604e8709c6f4eba10dd4cb543422ccabdfe589becb00b0a1662ec81","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.01s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":190,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC5","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py -q -k write_fails","command_hash":"sha256:a2c341faff0c76fbe8fc52941d5779d8b24a0ae347688e990c8ef674465b87bb","execution_key_hash":"sha256:603ebed246dd5962a8c8e41d6b47bf2b9406c5e9f209aae730497d428906ab6a","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.01s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":182,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC6","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py -q -k degraded","command_hash":"sha256:8333ef98f93ff13d565263b69dd36c9d6193ced18e7ffe617ce7d297e1fca0a4","execution_key_hash":"sha256:7aca736deaf29b17faf667d7eed22f7604de08559619235e5b3cd6e0e40528f3","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.01s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":180,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC7","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py -q -k fail_closed","command_hash":"sha256:e0db4b411aefa0da08646170d7ccae4323010f174af92203203862d9b8408759","execution_key_hash":"sha256:5699da08f36eb389c2a65412015382ac1c2500bf184f3926e826d90d5e2dfdb7","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.01s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy_readonly_boundary.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":184,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC8","line":3,"raw_command":"rg -n -e \"no-op placeholder\" -e PreToolCall .claude/skills/gemini-cli-headless-delegation/scripts/agy_permission_policy.py","command_hash":"sha256:e04bc55d30237b26360f3e3128865cf62f6e69ace9f8f03cf3aedee56670680e","execution_key_hash":"sha256:13d4417b61386f50641ccd719c94d426755889641b451d26c608eb014a43bbe7","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["172:            \"PreToolCall\": [","227:_WORKSPACE_DENY_GATE_HOOK_SOURCE = '''\"\"\"Workspace-scoped PreToolCall deny gate.","457:# deny policy / `workspace_deny_gate` PreToolCall hook above -- is controlled by","475:# PreToolCall hook remain the actual tool allowlist authority -- this fix"],"stdout_truncated":false,"stdout_original_line_count":5,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC9","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy.py -q","command_hash":"sha256:18279ea4f856c28e81a17713881258c55204ea81ec5459993e9e01f5ed724d8b","execution_key_hash":"sha256:a5ee2f355868ba0d59cb492d610be9a4f451d9083e22965c2a03639ac93b9445","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["................                                                         [100%]","16 passed in 0.04s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":271,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC10","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_permission_policy.py -q -k isolated_workspace_does_not_copy_credential_files","command_hash":"sha256:38963d45c70c355038243738a05322e2fa913fd1a4ae071aa5a3ad3e17da19b0","execution_key_hash":"sha256:4a0cb1b2f60aa6549d32a5aacc98e165f63187a5069868fb8d90fceba3098b04","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":[".                                                                        [100%]","1 passed, 15 deselected in 0.03s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":207,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC11","line":2,"raw_command":"rg -n -e degraded_symlink_reachability -e kernel_enforced_ro_bind -e superseded_by .claude/skills/gemini-cli-headless-delegation/references/runtime-portability.md","command_hash":"sha256:8cb87872d498b8a3e961c84cce9202ac3e2d54d387db58a34bb97b64fe7613e9","execution_key_hash":"sha256:80aefdee6eed36ccae499aab61babe34c39d35372c1033fce5bfa97d870ae5c1","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC12","line":2,"raw_command":"uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/ -q","command_hash":"sha256:287ce54dde3b5e26d207f3f562e5814cc142ca79f2b92697c27e5cfb44233e16","execution_key_hash":"sha256:d671203c07d886392a15e2947c2e892d9eb7f5b76c9ef278af96616b557249cc","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["........................................................................ [  7%]","........................................................................ [ 14%]","........................................................................ [ 21%]","........................................................................ [ 28%]","........................................................................ [ 35%]","........................................................................ [ 42%]","........................................................................ [ 50%]","........................................................................ [ 57%]","........................................................................ [ 64%]","........................................................................ [ 71%]","........................................................................ [ 78%]","........................................................................ [ 85%]","........................................................................ [ 93%]","......................................................................   [100%]","1006 passed in 34.89s"],"stdout_truncated":false,"stdout_original_line_count":16,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":37335,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null}]
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: {"issue_number":1779,"contract_source_kind":"issue_comment","contract_source_id":"5081516619","contract_body_sha256":"sha256:3cc508f04577f3d2695921fbb31e4103cf528f9d3a38176eb4fcd799f26786c6","allowed_paths_normalized_sha256":"67912fe7e0cac88172e829ea8962e9fa9bca57a88c907bfb61478a17527a077c","base_ref":"main","base_sha_at_snapshot":"7122654d3535ab3bbf2cea99018dddd88be08935"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions