Repository navigation
Closed
Labels
phase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: Bounded follow-up for the merged PR #2394 capability-preflight review findings.
change_kind: codeParent Issue
none
Parent Goal Ref
- Goal: Close the bounded capability-preflight review findings identified in merged PR feat: share capability preflight deadline #2394.
- Desired Destination: Capability preflight probe ordering, malformed-output handling, deadline test fidelity, and hermetic root-to-producer verification evidence.
Current Validated Scope
- Correct bounded capability-preflight probe ordering so required GitHub probes run before the optional Spark probe, and so
controlled_github_readruns independently of rootgithub_authsuccess/failure. - Validate only the Spark JSON fields actually consumed by the capability decision, and normalize malformed shapes into the existing structured reason without an uncaught exception.
- Make shared-deadline tests faithful to the producer/root-consumer contract and hermetic, including one test that crosses the real root-to-producer subprocess boundary.
- Remove the filename-based timeout-ownership blacklist test.
- Preserve structured reasons, the existing single absolute monotonic deadline, and fail-closed behavior.
Remaining Parent Gaps
- None. A new scheduler, deadline package, or security sandbox work requires a separate Issue.
Outcome
Updated capability-preflight source and hermetic tests make the merged PR #2394 review comment's five adopted findings pass deterministic tests for probe ordering, malformed Spark output validation, deadline fidelity (including a real root-to-producer boundary test), and removal of the filename-based timeout-ownership blacklist test, while preserving the existing single absolute monotonic deadline and public result schema.
Runtime Verification Applicability
decision: immediate
reason: "This Issue changes probe ordering, subprocess-spawn conditions, and Spark JSON parsing in scripts/claude-gpt/workflow_capability_preflight.py, plus a root-to-producer subprocess boundary test; these are runtime behaviors of external process invocation that static analysis cannot verify."
applicable_acs: [AC1, AC2, AC3, AC4, AC5, AC6, AC7]
execution_environment: "Deterministic pytest with faked external leaf CLIs (gh, claude-code-proxy or fixture preflight.sh); no live GitHub network, credentials, or user CLI state required."
skip_conditions: "none"
fallback_policy: "Producer-level unit tests are valid evidence for AC1-AC4 and AC6-AC7. AC5 alone requires the real root-to-producer subprocess boundary; a test that bypasses that boundary is not PASS evidence for AC5. A hermetic fixture failure is an ordinary test failure to fix within this PR, not automatic human escalation."
artifact_requirements: "Attach the focused pytest command, exit status, pass count, and a summary of captured producer argv / fake-CLI invocation traces to the PR Runtime Verification Evidence section."In Scope
- Reorder capability-preflight probes so the required GitHub probes (
github_auth, thengithub_repo_readonly whengithub_authcompleted) run before the optionalspark_env_onlyprobe, and runcontrolled_github_readindependently of rootgithub_authsuccess/failure, all within the existing shared absolute monotonic deadline. - Preserve no-spawn behavior once the shared deadline is exhausted.
- Add a small helper that validates only the Spark JSON fields consumed by the capability decision (
binary_available: bool,chatgpt_auth: object,chatgpt_auth.available: bool) and normalizes malformed/invalid shapes into the existing structured malformed-output reason without an uncaught exception. - Strengthen shared-deadline tests to assert observed probe arguments and remaining timeout budgets from a controlled monotonic clock, and to prove
assess()(not a monkeypatched replacement ofassess()) creates exactly one local absolute deadline shared unchanged by all applicable probes. - Add one hermetic test that exercises the real root-to-producer subprocess boundary by reusing the existing
skill_runtime_exec → workflow_start_entry → root_entry_router → workflow_capability_preflight.pyfixture pattern already used bytest_real_producer_blocked_on_fake_gh_auth_failure_posts_no_comment(the_install_fake_gh/_FAKE_GH_FIXTUREPATH-wrapper pattern, labeled "P1-4: real producer/consumer integration via a fakeghon PATH" intest_root_entry_router_workflow_capability.py); only external leaf CLIs (gh,claude-code-proxyor fixturepreflight.sh) are faked, and the producer subprocess/result itself is not replaced with a fixture payload. - Add these new probe-ordering, malformed-output, deadline-fidelity, and root-to-producer tests to a new file,
scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py, rather than as new test functions appended to an existing test file (Issue 実装: VC baseline-fail 用 pytest command を canonical form に正規化して contract-review 往復を削減する #1285 / PR feat: VC baseline-fail pytest command を canonical form に正規化する compiler を追加 #1305 canonical VC shape: a not-yet-created test file, not a new node-id on an existing file). - Remove the filename-based
test_no_new_competing_timeout_ownership_module_introducedblacklist test fromtest_timeout_taxonomy_compat.py; absence of a competing timeout-ownership module is confirmed once during PR review instead of enforced by a permanent filename blacklist. - Mark the existing real-subprocess integration test
test_workflow_capability_returns_structured_result()intest_workflow_capability_preflight.pywith the already-defined@pytest.mark.github_livemarker (pyproject.toml); it remains as optional live coverage and is not part of this Issue's hermetic close evidence. - Update this Issue's Verification Commands to
uv run --locked pytest ...instead ofuv run --with pytest python -m pytest ..., matching the project's pinneduv==0.11.29and declaredpytestdev dependency.
Out of Scope
- A new scheduler or general-purpose probe orchestrator.
- A new deadline package or cross-repository deadline framework.
- Security sandbox, credential, or permission-model redesign.
- Unrelated capability expansion or workflow remediation.
- Scoping
gh auth statusto a specific host (--active --hostname); tracked as a separate small follow-up, not part of this Issue's PR feat: share capability preflight deadline #2394 review deltas.
Acceptance Criteria
- AC1: Required probes run in the exact order defined above (
github_auth→github_repo_readwhengithub_authcompleted →controlled_github_readindependently of root auth outcome →spark_env_onlylast), verified by a new test intest_capability_preflight_review_fixes.py. A failed rootgithub_authskips rootgithub_repo_readbut does not skipcontrolled_github_read, verified by a second new test in the same file. - AC2: When required GitHub probes complete and the optional Spark probe consumes the remaining shared deadline,
preferred/allowedreturnsdegradedrather thanblocked, and the GitHub probe results remainready. - AC3: Invalid JSON and structurally invalid Spark payloads (non-dict top level, non-bool
binary_available, missing/non-dictchatgpt_auth, non-boolchatgpt_auth.available) return a structured malformed-output reason without an uncaught exception.preferred/alloweddegrades;required/forbiddenblocks. - AC4:
assess(deadline_ns=None)creates exactly one local absolute deadline via_local_deadline_ns()and passes it unchanged to all applicable probes. - AC5: A hermetic test invokes the real root consumer (
root_entry_router.capability_preflight_result()) and the real producer child process (workflow_capability_preflight.py). Only external leaf CLIs are faked; the producer subprocess and its result are not replaced with a fixture payload. - AC6:
test_no_new_competing_timeout_ownership_module_introducedis removed fromtest_timeout_taxonomy_compat.py. Absence of a competing timeout-ownership module is reviewed once in the PR and is no longer enforced by a permanent filename blacklist. - AC7: The focused, locked pytest suite (
test_capability_preflight_review_fixes.py,test_timeout_taxonomy_compat.py, and the existingtest_workflow_capability_preflight_deadline.py, including its existingtest_expired_deadline_spawns_no_new_processno-spawn-on-exhaustion regression) passes without live GitHub access, provider credentials, or userghCLI configuration.
Verification Commands
# AC1
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_required_probes_run_before_optional_spark_and_starvation_degrades scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_controlled_github_read_runs_independently_of_root_auth_failure -q
# AC2
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_required_probes_run_before_optional_spark_and_starvation_degrades -q
# AC3
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_malformed_spark_payload_returns_structured_reason -q
# AC4
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_assess_without_deadline_creates_one_shared_local_deadline -q
# AC5
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py::test_root_to_producer_transports_deadline_with_fake_external_clis -q
# AC6
$ ! rg -q "test_no_new_competing_timeout_ownership_module_introduced" scripts/claude-gpt/tests/test_timeout_taxonomy_compat.py
# AC7
$ uv run --locked pytest scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py scripts/claude-gpt/tests/test_timeout_taxonomy_compat.py scripts/claude-gpt/tests/test_workflow_capability_preflight_deadline.py -qAllowed Paths
scripts/claude-gpt/workflow_capability_preflight.pyscripts/claude-gpt/tests/test_actor_scoped_capability_probe.pyscripts/claude-gpt/tests/test_spark_fallback_route.pyscripts/claude-gpt/tests/test_timeout_taxonomy_compat.pyscripts/claude-gpt/tests/test_workflow_capability_preflight.pyscripts/claude-gpt/tests/test_workflow_capability_preflight_deadline.pyscripts/claude-gpt/tests/test_capability_preflight_review_fixes.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- Python subprocess and pytest
Required Design References
docs/dev/runtime-verification-policy.mddocs/dev/extension-surface-runtime-policy.yamldocs/dev/agent-skill-boundaries.md
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR. Create a dedicated worktree and open a Draft PR by default. Do not split these bounded review findings across multiple PRs.
Source
- URL: feat: share capability preflight deadline #2394 (comment)
- note_id: 1
- dedupe_key: follow-up:squne121/loop-protocol:pr/2394:1
- Source context: merged PR review comment; the validated scope delta is limited to the five adopted findings confirmed by OWNER follow-up review 実装: Address remaining capability preflight review findings #2401 (comment).
Scope Overlap Note
- Implementation dependency: none.
- Historical contract references: 実装: capability_preflight_result() の nested timeout 構造を単一 deadline 共有方式へ改善する #2322 (single absolute monotonic deadline), 実装: Claude-GPT workflow の actor-scoped capability handoff を導入し issue-refinement-loop の auth/delegation parity を安定化する #2340 (actor-scoped controlled GitHub capability).
- Source: PR feat: share capability preflight deadline #2394 post-merge review comment.
- No validated exact-file or line-level collision is known. The previously listed 実装: issue-refinement-loop の preflight result から LOOP_STATE を生成する route wrapper を追加し CLI/schema 迷走を防ぐ #1006, feat(issue-refinement-loop): LOOP_ITERATION_CAPSULE_V1 を導入し、raw body / raw log の main context 流入を禁止する #997, 実装: issue-refinement-loop の rewrite routing が既存 blocker contract を consume して non-body-author-fixable blocker を早期停止できるようにする #944, test: scope_signal_guard termination の publisher-level 回帰テストを追加する #926, 実装: playtest-log の JSON Schema / validator の追加 #420, 実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205 are broad
scripts/-prefix path matches unrelated to capability-preflight probe ordering, Spark JSON parsing, or shared-deadline semantics, and are removed as false positives; coordinate any concurrent line-level edit at PR creation without asserting a dependency absent validated evidence.
Notes for Reviewer
- Deterministic code and test-fixture improvements are the adopted remedy; a prompt or operator workaround does not correct probe ordering, parsing, deadline semantics, or reproducible evidence.
.claude/skills/issue-refinement-loop/scripts/root_entry_router.pywas removed from Allowed Paths: the AC5 root-to-producer test reuses the existingtest_real_producer_blocked_on_fake_gh_auth_failure_posts_no_commentfixture pattern (real subprocess, fakeghon PATH) without modifying that file. Note:test_root_entry_router_advances_once_on_positive_fixturein the same file is NOT the right precedent to copy -- it monkeypatchessubprocess.runto return a canned JSON payload instead of spawning the real producer, which is exactly what AC5 forbids.- Scoping
gh auth statusto a specific host is intentionally deferred to a separate small follow-up Issue rather than mixed into this bounded PR feat: share capability preflight deadline #2394 review-deltas Issue. - AC1-AC5's new tests live in a new file,
test_capability_preflight_review_fixes.py, instead of new node-ids on the existingtest_workflow_capability_preflight_deadline.py: the VC baseline preflight rejectsexisting_file.py::new_test_nameas a non-canonical shape (Issue 実装: VC baseline-fail 用 pytest command を canonical form に正規化して contract-review 往復を削減する #1285 / PR feat: VC baseline-fail pytest command を canonical form に正規化する compiler を追加 #1305) and requires a not-yet-created file instead. - AC6's Verification Command uses a negated
rgexistence check (! rg -q ...) rather than running the wholetest_timeout_taxonomy_compat.pyfile, since the target test currently exists and passes; the negated form fails at baseline (test still present) and passes once the test is removed. - Implementing AC1's new probe order will break the pre-existing, currently-passing assertion
assert [call[0][0] for call in calls] == ["sh", "gh", "gh", "gh"]intest_all_four_probes_share_decreasing_remaining_timeout(test_workflow_capability_preflight_deadline.py, included in AC7's focused suite). Updating that assertion to the new order (["gh", "gh", "gh", "sh"]) is a required part of implementing AC1, not an optional strengthening.
Metadata
Metadata
Assignees
Labels
phase/implementationImplementation phase
Activity
squne121 commentedon Aug 29, 2026
判定
Issue #2401の方向性自体は正しいです。PR #2394の残存不具合を、共有monotonic deadlineを維持したまま小さく直す方針は妥当です。
ただし、現状のIssue契約には誤った実装でもACを満たせるfalse-green経路が残っています。また、元レビューの5項目のうち1項目が、採否判断なしに消えています。着手前にIssue本文を修正すべきです。
P0-1: AC4の「root→producer証跡」は、現在の検証方法では証明できない
Issue #2401はAC4で、root consumerから実producerまでを通り、GitHubネットワーク・token・ユーザーCLI状態に依存しない再現可能な証跡を要求しています。さらに、producer/consumer経路を迂回するテストをPASS証跡として認めないと明記しています。
しかし現在の対応テストである
test_root_transports_one_deadline_and_keeps_watchdog_graceは、次の形です。root_entry_router.subprocess.runを置換つまりこれはrootからproducerへの引数組み立てテストであって、root→producerの実境界テストではありません。現在のAC4コマンドでdeadlineテストファイル全体を通しても、producerが一度も起動されないままPASSできます。
必要な修正
1件だけ、次の性質を持つテストを追加してください。
このテストでは以下を固定します。
実物の
root_entry_router.capability_preflight_result()を呼ぶrootが呼ぶ
subprocess.runは、argvを記録した後、保存した本物のsubprocess.runへ委譲する実物の
workflow_capability_preflight.pyを子プロセスとして起動するfakeにするのは外部leafだけ
ghclaude-code-proxy、またはfixture用preflight.shproducer subprocess自体やproducer返却payloadはfakeにしない
fake CLIの呼び出しを一時ファイルへ記録し、live GitHubへ到達していないことを確認する
rootが渡した
--deadline-monotonic-nsとproducerのstructured resultを確認するリポジトリには既に、実際の
を通すfixture設計があります。新しい共通ハーネスは作らず、この既存パターンをdeadlineテスト内で小さく流用すれば十分です。
P1-1: 元レビューは5項目なのに、Issueは「4 findings」として1項目を黙って落としている
PR #2394への元レビューは、次の5項目です。
Issue #2401は「four identified findings」と書き、5番目をIn ScopeにもACにも入れていません。Issueにはコメントがなく、P3を意図的に却下したowner decisionも記録されていません。したがって、少なくとも記録上は採否判断なしの取りこぼしです。
採用すべき修正
test_no_new_competing_timeout_ownership_module_introduced()を削除対象に加えてください。現在のテストは、次の3ファイル名だけを禁止しています。
この方式では、
deadline_budget.pyという名前で作れば通るという問題があります。個人趣味開発では変更自由度を下げるだけで、実装品質をほぼ保証しません。
同リポジトリでは直近のPR #2372で、dead-code不在確認を恒久pytestにせず、PRレビュー時の一回限り確認へ戻した先例があります。今回も同じ方針が整合的です。
Issue本文は、次のいずれかにする必要があります。
Rejected Findingsに記録ワークフロー有用性を優先するなら、削除を採用する方がよいです。
P1-2: 「review-required order」だけでは、actor-scoped契約を壊す実装を防げない
現在の実装順は概ね次のとおりです。
Sparkのprobe capとworkflow全体budgetがどちらも30秒なので、Sparkが先に30秒消費すると、GitHub必須probeが起動されないままworkflowが
blockedになります。現在の実装とテストは、この誤ったsh → gh → gh → gh順を固定しています。必要な順序は明記すべきです。
特に重要なのは、
controlled_github_readをroot側のgithub_auth成功に従属させないことです。Issue #2340は、root shellとcontrolled executorを別のexecution substrateとして扱い、controlled側のsanitized environmentを独立検証する契約です。root authが失敗したからといってcontrolled probeまで省略すると、actor-scoped capabilityを再び一つのroot判定へ潰すことになります。
必須の回帰ケース
最低限、次の2ケースが必要です。
ケースA: optional Sparkが残り予算を使い切る
ケースB: root auth失敗時もcontrolled probeは実行される
単にargvの先頭要素を並べるだけでなく、最終decisionとactor capabilityまで確認すべきです。
P1-3: malformed-outputのテストが、修正すべきparse境界を迂回している
現在の
_run_env_only_preflight()は、JSONをparseした後、トップレベルがdictであることしか確認していません。その後の_spark_capability()は次に相当する処理を行います。したがって、次のような構造はJSONとしては成功しますが、後段で
AttributeErrorになります。{ "binary_available": true, "chatgpt_auth": null }また、文字列を受理した場合は
bool("false") == Trueなので、次の不正値を「利用可能」と誤判定し得ます。{ "binary_available": "false", "chatgpt_auth": { "available": "false" } }現在のコードはトップレベル
dictしか確認せず、後段でbool coercionしています。さらに現在の
test_successful_malformed_spark_output_returns_structured_reasonは、_run_env_only_preflight()自体をmonkeypatchしてProbeOutcome(PROBE_COMPLETED)を返しています。つまり、実際に壊れているparse境界を通りません。このテストは、parse境界が未修正でも別の場所で例外を握りつぶせばPASSします。最小実装
JSON Schemaや共通validation packageは不要です。消費する3フィールドだけを小さなhelperで検査してください。
preflight.sh --env-onlyが実際に生成する値も、この3フィールドはboolean/object/booleanです。外部proxyの生出力をPython側で再解釈せず、リポジトリ所有のJSON境界だけを検証するのが適切です。テストでは
_run_env_only_preflight()を置換せず、subprocess.runのsh呼び出しだけにmalformed stdoutを返してください。最低限の入力集合は以下です。
全ケースについて、
を固定すべきです。
P1-4: local deadlineテストは依然として名前と証明内容が一致していない
現在のテスト名は、
ですが、テストは
assess()全体をfakeへ置換し、main()がdeadline_ns=Noneを渡したことだけを確認しています。つまり証明しているのは、
だけです。
実際の、
が削除されても、このテストは通ります。
必要な修正
既存テストは正直な名前へ変更します。
別途、実物の
assess()を使うテストを追加します。このテストでは、
_local_deadline_ns()をsentinel値へmonkeypatchgithub_authgithub_repo_readcontrolled_github_readspark_env_onlyの全probeが同じsentinelを受け取ることを確認します。
AC1とAC3の現在の対応も入れ替わっています。
ACとnode-idを一対一に対応させるべきです。
なお、Pythonの
subprocess.run(timeout=...)はtimeout後に子を終了して待機してから例外を返し、process creation自体は即時中断できない場合があります。そのため、テストすべきなのは渡された残りbudgetとdeadline後のno-spawnであり、実時間が厳密に30.000秒以内かどうかではありません。absolutemonotonic_ns()を共有する設計自体は妥当です。 ([Python documentation]1)P1-5: Runtime Verificationの
applicable_acs: AC4は自己矛盾しているIssueは変更理由として、
を挙げています。
それにもかかわらず、Runtime Verificationの対象はAC4だけです。しかし実際には、
の全てがruntime behaviorです。元のIssue #2322も、fake clockとfake subprocessで全ACをimmediate runtime verification対象としていました。
また、
というskip conditionは過剰です。
fixtureが壊れた場合は通常のtest failureとして、同じPR内で修正すればよいだけです。fixture実行失敗のたびに人間停止・Issue commentを要求すると、今回のような小さなfollow-upが運用ゲートになります。
推奨契約
「producerを直接呼ぶテストは一切PASS証跡にならない」と広く解釈すると、AC1~AC3まで重いE2Eへ寄せることになります。境界証明が必要なのはAC4だけ、と明確に分けるべきです。
P1-6: focused verificationがhermeticではなく、
uv --with pytestも再現性を下げているIssueのAC5は
test_workflow_capability_preflight.pyファイル全体を実行します。しかし同ファイルのtest_workflow_capability_returns_structured_result()は、実物の、を起動します。その先で実際の、
へ到達し得ます。これはGitHub認証・CLI状態に依存しないhermetic close gateではありません。
このintegration test自体には価値があるので、削除する必要はありません。
推奨は次の分離です。
@pytest.mark.github_liveを付けて保持リポジトリの
pyproject.tomlには既にgithub_livemarkerがあり、通常pytestでは除外する方針が定義されています。新しい分類やハーネスは不要です。また、Issueの全Verification Commandsが使っている、
も変更すべきです。
このリポジトリは既にdev dependencyとしてpytestを宣言し、uvのバージョンを
==0.11.29へ固定しています。--with pytestはpytestを別のephemeral layerとして追加でき、project lockと競合する版も許容し得ます。ここでは再現性を下げるだけです。--lockedはlockfileを変更せず、古いlockなら失敗させるため、Issue検証にはこちらが適切です。 ([Astral Docs]2)使用すべき形は次です。
--offlineは追加しない方がよいです。テスト本体はGitHub/proxyへ接続しない一方、初回環境ではuvがlocked dependencyを取得する可能性があります。依存cacheまでmerge条件にすると、個人環境で不要な失敗を増やします。P2-1: Scope Collision欄は実質的に誤検出で、調整判断に使えない
Scope Collisionとして挙げられているIssueは、実際には次の内容です。
これらは、#2401が変更するcapability preflightのprobe ordering、Spark JSON parsing、shared deadline testsとは実質的に別スコープです。広い
allowed_paths: scripts/や.claude/.../scripts/が一致しただけのpath-prefix overlapに見えます。この列挙をC1として残すと、scope guardや実装Agentが無駄に停止・調整・人間エスカレーションする可能性があります。
次の形へ置き換えるのが適切です。
P2-2: 裸の
gh auth statusは別Issueで対象hostへ絞る価値がある現在のroot auth probeは、
を実行しています。
GitHub CLIの公式仕様では、hostを指定しない場合、既知の全host・accountを調べ、いずれかに問題があるとexit 1になり得ます。そのため、今回のGitHub.comリポジトリへ正常にアクセスできても、古いEnterprise hostや非active accountの不整合でworkflowをblockする可能性があります。 ([GitHub CLI]3)
最小改善は次です。
ただしこれはPR #2394レビューの残存差分ではないため、#2401には混ぜず、別の小さなfollow-upにするのがよいです。
外部実装との照合結果
absolute monotonic deadlineは維持すべき
time.monotonic_ns()はシステム時計変更の影響を受けず、後退せず、プロセス間で同じclock domainを利用できます。rootがabsolute deadlineを整数で渡し、producerが残り時間を再計算する方式は、relative timeoutを段階ごとに作り直すより妥当です。新しいschedulerやdeadline managerは不要です。 ([Python documentation]4)subprocess.run(timeout=…)の現在の使い方も基本的に妥当timeout時には子を終了・waitした後に
TimeoutExpiredが返るため、optional probeが共有予算を実時間で使い切るという元レビューの前提は正しいです。一方で厳密なwall-clock upper boundまでは保証されないため、process supervisorやsleepベーステストを追加する必要はありません。 ([Python documentation]1)claude-code-proxy codex auth statusはproduction probeとしては妥当proxyは保存された認証情報・account・expiryを確認する
codex auth statusを提供しています。productionでは現行probeを維持し、テストではfake executableでCLI契約だけを再現するのが適切です。実OAuth/keychainをhermetic testへ持ち込む必要はありません。 ([GitHub]5)Issue本文の推奨差し替え要点
推奨Verification Commands
より広い
scripts/claude-gpt/tests回帰は実行してよいですが、#2401のclose根拠は上記focused suiteに置くべきです。最終評価
Issue #2401は修正後なら価値の高い小規模follow-upです。実装規模も、本来は次の範囲で収まります。
新しいscheduler、共通schema、sandbox、process supervisor、永続artifact pipelineは不要です。上記の契約修正を入れれば、品質を上げながら個人開発のワークフローを重くしない形で
APPROVE相当になります。squne121 commentedon Aug 29, 2026
issue-refinement-loop: approved
OWNERのREQUEST_CHANGESレビュー(https://github.com/squne121/loop-protocol/issues/2401#issuecomment-5463051460)を受け、Issue契約を全面改訂しました。
approvedCONTRACT_REVIEW_RESULT_V1.status == go(readiness_status: go,vc_preflight_status: pass,body_sha256は現在の Issue body と一致)確認済み実施した修正(Step 4 rewrite、3 iteration + Step 2.5 semantic review、2 iteration)
^\s*field\s*:正規表現が- field:箇条書きにマッチしないバグを回避)。AC を AC1〜AC7 へ再構成し probe 順序・malformed JSON 検証・deadline 忠実性・root-to-producer 境界テスト・blacklist test 削除・hermetic focused suite を反映。Allowed Paths から未使用のroot_entry_router.pyを除去(scope_signal_guard のnew_allowed_path_layer誤検知も解消)。Scope Overlap Note の無関係 Issue 列挙を削除。uv run --locked python -m pytest ...からuv run --locked pytest ...へ修正(--lockedとpython -mの組み合わせが VC preflight allowlist でブロックされるため)。test_capability_preflight_review_fixes.pyへの参照へ変更(Issue 実装: VC baseline-fail 用 pytest command を canonical form に正規化して contract-review 往復を削減する #1285 / PR feat: VC baseline-fail pytest command を canonical form に正規化する compiler を追加 #1305 の非canonical VC shape 検出)。AC6 を否定rg形式に変更。test_all_four_probes_share_decreasing_remaining_timeoutのハードコード済みアサーション(["sh","gh","gh","gh"])が壊れる懸念を検出・検証し、Notes for Reviewer に明記。test_root_entry_router_advances_once_on_positive_fixture、実際は canned JSON を返す monkeypatch)を参照していたことを検出・検証し、正しい precedent(test_real_producer_blocked_on_fake_gh_auth_failure_posts_no_comment、実 subprocess + fakeghon PATH)へ訂正。assessment: clear、追加 finding なし。外部仕様 claim(
time.monotonic_ns()、subprocess.run(timeout=)、gh auth status、uv run --locked等)は web-researcher で一次資料照合済み。リポジトリ内 fact claim(probe 順序・JSON parse バグ・既存テスト実装・関連 Issue の実在性等)は codebase-investigator で全 13 件検証済み。Follow-up
OWNERレビューのP2-2(
gh auth statusの host 絞り込み)は本Issueのスコープ外として分離し、#2404 として起票済みです。Handoff
root_entry_router.py::run_root_transition()による同一ターン内 fresh review(capability preflight → live fetch → current-runissue-contract-review→ live 再取得)の結果、route: invoke_impl_review_loop(reason: fresh_review_go_live_equality、reviewed_body_sha256とobserved_live_body_sha256が一致、reviewed_base_shaとobserved_base_shaが一致)を確認しました。ただし今回の依頼スコープは issue-refinement-loop 単体のため、impl-review-loopの実起動はこのターンでは行っていません。実装に進む場合は改めて指示してください。[-]Address remaining capability preflight review findings[/-][+]実装: Address remaining capability preflight review findings[/+]squne121 commentedon Aug 29, 2026
implement-issue: 実装完了 (2026-08-29T22:15:31Z)
.claude/worktrees/issue-2401-capability-preflight-review-fixesworktree-issue-2401-capability-preflight-review-fixessqune121 commentedon Aug 29, 2026
impl-review-loop: 完了 (2026-08-29T22:20:00Z)
fix: AC5 root-to-producer deadline transport観測とAC2/AC3境界テストをOWNERレビュー…
squne121 commentedon Aug 29, 2026
impl-review-loop: 完了 (2026-08-29T23:30:00Z)
OWNER の REQUEST_CHANGES(https://github.com/squne121/loop-protocol/pull/2410#issuecomment-5465398027、P1:1/P2:3)を fix_delta として反映し、独立 pr-review-judge が再検証の上 APPROVE しました。
fix: capability-preflight probe ordering, Spark validation, deadline …
squne121 commentedon Aug 29, 2026
post-merge-cleanup: 完了 (2026-08-30T00:00:00Z)