Repository navigation
実装: AGY/Serena/WebSearch fan-out E2E artifact validatorとenvironment manifestを追加する (#1710) - #1723
Merged
Merged
Conversation
…anifestを追加する (#1710) #1494 レビュー(Blocker5/Blocker6/Major2-4)が求めた、fan-out E2E run のPASS/FAIL判定を 決定論的に行う validate_agy_fanout_e2e_evidence.py を追加する。25 predicate すべてを artifact bundle から評価し AGY_FANOUT_E2E_VERDICT_V1 を出力する。#1708/#1707/#1705/#1706 が提供する既存モジュール(agy_tool_provenance / fan_out_orchestrator / agy_permission_policy / run_gemini_headless の Serena hash chain)を消費し、環境 manifest 生成・positive/negative/ tampering fixture・closed-schema test を含む。 Closes #1710 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
Preview URLPreview removed (PR #1723 closed). |
Co-Authored-By: Claude Sonnet 5 <[email protected]>
squne121
commented
Jul 25, 2026
squne121
left a comment
Owner
Author
There was a problem hiding this comment.
Issue #1710 の contract(Outcome / AC1-AC15 / Allowed Paths / Verification Commands)と PR #1723 の diff・CI 結果・テスト証跡を独立に照合した。
確認事項
- 変更ファイル(
git diff 1df57fcb...abc7761d --name-only)は Issue #1710 の Allowed Paths 3 件(validate_agy_fanout_e2e_evidence.py/test_agy_fanout_e2e_validator.py/tests/fixtures/agy_fanout_e2e/)と完全一致。scope 混入なし。 uv run --locked pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agy_fanout_e2e_validator.py -q→ 20 passed(positive/negative/tampering fixture 全系統)。uv run --locked pytest .claude/skills/gemini-cli-headless-delegation/tests/ -q→ 909 passed(既存回帰なし)。- Issue 本文記載の AC1〜AC13/AC15 の
-k式を個別実行しすべて PASS を確認済み(pytest ... -k <name>)。AC14 はrg -n "consumer inventory" .../validate_agy_fanout_e2e_evidence.pyで確認済み。 - required CI 全 green(
python-test/test/e2e/build/lint/typecheck/actionlint/check-hook-integrity/node-backed-hook-tests/validate-generated-artifact/deploy-pr/PR Body Japanese Check)。head SHAabc7761dに一致。 - Schema Change Applicability:
schema_change。AGY_FANOUT_E2E_VERDICT_V1は新規導入 schema であり、既存 schema(delegation_audit_v1等)を変更しない。Schema Consumer Inventory / Compatibility Decision(additive/backward_compatible)が PR 本文に記載済み。 - Safety Claim Matrix: 6 claim すべて記載済み。
Not controlledが非空の 1 行(live AGY 実行は対象外)に対応する Follow-up(#1494)も記載済み。無限定のsafe/sandboxed等の主張なし。 - overlap preflight(
check_implementation_overlap.pyオンライン再実行、source.complete: true)はroute: proceed_with_collision_evidence(安全経路)。#1708 との fixtures ディレクトリ prefix 重複は Issue 本文の Scope Collision 判断通り disjoint(新規サブディレクトリのみ追加、既存ファイル変更なし)。
Blocker
なし。
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: "abc7761d3503ab7b669e89b6916b4802cdfd2f34"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
squne121
marked this pull request as ready for review
July 25, 2026 02:59
This was referenced Jul 25, 2026
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
#1494(REQUEST_CHANGES レビュー、Blocker5・Blocker6・Major2〜4)が求めた「fan-out E2E run の PASS/FAIL 判定を人手の文章ではなく決定論的 validator で行う」を実装する。validate_agy_fanout_e2e_evidence.pyは固定レイアウトの artifact bundle(fan-out request、child request/result、#1708の hook provenance event、#1707の process lifecycle event、#1705の permission event、#1706の Serena task-linked hash chain record、delegation_audit_v1、artifact manifest、environment manifest)を読み込み、25 predicate すべてを評価してAGY_FANOUT_E2E_VERDICT_V1を出力する。Issue contract(Issue 契約情報)
Closes #1710(本 Issue を解決する)
Checks
pnpm typecheck(本 PR は TypeScript を変更しないため CI 実行で確認)pnpm lint(本 PR は TypeScript を変更しないため CI 実行で確認)pnpm test(本 PR は TypeScript を変更しないため CI 実行で確認)pnpm build(本 PR は TypeScript を変更しないため CI 実行で確認)Schema Change Applicability
schema_changeAGY_FANOUT_E2E_VERDICT_V1を新規導入する(既存 schema の破壊的変更は含まない、詳細は下記 Schema Consumer Inventory 参照)AC mapping(AC 対応表)
_predicate_fanout_request_shape_predicate_process_overlap(fan_out_orchestrator.actual_provider_process_overlapを消費)_predicate_hook_provenance(agy_tool_provenance.validate_provenance_event/match_run_contextを消費)_predicate_serena_hash_chain(run_gemini_headless.verify_serena_hash_chainを消費)_predicate_permission_isolation(agy_permission_policy.classify_tool_call_eventsを消費)_predicate_audit_and_correlation+load_bundle()の fail-closed sha256 検証_predicate_redaction_predicate_success_and_fail_close+load_bundle()の closed manifest key settest_tampering_fixture_detects_hash_mismatch/test_tampering_file_content_edited_without_manifest_update_is_detectedbuild_environment_manifest()/assert_environment_manifest_no_secrets()AGY_FANOUT_E2E_VERDICT_V1出力 schemabuild_verdict()/validate_verdict_schema()test_closed_schema_rejects_unknown_keyrg -n "consumer inventory"で検証可能)uv run --locked pytest .../test_agy_fanout_e2e_validator.py -qVerification results(検証結果)
AC1〜AC13/AC15 の Issue 本文記載の
-k式は個別実行でも全て PASS を確認済み。AC14 はrg -n "consumer inventory" .../validate_agy_fanout_e2e_evidence.pyで検証済み。Safety Claim Matrix
validate_agy_fanout_e2e_evidence.pyは入力 artifact bundle のみを参照し、外部呼び出し・sleep・乱数を含まないtest_tampering_fixture_detects_hash_mismatch/test_tampering_file_content_edited_without_manifest_update_is_detectedtest_environment_manifest_no_secret_fields/assert_environment_manifest_no_secrets()(credential/username/email/token/raw_auth_path 等の禁止 key を静的検査)test_hook_provenance_predicates内mutate_no_hook_eventsで hook evidence 除去時に stdout self-report だけでは group が pass しないことを確認(predicate 11)test_missing_artifact_fails_closed/test_duplicate_unknown_artifact_key_fails_closedAllowed Paths compliance(許可パス遵守)
Issue #1710 の Allowed Paths(実装前確認により実配置を確定)と完全一致:
.claude/skills/gemini-cli-headless-delegation/scripts/validate_agy_fanout_e2e_evidence.py(新規).claude/skills/gemini-cli-headless-delegation/tests/test_agy_fanout_e2e_validator.py(新規).claude/skills/gemini-cli-headless-delegation/tests/fixtures/agy_fanout_e2e/(新規、__init__.py+build_bundle.py)Scope Collision evidence(スコープ衝突証跡)
Issue 本文の「Scope Collision 判断」に記載のとおり、
tests/fixtures/agy_fanout_e2e/は#1708の広域tests/fixtures(bare directory、agy_tool_provenance_v1用 fixture)とサブディレクトリレベルで prefix 重複するが、#1708は既に main へ squash merge 済み(PR #1714, merge commit65d44f570a6fffb10c5bc6a64ee1ed19b2a7646f)であり、本 PR は#1708が追加した既存 fixture ファイルを一切変更しない(新規サブディレクトリのみ追加)。git diff --name-onlyの出力は上記の通り新規ファイルのみ。Secrets / billing non-use(機密情報・課金非使用)
os.environから secret env var 名の有無のみを boolean/enum 化してauthentication_stateに格納し、値そのものは一切読み書きしない(_authentication_state())。sk-...等のダミー文字列)のみを使用し、実 credential は使用していない。Schema Consumer Inventory
変更対象 schema:
AGY_FANOUT_E2E_VERDICT_V1(新規導入)before/after 差分:
Consumer 列挙(rg コマンド例と結果):
Consumer 更新状況:
validate_agy_fanout_e2e_evidence.pytest_agy_fanout_e2e_validator.py#1494最終証拠文書生成 PR(未着手)Compatibility Decision(互換性判断)
additivebackward_compatiblenoN/Adelegation_audit_v1/agy_tool_provenance_v1/agy_profile_gate_result/v1/process_lifecycle_event_v1/delegation_fanout_request_v1)はすべて read-only 入力として消費するのみで変更しない。破壊的変更となり得る「前バージョン」自体が存在しない。Runtime Verification Applicability(実行時検証適用性)
Issue 本文の通り
decision: deferred(deferred_destination: "#1494")。本 PR は hermetic fixture ベースの validator unit/integration test までを対象とし、live AGY 実行を伴う最終検証は#1494の最終 E2E run で別途実施する。Notes
AGY_FANOUT_E2E_VERDICT_V1validator + positive/negative/tampering fixture のみ。live AGY 実行は含まない(Out of Scope、調査: fan-out orchestrator の実AGY/Serena MCP/WebSearch並列実行E2E検証を行う #1494 で別途実施)