Repository navigation
実装: AGY auth surfaceと因果主張のmachine-readable baselineを追加する (#1778) - #1780
Merged
squne121 merged 1 commit intoJul 26, 2026
Merged
Conversation
CLOSED済み#1494の敵対的再監査で判明した設計gapを機械可読なbaseline artifactとして固定する。audit_agy_auth_surface.py(認証surface露出・ read_only未強制の静的検出)とcheck_agy_causal_claim_drift.py (Issue参照コメントとreferences/*.md status整合のfail-closed検出)を 新規追加し、AGY_CAUSAL_CLAIM_MANIFEST_V1 schemaとhermeticテストで 両者の出力を検証する。agy_permission_policy.py / run_gemini_headless.py は一切編集しない(behavior changeなし)。 Closes #1778 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-1780/ The preview will be removed when this PR is closed. |
squne121
commented
Jul 26, 2026
squne121
left a comment
Owner
Author
There was a problem hiding this comment.
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: "e3db3a528d5b90e10dd2e1d2ec46b699c5a62273"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []レビュー詳細(日本語)
- Linked Issue: #1778(
Closes #1778を PR 本文に含む) - Allowed Paths:
git diff --name-only origin/main HEADの 9 ファイルが Issue #1778 の Allowed Paths(新規 5 ファイル + 追記のみ 4 ファイル)と完全一致。逸脱なし。 - AC coverage: AC1〜AC9 全て PR 本文
## 受け入れ条件の達成状況に[x]+ 根拠記載あり。各 VC を独立再実行し一致を確認済み(rg/pytest -k read_only4 passed /pytest -k issue_17582 passed /jsonschema.Draft202012Validatorで両スクリプト出力を検証し 0 エラー /rgschema-governance / 全 16 test PASS / python-test-plan.json 登録確認 /agy_permission_policy.py・run_gemini_headless.py無変更 / references 2 本は insertions のみ)。 - behavior change なし: AC8 の通り
agy_permission_policy.py/run_gemini_headless.pyは本 PR で一切変更されていない。 - Schema Consumer Inventory:
AGY_CAUSAL_CLAIM_MANIFEST_V1(新規、additive)の consumer inventory・Compatibility Decision が PR 本文・docs/dev/schema-governance.mdの両方に記載済み。 - Safety Claim Matrix: 記載済み。
Not controlledは「認証 surface の実削減」「read-only OS 強制導入」であり、Issue 本文自身が Issue B/D として follow-up 予定であることを明記している(本 Issue の Out of Scope と整合)。 - CI: 全 required check green(
ci_verdict_summary.py→failed_checks: [] / pending_checks: [] / next_action: none)。mergeStateStatus: CLEAN。 - blocker なし。
squne121
marked this pull request as ready for review
July 26, 2026 01:46
squne121
deleted the
worktree-issue-1778-agy-auth-surface-machine-readable-baseli
branch
July 26, 2026 01:46
This was referenced Jul 26, 2026
squne121
added a commit
that referenced
this pull request
Jul 26, 2026
* 実装: check_agy_causal_claim_drift.pyをCI required checkとして統合する (#1788) Issue #1778 (PR #1780) で追加された scripts/check_agy_causal_claim_drift.py が CI workflow から一切呼び出されておらず required check として機能して いなかった問題を解消する。 - check_agy_causal_claim_drift.py に --apply-baseline フラグを追加 (検出ロジック自体は不変。既存 54 件の drift を _CI_GATE_BASELINE_KEYS として許容し、新規 drift のみを fail-close する baseline snapshot 方式) - .github/workflows/ci.yml に agy-causal-claim-drift-gate job を追加し ci-verdict-summary の needs に統合 - scripts/tests/test_check_agy_causal_claim_drift_ci_gate.py を新規追加 (AC4: 意図的な drift fixture で fail-close / AC5: clean fixture で pass / 実リポジトリで baseline 適用時に無関係な PR をブロックしないことを検証) - docs/dev/ci-operations.md に Section 8.3 (採用方針・fail-close 対応手順) を追加 Scope Delta (Allowed Paths 外だが AC6 に必須と判明したため追加、Issue 本文 に判断根拠を記載済み): - .claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py: CLASSIFICATION_MAP/REQUIRED_CHECKS に新 check を登録 (未登録だと classification: unknown で常時 blocking になり AC6 が成立しない) - 対応する契約テストの fixture 更新 - .github/ci/python-test-plan.json に新規テストファイルを登録 Closes #1788 Co-Authored-By: Claude Sonnet 5 <[email protected]> * 実装: AGY_CAUSAL_CLAIM_MANIFEST_V1 schemaへ --apply-baseline 追加フィールドを登録する (#1788) check_agy_causal_claim_drift.py の --apply-baseline が manifest に追加した 3つの任意 top-level field (baseline_applied / baseline_count / new_finding_count) を、additionalProperties: false の共有 schema (audit_agy_auth_surface.py と共有) に追加登録する (Scope Delta、Issue 本文に 判断根拠を記載済み)。全て optional のため additive/backward-compatible。 Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: PR #1790 CI green化(PR Body Japanese Check・python-test) - docs/dev/ci-operations.md: 既存の非 canonical 英語見出し 17 ブロックに 日本語併記を追加し、whole-file 日本語比率チェック(PR Body Japanese Check)を通過させる。本文の意味・構成は変更しない。 - .github/ci/python-test-plan.json: test_baseline_vc_preflight.py:: test_issue_393_snapshot_fixture_processed が 4-way xdist の CPU 飽和下で 90s subprocess timeout に達して flake するため、ファイル全体を parallel_exclude(serial lane, -n 0)へ移動した。検出ロジック・テスト 内容は不変(serial 実行では 139 passed / 1 skipped で安定)。 - scripts/ci/tests/test_python_test_plan.py: 上記 parallel_exclude 追加を 反映して契約テストの期待値を更新した。 Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
7 tasks
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.
Summary
audit_agy_auth_surface.py(新規):agy_permission_policy.pyを静的解析し、materialize_isolated_agy_workspace()が露出する 5 つの認証 surface と、read_only命名関数のうち OS レベル強制(bwrap/chmod/mount)を含まないもの(_expose_gcloud_adc_read_only/_expose_agy_oauth_token_read_only)を検出する。scripts/check_agy_causal_claim_drift.py(新規):agy_permission_policy.py/run_gemini_headless.pyのIssue #N参照コメントとreferences/*.mdfrontmatterstatusの整合を検出し、# SUPERSEDED (Issue #M): ...マーカー欠落時に fail-close(non-zero exit)する。AGY_CAUSAL_CLAIM_MANIFEST_V1schema(JSON Schema draft 2020-12)を新規追加し、両スクリプトの出力形式として使う。docs/dev/schema-governance.mdの Known Schemas 表に登録済み。agy_permission_policy.py/run_gemini_headless.pyは一切編集していない)。references/*.md2 本は既存本文を削除せず追記のみ。本 PR は Issue #1778 を close する: Closes #1778
Checks(検証コマンド実行結果)
pnpm typecheck(型チェック、成功)pnpm lint(静的解析、成功)pnpm test(vitest、1814 件成功)pnpm build(ビルド、成功)Schema Change Applicability
schema_changeAGY_CAUSAL_CLAIM_MANIFEST_V1を新規追加(producer 2 件:audit_agy_auth_surface.py/check_agy_causal_claim_drift.py)。既存 schema の変更は含まない。Schema Consumer Inventory
変更対象 schema:
AGY_CAUSAL_CLAIM_MANIFEST_V1(新規)before/after 差分:
Consumer 列挙(rg コマンド例と結果):
Consumer 更新状況:
audit_agy_auth_surface.pycheck_agy_causal_claim_drift.pytest_audit_agy_auth_surface.pytest_check_agy_causal_claim_drift.pydocs/dev/schema-governance.mdCompatibility Decision(互換性の判定)
additivebackward_compatiblenoN/ASafety Claim Matrix
agy_permission_policy.py/run_gemini_headless.pyの挙動は本 PR で変更されないgit diff --name-only origin/main -- .claude/skills/gemini-cli-headless-delegation/scripts/agy_permission_policy.py .claude/skills/gemini-cli-headless-delegation/scripts/run_gemini_headless.pyが空出力audit_agy_auth_surface.pyは静的解析のみで、認証 surface を実際に削減・強制しないbwrap導入等)は本 PR の scope 外rg/ hermetic pytest)bwrap導入検討)。本 Issue 完了後に起票予定check_agy_causal_claim_drift.pyは fail-close だが、CI gate としての強制は本 PR の scope 外(新規テストファイルをpython-test-plan.jsonに登録するのみ)受け入れ条件の達成状況
audit_agy_auth_surface.pyが 5 つの認証 surface(DBUS_SESSION_BUS_ADDRESS/XDG_RUNTIME_DIR/GOOGLE_APPLICATION_CREDENTIALS/gcloud_adc_path/agy_oauth_token_path)を出力することをtest_auth_surface_enumeration_finds_all_five_surfacesで確認済み。_expose_gcloud_adc_read_only/_expose_agy_oauth_token_read_onlyの両方が unenforced として検出されることをtest_read_only_functions_detected_in_real_repo_fileで確認済み(-k read_onlyで 4 件 PASS)。Issue #1758参照コメント(agy_permission_policy.py 3 箇所)がagy-headless-tool-use-investigation.md(status: resolved)に照らし逆参照マーカー欠落として検出され、non-zero exit(1)で fail-close することを確認済み(-k issue_1758で 2 件 PASS)。jq empty/python3 -m json.tool相当)であり、両スクリプトの実際の出力をjsonschema.Draft202012Validatorで検証し 0 エラーであることを確認済み。docs/dev/schema-governance.mdの Known Schemas 表にAGY_CAUSAL_CLAIM_MANIFEST_V1の consumer inventory・Compatibility Decision を登録済み。test_audit_agy_auth_surface.py(10 件)とtest_check_agy_causal_claim_drift.py(8 件)、計 16 件が全て PASS。scripts/tests/test_check_agy_causal_claim_drift.pyを.github/ci/python-test-plan.jsonのtargetsに登録済み。git diff --name-only origin/main -- agy_permission_policy.py run_gemini_headless.pyが空出力(無変更)であることを確認済み。git diff --stat origin/main -- <2つの references/*.md>がinsertions のみ・deletions 0であることを確認済み(既存本文削除なし)。検証コマンド結果
追加で
pnpm typecheck/pnpm lint/pnpm test(1814 件成功)/pnpm build/uv run --locked ruff check(新規ファイル対象、違反 0)を実行済み。Allowed Paths 遵守
git diff --name-only origin/main HEADの出力は以下の 9 ファイルのみであり、Issue #1778 の Allowed Paths(新規 5 ファイル + 追記のみ 4 ファイル)と完全一致する。Allowed Paths 外の変更は無い。Notes
CI_TEST_PERFORMANCE_DECISION_V1(証跡)
新しいテストは 2 ファイルとも hermetic(外部 I/O なし、
tmp_pathfixture 使用)で実行時間は合計 0.05 秒。CI runtime への影響は無視できる規模であり、performance claim(高速化・低速化の主張)は行っていない(claim.kind: none相当)。