Repository navigation
Closed as not planned
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasestate/blockedblocked by another issue
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
depends_on: "#1834"
goal_ref: "Issue #1834 / PR #1850 の人間レビューで特定された non-blocking follow-up(テスト厳密化とテストディレクトリ命名重複の解消)を完了する"
change_kind: codeParent Issue
なし(単独改善。Issue #1834 / PR #1850 のレビュー follow-up)
Parent Goal Ref
- Goal: なし(親 Issue なし。Issue 実装: Codex Multi-Agent V2 runtime capability を artifact 化する #1834 の PR 実装: Codex Multi-Agent V2 runtime capability を artifact 化する #1850 レビューで特定された non-blocking follow-up の実施)
- Desired Destination: N/A
Precondition(着手前に必ず確認する)
本 Issue は #1834(GitHub native issue dependency として登録済み、blocked_by: #1834)に加えて、以下の Precondition を満たすまで着手しない。
precondition:
decision_issue: "#1860"
required_decision:
- retain_probe_and_tests
- remove_probe_and_tests
on_retain:
implement_this_issue: true
on_remove:
close_as_superseded: true
removal_scope: "#1860 の Multi-Agent V2 整理 child"#1860(OPEN)は Multi-Agent V2 系資産(本 Issue が対象とするscripts/agent-guards/probe_codex_v2_runtime_capability.pyとそのテストを含む)の retain/delete を再判定する上位方針 Issue である。#1860がretain_probe_and_testsに決した場合のみ本 Issue を実装する。remove_probe_and_testsに決した場合は本 Issue を#1860の整理 child へ統合し、本 Issue は superseded として close する。state/blockedラベルを付与し、#1860の決定が確定するまでキューに入れない。
Current Validated Scope
tests/agent-guards/test_probe_codex_v2_runtime_capability.pyの fake Codex CLI runner を、substring match ではなく expected-call queue ベースの exact 検証(未登録呼出し・欠落呼出し・重複呼出し・順序変更のいずれも検出する)へ変更する。tests/agent-guards/(ハイフン)と既存tests/agent_guards/(アンダースコア)のディレクトリ命名重複をtests/agent_guards/へ統合する。- CI の python-test-plan 正本(
.github/ci/python-test-plan.json)から旧 targettests/agent-guards/を削除し、移行後の構成と一致させる。
Remaining Parent Gaps
なし
Outcome
tests/agent_guards/test_probe_codex_v2_runtime_capability.py(移行後の唯一の配置先)の fake runner が exact expected-call queue によって未登録呼出し・欠落呼出し・重複呼出し・意図しない順序変更のすべてを検出し、capture_output / text / timeout / cwd / env / 未知 kwargs を厳密検証し、常時真の no-op assertion が存在せず、.github/ci/python-test-plan.json が tests/agent-guards/ を含まず tests/agent_guards/ のみを target とし、統合後の tests/agent_guards/ 配下の pytest が全件 PASS している状態。
In Scope
tests/agent-guards/test_probe_codex_v2_runtime_capability.pyをtests/agent_guards/test_probe_codex_v2_runtime_capability.pyへ移動する。.github/ci/python-test-plan.jsonのtargetsから旧 target"tests/agent-guards/"を削除する("tests/agent_guards/"は維持する)。- fake runner を
" ".join(cmd)substring match から、expected-call queue(collections.deque等)による exacttuple(argv)照合へ置換する。 response/FileNotFoundError/TimeoutExpiredを含む全 dispatch を exact argv ベースの expected-call model に統一する。- 未登録の argv による呼出しを
AssertionErrorにする(unexpected call)。 - 登録済みだが未消費の expected call を
assert_exhausted()相当の呼び出しで検出できるようにする(missing call)。 - 呼出しの重複・欠落・意図しない順序変更を検出する専用テストを追加する。
- fake runner の呼出し検証で
capture_output/text/timeout/cwd/env/ 未知 kwargs の存在と値を厳密に検証する(デフォルト引数で暗黙に一致させない)。 assert str(tmp_path) not in call["env"]["CODEX_HOME"] or Trueの常時真 no-op assertion を削除し、隔離CODEX_HOMEが絶対パスであること・ambientCODEX_HOMEと異なること・tmp_pathと異なりtmp_pathの親でもないことを検証する assertion に置き換える。- 統合後、
test_probe_codex_v2_runtime_capability.pyの import パス・tests/agent_guards/conftest.py依存が既存ファイル群と矛盾しないことを、対象テストの--collect-onlyで確認する。 - 移動先テストファイルに
test_python_test_plan_check_paths_passes/test_verify_lane_union_passesを追加し、scripts/ci/python_test_plan.py --emit scope-argv --check-paths --format jsonとscripts/ci/verify_lane_union.pyをそれぞれ subprocess 実行して returncode 0 を assert する(VC preflight のuv runallowlist は pytest 経由の呼び出しのみを許可するため、この 2 スクリプトを直接 VC として実行することはできない)。
Out of Scope
scripts/agent-guards/probe_codex_v2_runtime_capability.py本体のロジック変更(Issue 実装: Codex Multi-Agent V2 runtime capability を artifact 化する #1834 で確定済みの probe 挙動は変えない)。artifacts/codex-multi-agent-v2/runtime-capability.jsonの内容変更(live canary 実施は別 Issue で扱う)。- JSON Schema 追加・CI freshness gate の追加(別 Issue で扱う)。
tests/agent_guards/conftest.pyおよびtests/agent_guards/配下の既存テストファイル(移行対象以外)の変更。.github/workflows/ci.ymlの変更(workflow は plan を動的に読むため不要)。#1862(新規 JSON Schema・digest freshness gate 追加)・#1863(V2 live canary 追加投資)との統合。両 Issue は#1860の方針確定を別途待つ。
Acceptance Criteria
- AC1: 移動先
tests/agent_guards/test_probe_codex_v2_runtime_capability.pyが存在し、旧ディレクトリtests/agent-guards/が存在しない。 - AC2:
.github/ci/python-test-plan.jsonのtargetsに"tests/agent-guards/"が存在せず、"tests/agent_guards/"が存在する。 - AC3: fake runner の全 dispatch が exact
tuple(argv)照合であり、" ".join(cmd)を用いた substring/prefix fallback が存在しない。 - AC4: 未登録の argv を受け取った場合に
AssertionErrorを送出する(unexpected call)。 - AC5: 登録済みだが未実行の expected call が存在する場合、検証用の exhaustion チェックが失敗する(missing call)。
- AC6: 呼出しの重複・欠落・意図しない順序変更を検出する専用テストが存在し PASS する。
- AC7:
capture_output/text/timeout/cwd/env/ 未知 kwargs の存在と値を厳密に検証するテストが存在し PASS する。 - AC8:
assert ... or Trueのような常時真になる assertion がテストファイル中に存在しない。 - AC9: 移動先テストファイルの
--collect-onlyが成功し、当該ファイルおよびtests/agent_guards/配下の pytest が全件 PASS する。 - AC10:
python_test_plan.py --emit scope-argv --check-pathsとverify_lane_union.pyがともに成功する。これを VC preflight allowlist の範囲内で検証するため、移動先テストファイルにtest_python_test_plan_check_paths_passes/test_verify_lane_union_passesの 2 つの pytest wrapper(両スクリプトを subprocess で実行し returncode 0 を assert する)を追加する。 - AC11:
git diffでscripts/agent-guards/probe_codex_v2_runtime_capability.py/artifacts/codex-multi-agent-v2/runtime-capability.json/ schema ファイル /tests/agent_guards/conftest.pyに差分がない。
Runtime Verification Applicability
- decision: not_applicable
- reason: 本 Issue は fake runner の contract test 厳密化・テストディレクトリ統合・CI test-plan 正本更新のみで完結し、ゲームループやマルチコンポーネント間の runtime 統合検証は不要。
Verification Commands
# AC1
# baseline-expect: fail
$ test -f tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC1
# baseline-expect: fail
$ test ! -d tests/agent-guards
# AC2
# baseline-expect: fail
$ ! rg -nF '"tests/agent-guards/"' .github/ci/python-test-plan.json
# AC2
# baseline-expect: pass
$ rg -nF '"tests/agent_guards/"' .github/ci/python-test-plan.json
# AC3
# baseline-expect: fail
$ ! rg -qF '" ".join(cmd)' tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC4
# baseline-expect: fail
$ rg -q 'def test_unregistered_argv_is_rejected' tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC5
# baseline-expect: fail
$ rg -q 'def test_missing_expected_call_is_rejected' tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC6
# baseline-expect: fail
$ rg -q 'def test_duplicate_call_is_rejected' tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC7
# baseline-expect: fail
$ rg -q 'def test_capture_text_timeout_cwd_env_are_explicit_and_exact' tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC8
# baseline-expect: fail
$ ! rg -qF 'or True' tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC9
# baseline-expect: fail
$ uv run python3 -m pytest --collect-only tests/agent_guards/test_probe_codex_v2_runtime_capability.py -q
# AC9
# baseline-expect: fail
$ uv run python3 -m pytest tests/agent_guards/ -q
# AC10
# baseline-expect: fail
$ rg -q 'def test_python_test_plan_check_paths_passes' tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC10
# baseline-expect: fail
$ rg -q 'def test_verify_lane_union_passes' tests/agent_guards/test_probe_codex_v2_runtime_capability.py
# AC10
# baseline-expect: fail
$ uv run python3 -m pytest tests/agent_guards/test_probe_codex_v2_runtime_capability.py::test_python_test_plan_check_paths_passes -q
# AC10
# baseline-expect: fail
$ uv run python3 -m pytest tests/agent_guards/test_probe_codex_v2_runtime_capability.py::test_verify_lane_union_passes -q
# AC11
# baseline-expect: pass
$ git diff --quiet main -- scripts/agent-guards/probe_codex_v2_runtime_capability.py artifacts/codex-multi-agent-v2/runtime-capability.json tests/agent_guards/conftest.pyAllowed Paths
- tests/agent-guards/test_probe_codex_v2_runtime_capability.py
- tests/agent_guards/test_probe_codex_v2_runtime_capability.py
- .github/ci/python-test-plan.json
tests/agent_guards/ 配下の既存ファイル(conftest.py 含む)は Allowed Paths に含まない。変更が必要と判明した場合は Scope Delta として報告する。
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 着手時点で
#1860がretain_probe_and_tests/remove_probe_and_testsのいずれにも決していない場合(即停止し#1860の決定を人間へ確認する)
Required Skills
なし
Required Design References
- docs/dev/codex-multi-agent-v2-runtime-evidence.md
- 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860(retain/remove 決定の正本)
- 実装: Codex Multi-Agent V2 runtime capability を artifact 化する #1834(実装 provenance)
Scope Delta(任意)
N/A
Notes for Reviewer
- Overlap preflight(
check_issue_overlap.py)はoverlap_requires_comment(C1)を返した。matched candidates は主に Issue 実装: Codex Multi-Agent V2 runtime capability を artifact 化する #1834(本 follow-up の起点、同一tests/agent-guards/test_probe_codex_v2_runtime_capability.pyパスを Allowed Paths に含むため overlap は想定内)、およびtests/tests/agent_guardsを broad path として Allowed Paths に含む無関係の既存 Issue(実装: visual diff AI/VLM triage を非ブロッキング助言として分離する #1390 / 導入: M4 Upgrade Loop 実装 parent tracker #1176 / 実装: playtest-log の JSON Schema / validator の追加 #420 など)。broad path 一致は false positive として扱う。non_conflict_reason: 本 Issue は Issue 実装: Codex Multi-Agent V2 runtime capability を artifact 化する #1834 の直接 follow-up であり、他候補は無関係の機能領域でtests配下を広く参照しているのみで具体的なファイル競合はない。 - ディレクトリ統合の方向(
agent-guards→agent_guardsに寄せる、逆はしない)は既存ファイル数(agent_guardsに 5 ファイル、agent-guardsに 1 ファイル)を踏まえた提案。実装時に別方針が適切と判明した場合は Stop Condition として報告する。 - 2026-07-30 のレビュー(#1861 anchor comment、
REQUEST_CHANGES)を反映し本文を全面改訂した。反映内容: (1).github/ci/python-test-plan.jsonを Allowed Paths へ追加し旧 target 削除を AC 化、(2)#1860の retain/remove 決定を Precondition 化しstate/blockedを付与、(3) fake runner を expected-call queue モデルへ再設計し missing-call/duplicate-call/順序変更検出を AC 化、(4) subprocess kwargs(capture_output/text/timeout/cwd/env/未知 kwargs)の厳密検証を AC 化、(5) 常時真のor Trueassertion 除去を AC 化、(6) Verification Commands を否定条件・behavioral test 存在チェックへ修正し baseline-expect を付与、(7) dependency 登録を PR 実装: Codex Multi-Agent V2 runtime capability を artifact 化する #1850 ではなく Issue 実装: Codex Multi-Agent V2 runtime capability を artifact 化する #1834 に対して GitHub nativeblocked_byとして再登録済み(旧 create-issue transaction の partial-failure を解消)。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasestate/blockedblocked by another issue
Activity
squne121 commentedon Jul 30, 2026
create-issue transaction partial-failure
Issue: #1861
Failure stage: issue-ids
Message: issue-ids failed
Requested:
Completed steps: create, label, label-readback
Failure context: command=gh api graphql -f query=
query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){issue(number:$number){id databaseId}}} -F owner=squne121 -F name=loop-protocol -F number=1850
output=gh: Could not resolve to an Issue with the number of 1850.
matching_issue_numbers=[1861]
issue_number=1861
Recovery hint: stage 'issue-ids' encountered an unexpected failure.
Generic guidance: verify the issue state manually and re-run the transaction if safe.
gh issue view 1861 --repo squne121/loop-protocol --json number,title,labels,state
idempotent re-run: depends on the specific failure
Please recover deterministically before re-running the create issue transaction.
squne121 commentedon Jul 30, 2026
結論
判定は
REQUEST_CHANGES。Issue #1861 は現状の契約のままでは着手不可です。主目的である「substring fake runner の厳密化」と「テストディレクトリ統合」は妥当です。しかし、次の二点が先に解消されていません。
tests/agent-guards/を削除すると、CI の正本である.github/ci/python-test-plan.jsonに残った旧パスにより確実に CI が失敗する一方、この計画ファイルは Allowed Paths に含まれていません。敵対的レビュー findings
P0: AC3を満たすとCIが必ず壊れ、修正はAllowed Paths違反になる
現在の
.github/ci/python-test-plan.jsonは Python テスト対象の「Single source of truth」と明記され、tests/agent_guards/とtests/agent-guards/の両方を target に含めています。plan loader は--check-paths指定時に全 target の存在を検査し、欠落があればPlanErrorを送出します。CI workflow もこの検査を実際に fail-closed で実行しています。したがって、Issue #1861 の AC3 に従って
tests/agent-guards/を削除すると、次の状態になります。しかし Issue の Allowed Paths は旧テストファイルと
tests/agent_guards/だけで、.github/ci/python-test-plan.jsonを含みません。さらに「Allowed Paths 外の変更が必要なら停止」と規定しています。つまり、現在の契約を遵守した実装では成功状態に到達できません。必須修正
.github/ci/python-test-plan.jsonを Allowed Paths に追加する。"tests/agent-guards/"を削除する。"tests/agent_guards/"は維持する。.github/workflows/ci.ymlの変更は不要です。これは任意の改善ではなく、Issue を実装可能にするための契約修正です。
P1: #1860による存廃判断を無視しており、実装順序が逆転している
Issue #1861 は
parent_issue: none、Remaining Parent Gaps: なしとしていますが、対象テストは #1834/PR #1850 で導入され、#1834 は #1833「Codex Multi-Agent V2 移行」の Phase 0 です。一方、直前の #1860 は、#1833 を「個人開発では過剰投資の可能性がある」と明記し、Multi-Agent V2・ledger・manifest の authority を廃止して単一エージェント運用を既定へ戻すための整理 child を予定しています。また、新しい schema、digest、artifact authority を追加しない方針を固定しています。
関連する #1862 は新しい JSON Schema と digest freshness gate を追加する内容であり、#1860 の固定方針と直接衝突しています。#1863 も V2 live canary への追加投資です。この三件を独立した non-blocking follow-up として並列実装するのは、現在のリポジトリ方針と整合していません。
#1861には次の事前判定を追加すべきです。
#1861自体は小規模ですが、削除予定のテストを先に精密化するのはサンクコストです。技術的 P0 を修正した後も、#1860 による retain/delete 判定を着手条件とするのが妥当です。
P1:
tuple(argv)辞書化だけでは「呼ばれなかったコマンド」を検出できない現在の fake runner は joined argv の substring を順番に調べ、未一致なら成功を返します。例えば
--helpはexec --helpにも一致するため、先に登録された短い marker が後者を飲み込みます。これは #1861 が解消しようとしている実害です。ただし、Issue が指定する「
dict[tuple(argv), response]と未登録 argv の AssertionError」だけでは不十分です。例えば production が誤って
codex exec --helpを呼ばなくなっても、runner に登録されたその response は未使用のまま残ります。現在のテストはcodex --helpの内容だけでも期待値を満たせるため、テストが成功する可能性があります。production は現在二つの help command を順に実行しています。厳密化すべき対象は「未知の追加呼出し」だけではなく、次の全てです。
辞書ではなく、原則として expected-call queue を使うべきです。
呼出し順が契約でないケースだけ、queue の代わりに multiset/
Counterと消費確認を使うべきです。単なる tuple-key dictionary は、同じ argv を異なる結果で複数回実行するテストも表現できません。P1: fake runnerのデフォルト引数が、本番コードのkwargs欠落を隠蔽する
現在の fake runner は次のシグネチャです。
このため、production が誤って
capture_output=Trueやtext=Trueを渡さなくなっても、fake 側のデフォルト値によって「渡されたように見える」ため、テストは検出できません。実際のsubprocess.runのデフォルトはcapture_output=False、text=Noneです。 ([Python documentation]1)production の
_runは現在、capture_output=True、text=True、指定 timeout、および必要に応じてcwdとenvを渡しています。これらは subprocess 呼出し契約そのものです。Python の仕様上、envを渡すと通常の環境継承の代わりにその mapping が使用され、cwdもプロセス解決・実行コンテキストへ影響します。 ([Python documentation]1)元の PR #1850 レビューも、follow-up の strict fake に対して以下を要求していました。
#1861 はこの要求を argv と未登録 command だけに縮退させています。元レビューを完全には回収していません。
必要な設計
def __call__(self, cmd, **kwargs)または_MISSINGsentinel を使用する。capture_outputとtextは「キーが存在し、値がTrue」であることを検査する。timeoutは呼出しごとの正確な値を検査する。cwd == str(repo_root)を検査する。envは ambient environment を維持しつつ、CODEX_HOMEだけが隔離先へ上書きされたことを検査する。envは参照ではなくdict(env)の snapshot にする。Codex は CLI override、project config、user config の優先順位を持ち、project
.codex/config.tomlは current working directory と trust 状態に依存して読み込まれます。したがってcwdと隔離CODEX_HOMEはテストの周辺情報ではなく、probe の意味を決める入力です。 ([OpenAI Developers]2)P1: 現在のテストには常に成功するassertionが残っている
隔離
CODEX_HOMEの検査には次の assertion があります。or Trueにより、どのような値でも必ず成功します。Issue の目的が「テスト厳密化」である以上、これを残したまま exact argv だけ直すのは不十分です。しかし #1861 の In Scope/AC には、この no-op assertion の除去が含まれていません。少なくとも次を検証すべきです。
さらに、四つの config-loader invocation が同じ隔離
CODEX_HOMEを使うこと、ambient 環境の sentinel 変数が保持されることを検査すべきです。P2: Verification CommandsがAcceptance Criteriaを正しく検証していない
AC1 の検証は次です。
rg -c '" ".join(cmd)' ...AC1を満たした状態では文字列が存在しないため、ripgrep は count
0を表示するのではなく、通常は no-match の exit status1を返します。したがって、そのまま検証コマンドとして実行すると「望ましい状態なのに失敗」します。ripgrep は match 時に0、no-match 時に1、エラー時に2を返します。 ([mankier.com]3)また、AC2 の
rg -n "AssertionError"はコメントや dead code に文字列が存在するだけでも成功します。AC3/AC4も、移動先テストファイルの明示的な存在や、strict-runner の負の回帰ケースを保証していません。必要なのはソース文字列の存在確認ではなく、次の振る舞いを実行するテストです。
ソース上の補助検査を残すなら、否定条件には
!、リテラルには-Fを使うべきです。P2: ディレクトリ移動は単純なrenameではなく、pytest import contextを変える
このリポジトリは pytest を
--import-mode=importlibで実行しています。importlibmode は test directory を自動的にsys.pathへ追加しません。既存のtests/agent_guards/conftest.pyはそれを補うため、ディレクトリ自身をsys.pathに追加します。 ([pytestドキュメント]4)したがって、テストを
tests/agent_guards/へ移動すると、それまで適用されなかった conftest が ancestor として適用され、import namespace が変わります。全体 pytest の PASS だけでなく、対象ファイルの collection と import を独立して検証すべきです。また、Issue の次の記述は誤解を招きます。
_SCRIPT_PATHは production script ではなくテストファイル側にあります。しかもハイフン形式からアンダースコア形式への移動でもディレクトリ深度は変わらないため、現在のparents[2]は原則変更不要です。production script は Out of Scope のまま維持すべきです。Allowed Paths の
tests/agent_guards/も広すぎます。無関係な既存テストやconftest.pyを変更できるため、移動先ファイルを完全指定すべきです。P2: 依存関係の登録が失敗したままになっている
Issue 作成トランザクションは dependency として
#1850を登録しようとしましたが、repository.issue(number: 1850)で PR を Issue として取得しようとして失敗しています。ラベル付与までは成功しましたが、dependency relation は登録されていません。依存モデルが Issue node を要求するなら、正しい登録は次です。
#1834 は実際の導入 Issue、#1850 はその実装とレビュー証跡です。PR を dependency Issue として登録するべきではありません。
上流Codex実装を踏まえた技術補正
2026年7月30日時点の OpenAI Codex ソースでは、
multi_agentは Stable/default enabled、multi_agent_v2も Stable ですが default disabled として別 feature に残っています。MultiAgentV2ConfigTomlは unknown field を拒否し、max_concurrent_threads_per_sessionに最小値1を定義しています。したがって、現在の positive/unknown-key/wrong-type/zero-concurrency の四ケースという構成自体は上流実装と整合しています。ただし、公開設定ドキュメントで利用者向けに案内されているのは主に
multi_agent、agents.enabled、agents.max_concurrent_threads_per_sessionです。公開 config reference にはmulti_agent_v2自体は掲載されていません。公開ドキュメントも common flag table は内部・開発中 feature の全件一覧ではないと明記しています。したがって、「公開ドキュメントにないから無効」とも、「fake unit test が通るから現行 CLI で利用可能」とも判断できません。 ([OpenAI Developers]2)この境界は次のように維持すべきです。
推奨する修正版Issue契約
Allowed Paths
tests/agent_guards/全体は許可しません。conftest.pyや既存テストを変更する必要が出た場合は Scope Delta とします。In Scope
tests/agent_guards/へ移動する。tests/agent-guards/を削除する。capture_output、text、timeout、cwd、env、unexpected kwargs を検査する。or Trueの no-op assertion を削除する。Acceptance Criteria
Verification Commands
最終判定
現状の #1861 は「小さな follow-up」に見えますが、CI正本の更新漏れにより、契約どおり実装すると必ず失敗します。まず Issue 本文を修正し、#1860 の retain/delete 判断へ束縛してから着手すべきです。
squne121 commentedon Jul 30, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jul 30, 2026
結論
implementation-workerの停止は正常です。Issue #1861 は、#1860 にretain_probe_and_testsまたはremove_probe_and_testsが記録されていなければ即停止する、と明示しています。これは実装上の障害ではなく、Issue契約が意図的に人間へ留保した存廃判断です。今回の推奨判断は、次です。
なぜ削除を推奨するか
1. 名前に反して、runtime capabilityを検証していない
既存artifactは
overall_status: partialで、実際のspawn_agent実行検証はnot_runです。確認できているのは主にCodexのバージョン、feature flag認識、config loaderのaccept/rejectであり、Multi-Agent V2が実運用で使えることは証明していません。evidence文書自身も、「runtime capabilityは未実証」「
agent_type、task_name、fork_turns、nested delegationのruntime availabilityは未確認」と明記しています。したがって、約900行のprobeと大規模なfake-runnerテストを厳密化しても、最も知りたい「現在のCodex環境で実際にspawnできるか」には答えられません。
2. 現在のリポジトリ内に実利用consumerが見つからない
GitHubコード検索で見つかった参照は、次の4資産だけでした。
後続処理や実装時gateなど、独立したcommitted consumerは確認できませんでした。
つまり現在は、probeを維持するためにprobeをテストしている自己完結系です。
3. #1833系列はPhase 0以降が未実装
probeは #1833 の9段階Multi-Agent V2導入計画におけるPhase 0として作られました。#1834は完了していますが、V2有効化、graph policy、task packet、delegation metadata、validator、nested canaryなどの後続 #1835〜#1842 は現在もOPENです。
その後、#1860 が「単一エージェントを既定へ戻し、Multi-Agent V2・ledger・manifestのauthorityを整理する」方向へ転換しています。したがって、未導入の仕組みを支えるPhase 0 probeだけを先に高品質化するのはサンクコストになります。
4. Codexの実装変化に対して、静的artifactは弱い
OpenAIの現行Codex実装には
multi_agent_v2設定自体は存在しています。したがって削除判断は「Multi-Agent V2が存在しない」という意味ではありません。([GitHub]1)一方、公式リポジトリでは、
fork_turnsの既定動作、role/model override、tool schema表示、モデル選択などについて、2026年にも複数の挙動差・不具合報告があります。([GitHub]2)この種の機能は、過去のCLIバージョンで生成したcommitted artifactよりも、実際に利用する直前のlive canaryで判定する方が正確です。
推奨アクション
導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 に
remove_probe_and_testsのowner decisionを記録する。削除専用のクリーンアップ子Issueを作る。既に適切な子Issueがある場合はそこへ統合する。
実装: Codex V2 runtime capability probe のテスト厳密化とテストディレクトリ命名重複を解消する #1861 に「#1860の判断によりsuperseded」とコメントし、
not plannedでcloseする。クリーンアップ子Issueで以下を削除する。
scripts/agent-guards/probe_codex_v2_runtime_capability.pytests/agent-guards/test_probe_codex_v2_runtime_capability.pyartifacts/codex-multi-agent-v2/runtime-capability.jsondocs/dev/codex-multi-agent-v2-runtime-evidence.md.github/ci/python-test-plan.jsonのtests/agent-guards/target将来Multi-Agentを実際に導入するときは、committed evidence chainを復活させず、利用直前に次だけを実施する。
codex --versioncodex features listspawn_agentcanary#1862のJSON Schema/CI freshness gateと、#1863のcommitted artifact更新も、同じ判断が確定するまで実装すべきではありません。少なくともblock状態を維持し、クリーンアップ子Issueでclose可否を判定するのが安全です。
#1860 に記録する判断文
Owner Decision: Codex V2 runtime capability probe assets
Decision rationale
Issue #1834 / PR #1850 で追加されたprobeは、Codex CLIのバージョン、feature flag認識、config loaderのaccept/rejectを記録するPhase 0診断資産であるが、実際の
spawn_agentMulti-Agent V2 runtime capabilityは検証していない。現時点では、このprobe artifactを実装判断または実行時gateとして使用するcommitted consumerが存在せず、#1833の後続Multi-Agent V2導入childrenも未完了である。今後の方針は #1860 のminimal harness化とし、利用されていないPhase 0 evidence chainへ追加のテスト・schema・freshness gateを投資しない。
将来Multi-Agent機能を実際に利用する場合は、committed artifactをauthoritative evidenceとして維持せず、利用直前に現在のCodex CLIを対象としたread-only live canaryを実行する。canaryの失敗は診断情報として扱い、通常の開発作業全体を停止するblocking authorityにはしない。
Required follow-up
impl-review-loop 再開用プロンプト
リポジトリ
squne121/loop-protocolで、Issue #1860 の人間判断を次のとおり確定したものとして処理してください。目的は、Issue #1861を実装することではありません。Issue #1834 / PR #1850で追加されたCodex Multi-Agent V2 Phase 0 probe関連資産を、#1860のminimal harness方針に従って安全に整理することです。
Step 1: live stateと依存関係の確認
GitHub上の最新状態を取得してください。
次の資産について、現在の参照元とconsumerをリポジトリ全体から検索してください。
probe、専用test、artifact、evidence文書以外に、実行時consumer、CI gate、production code、別のテストが存在する場合は実装を停止し、次を報告してください。
単なるIssue本文、PR本文、履歴上の参照、削除対象自身からの参照はblocking consumerに含めないでください。
Step 2: GitHub上の決定記録とIssue整理
#1860 の本文またはowner decision commentに、以下を明示してください。
既存の適切なクリーンアップchildがない場合は、#1860配下に新しいimplementation childを起票してください。
childのscopeは次に限定してください。
#1861には、#1860のowner decisionにより実装不要となり、クリーンアップchildへ統合された旨をコメントしてください。その後、
state_reason: not_plannedでcloseしてください。#1862と#1863は自動実装しないでください。#1860の判断と競合するため、クリーンアップchildの関連Issueとして記録し、closeまたは再分類候補として報告してください。人間判断なしに新しいschema、CI gate、artifact、canary harnessを追加しないでください。
Step 3: 実装
canonical repositoryとcanonical worktreeを確認し、default branchへ直接変更しないでください。クリーンアップchild専用branch/worktreeを作成してください。
consumerが存在しないことを確認した後、次を削除してください。
.github/ci/python-test-plan.jsonから、削除後に存在しなくなる次のtargetだけを削除してください。"tests/agent-guards/"既存の
tests/agent_guards/targetは維持してください。次は禁止します。
tests/agent_guards/の既存テスト変更.codex/config.tomlまたは.codex/hooks.jsonの変更Step 4: 検証
最低限、次を実行してください。リポジトリの正規コマンドが異なる場合は、現行mainのSSOTを確認して同等コマンドへ置き換えてください。
rgでIssue番号や履歴文書など、削除対象の由来を説明する非実行参照だけが検出された場合は、機械的に全削除せず、参照の性質を分類してください。すべての変更ファイルがクリーンアップchildのAllowed Paths内であることを確認してください。
Step 5: 独立レビューとPR
実装者とは別のreviewerで、次を確認してください。
tests/agent_guards/を誤って削除またはtest planから除外していない.codex/config.tomlと.codex/hooks.jsonに差分がない検証成功後、Draft PRを作成してください。
PRは次を明記してください。
最終出力は次の形式にしてください。
このプロンプトは、#1861を無理に再開せず、存廃決定を正本化してから削除PRへ移行する構成です。GitHub更新権限を与えない運用では、Step 2を「コメント・Issue変更案を出力するだけ」に置き換えてください。
squne121 commentedon Jul 30, 2026
Superseded by owner decision
親 Issue #1860 のコメント(#1860 (comment) )で、リポジトリ owner が Codex V2 runtime capability probe 関連資産について
remove_probe_and_testsを決定しました。この決定により、本 Issue(probe のテスト厳密化)は実装せず、削除スコープの cleanup child issue #1866 へ統合します。
本 Issue は
not plannedとして close します。chore: remove Codex V2 runtime capability probe and related assets (#…