Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: research
parent_issue: "none"
goal_ref: "current main fact-check を行い ADD/KEEP を記録し、ADD なら1件だけ dedupe 済み implementation Issue を link して research を close する"
change_kind: research-onlyParent Issue
なし(単独の判断 Issue)
Source
- Human decision anchor: 調査: RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONS allowlist に missing_monolith_performance_phase を追加すべきか #2580 (comment)
- current origin/main fact-check SHA:
3aff61429acd4429f2840faa374f5cf4687c7113 - Source: 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554, fix: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2575, 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155
- dedupe_key:
follow-up:squne121/loop-protocol:pr/2575:receipt-performance-allowlist-missing-monolith
Background
PR #2575 と #2554 の後、missing_monolith_performance_phase は monolith topology の Performance observation における required phase 不足を表す。一方、current main の consumer allowlist RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONS にはこの reason がない。
current main の producer には確認済みの穴がある。explicit monolith baseline で test_e2e_ci と test_e2e_monolith_responsive の両方がなく、legacy test_e2e_core だけであっても、receipt が complete、duration が nonzero、かつ eligible になり得る。このため判断が ADD の場合、consumer allowlist だけでなく producer repair を同じ implementation scope に含める必要がある。
Decision Rationale
- Performance observation の measurement/eligibility failure と、Reliability observation の integrity failure は別の fault domain として扱う。
missing_monolith_performance_phaseだけが、Performance observation の狭い positive allowlist 候補である。unknown、identity、run-set、manifest binding、及び Reliability 自身の evidence missing は fail-closed のまま維持する。allowlist の拡張根拠にはしない。
Outcome
current main fact-check を行い、missing_monolith_performance_phase について ADD または KEEP を本 Issue に記録する。ADD なら dedupe 済み implementation Issue #2617 を1件だけlink し、#2617 が #2155 を block する native dependency(#2155 の blockedBy に #2617 が入る方向)を materialize する。#2155 の既存他 blocker は変更しない。#2155 のこの新 prerequisite は #2617 が CLOSED + COMPLETED になった時だけ充足することを readback で確認して、この research を close する。KEEP なら判断理由を記録してこの research を close する。
In Scope
- current main における consumer allowlist、Performance producer、Reliability assessment の fact-check
- ADD/KEEP の判断と human decision anchor に沿う根拠の記録
- ADD 時に1件だけ作る dedupe 済み implementation Issue の契約確認。その実装 scope は consumer allowlist/tests、producer completeness と materialization regression、及び関連 docs に限定する
- research 自身の repo 変更は行わない
Out of Scope
- この research Issue における repo ファイルの変更
missing_monolith_performance_phase以外の consumer/gate 分類の再設計- ADD 判断後に複数の implementation Issue を作ること
Acceptance Criteria
- AC1: human decision anchor、current origin/main SHA
3aff61429acd4429f2840faa374f5cf4687c7113、実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554、fix: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2575、検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 を Source として用いた current main fact-check が記録される。 - AC2: Performance observation の measurement/eligibility failure と Reliability observation の integrity failure を別 fault domain とする判断、
missing_monolith_performance_phaseのみを narrow positive allowlist 候補とする判断、及び unknown/identity/run-set/manifest binding/Reliability 自身 evidence missing の fail-closed 維持が記録される。 - AC3: explicit monolith baseline で required
test_e2e_ciとtest_e2e_monolith_responsiveの両方がなく legacytest_e2e_coreのみでもcomplete/nonzero duration/eligibleになり得る producer hole を記録する。 - AC4: ADD の場合、dedupe 済み implementation Issue 実装: missing_monolith_performance_phase をPerformance-only allowlist化しmonolith phase完全性を保証する #2617 が1件だけ link され、その scope が consumer allowlist/tests、producer completeness と materialization regression、及び docs を含む。実装: missing_monolith_performance_phase をPerformance-only allowlist化しmonolith phase完全性を保証する #2617 が 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 を block する native dependency(検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の
blockedByに 実装: missing_monolith_performance_phase をPerformance-only allowlist化しmonolith phase完全性を保証する #2617 が入る方向)を materialize し、検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の既存他 blocker は変更しない。検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 のこの新 prerequisite は 実装: missing_monolith_performance_phase をPerformance-only allowlist化しmonolith phase完全性を保証する #2617 がCLOSED + COMPLETEDになった時だけ充足することの readback を記録する。 - AC5: ADD/KEEP の結論と理由を記録し、ADD は link 後、KEEP は理由の記録後に research を close する。
Verification Commands
# AC1
$ rg -n "RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONS" scripts/ci/build_ci_reliability_assessment_v1.py# AC2
$ rg -n "Reliability" docs/dev/ci-test-reliability-assessment.md# AC3
$ rg -n "test_e2e_core" tests/ci/test_ci_performance_gate.py# AC4
$ rg -n "missing_monolith_performance_phase" scripts/ci/tests/test_build_ci_reliability_assessment_v1.py# AC5
$ rg -n "test_e2e_monolith_responsive" docs/dev/e2e-performance-benchmark.mdAllowed Paths
research 自身は repo 変更なし。ADD 時の implementation Issue の Allowed Paths は次の5ファイルに厳密に限定する。
scripts/ci/build_ci_reliability_assessment_v1.pyscripts/ci/tests/test_build_ci_reliability_assessment_v1.pytests/ci/test_ci_performance_gate.pydocs/dev/ci-test-reliability-assessment.mddocs/dev/e2e-performance-benchmark.md
Runtime Verification Applicability
- decision: not_applicable
- reason: 本 research は current main の静的 fact-check と ADD/KEEP の意思決定だけで完結し、実行時動作を変更しない。
Stop Conditions
- Outcome / Scope / AC が検索可能な形で記載されていない場合は即停止
- Allowed Paths 外への書き込みを試みた場合は即停止
- 権限不足(permission denied)により操作が完了できない場合は即停止
- 成果物の書き込みに失敗した場合(I/O エラー等)は即停止
- ADD/KEEP を既存 evidence だけで安全に決められない場合は、結論を推測せず human judgment を求める。
本作業の実行方針として、人間へ停止・承認要求するのは破壊的操作または secret value のアクセス/露出が必要な場合に限る。通常の Issue/PR mutation、commit/push/review/rerun/squash merge は自律継続する。
Handoff Contract
Current Objective: current main fact-check に基づきmissing_monolith_performance_phaseの ADD/KEEP を記録する。Bounded Current Context: 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554、fix: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2575、検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155、human decision anchor、及び current origin/main SHA に限定する。Next Action: ADD なら1件だけ dedupe 済み implementation Issue を link して close、KEEP なら理由を記録して close。Artifact Refs: 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554, fix: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2575, 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155, 調査: RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONS allowlist に missing_monolith_performance_phase を追加すべきか #2580 (comment)
Activity
squne121 commentedon Sep 8, 2026
create-issue transaction partial-failure
Issue: #2580
Failure stage: label-apply
Message: label-apply failed
Requested:
Completed steps: create
Failure context: command=gh issue edit --repo squne121/loop-protocol 2580 --add-label triage-required,decision-required,phase/research
output=failed to update #2580: 'decision-required' not found
failed to update 1 issue
matching_issue_numbers=[2580]
issue_number=2580
Recovery hint: stage 'label-apply' encountered an unexpected failure.
Generic guidance: verify the issue state manually and re-run the transaction if safe.
gh issue view 2580 --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 Sep 10, 2026
判定
#2580 の最終判断は「
missing_monolith_performance_phaseをRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSに追加する」が妥当です。ただし、現在の Issue 本文のまま判断だけ記録して implementation Issue を切るのは REQUEST_CHANGESです。allowlist の結論自体はほぼ決まっていますが、調査中に隣接する実装上の穴と、後続実装スコープの不足が見つかりました。
P1 — 現状維持は Reliability / Performance の責務分離に反する
Reliability builder 自身のコメントが設計意図をかなり明確にしています。
receipt.evidence_errorsは、identity / run-set / manifest-binding の integrity violation → Reliability blocker
Performance measurement が計算できないだけの ineligibility → Reliability を止めない
という2クラスに分離されています。未知 reason だけを fail-closed に残す設計です。現在の allowlist は
gate_ready_timestamp_missing_or_invalid、missing_pair_e2e-core、missing_pair_e2e-responsive-matrixの3つです。missing_monolith_performance_phaseは「monolith のe2e-coreは存在し、workflow_run identity もあるが、その Performance duration observation に必要な2 phaseの片方が使えない」という reason です。PR #2575 でも、provider lane 自体の欠落とは別 reason として意図的に導入されています。ところが現状では、この新reasonがallowlist外なので
verify_prerequisites_available()がreceipt.evidence_errors_contains_non_performance_only_reasonとして Reliability 全体を停止します。これは「保守的な fail-close」というより、Performance instrumentation の障害を Reliability measurement の代理 blocker にしてしまう cross-metric coupling です。
親 #2155 も、固定 root run set から Performance と Reliability が独立した metric eligibility projectionを作る契約になっています。Performance evidence の欠損を理由に Reliability observation まで失うのは、この契約と逆です。
allowlist追加は Reliability の fail-open にはならない
ここは #2580 本文で明記した方がよいです。
状況 | Performance | Reliability -- | -- | -- monolith timing phaseだけ欠損 | runをPerformance sampleから除外 | 自身の証跡が正常なら継続 Playwright JSON自体が欠損 | Performance側とは独立 | Reliability自身がfail-close workflow job未完了 | 同上 | Reliability自身がfail-close identity / manifest / binding破損 | evidence error | 引き続きfail-close 未知reason | — | 引き続きfail-close実装上も Reliability builder は
job_not_completedやmissing_playwright_json_artifactを独立検査しており、そのnegative regressionも存在します。外部仕様とも整合します。GitHub Actions API は job の
status/conclusion/ step状態を取得でき、Playwright のJSON reporterはテストrun情報を独立したreportとして出力できます。またconfig metadataもJSON reportへシリアライズできます。つまり Performance用timing recordとReliability用test/job evidenceを別々に判定する材料は公式API上も存在します。(GitHub Docs)P1 — #2575側に「両方のphaseが無い」抜け道がある
今回の調査で、こちらの方が重要な隣接findingです。
_monolith_required_phase_completeness()は、少なくともどちらか一方の既知phaseが見つかった場合には、test_e2e_citest_e2e_monolith_responsiveの両方を要求します。
しかし 両方とも存在しない場合は
Trueを返します。これは意図的です。legacy/generic fixture の
test_e2e_coreを壊さないため、「既知2-phase shapeを名乗っているbaselineだけ厳しくする」guardになっています。実際、その互換性を維持する専用testもあります。しかし production workflow の actual phase names は明確に
test_e2e_ciとtest_e2e_monolith_responsiveです。したがって、明示的に
topology="monolith"と分かっている production path で、legacy fixture互換性のために production validation を弱めるのは逆方向です。例えばmalformed evidenceが、
になれば、両 required phase がゼロなのに completeness check は通過し、既存
_job_duration_seconds()はtest_e2e*を合算するので non-zero duration を作り得ます。現在の #2580 本文にある「required phase のいずれかを欠く場合にmissing_monolith_performance_phase」という説明も、このケースについては実装と一致していません。これは allowlistへ追加しない理由ではありません。逆に、reason producerを正しくしてから、そのreasonを正しいfault domainへ分類すべきです。
P2 — 後続実装の regression が弱すぎる
現在のReliability側テストは、Performance-only代表例として
gate_ready_timestamp_missing_or_invalidを1件試しているだけです。単に新reasonをsetへ1行追加し、似たtestを1本追加するだけでは、「将来またreasonを追加して分類漏れ」が繰り返されます。
一方で巨大なreason registry/schemaを作る必要もありません。趣味開発なら 既存frozensetをそのままauthorityとしてpytest parameterizeする程度が適切です。
P2 — ドキュメントと #2155 の接続も更新した方がよい
Reliability docs は現在Performance-only reasonを既存3種として明記しています。 Performance benchmark docs側の close-grade exclusion taxonomyにも新reasonがまだ反映されていません。
また #2155 は44-runを固定 root set とし、sample不足でもtop-upしない設計です。先に
blocks=1smoke でmonolithの両required phaseを確認してから本実験へ進む契約も既にあります。そのため #2580は
blocks=22より前に解消しておくべき prerequisite です。ここを未解決のまま44-runへ行くと、1件のPerformance-only timing defectがReliability production assessmentまで止める可能性があり、固定実験を無駄にし得ます。推奨する最小修正
調査: RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONS allowlist に missing_monolith_performance_phase を追加すべきか #2580 のDecisionを ADD に確定し、「malformedだからallow/fail-close」ではなく fault-domain ownership を判断基準として本文に記録する。
後続implementation Issueを1件だけ作り、
missing_monolith_performance_phaseをallowlistへ追加する。Reliability regressionをparameterizeし、全allowlisted reasonは非blocking / unknownまたはidentity-binding reasonはblocking を固定する。さらに、新reasonがあってもReliability固有evidenceが欠損していれば当然failする統合caseを1本入れる。
同じ小規模implementation Issueで
_monolith_required_phase_completeness()の「required phaseが両方無い場合はTrue」を修正し、明示的monolith production pathでは2 phase exact completenessを要求する。legacy fixtureはproduction-shaped fixtureへ直す。これを別Issueにして管理コストを増やす利点は薄いです。docs/dev/ci-test-reliability-assessment.mdとdocs/dev/e2e-performance-benchmark.mdのreason taxonomyを同期する。検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の
blocks=22start prerequisite にこのfollow-up completionを追加する。ただし、このPR専用の新しいlive smoke、schema、別harness、SLSA/OIDC、署名、追加approval gateは作らない。production確認は既存の 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155blocks=1smokeに任せる。最終 disposition
Issue #2580: REQUEST_CHANGES → Decisionは「ADD」に収束。
「malformed evidence は保守的に Reliability も止めるべき」という選択肢は採用しません。ReliabilityにはGitHub job stateとPlaywright JSON/metadataを使った独立したfail-close機構が既にあり、Performance timing phaseの完全性をReliabilityのproxy gateにする必要がありません。Playwright自身もtest resultの
status・duration・errors等を独立した結果として提供しています。(Playwright)同時に、allowlist 1行追加だけで終わらせず、#2575で残った「required phaseが両方ゼロならstrict checkを回避できる」穴を一緒に閉じるのが、今回の品質・実用性・ワークフローコストのバランスとして最も良いです。
## 判定#2580 の最終判断は「
missing_monolith_performance_phaseをRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSに追加する」が妥当です。ただし、現在の Issue 本文のまま判断だけ記録して implementation Issue を切るのは REQUEST_CHANGESです。allowlist の結論自体はほぼ決まっていますが、調査中に隣接する実装上の穴と、後続実装スコープの不足が見つかりました。
P1 — 現状維持は Reliability / Performance の責務分離に反する
Reliability builder 自身のコメントが設計意図をかなり明確にしています。
receipt.evidence_errorsは、という2クラスに分離されています。未知 reason だけを fail-closed に残す設計です。現在の allowlist は
gate_ready_timestamp_missing_or_invalid、missing_pair_e2e-core、missing_pair_e2e-responsive-matrixの3つです。missing_monolith_performance_phaseは「monolith のe2e-coreは存在し、workflow_run identity もあるが、その Performance duration observation に必要な2 phaseの片方が使えない」という reason です。PR #2575 でも、provider lane 自体の欠落とは別 reason として意図的に導入されています。ところが現状では、この新reasonがallowlist外なので
verify_prerequisites_available()がreceipt.evidence_errors_contains_non_performance_only_reasonとして Reliability 全体を停止します。これは「保守的な fail-close」というより、Performance instrumentation の障害を Reliability measurement の代理 blocker にしてしまう cross-metric coupling です。
親 #2155 も、固定 root run set から Performance と Reliability が独立した metric eligibility projectionを作る契約になっています。Performance evidence の欠損を理由に Reliability observation まで失うのは、この契約と逆です。
allowlist追加は Reliability の fail-open にはならない
ここは #2580 本文で明記した方がよいです。
実装上も Reliability builder は
job_not_completedやmissing_playwright_json_artifactを独立検査しており、そのnegative regressionも存在します。外部仕様とも整合します。GitHub Actions API は job の
status/conclusion/ step状態を取得でき、Playwright のJSON reporterはテストrun情報を独立したreportとして出力できます。またconfig metadataもJSON reportへシリアライズできます。つまり Performance用timing recordとReliability用test/job evidenceを別々に判定する材料は公式API上も存在します。([GitHub Docs]1)P1 — #2575側に「両方のphaseが無い」抜け道がある
今回の調査で、こちらの方が重要な隣接findingです。
_monolith_required_phase_completeness()は、少なくともどちらか一方の既知phaseが見つかった場合には、test_e2e_citest_e2e_monolith_responsiveの両方を要求します。
しかし 両方とも存在しない場合は
Trueを返します。これは意図的です。legacy/generic fixture の
test_e2e_coreを壊さないため、「既知2-phase shapeを名乗っているbaselineだけ厳しくする」guardになっています。実際、その互換性を維持する専用testもあります。しかし production workflow の actual phase names は明確に
test_e2e_ciとtest_e2e_monolith_responsiveです。したがって、明示的に
topology="monolith"と分かっている production path で、legacy fixture互換性のために production validation を弱めるのは逆方向です。例えばmalformed evidenceが、
になれば、両 required phase がゼロなのに completeness check は通過し、既存
_job_duration_seconds()はtest_e2e*を合算するので non-zero duration を作り得ます。現在の #2580 本文にある「required phase のいずれかを欠く場合にmissing_monolith_performance_phase」という説明も、このケースについては実装と一致していません。これは allowlistへ追加しない理由ではありません。逆に、reason producerを正しくしてから、そのreasonを正しいfault domainへ分類すべきです。
P2 — 後続実装の regression が弱すぎる
現在のReliability側テストは、Performance-only代表例として
gate_ready_timestamp_missing_or_invalidを1件試しているだけです。単に新reasonをsetへ1行追加し、似たtestを1本追加するだけでは、「将来またreasonを追加して分類漏れ」が繰り返されます。
一方で巨大なreason registry/schemaを作る必要もありません。趣味開発なら 既存frozensetをそのままauthorityとしてpytest parameterizeする程度が適切です。
P2 — ドキュメントと #2155 の接続も更新した方がよい
Reliability docs は現在Performance-only reasonを既存3種として明記しています。 Performance benchmark docs側の close-grade exclusion taxonomyにも新reasonがまだ反映されていません。
また #2155 は44-runを固定 root set とし、sample不足でもtop-upしない設計です。先に
blocks=1smoke でmonolithの両required phaseを確認してから本実験へ進む契約も既にあります。そのため #2580は
blocks=22より前に解消しておくべき prerequisite です。ここを未解決のまま44-runへ行くと、1件のPerformance-only timing defectがReliability production assessmentまで止める可能性があり、固定実験を無駄にし得ます。推奨する最小修正
missing_monolith_performance_phaseをallowlistへ追加する。_monolith_required_phase_completeness()の「required phaseが両方無い場合はTrue」を修正し、明示的monolith production pathでは2 phase exact completenessを要求する。legacy fixtureはproduction-shaped fixtureへ直す。これを別Issueにして管理コストを増やす利点は薄いです。docs/dev/ci-test-reliability-assessment.mdとdocs/dev/e2e-performance-benchmark.mdのreason taxonomyを同期する。blocks=22start prerequisite にこのfollow-up completionを追加する。ただし、このPR専用の新しいlive smoke、schema、別harness、SLSA/OIDC、署名、追加approval gateは作らない。production確認は既存の 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155blocks=1smokeに任せる。最終 disposition
Issue #2580: REQUEST_CHANGES → Decisionは「ADD」に収束。
「malformed evidence は保守的に Reliability も止めるべき」という選択肢は採用しません。ReliabilityにはGitHub job stateとPlaywright JSON/metadataを使った独立したfail-close機構が既にあり、Performance timing phaseの完全性をReliabilityのproxy gateにする必要がありません。Playwright自身もtest resultの
status・duration・errors等を独立した結果として提供しています。(Playwright)同時に、allowlist 1行追加だけで終わらせず、#2575で残った「required phaseが両方ゼロならstrict checkを回避できる」穴を一緒に閉じるのが、今回の品質・実用性・ワークフローコストのバランスとして最も良いです。
squne121 commentedon Sep 10, 2026
推奨は、対象コメントを human-origin anchor として
issue-refinement-loopに投入し、#2580 自体ではコード実装せず、Decision と後続 implementation Issue の契約を修正させることです。現行 skill は loop iteration ごとの人間承認を既定で要求せず、Claude Code/Claude-GPT の permission mode とは別概念として扱っています。したがって、すでに auto mode なら/permissionや permission mode 切替を挟ませる必要はありません。特に重要なのは次の点です。現行 #2580 は research-only で、ADD 判断なら実装 Issue を起票する契約ですが、その将来 Allowed Paths は今回コメントで発見された
test_ci_performance_gate.pyの producer-side defect や docs まで含めていません。 一方、現行コードでは Reliability allowlist は旧3 reason のままで、Reliability regression も Performance-only reason を1例しか検査していません。 対象コメントの「ADD + producer hole修正 + parameterized regression + docs同期」という方向で契約を拡張するのが妥当です。もう一点、#2155 の blocker は #2580 だけにしない方がよいです。#2580 は「実装 Issue を起票した時点でclose可能」という現在の契約なので、#2580 だけを prerequisite にすると、実装前に44-runへ進めてしまいます。#2155 の実際の start prerequisite は、今回 materialize する implementation Issue の CLOSED+COMPLETED に束縛するのが整合的です。現在の #2155 Blocked By に #2580/その後続実装はまだ入っていません。
以下を、そのまま既存の auto mode Claude-GPT に渡すのを推奨します。
squne121/loop-protocolの Issue #2580 を、エージェントスキル.claude/skills/issue-refinement-loopの現行 canonical contract に従って、人間の途中承認なしで最後まで refinement してください。対象:
squne121/loop-protocol#2580https://github.com/squne121/loop-protocol/issues/2580#issuecomment-5611751710.claude/skills/issue-refinement-loop実行モード
この対話セッションは既に auto mode で起動済みです。
通常の調査、SubAgent起動、Issue本文更新、コメント、follow-up Issue materialization、dependency同期など、skill が許可する通常操作について私の承認を逐次求めないでください。
特に:
/permissionを実行しない。--dangerously-skip-permissions等へ切り替えようとしない。loop_iteration_approval_gateと Claude-GPT/Claude Code の tool permission を混同しない。needs-fixになっても max_iterations 未到達なら、人間確認を挟まず canonical routing に従って次 iteration へ進む。ただし、canonical planner / guard が明示的に
human_judgment_required、blocked、environment_failure等を返し、自動回復経路も存在しない場合は、その契約を無視して突破しないこと。秘密情報へのアクセスや破壊的操作が必要になった場合も停止すること。Anchor の扱い
上記 anchor comment は、この会話で人間が明示的に指定した direct human context です。
URL単独の unlabeled anchor として扱わず、skill が規定する human-context lane を使用してください。
canonical main root / default branch から、必要な capability preflight を経た上で、概念的には以下に対応する正規経路を使用してください。
preflight.run.with_human_contextその結果が trusted contract patch を許可した場合のみ、skill の規定に従って
contract_update.run.with_human_contextへ進んでください。
wrapperやplannerを迂回して、anchor commentを根拠に直接 Issue body を手編集し始めないこと。
SubAgent の必須利用
SubAgent を実際に使用してください。
少なくとも canonical Step 1 の
codebase-investigatorに、current default branch の repository facts を独立検証させてください。重点確認対象:
scripts/ci/build_ci_reliability_assessment_v1.pyRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSverify_prerequisites_available()scripts/ci/tests/test_build_ci_reliability_assessment_v1.pytests/ci/test_ci_performance_gate.pyMISSING_MONOLITH_PERFORMANCE_PHASE_REASON_monolith_required_phase_completeness()_job_duration_seconds()docs/dev/ci-test-reliability-assessment.mddocs/dev/e2e-performance-benchmark.mdIssue 実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554
PR fix: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2575
Issue 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155
Issue 調査: RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONS allowlist に missing_monolith_performance_phase を追加すべきか #2580 本文および全コメント
anchor comment の主張をそのまま真実扱いせず、current repository state に対して fact-check してください。
planner が external claim の調査を要求する場合だけ
web-researcherも使用してください。repository evidence だけで disposition が確定するなら、不必要な web research を追加しないでください。SubAgent join rule
起動した SubAgent は fire-and-forget にしないこと。
すべての必要な SubAgent が terminal state になるまで待ち、結果を回収してから review / rewrite / GitHub mutation / iteration termination の判断へ進んでください。
並列実行可能な read-only 調査は並列化してよいですが、必ず全件 join してください。
canonical Step 2 については現行 skill contract を守り、legacy
issue-reviewerSubAgent を独自に起動して canonical root review pipeline の代替にしないでください。今回の refinement で収束させたい Decision
anchor comment の主要 disposition を独立検証し、事実と一致するなら #2580 の Decision を以下に収束させてください。
ADD:
missing_monolith_performance_phaseをRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSに追加する。判断理由は単なる「malformed evidence を許容する」ではなく、fault-domain ownership / metric eligibility separation としてください。
明示するべき意味:
#2580 本文の不足を修正
現在の #2580 の「ADDならallowlist追加+regression testの implementation Issue を起票する」だけでは不足しています。
current facts が anchor comment と一致するなら、後続 implementation contract に以下を含めるよう #2580 を refinement してください。
1. Reliability consumer classification
missing_monolith_performance_phaseをRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSへ追加する。
対象:
scripts/ci/build_ci_reliability_assessment_v1.py2. Reliability regression の一般化
単一reason専用testを追加するだけで終えない。
既存
RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSの frozenset を authority として利用できるなら、pytest parameterization 等の小さな仕組みで、missing_monolith_performance_phaseが存在しても、Reliability自身に必要な evidence が欠損している場合 → Reliability は当然 fail-closeを固定すること。
主対象:
scripts/ci/tests/test_build_ci_reliability_assessment_v1.py巨大なreason registry、新schema、新harnessは作らない。
3. Producer-side monolith completeness defect
anchor comment の finding を current code で独立確認すること。
_monolith_required_phase_completeness()が、既知required phaseの片方だけ存在する場合は reject する一方、両方とも存在しない generic/legacy shape を通してしまうのであれば、明示的な production monolith path ではtest_e2e_citest_e2e_monolith_responsiveの 両方の exact completeness
を要求する契約へ修正する後続実装scopeを含めること。
test_e2e_coreのような generic measurement だけで production monolith Performance duration が成立したことにしない。legacy fixture がこの抜け道に依存しているだけなら、production-shaped fixture へ更新する方向を優先する。
主対象:
tests/ci/test_ci_performance_gate.pyこれは allowlist ADD と矛盾するものではない。
producerを正しく fail/classify させ、その reason を consumer 側で正しい fault domain に分類する一連の変更として扱うこと。
4. Documentation synchronization
current docsを確認し、不足しているなら後続 implementation Issue に以下の同期を含める。
docs/dev/ci-test-reliability-assessment.mddocs/dev/e2e-performance-benchmark.md少なくとも:
missing_monolith_performance_phaseの taxonomyを実装と矛盾しない形で記録する。
5. #2155 との prerequisite 接続
#2155 の
blocks=22/ 44-run production experiment より前に、この修正が完了していることを保証してください。ここで重要なのは、research Issue #2580 の close だけを sufficient prerequisite にしないことです。
#2580 は Decision を記録して implementation Issue を materialize した段階で close できる契約になり得るため、#2155 が #2580 だけに block されていると、implementation未完了のまま本実験を開始できる false-green dependency になります。
推奨:
repository の dependency materializer / planner が別の canonical 表現を要求するなら、その authority に従いつつ、意味論として「implementation completion 前に blocks=22 を開始できない」を維持してください。
#2155 を ad hoc に直接書き換えるのではなく、skill の dependency / scope-rollup / materialization contract が所有する正規経路を使ってください。
Follow-up implementation Issue
Decision=ADD が確定したら、
issue-refinement-loopの Step 4.5 / follow-up materialization contract に従って implementation Issueを1件 materialize してください。まず dedupe_key /既存open issue を canonical 手順で検索し、同一scopeの open Issue が存在すれば再利用してください。title類似だけでdedupeしないこと。
1 Issue = 1 PR を維持しつつ、今回の以下の変更は同じ fault-domain contract の整合修正なので、current reviewで矛盾が見つからない限り1つの小規模 implementation Issue にまとめてください。
候補 Allowed Paths:
scripts/ci/build_ci_reliability_assessment_v1.pyscripts/ci/tests/test_build_ci_reliability_assessment_v1.pytests/ci/test_ci_performance_gate.pydocs/dev/ci-test-reliability-assessment.mddocs/dev/e2e-performance-benchmark.md必要なら、#2155 の dependency metadata / issue contract 更新は repository の canonical dependency mechanism が所有する別 mutation として扱うこと。
implementation Issue には最低限、
を検索可能な形で持たせてください。
不要なもの:
production live確認は #2155 が既に所有する smoke / experiment contract に委ねてください。
#2580 ではコード実装しない
今回実行するのは
.claude/skills/issue-refinement-loopです。#2580 自体の refinement 中に上記Python/docsファイルを直接変更・commit・PR作成しないでください。
このrunで行うべき成果は、
です。
implementation は materialize した後続 Issue の別
impl-review-loop等に委ねます。Review loop
各 iteration で skill の planner / root review pipeline / decision helper を authority としてください。
独自の prose 判定で canonical
status/verdict/next_actionを上書きしないこと。needs-fix/request_changesなら max_iterations 内で自動 rewrite → re-review を継続してください。reviewで新しいscope findingが出た場合も、
を canonical scope/follow-up decision に従って処理してください。
完了条件
途中承認を求めず、可能な限り以下まで一気に進めてください。
FOLLOW_UP_MATERIALIZATION_RESULT_V1を含む終了結果が記録されている最後に、この対話へ簡潔に以下を報告してください。
人間承認待ち状態で終了しないでください。canonical contract上、本当に人間判断が不可避な場合だけ、その根拠となる machine-readable status / blocker を明示して停止してください。
このプロンプトでは、
issue-reviewerを追加で投げるのではなく、現行 skill の codebase-investigator → root-owned review pipeline を維持しつつ、「SubAgent完了待ち」を明示しています。また follow-up materialization は skill 上も dedupe → create/reuse → 終了結果への記録が正規経路です。squne121 commentedon Sep 10, 2026
結論
はい。今回の停止は、かなりの部分が Claude-GPT 側で「秘密値を漏らさないこと」と「認証済み capability を子プロセスへ維持すること」を強く分離しすぎた結果だと評価します。
ただし、
GH_TOKENを無差別に子プロセスへ渡す方向へ緩和するのは推奨しません。問題は secret protection 自体ではなく、親で成立している GitHub capability を canonical child が必要とするのに、その capability carrier を command ごとに落としてしまう設計です。今回のログでは、親セッションの
gh auth statusは成功し、直接の GraphQLviewer { login }も成功しているのに、run_scope_rollup_preflight.py内から同じ GitHub GraphQL へ行くと 401 になっています。つまり「GitHub認証そのものが壊れている」のではなく、実行境界をまたいだ時点で認証 context が変わっています。何が起きているか
現在の Claude-GPT launcher は、Issue #2299 以降、isolated HOME は維持しつつ、
GH_CONFIG_DIRを nativegh相当の GitHub auth capability として子へ渡す設計になっています。current main のコメントにも、「ambient のGH_CONFIG_DIRをそのまま渡して GitHub auth のみ native 相当を維持する」とあります。ところが
run_scope_rollup_preflight.pyは、その内部でさらに_sanitized_gh_env()を作り直しています。その allowlist にはGH_TOKEN/GITHUB_TOKENはありますが、GH_CONFIG_DIRは明示的な DROP 対象です。 つまり概念的には、となっています。
しかも GitHub CLI の標準ログインは、通常は token を system credential store に保存し、headless automation の場合には
GH_TOKENを使うことを公式にも案内しています。したがって「親の保存済みgh認証が動く」からといって、環境を絞った子ghが必ず同じ credential store を利用できるわけではありません。([GitHub CLI]1)ログだけでは、決定的に失われたものが
GH_CONFIG_DIRそのものなのか、credential-store へのアクセスに必要な別の process environment まで含むのかは断定しません。ですが、親と sanitized child の authentication capability が同値ではないことは実証済みです。既存改善設計への批評
Issue #2340 の方向性は正しいです。実際、そこでは既に「root preflight の成功を downstream actor の成功証明にしない」「actor / execution-substrate scoped に capability を評価する」と定義されています。今回まさに、それを破る新しい execution substrate が残っています。
問題は #2403 / PR #2407 の解決方法です。PR #2407 は
GH_CONFIG_DIRを渡せる command ID を、preflight.run、contract_update.run.with_anchor、contract_update.run.with_human_context、repair_action.apply、structural_repair_action.applyという5個の有限集合にハードコードして解決しました。そしてこれは2026年9月3日にマージ済みです。
当時の局所修正としては妥当ですが、architecture としては脆いです。後から GitHub CLI consumer が追加されるたびに「command は registry に存在するが auth capability carrier の inventory には入っていない」という今回と同型の regression が再発します。
scope_rollup.runはまさにその例です。したがって改善 Issue を「
scope_rollup.runにGH_CONFIG_DIRを1行追加する」だけで閉じると、再発防止としては不十分です。ただし逆に、最初から巨大な credential broker や新しい permission framework を作るのも、この個人開発には重すぎます。私なら次の順序にします。
P0として今回の実害を最小修正する。
scope_rollup.runが launcher で既に成立している GitHub auth capability を失わないようにする。単純な ambientGH_CONFIG_DIR無制限継承ではなく、launcher 由来の canonical carrier を exact command / actor scope で維持する。GH_TOKENの値をログ・artifactへ出すことは引き続き禁止する。P1として hard-coded command list を capability declaration に置き換える。 command registry 側に例えば
github_auth_capability: required/credentialless_read/none程度の metadata を持たせ、GitHub CLI を使う command が capability 宣言なしで登録されたらテストを落とす。この程度なら新しい「credential framework」ではなく、既存 command registry の completeness invariant で済みます。Auto mode の false-deny は別 Issue にする。 今回ログでは、AGY失敗後の canonical native fallback を最初は
[Auto-Mode Bypass]と誤認して拒否し、あなたがagy_advisory_native_fallback_allowed: trueを明示した後には SubAgent が正常に再開しています。 Claude Code の現在の Auto mode は soft-deny に対して具体的なユーザー意図で解除できる仕様なので、この挙動自体は Auto mode のモデルと一致します。(Claude) 実装: Claude-GPT Auto の issue-editor canonical transaction の false-deny を解消する #2433 もpermissions.allowの広域化ではなく narrow な canonical transaction authorization を採用しており、この方向が適切です。要するに、**「秘密情報への扱いが厳しすぎる」というより、「capability-preserving isolation になっておらず、secret scrubbing が availability を壊している」**と Issue を定義するのがよいです。
改善 Issue の第一候補タイトルは、
実装: scope_rollup.run の GitHub auth capability parity を復旧し canonical child の認証 false-negative を解消するを推奨します。
その Issue の P0 AC には、fixture だけでなく今回と同じ positive workflow、つまり「同一 Claude-GPT session で親
gh api graphqlが成功する状態なら、exactscope_rollup.runも read-only GitHub inventory を取得できる」を入れるべきです。token 値や config 内容を観測する必要はなく、host/account identity、exit status、sanitized reason だけで十分です。Claude-GPT に渡す作業プロンプト
以下は、すでに Auto mode で起動している現在の対話的 Claude-GPT にそのまま渡す前提です。今回発生した native fallback も明示的に許可する形にしています。
squne121/loop-protocolで今回観測した Claude-GPT の GitHub authentication / capability propagation failure を対象に、関連 Issue・PR・current repository implementation・Claude Code Auto mode 仕様を独立検証し、改善 Issue を高品質化してください。目的は security harness を増やすことではなく、Claude-GPT が canonical workflow を実際に完走できることを優先しながら、credential/token の値そのものを不要に露出しない設計へ収束させることです。
今回の実測では、同一親セッションで以下が成立しています。
gh auth status --active --hostname github.comは成功gh api graphql -f query='{ viewer { login } }'は成功scripts/agent-guards/run_scope_rollup_preflight.pyを使う canonical scope-rollup はHTTP 401: Requires authentication[Auto-Mode Bypass]として拒否されたagy_advisory_native_fallback_allowed: trueを明示すると SubAgent は正常に再開・完了したこれらを事実として鵜呑みにせず、current default branch と実際の current GitHub state で独立検証してください。
今回の作業では
/permissionsを実行しないでください。permission mode を変更せず、bypassPermissions、--dangerously-skip-permissionsその他の permission bypass を使わないでください。現在の Auto mode のまま進めてください。明示的なユーザー意図として、AGY / advisory delegation が auth unavailable・timeout 等で失敗した場合に、既存 canonical contract が許容する native
codebase-investigator等への fallback を使用することを許可します。これは Auto mode を無効化・迂回する指示ではなく、workflow contract 上の canonical fallback route を実行する許可です。agy_advisory_native_fallback_allowed: trueとして扱ってください。まず関連資産を確認してください。最低でも以下を調査対象に含めます。
docs/dev/secret-policy.mddocs/dev/agent-skill-boundaries.mddocs/dev/hook-boundaries.mdscripts/claude-gpt/launch.shscripts/claude-gpt/lib.shscripts/claude-gpt/workflow_capability_preflight.pyscripts/agent-guards/skill_runtime_exec.pyscripts/agent-guards/run_scope_rollup_preflight.py.claude/skills/issue-refinement-loop/scripts/command_registry.pyscope_rollup.runの command policy / caller / child subprocess 全経路特に以下を fact-check してください。
launch.shが Claude-GPT session に維持している GitHub auth capability と、scope_rollup.run→run_scope_rollup_preflight.py→gh issue view/gh api graphqlが実際に受け取る environment を比較し、どの boundary で authentication capability が失われるかを特定してください。GH_CONFIG_DIR、GH_TOKEN、GITHUB_TOKEN、isolatedHOME/ XDG、system credential store を区別してください。credential/token/config の値そのものは表示・ログ保存しないでください。必要なのは presence、source class、path identity、安全な account/host identity、success/failure だけです。現在の
run_scope_rollup_preflight.py::_sanitized_gh_env()がGH_CONFIG_DIRを drop しつつGH_TOKEN/GITHUB_TOKENを allow しているかを current main で確認してください。また #2299 / #2340 / #2403 の現在の design intent と整合するか評価してください。親で
ghが成功していることを downstream actor の成功証明として扱わず、同一 execution substrate と同一 sanitized environment の actor-equivalent positive probe を重視してください。SubAgent は必須
少なくとも3系統の SubAgent を実際に起動してください。
1つ目は read-only
codebase-investigatorとし、launcher → executor →scope_rollup.run→run_scope_rollup_preflight.py→ childghの environment/capability trace を current default branch から独立検証させてください。2つ目は Issue/PR history 調査担当とし、#1547、#2241、#2257、#2299、#2340、#2403/PR #2407、#2433 と関連コメントを調べ、今回と同一 scope の open Issue が既に存在するか、過去の Owner Decision が何を意図的に許可・禁止したかを整理させてください。
3つ目は Auto mode / external-spec reviewer とし、Claude Code current official documentation を確認して、今回の
[Auto-Mode Bypass]false-deny、explicit user intent、autoMode.environment/ allow / soft-deny、PermissionRequest hook の関係を調査させてください。repository 側 auth sanitization 問題と Auto classifier 問題を混同しないでください。並列化可能な read-only 調査は並列化して構いません。
SubAgent を spawn しただけで完了扱いにせず、全 SubAgent を terminal completion まで必ず待機・join してください。全件の結果が揃う前に最終判断、Issue mutation、起票を行わないでください。
AGY advisory delegation が auth failure になった場合は、上で明示許可した canonical native fallback を使用してください。その fallback SubAgent についても完了まで待ってください。
改善設計の優先順位
current facts が今回の観測と一致する場合、P0 は「secret isolation をさらに強化すること」ではなく、canonical GitHub consumer が launcher で既に成立している authenticated GitHub capability を失わないことにしてください。
第一段階では最小修正を優先してください。
scope_rollup.runが read-only GitHub inventory を必要とする exact canonical command であるなら、launcher 由来の authentication capability を command/actor scoped に維持してください。ambient の任意値を無条件伝播する設計にはせず、現在 launcher が authoritative に確定している carrier/context を使用してください。
token/config 内容のログ・artifact 化は引き続き禁止してください。
HOME全体共有、SSH/GPG secret 共有、generic shell permission、rawghbroad allow、credential broker、daemon、新しい secret manager、permission ledger は、この問題を解くために本当に必要だと current facts で証明されない限り追加しないでください。特に 「
GH_CONFIG_DIRを落とす一方で rawGH_TOKEN/GITHUB_TOKENは child environment で許容する」現在の policy が、secret exposure と availability のバランスとして本当に合理的かを敵対的に評価してください。既存 Issue 設計への批評
#2340 の actor-scoped capability parity が、新規 execution substrate / command ID に対して再発防止 invariant を持っていたか確認してください。
#2403 / PR #2407 の finite exact command-ID allowlist は当時の局所修正として妥当だったかと、今後 GitHub consumer command を追加するたびに auth carrier を追加し忘れる構造的 regression risk を分けて評価してください。
今回の P0 修正を、「command registry 全体の再設計」が終わるまで待たせないでください。
一方で再発防止として、別 P1 follow-up が妥当なら、command registry に例えば
github_auth_capability/github_transport_class相当の宣言的 metadata を持たせ、GitHub CLI consumer が capability 宣言なしで登録された場合に deterministic test が fail する設計を検討してください。大規模な capability framework や新しい broker を作るより、既存 registry の completeness invariant を優先してください。
Auto mode 問題
今回の GitHub 401 と Auto mode false-deny は別 finding として扱ってください。
AGY auth failure → contract-authorized native fallback / SubAgent resume が Auto classifier に
Auto-Mode Bypassと誤認される問題が current main でも再現可能なら、#2433 と重複するかを確認してください。修正する場合も Auto mode を無効化したり broad permission allow を追加するのではなく、canonical fallback route であることを classifier/hook が narrow に認識できる方法、または typed fallback contract を使う方法を優先してください。
この Auto-mode finding を、
scope_rollup.runauth parity の P0 implementation と無理に同一 PR に混ぜないでください。1 Issue = 1 PR を維持できる単位へ分離してください。Issue materialization
まず dedupe key、既存 open Issue、既存 closed Issue の residual gap を canonical 手順で確認してください。
今回と実質同一の open implementation Issue が存在する場合はそれを再利用・refine してください。
存在しない場合は、canonical issue creation / follow-up materialization route を使用して、最低でも次の Outcome を持つ implementation Issue を1件 materialize してください。
「同一 Claude-GPT session の parent GitHub capability が ready であり、
scope_rollup.runが canonical GitHub consumer として選択された場合、exact child execution でも同じ repository/host に対する read capability が維持され、credential sanitization を理由とする authentication false-negative で停止しない。credential/token/config の値自体は log/artifact に出力しない。」P0 Acceptance Criteria には actual-process positive control を必ず含めてください。
同一 Claude-GPT execution context で safe な parent GitHub read が成功した状態から exact
scope_rollup.runを実行し、read-only GitHub inventory / GraphQL が authentication failure なしで完了することを確認してください。fake
gh/ fixture だけをこの AC の唯一の PASS 根拠にしないでください。live mutation は不要です。read-only canary で十分です。さらに、non-GitHub command / capability 非要求 command が不要な credential context を受け取らない negative regression、token/config contents が output/artifact に現れない evidence-hygiene regression を含めてください。
より広い registry metadata 化が必要なら別 P1 Issue としてください。Auto-mode canonical-fallback false-deny も原則別 Issue としてください。
作業上の制約
通常の調査、Issue refinement、canonical Issue mutation、follow-up materialization、SubAgent delegation の途中承認をユーザーへ求めないでください。
「この Issue を更新してよいですか」「follow-up を起票してよいですか」「次の iteration に進んでよいですか」のような通常確認は不要です。
ただし destructive operation、credential/token/config 内容の表示・コピー、秘密情報の取得、または canonical planner/guard が自動回復不能な
human_judgment_requiredを明示的に返した場合のみ停止してください。今回明示した
agy_advisory_native_fallback_allowed: trueは既にユーザー判断済みなので、同じ確認を再要求しないでください。最後にこの対話へ、以下を簡潔に報告してください。
このプロンプトでは、まず availability を直し、その後に再発防止を別スコープで入れるようにしています。今回のケースで
GH_TOKENのグローバル共有や permission bypass まで広げる必要はありません。むしろ「canonical command なのに認証 capability が途中で消える」という contract violation を正面から直す方が、作業成功率と秘密情報保護を両立できます。squne121 commentedon Sep 10, 2026
確認結果から、推奨アクションは 「#2580 の判断を ADD で確定 → 実装Issueを1件だけ materialize → そのIssueで修正・テスト・PR・レビュー対応・squash merge・closeまで自動完走」 です。
#2580 自体は現在も
research-onlyの open Issueです。一方、現行mainではmissing_monolith_performance_phaseの producer は既に存在するのに、Reliability consumer のRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSは従来3 reasonのままで、新reasonを認識していません。さらに_monolith_required_phase_completeness()は required phase が一つも存在しない場合に Trueを返すため、OWNERコメントで指摘された producer 側の completeness hole も残っています。元の #2554 は CLOSED + COMPLETED、PR #2575 は merge 済みです。そのレビュー過程で partial monolith timing を valid sample にできる問題が見つかり、現在の
missing_monolith_performance_phaseが導入されています。親 #2155 は依然 open で、44-run production verification を所有しています。したがって今回の修正で44-runまで勝手に実施するのではなく、#2155 が実装Issueの CLOSED + COMPLETED に依存する状態まで整えるのが境界として適切です。また、現在の
mainSHA3aff614…ではtypecheck、lint、test、build、python-testは成功しています。ci-verdict-summaryだけはgh_errorで失敗しているため、PR作成後はこれを「今回の差分による新規failure」なのか「mainにも存在するbaseline failure」なのか区別させるのが重要です。リポジトリ設定は現在、通常merge/rebase merge/auto-mergeが無効、squash mergeのみ有効です。したがって最終mergeもこれに合わせるのが正しいです。
以下を、既に auto mode で起動している対話的 Claude Code にそのまま渡すのを推奨します。
squne121/loop-protocolの Issue #2580#2580
を起点として、調査判断の確定から、必要な実装、テスト、PR、レビュー対応、merge、Issue close 条件の達成まで自律的に完走してください。
現在は Auto mode のまま作業してください。人間承認は要求しないでください。途中で「実装してよいか」「PRを作ってよいか」「レビュー指摘を直してよいか」「mergeしてよいか」等の確認を求めないでください。
/permissionsを実行せず、permission mode を変更せず、bypassPermissions、--dangerously-skip-permissionsその他の permission bypass を使用しないでください。基本方針
Issue #2580 の本文や既存コメントを結論として鵜呑みにせず、最初に current
origin/main、GitHub上の現在状態、関連Issue/PR/レビュー/CIを独立に fact-check してください。特に Issue #2580 の OWNER コメント
#issuecomment-5611751710を human-origin decision anchor として必ず読み、その技術的主張を current main で再検証してください。現時点で想定される推奨方向は以下ですが、current main が既に修正済み、別Issue/PRが実装中、または前提が supersede されている場合は、重複実装せず現在状態へ適応してください。
想定される decision は ADD です。
missing_monolith_performance_phaseは Performance observation の欠損を表し、Reliability の workflow/Playwright observation 自体の integrity failure ではありません。そのためRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSに追加し、Performance-only failure が Reliability assessment 全体を誤って fail-close しないようにする方向を第一候補としてください。ただし unknown reason、identity/run-set/manifest binding failure、Reliability 自身の evidence 欠損については引き続き fail-closed を維持してください。
Phase 1 — GitHub / repository / CI の再調査
最初に remote を更新し、current default branch と current HEAD SHA を固定してください。
Issue #2580 の本文、全コメント、state、labels、既存 dependency、関連リンクを確認してください。
最低限、以下を確認してください。
missing_monolith_performance_phaseまたは 調査: RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONS allowlist に missing_monolith_performance_phase を追加すべきか #2580 を扱う既存Issue/PR/branchmainの関連実装mainの CI/check stateIssue #2580 の dedupe key
follow-up:squne121/loop-protocol:pr/2575:receipt-performance-allowlist-missing-monolithおよび
missing_monolith_performance_phaseを検索し、既存のimplementation Issue/PRがあるなら必ず再利用してください。重複Issue/PRを作成しないでください。current main で最低限以下を直接確認してください。
scripts/ci/build_ci_reliability_assessment_v1.pyRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSscripts/ci/tests/test_build_ci_reliability_assessment_v1.pytests/ci/test_ci_performance_gate.pyMISSING_MONOLITH_PERFORMANCE_PHASE_REASON_MONOLITH_REQUIRED_PERFORMANCE_PHASE_IDS_monolith_required_phase_completeness()_monolith_incomplete_required_phase_workflow_run_ids()_layout_aware_provider_baselines()_job_duration_seconds()run_evidence_gate()build_close_grade_receipt()docs/dev/ci-test-reliability-assessment.mddocs/dev/e2e-performance-benchmark.md特に次の反例が current main で成立するか直接検証してください。
明示的な monolith Performance baseline の
measurements[]にtest_e2e_ciと
test_e2e_monolith_responsiveのどちらも存在せず、代わりに legacy/generic な
test_e2e_core等だけが存在する場合に、_monolith_required_phase_completeness()が complete と判定し、_job_duration_seconds()により非zero duration が成立して eligible sample へ流れ得るか。成立するなら、これは #2580 の implementation follow-up に含める producer-side completeness defect としてください。
SubAgent は必須
調査・実装・レビューをメインコンテキストだけで済ませないでください。
最低でも read-only の
codebase-investigatorSubAgent を起動し、current main の producer/consumer/test/docs の実態、call graph、fault-domain separation、既存fixtureへの影響を独立検証させてください。加えて利用可能なら別の read-only SubAgent を使い、GitHub history、#2554 / PR #2575 / #2580 / #2155、レビューコメント、CI、既存follow-upの有無を独立確認してください。専用agentが存在しなければ general-purpose SubAgent を read-only task として使用して構いません。
実装後は
.claude/skills/impl-review-loopが定義する reviewer/test-runner 等の SubAgent を使用してください。重要: 起動したすべての SubAgent は必ず completion まで待ち、terminal result を join してください。SubAgent が実行中の状態で issue mutation、review verdict、PR merge、最終報告へ進まないでください。
SubAgent failure が transient で、安全な再試行または repository-defined canonical fallback が存在する場合は、人間へ質問せず自己回復してください。
Phase 2 — #2580 research contract を完了する
fact-check の結果、想定どおり ADD が妥当なら、
.claude/skills/issue-refinement-loopおよび repository の canonical issue mutation route を使い、#2580 を research Issue として完了可能な状態へ更新してください。単に allowlist に1行足すという判断だけでなく、以下の decision rationale を固定してください。
Performance observation の測定不能・Performance eligibility failure と、Reliability observation の integrity failure は別 fault domain である。
missing_monolith_performance_phaseは前者なので Reliability consumer では Performance-only reason として扱う。一方で未知reasonや identity/run-set/manifest-binding failure は fail-closed のままにする。
さらに producer 側で「required monolith phases が両方とも存在しない production-shaped input」を complete にしてしまう問題が current main で確認できた場合、それも同一 implementation follow-up に含める。
ADD と判断した場合は、repository の follow-up materialization / dedupe 規約を使って implementation Issueを1件だけ作成してください。既存同等Issueがある場合はそれを再利用してください。
implementation Issue の推奨 scope は以下です。
Allowed Paths:
scripts/ci/build_ci_reliability_assessment_v1.pyscripts/ci/tests/test_build_ci_reliability_assessment_v1.pytests/ci/test_ci_performance_gate.pydocs/dev/ci-test-reliability-assessment.mddocs/dev/e2e-performance-benchmark.md変更は必要最小限にしてください。新schema、新credential/security framework、新broker、新artifact format、新approval gate、新SLSA/OIDC/signing、新しい巨大なharnessは導入しないでください。
implementation Issue を #2580 から明示的に link してください。
また #2155 の production verification が「#2580 research Issue が閉じたこと」だけを根拠に開始できないようにしてください。#2155 の prerequisite/dependency authority が repository の現在設計上更新可能なら、新しい implementation Issue が
CLOSED + COMPLETEDになることを dependency として canonical dependency materializer 経由で反映してください。#2580 の research AC が満たされた時点で、decision、implementation Issue link、dependency disposition を記録し、#2580 を
completedとして close してください。その後も作業を終了せず、implementation Issueへ継続してください。current fact-check で KEEP が正しいと判明した場合だけ、根拠を #2580 に記録して research Issue を close し、コード変更やPRを作成せず終了してください。
Phase 3 — implementation Issue を実装する
implementation Issue が materialize / reuse されたら、それを Current Objective に切り替え、fresh
origin/mainから専用branch/worktreeを使用して実装してください。repository に
.claude/skills/impl-review-loopが存在するなら、その skill contract に従って実装からレビューまで回してください。想定される最低限の変更は次のとおりです。
scripts/ci/build_ci_reliability_assessment_v1.pyRECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSにmissing_monolith_performance_phaseを追加してください。
これは narrow positive allowlist の拡張とし、unknown reason を許可する wildcard/prefix rule に変更しないでください。
scripts/ci/tests/test_build_ci_reliability_assessment_v1.pyPerformance-only reasons の regression を、可能なら production constant
RECEIPT_PERFORMANCE_ONLY_EVIDENCE_ERROR_REASONSを authority とする parameterized test にしてください。
少なくとも新reason単独では Reliability prerequisite を block しないことを確認してください。
同時に、既存または追加テストで unknown reason と identity/binding-class error が引き続き block することを確認してください。
さらに重要な integration negative control として、
missing_monolith_performance_phaseが存在する+
Reliability 自身に必要な evidence が欠損している
ケースでは Reliability が fail-close することを確認してください。
allowlist 化によって Reliability 独自の failure を隠してはいけません。
tests/ci/test_ci_performance_gate.pycurrent main で producer-side completeness hole が再現する場合は修正してください。
明示的な monolith production observation は、
test_e2e_ciおよび
test_e2e_monolith_responsiveの 両方について usable な positive duration を持たなければ complete としないでください。
どちらか片方しかないケースだけでなく、両方ともないケースも incomplete にしてください。
ただし、legacy/generic fixture を守るために production correctness を弱めないでください。既存fixtureが historical shape に依存しているだけなら、fixture側を production-shaped evidence に更新することを優先してください。
missing/incomplete run は silent drop せず
missing_monolith_performance_phaseとして evidence_errors に現れ、provider post-filter sample count と close-grade receipt eligibility の双方から除外されることを regression で固定してください。
sample-count、assessment/run-details、receipt eligibility が同じ materialization semantics を使用し続けることも確認してください。
split topology の
max(core, responsive)semantics と genuine missing-responsive fail-close は変更しないでください。docs/dev/ci-test-reliability-assessment.mdと
docs/dev/e2e-performance-benchmark.mdの classification / fault-domain / monolith phase completeness に関係する記述を実装と同期してください。
「Performance-only reason なら何でも無視する」という説明にせず、explicit allowlist と unknown fail-close を明記してください。
Phase 4 — テスト
implementation Issue に materialize された literal Verification Commands を正本としてすべて実行してください。
加えて changed-path と producer/consumer integration を考慮して最低限、該当する focused test、Reliability builder test、Performance gate test、
tests/ci/とscripts/ci/tests/の関連suiteを実行してください。必要なら以下相当を実行してください。ただし current repository の dependency/tool invocation policy と issue contract を優先してください。
uv run --locked pytest scripts/ci/tests/test_build_ci_reliability_assessment_v1.py -quv run --locked pytest tests/ci/test_ci_performance_gate.py -quv run --locked pytest tests/ci/ scripts/ci/tests/ -q関連Pythonファイルへの Ruff check
repository-required な
pnpm typecheckpnpm lintpnpm testpnpm build新しい regression が vacuous でないことを確認してください。安全かつ簡単に可能なら、修正を一時的に戻した状態で新規testが失敗し、修正状態でpassすることを独立 test-runner に確認させてください。確認用の一時変更は最終diffへ残さないでください。
Phase 5 — PR 作成
全local verificationがpassしたら、branchをpushしてPRを作成してください。
PR本文は repository の現在の contract/template に従い、Summary、Checks、Acceptance Criteria、Allowed Paths、Runtime Verification Applicability、Schema Change Applicability、必要な Safety Claim Matrix 等を正確に埋めてください。
PR本文には implementation Issue に対する
Closes #<IMPLEMENTATION_ISSUE_NUMBER>を必ず入れてください。
#2580 は research Issue として先にcloseする設計なので、implementation PR の
Closesを #2580 に誤って向けないでください。#2580、#2554、PR #2575、#2155 は Related/Context として trace してください。PRのdiffが implementation Issue の Allowed Paths を超えていないことを確認してください。
Phase 6 — CI と review loop
PR作成後、
.claude/skills/impl-review-loopの canonical flow でレビューと修正ループを、人間承認なしで merge-ready になるまで続けてください。SubAgent reviewer / test-runner を起動した場合は、毎iteration必ず全員を completion join してから判定してください。
reviewer が P0/P1 blocker または今回scope内の妥当な defect を検出したら、自動的に修正し、必要なtestを追加・再実行し、pushしてください。
actionable review comment / thread に対応し、修正済みなら repository の規約に従い reply / resolve してください。
CI failure が出た場合はログを調べてください。
現在の main 自体にも
ci-verdict-summaryのoverall_status='gh_error'failure が観測されているので、PRで同種failureが発生した場合は必ず base/main と比較し、を区別してください。
PR由来なら自動修正してください。
mainにも同じfailureが存在し、required checksおよび repository の canonical merge-readiness contract がそれを非blockingと扱うなら、本Issueへ無関係なCI infrastructure修正を抱き込まないでください。必要なら安全にrerunして再評価してください。
flaky/transient failure は安全なrerunで自己回復してください。
Phase 7 — merge と closure
すべての required checks がpassし、canonical review verdict が APPROVE / blockerなしとなり、repositoryのmerge-readiness条件を満たしたら、人間承認を求めずmergeしてください。
current repository settingsを実行直前に再確認してください。現状と同じく squash merge のみ有効なら squash merge を使用してください。auto-mergeが無効なら、それを有効化しようとせず、条件成立後に通常のsquash mergeを実行してください。
force push、history rewrite、branch protection回避などでmerge条件を突破してはいけません。
merge後、default branchへ実際にcommitが入ったことを read back してください。
Closes #<IMPLEMENTATION_ISSUE_NUMBER>によって implementation Issue がCLOSED + COMPLETEDになったことを確認してください。自動closeされなかった場合でも、merge済みかつ全AC達成を read back した後であれば、repositoryの通常のIssue mutation routeを使って completed close してください。#2580 が decision記録+implementation linkを持って CLOSED + COMPLETED であることも確認してください。
#2155 の dependency が、新implementation Issueの完了を正しく反映していることを確認してください。
ただし #2155 の44-run experimentそのものは今回のimplementation Issueのscopeへ取り込まないでください。#2155 は別の verification-only contract を持つため、今回の成果はその prerequisite を1つ解消したところまでです。#2155 の残りのprerequisiteがあるならそのまま残してください。
停止条件
人間へ停止・承認要求してよいのは、原則として次の2種類だけです。
1. 破壊的操作が不可避な場合
例:
repository / Issue / PR / release / artifact 等の削除
既存履歴を失う
reset --hardforce push
published history の rewrite
既存データを不可逆に破壊する migration
branch protection や safety control の無効化・迂回
通常のcommit、push、Issue編集、Issue作成、PR作成、review reply、CI rerun、squash merge、正常なIssue closeは、この作業の意図された操作であり、それ自体を「破壊的だから承認待ち」としないでください。
2. 秘密情報そのものへのアクセス・露出が必要な場合
token、credential、API key、private key、secret value、credential-store contents等の値そのものを表示、コピー、保存、転送、ログ出力しなければ作業できない場合は停止してください。
一方、既に認証済みの
gh/ GitHub capability を通常利用すること、gh auth statusなどで認証の成否やaccount/host identityだけを確認することは停止条件ではありません。GH_TOKEN/GITHUB_TOKEN等の値をecho、print、artifact、comment、ログへ出してはいけません。認証・CI・SubAgent・canonical command が一時的に失敗しただけでは人間へ停止しないでください。secretを露出しない安全なretry、再取得、repository-defined canonical fallback、native read-only fallback等で回復可能なら自律的に続行してください。
repository policyとの不整合を検出した場合も、まず安全なplan修正で解消してください。上記2停止条件を必要としない限り、人間判断待ちへエスカレーションしないでください。
最終報告
すべて完了したら、最後に次をまとめてください。
作業開始時の default branch / HEAD SHA。
#2580 の最終decision。
#2580 の更新内容と最終state。
materialize/reuseした implementation Issue番号とURL。
実装branchとcommit。
変更ファイル。
producer-side completeness hole の再現結果と修正内容。
実行したtestと結果。
PR番号とURL。
Closes #Nの対象。review iteration、SubAgent reviewerの結果、対応した指摘。
最終CI結果。baseline/main failureとPR固有failureをどう区別したか。
merge methodとmerge SHA。
implementation Issue の CLOSED + COMPLETED readback。
#2580 の CLOSED + COMPLETED readback。
#2155 dependency の最終状態。
今回起動した全SubAgentの用途・terminal status・completion join済みであること。
残存事項がある場合は、今回scopeを本当に妨げないものだけを follow-up として記録してください。
途中経過ではなく、上記の完了条件まで連続して進めてください。
この形なら、既存の
issue-refinement-loopの「research と implementation を分離する」設計を壊さず、一つの対話セッション内ではそのまま implementation → impl-review-loop → merge → closure まで連続実行できます。また、#2155 の44-run検証を不用意に巻き込まないよう境界も固定しています。squne121 commentedon Sep 10, 2026
Research decision: ADD
Current
origin/main(3aff61429acd4429f2840faa374f5cf4687c7113) と human-origin decision anchor #issuecomment-5611751710 を再検証しました。missing_monolith_performance_phaseは Performance observation の測定不能/eligibility failure であり、Reliability の workflow/Playwright observation integrity failure とは別 fault domain です。したがって、明示的な narrow allowlist に追加します。test_e2e_coreだけでtest_e2e_ciとtest_e2e_monolith_responsiveの両方を欠く場合、現行 helper は complete とし、非ゼロ duration が eligible sample へ流れ得ます。Implementation follow-up は #2617(https://github.com/squne121/loop-protocol/issues/2617)として dedupe key
follow-up:squne121/loop-protocol:pr/2575:receipt-performance-allowlist-missing-monolithで1件だけmaterializeしました。#2617 は consumer allowlist、producer-side two-phase completeness、negative controls、materialization semantics、docs を同一の最小 scope で扱います。#2155 の native dependency authority も readback 済みで、#2617 が #2155 を block しています。よって #2155 の production verification は、この research Issue の close ではなく #2617 が CLOSED + COMPLETED になることを prerequisite とします。#2155 の既存の他 prerequisite や44-run verification contractは変更しません。
Research AC を満たしたため、本Issueを completed としてcloseします。