Repository navigation
feat: add codex subagent launch guardrails - #767
Conversation
Preview URLPreview removed (PR #767 closed). |
squne121
left a comment
There was a problem hiding this comment.
マージ前 review の結果、Issue #764 の contract・Allowed Paths・local verification・GitHub required checks を確認し、blocking issue は見当たりませんでした。
LOOP_VERDICT_V2
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: 36a7d1b90a4b862dd4fbee2f35029ee9f6c42c2a
merge_ready: true
mergeability:
mergeable: MERGEABLE
merge_state_status: CLEAN
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
結論:
|
Summary
要約です。
SUBAGENT_LAUNCH_LEDGER_V1の valid / invalid fixture と strict fail-closed validator を追加Checks
確認項目です。
python3 scripts/check_codex_agent_config.py --assert-required-fieldsを実行し、必須 field 検査が通過した。python3 scripts/check_codex_agent_config.py --assert-runtime-contractを実行し、runtime contract 検査が通過した。python3 scripts/check_impl_review_loop_codex_dispatch.py --assert-max-depth --assert-no-project-profile-routingを実行し、dispatch 設定検査が通過した。python3 scripts/check_impl_review_loop_codex_dispatch.py --assert-explicit-spawn-notesを実行し、spawn 文言検査が通過した。python3 scripts/check_subagent_launch_ledger.py tests/fixtures/subagent-ledger/valid.jsonを実行し、valid fixture が pass した。python3 scripts/check_subagent_launch_ledger.py tests/fixtures/subagent-ledger/hook-untrusted.jsonを実行し、想定どおり fail-closed を確認した。python3 scripts/check_subagent_launch_ledger.py tests/fixtures/subagent-ledger/pr763-replay.jsonを実行し、PR test: hooks tests の CI 取りこぼしを防ぐ (#682) #763 replay が想定どおり reject された。python3 .claude/skills/review-issue/scripts/check_issue_contract.py --file tmp/issue-764-body.md --jsonを実行し、Issue contract checker が approve を返した。受け入れ条件の達成状況
.codex/agents/implementation-worker.toml/test-runner.toml/pr-reviewer.toml/post-merge-cleanup-worker.tomlをscripts/check_codex_agent_config.py --assert-required-fieldsで必須 field と runtime limitation field まで検査できるscripts/check_codex_agent_config.py --assert-runtime-contractが model / reasoning effort / default_permissions / runtime_dependency_status と hook wiring を fail-closed で検査できる.codex/config.tomlに[agents] max_depth = 1を追加し、project-local config を profile routing の証拠として扱わない文言をscripts/check_impl_review_loop_codex_dispatch.py --assert-max-depth --assert-no-project-profile-routingで検査できるscripts/check_subagent_launch_ledger.pyが strict top-level schema と launch/root-thread action schema を持ち、valid fixture を通しつつ self-report only・missing launch・root-thread data-plane 実行を reject するtests/fixtures/subagent-ledger/pr763-replay.jsonでsubagent_launch_evidence_missingとroot_thread_data_plane_execution_observedを同時に返す fail audit を固定したcheck_issue_contract.pyを通ることを確認した検証コマンド結果
python3 scripts/check_codex_agent_config.py --assert-required-fields: ✅ 通過python3 scripts/check_codex_agent_config.py --assert-runtime-contract: ✅ 通過python3 scripts/check_impl_review_loop_codex_dispatch.py --assert-max-depth --assert-no-project-profile-routing: ✅ 通過python3 scripts/check_impl_review_loop_codex_dispatch.py --assert-explicit-spawn-notes: ✅ 通過python3 scripts/check_subagent_launch_ledger.py tests/fixtures/subagent-ledger/valid.json: ✅ valid fixture を passpython3 scripts/check_subagent_launch_ledger.py tests/fixtures/subagent-ledger/hook-untrusted.json: ✅ expected fail (hook_evidence_untrusted_or_missing)python3 scripts/check_subagent_launch_ledger.py tests/fixtures/subagent-ledger/pr763-replay.json: ✅ expected fail (subagent_launch_evidence_missing,root_thread_data_plane_execution_observed)python3 .claude/skills/review-issue/scripts/check_issue_contract.py --file tmp/issue-764-body.md --json: ✅verdict: approveAllowed Paths 遵守
.codex/config.toml、scripts/check_*、tests/fixtures/subagent-ledger/、tests/fixtures/codex-agent-config/、docs/dev/workflow.md、docs/dev/agent-skill-boundaries.md、.claude/skills/impl-review-loop/steps/*、.claude/skills/post-merge-cleanup/SKILL.mdに限定した.codex/rules/default.rules、.claude/agents/*.md、assets/、LICENSES/は変更していないSchema Change Applicability
スキーマ変更判定です。
schema_changeSUBAGENT_LAUNCH_LEDGER_V1と Codex custom-agent runtime contract という machine-readable guardrail contract を validator/fixture として導入したためSchema Consumer Inventory
スキーマ利用箇所の棚卸しです。
変更対象 schema:
SUBAGENT_LAUNCH_LEDGER_V1,codex_agent_runtime_contract/v1before/after 差分:
Consumer 列挙(rg コマンド例と結果):
Consumer 更新状況:
scripts/check_subagent_launch_ledger.pytests/fixtures/subagent-ledger/*.jsondocs/dev/agent-skill-boundaries.mddocs/dev/workflow.mdscripts/check_codex_agent_config.pyCompatibility Decision
互換性の判断です。
additivebackward_compatibleno#601Safety Claim Matrix
安全性主張と未制御範囲の対応表です。
python3 scripts/check_subagent_launch_ledger.py tests/fixtures/subagent-ledger/pr763-replay.json.codex/config.tomlを profile routing の証拠として扱わないpython3 scripts/check_impl_review_loop_codex_dispatch.py --assert-max-depth --assert-no-project-profile-routingpython3 scripts/check_subagent_launch_ledger.py tests/fixtures/subagent-ledger/hook-untrusted.jsonNotes
補足です。