Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
related_issues: "#1059, #1060, #1064, #1436, #1534, #1538, #898, #918, #1725"
goal_ref: "CI performance baseline の性能主張・provisioning 判定境界を明確化する(旧 #1059 系譜の post-rollup follow-up)。claim/evidence/functional smoke provenance を直交させた versioned schema と意味検証 validator を追加する"
change_kind: mixedParent Issue
なし
Parent Goal Ref
- Goal: CI の性能判断契約を、主張(claim: 主張者の意図)と証拠充足状態(evidence: 証拠の充足状態)を直交させた versioned schema で意味論的に検証可能にし、性能主張のない correctness/provisioning 変更を 20-run baseline 不足で誤ブロックしない。
- Desired Destination: 既存
CI_TEST_PERFORMANCE_DECISION_V1/ci_runtime_delta_v1(improved | regression | no_change | insufficient_data)を in-place 変更せず、CI_TEST_PERFORMANCE_ASSESSMENT_V2を新設し、fixture-driven semantic validator で reviewer gate の evidence 品質を機械検証する状態。
Current Validated Scope
- 現行
CI_TEST_PERFORMANCE_DECISION_V1(.claude/skills/ci-test-performance/references/decision-matrix.md定義)とtemplates/runtime-delta.mdの verdict 列挙は固定契約として維持し、in-place で変更しない(旧 実装: CI performance baseline の性能主張・provisioning 判定境界を明確化する #1538 の AC1/AC5 が本フィールドを V1 へ in-place 追加しようとし、同 Issue 自身の Stop Condition「固定契約のキー集合・スキーマ・型定義の変更が必要になった場合」と自己矛盾していた問題を、versioned addition(V2 新設)で解消する)。 claim.kind(none/improvement/non_regression/absolute_budget)・performance_evidence.status(not_required/not_instrumented/unavailable/insufficient_samples/incomparable_cohort/complete)・observation.outcome(not_observed/improved/regressed/equivalent_within_threshold/budget_met/budget_exceeded/inconclusive)・claim_evaluation.outcome(not_applicable/satisfied/not_satisfied/inconclusive)を分離した4軸の新スキーマを追加する。この4軸分離により、「assessment としての構造妥当性・意味妥当性(structural_valid / semantic_valid)」と「reviewer gate 上の承認可否(approval_eligible)」を別次元として扱い、両者を混同しない。- functional smoke evidence の定義は新規発明せず、既存
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py(Issue 実装: CI verdict artifact を正規化し AIエージェントの CI 待機・判定を安定化する #898 / PR implement(#898): CI verdict artifact を ci_verdict_summary_v2 として正規化し AIエージェントの CI 待機・判定を安定化する #918 由来、canonical consumer は pr-review-judge。Step1 investigation で実ファイル存在を確認済み)の provenance model を再利用する。旧ci_verdict_summary.py(V1)の zero-checkall_pass経路は provenance として使わない。最低条件として次を満たす:artifact.schema == ci_verdict_summary_v2expected_head_shaを trusted 入力と照合する- 選択された check は
check_run_id > 0かつstatus == completedかつconclusion == successかつhead_sha_match == trueかつclassification in [required, evidence] - synthetic
needs.result由来の判定・skipped/neutral/stale/nullhead・zero selected checks は evidence として不可
- green Check Run は「期待したコマンド・test file・nodeid が実際に実行された」ことの証明にはならない。本 Issue のスコープでは
functional_evidence.proof_level: check_run_onlyかつfunctional_evidence.coverage_bound: falseとして保証範囲を限定する(coverage-bound execution artifact の追加は Out of Scope のまま。cross-job coverage 強化は既存の Out of Scope 記述と整合させる)。 impactフィールドは実際には diff から検証されない自己申告値である。本 Issue のスコープでは用語をdeclared_impact(自己申告値であることが明確な用語)に変更する。trusted base/head SHA 由来のdiff_evidence(base_sha/head_sha/merge_base_sha/changed_files/changed_files_digest)による真の diff-derived 検証は Out of Scope として明記する。
Remaining Parent Gaps
-
generate_ci_test_selection_artifact.pyの cross-job coverage 検証強化(provider job の実 artifact/collected nodeid を head SHA 付きで照合する仕組み)は本 Issue のスコープ外。Issue B の Remaining Parent Gaps を参照。 - 新設した V2 契約を実際の CI workflow(
.github/workflows/*.yml)へ配線し、reviewer gate を V2 evidence 必須へ切り替える作業は、本 Issue で schema/validator が安定した後の follow-up とする。 -
docs/dev/ci-runtime-baseline-1064.mdが示す cohort 比較基準(同一 ImageVersion・worker数・scheduler)を一般契約へ昇格する作業は、本 Issue の AC で最小限のフィールド定義に留め、実測ワークフロー改修は含めない。 - 解消済み(本 Issue スコープに統合): 新規 schema(
CI_TEST_PERFORMANCE_ASSESSMENT_V2,ci_runtime_delta_v2)のschemas/catalog.yamlへの登録は、OWNER(squne121) の human decision(issuecomment-5076670372 の P0-4 指摘への回答)により本 Issue のスコープと Allowed Paths に統合された。詳細は AC6・Notes for Reviewer 参照。
Outcome
CI_TEST_PERFORMANCE_ASSESSMENT_V2 と ci_runtime_delta_v2 の JSON Schema、および以下の4軸を直交させた fixture-driven semantic validator(pnpm policy:check:ci-performance)が追加され、既存 V1 契約が無変更のまま両立している状態になる。
claim.kind: none | improvement | non_regression | absolute_budget(absolute_budgetの場合は metric / minimum_improvement_pct / maximum_regression_pct / maximum_value_ms 等の threshold を伴う)performance_evidence.status: not_required | not_instrumented | unavailable | insufficient_samples | incomparable_cohort | completeobservation.outcome: not_observed | improved | regressed | equivalent_within_threshold | budget_met | budget_exceeded | inconclusiveclaim_evaluation.outcome: not_applicable | satisfied | not_satisfied | inconclusive
validator の出力は structural_valid / semantic_valid / approval_eligible / errors / blockers / warnings に分離し、「assessment としての妥当性(valid/invalid)」と「approval eligibility(eligible/blocked)」を別軸として扱う。これにより fixture 期待値は「妥当性」列と「承認可否」列を別々に記述できる状態になる。
In Scope
schemas/ci_test_performance_assessment_v2.schema.jsonとschemas/ci_runtime_delta_v2.schema.jsonを追加する。両 schema は$schema: https://json-schema.org/draft/2020-12/schemaを使用し、unevaluatedProperties: false等で closedness を持つci_test_performance_assessment_v2.schema.json:claim(kind + threshold)/performance_evidence(status)/observation(outcome)/claim_evaluation(outcome)/functional_evidence(proof_level・coverage_bound・ci_verdict_summary_v2 参照)/declared_impact(自己申告であることが明確な用語)/risk_acknowledgement(reference.source_kind/reference.source_id/verification_status: unverified。accepted/actor自己申告ではない)/decision(validator/reviewer が導出する出力フィールドであり、入力フィールドではない)ci_runtime_delta_v2.schema.json:mode: comparative | absoluteで分岐する。comparative(improvement/non_regression)は before/after delta を必須とし、absolute(absolute_budget)は after cohort のみを必須とする
.claude/skills/ci-test-performance/scripts/validate_ci_performance_assessment_v2.pyを追加する。有効/無効 fixture を検証し、無効 fixture は非 0 終了する。CLI は最低限--assessment(入力ファイルパス)と--output(結果出力先)を受け取り、exit code は0=valid/2=structural または semantic invalid/3=operational failure(ファイル不在・パース不能等)とする。JSON parsing は重複キー・NaN・Infinity を拒否する strict parsing とする.claude/skills/ci-test-performance/scripts/fixtures/配下に fixture を追加する。最低限、以下のカテゴリを含める:- 構造/パーサー系: missing required property, unknown property, wrong schema ID/version, duplicate JSON key, NaN/Infinity, invalid SHA/digest
- claim/evidence 状態機械系(既存の想定ケースを含む): no claim + not instrumented → valid, no claim + improved observation → invalid, improvement claim + insufficient samples → invalid, non-regression claim + incomparable cohort runner → invalid, no claim + observed regression → valid(approval eligibility は別軸), docs-only + runtime delta 記載 → warning, insufficient samples だが observation=improved → invalid, no claim だが claim_evaluation=satisfied → invalid
- functional evidence 系: zero selected checks, synthetic
needs.result, missing check run ID, stale/null head SHA, skipped/neutral conclusion - 各 fixture について「assessment としての妥当性(structural_valid/semantic_valid)」列と「approval eligibility」列を分けて期待値を記述する
.claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2.pyを追加し、上記 fixture すべてを pytest で検証する。加えて、V1 の fenced YAML block(decision-matrix.md/runtime-delta.md)について、行末空白・改行を正規化した上での正規化済み snapshot と exact comparison する snapshot test を含め、enum・required key の変更を検出できるようにする(現行 AC1 のrgによる identifier 残存確認だけでは検出できない差分をカバーする).claude/skills/ci-test-performance/scripts/fixtures/の cohort comparability ケースとして、ci_runtime_delta_v2の comparison に必要な最低フィールド(runner_image/workers/scheduler/command_manifest_digest/test_selection_digest等の一致確認)を検証する。20件未満のサンプルでも構造としては valid だがinsufficient_samplesとして gate は blocked になることを検証し、外れ値除外を行う場合は除外した run ID・理由・事前定義ルールを記録するフィールドを持つことを検証するpackage.jsonにpolicy:check:ci-performancescript を追加し、既存のpolicy:check:secret/policy:check:sessionと同じパターンで validator を実行できるようにし、policy:check集約 script(pnpm run policy:check:secret && pnpm run policy:check:session)へ追加する.claude/skills/ci-test-performance/SKILL.md・references/decision-matrix.md・templates/runtime-delta.md・docs/dev/ci-performance.mdに V2 契約の説明(4軸分離・declared_impact・risk_acknowledgement・CLI 引数と exit code 規約・ci_runtime_delta_v2のmode分岐)と、V1 との使い分け(V1 は実測値専用として維持・V2 は上位の claim/evidence/decision 契約として追加)を追記するschemas/catalog.yamlにCI_TEST_PERFORMANCE_ASSESSMENT_V2とci_runtime_delta_v2の2エントリを追加する。各エントリは既存エントリと同じ必須フィールド構造(schema_id/format/source_kind/definition_paths/producer.owner/producer.paths/consumers[].id+paths/detection_patterns[](id/engine/mode/pattern/paths) /required_test_commands/compatibility/migration)を埋める。producer は本 Issue で追加するvalidate_ci_performance_assessment_v2.py等のスクリプトとし、consumers はci-test-performanceskill と将来の pr-review-judge integration とするschemas/tests/test_catalog.pyのEXPECTED_ENTRY_COUNTを現行20から23(Scope Delta で追加したCI_TEST_PERFORMANCE_ASSESSMENT_V2_VALIDATION_RESULT_V1を含む3エントリ追加のため)へ更新する
Out of Scope
.github/workflows/*.ymlの変更(V2 validator の CI gate 配線は follow-up)ci_runtime_baseline_v1artifact schema・phase_id・集計器・artifact upload・workflow instrumentation の追加・変更- cross-job coverage の provider-side 実 artifact 照合強化(→ Issue B の Remaining Parent Gaps)
- coverage-bound smoke execution artifact の追加(
functional_evidence.proof_levelはcheck_run_onlyのまま。coverage-bound execution 保証の追加は本 Issue のスコープ外) - node-backed-hook-tests job の実行対象修正(→ Issue B)
- PR feat: Codex scope-rollup capture を復旧 (#1527) #1534 または既存 Issue/PR の実装・契約・レビュー verdict の直接変更
CI_TEST_PERFORMANCE_DECISION_V1/ci_runtime_delta_v1の in-place 変更・削除- trusted base/head SHA 由来の
diff_evidence(真の diff-derived impact 検証)の追加。本 Issue ではdeclared_impactという自己申告であることが明確な用語への変更のみを行う
Acceptance Criteria
- AC1:
schemas/ci_test_performance_assessment_v2.schema.jsonとschemas/ci_runtime_delta_v2.schema.jsonが$schema: https://json-schema.org/draft/2020-12/schemaを使う有効な JSON Schema として存在し、unevaluatedProperties: false等で closedness を持ち、ci_runtime_delta_v2はmode: comparative | absoluteで before/after delta 必須 or after-only cohort 必須を分岐する。既存CI_TEST_PERFORMANCE_DECISION_V1の定義(decision-matrix.md)に変更差分がない - AC2:
.claude/skills/ci-test-performance/scripts/validate_ci_performance_assessment_v2.pyが存在し、pnpm policy:check:ci-performanceから実行できる。CLI は--assessment/--outputを受け取り、exit code は0=valid/2=structural または semantic invalid/3=operational failureを返す。JSON parsing は重複キー・NaN・Infinity を拒否する strict parsing を行う - AC3: claim/performance_evidence/observation/claim_evaluation の4軸直交性・
declared_impact・functional smoke provenance(ci_verdict_summary_v2.py再利用、check_run_only/coverage_bound: false)・cohort comparability(runner_image/workers/scheduler/command_manifest_digest/test_selection_digest 一致確認・insufficient_samples gate・外れ値除外記録)・risk_acknowledgement(reference + verification_status: unverified)の各ケースを検証する pytest テストスイートが存在し PASS する。fixture は構造/パーサー系・claim/evidence 状態機械系・functional evidence 系の各カテゴリを最低限含み、各 fixture の期待値は「structural_valid/semantic_valid」と「approval_eligible」を別軸で記述する - AC4:
.claude/skills/ci-test-performance/SKILL.mdがCI_TEST_PERFORMANCE_ASSESSMENT_V2と V1 の共存関係、および validator の CLI 引数(--assessment/--output)と exit code 規約を明記する - AC5:
docs/dev/ci-performance.mdが V2 契約と semantic validator の存在を明記する - AC6:
schemas/catalog.yamlにCI_TEST_PERFORMANCE_ASSESSMENT_V2とci_runtime_delta_v2、および Scope Delta で追加したCI_TEST_PERFORMANCE_ASSESSMENT_V2_VALIDATION_RESULT_V1の3エントリが、既存エントリと同じ必須フィールド構造(schema_id/format/source_kind/definition_paths/producer.owner/producer.paths/consumers[].id+paths/detection_patterns[](id/engine/mode/pattern/paths) /required_test_commands/compatibility/migration)で登録されている。schemas/tests/test_catalog.pyのEXPECTED_ENTRY_COUNTが23に更新され、uv run --locked pytest schemas/tests/test_catalog.pyが pass する
Verification Commands
# AC1
# baseline-expect: fail
$ test -f schemas/ci_test_performance_assessment_v2.schema.json
# AC1
# baseline-expect: pass
$ rg -n "CI_TEST_PERFORMANCE_DECISION_V1" .claude/skills/ci-test-performance/references/decision-matrix.md
# AC2
# baseline-expect: fail
$ rg -n "policy:check:ci-performance" package.json
# AC3
# baseline-expect: fail
$ test -f .claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2.py
# AC3
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2.py
# AC4
# baseline-expect: fail
$ rg -n "CI_TEST_PERFORMANCE_ASSESSMENT_V2" .claude/skills/ci-test-performance/SKILL.md
# AC4
# baseline-expect: fail
$ rg -n -- "--assessment" .claude/skills/ci-test-performance/SKILL.md
# AC5
# baseline-expect: fail
$ rg -n "CI_TEST_PERFORMANCE_ASSESSMENT_V2" docs/dev/ci-performance.md
# AC6
# baseline-expect: fail
$ rg -n "CI_TEST_PERFORMANCE_ASSESSMENT_V2" schemas/catalog.yaml
# AC6
# baseline-expect: fail
$ rg -n "EXPECTED_ENTRY_COUNT = 23" schemas/tests/test_catalog.py
# AC6
# baseline-expect: fail
$ uv run --locked pytest schemas/tests/test_catalog.pyAllowed Paths
schemas/ci_test_performance_assessment_v2.schema.jsonschemas/ci_runtime_delta_v2.schema.json.claude/skills/ci-test-performance/scripts/validate_ci_performance_assessment_v2.py.claude/skills/ci-test-performance/scripts/fixtures/.claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2.py.claude/skills/ci-test-performance/SKILL.md.claude/skills/ci-test-performance/references/decision-matrix.md.claude/skills/ci-test-performance/templates/runtime-delta.mddocs/dev/ci-performance.mddocs/dev/test-lane-policy.mdpackage.jsonschemas/catalog.yamlschemas/tests/test_catalog.py.claude/skills/open-pr/scripts/validate_schema_catalog.py.github/ci/python-test-plan.jsonschemas/ci_test_performance_assessment_v2_validation_result_v1.schema.json
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
CI_TEST_PERFORMANCE_DECISION_V1/ci_runtime_delta_v1(V1)へ in-place 変更が必要と判明した場合
Required Skills
- ci-test-performance
- JSON Schema
- pytest
Required Design References
docs/dev/ci-performance.md#bootstrap 3 runs と decision baseline 20 runs の使い分けdocs/dev/agent-skill-boundaries.md#ci-test-performance Consumer Routing.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py(functional smoke provenance の再利用元。Issue 実装: CI verdict artifact を正規化し AIエージェントの CI 待機・判定を安定化する #898 / PR implement(#898): CI verdict artifact を ci_verdict_summary_v2 として正規化し AIエージェントの CI 待機・判定を安定化する #918 由来、canonical consumer は pr-review-judge)
Scope Delta(該当時のみ記載)
PR #1739 の pr-review-judge REQUEST_CHANGES(review)で検出された CI 必須チェック失敗を解消するため、OWNER(squne121) の承認に基づき Allowed Paths を以下の2ファイルへ拡張する。
.claude/skills/open-pr/scripts/validate_schema_catalog.py: 本 Issue がschemas/catalog.yamlに追加したCI_TEST_PERFORMANCE_ASSESSMENT_V2/ci_runtime_delta_v2エントリのrequired_test_commands[0].id: validate_ci_performance_assessment_v2がALLOWED_COMMANDS(_COMMAND_REGISTRY)に未登録のため、python-testのtest_validate_schema_catalog.py::TestRealCatalogRegression::test_real_catalog_passesが FAIL していた。新規 command id を registry に追記する。.github/ci/python-test-plan.json: 本 Issue が追加した.claude/skills/ci-test-performance/scripts/tests/test_validate_ci_performance_assessment_v2.pyが test plan に未登録のため、node-backed-hook-testsjob のgenerate_ci_test_selection_artifact.pyがUncovered tests: 1で FAIL していた。既存パターンに従い test plan へ登録する。
いずれも本 Issue が追加した新規 catalog エントリ・新規テストファイルを既存 governance/CI gate の実態に一致させるための additive 修正であり、In Scope の固定契約(キー集合・スキーマ・型定義)変更は含まない。
PR #1739 への人間(squne121)の敵対的レビュー REQUEST_CHANGES(issuecomment-5077564154)の P1-2 指摘(schema の producer/consumer 境界が逆転しており、validator が出力する第三の machine-readable contract に JSON Schema も catalog entry も無い)に対応するため、OWNER(squne121) の承認に基づき Allowed Paths を以下の1ファイルへ拡張する。
schemas/ci_test_performance_assessment_v2_validation_result_v1.schema.json: validator(validate_ci_performance_assessment_v2.py)が出力するCI_TEST_PERFORMANCE_ASSESSMENT_V2_VALIDATION_RESULT_V1の formal JSON Schema を新設し、schemas/catalog.yamlに registration する(catalog.yaml 自体は既存 Allowed Paths 内)。assessment 入力 schema からはdecisionフィールドを削除し(validator/reviewer 専用の出力フィールドであることを明確化)、validation result を independent contract として分離する。
In Scope の固定契約(CI_TEST_PERFORMANCE_ASSESSMENT_V2 / ci_runtime_delta_v2 のキー集合・型定義)の変更は伴わない、新規 output schema の追加のみである。
上記に伴い、schemas/catalog.yaml のエントリ数が2件→3件追加(計23件)となったため、In Scope・AC6・Verification Commands の EXPECTED_ENTRY_COUNT 記述を 22 から 23 へ整合修正した(実装値の変更ではなく Issue 本文記述の同期)。
Runtime Verification Applicability
本 Issue の変更対象は CI 判定契約の schema・validator・docs のみです。ゲームの実行時動作には影響しません。
decision: not_applicable
reason: "New JSON Schema, a semantic validator, fixtures, and docs describing a CI performance decision contract. No game runtime behavior changed."Delivery Rule
- 1 Issue = 1 PR
- dedicated worktree を使用する。
- Draft PR を既定とする。性能比較を行わない PR evidence では
no_claim/not_instrumentedを維持する。
Notes for Reviewer
- 本 Issue は 実装: CI performance baseline の性能主張・provisioning 判定境界を明確化する #1538 の OWNER anchor comment(issuecomment-5076467015)の REQUEST_CHANGES 指摘(P0-1・P0-2・P0-5・P1-1〜P1-4)を切り出した Issue A です。実装: CI performance baseline の性能主張・provisioning 判定境界を明確化する #1538 は本 Issue と Issue B(node-backed-hook-tests の実行対象 SSOT 化・false-green 修正)へ分割の上、superseded としてクローズします。
- P1-5(parent topology の破綻)の指摘に基づき、本 Issue は
parent_issue: noneとし、related_issues: #1059, #1060, #1064, #1436, #1534, #1538, #898, #918, #1725として関連付けます。CI python-test pytest実行phase高速化: test lane分類・pytest統合・Ruff導入・Skill化 #1059 の delivery rollup parent には紐づけません。理由は、本 Issue が CI python-test pytest実行phase高速化: test lane分類・pytest統合・Ruff導入・Skill化 #1059 系譜の post-rollup follow-up であり CI python-test pytest実行phase高速化: test lane分類・pytest統合・Ruff導入・Skill化 #1059 自体は既に別スコープで進行/完了しているため、新たな parent-child 従属関係を追加すると P1-5 で指摘された topology 破綻を再発させるからです。 - V2 契約の CI workflow への実配線(reviewer gate を V2 evidence 必須に切り替える作業)は本 Issue に含めず、schema/validator が安定した後の follow-up とします(Remaining Parent Gaps 参照)。
- OWNER レビュー(issuecomment-5076670372, REQUEST_CHANGES)で指摘された P0-4(新規 schema の
schemas/catalog.yaml登録)は、OWNER(squne121) による human_escalation への直接回答(2026-07-25)に基づき本 Issue のスコープと Allowed Paths(schemas/catalog.yaml,schemas/tests/test_catalog.py)へ統合しました。詳細は AC6・Verification Commands・Remaining Parent Gaps 参照。 - 本 Issue の Allowed Paths(
schemas/catalog.yaml,schemas/tests/test_catalog.py)拡張は、OWNER(squne121) による human_escalation への直接回答(2026-07-25、issuecomment-5076670372 の P0-4 指摘への対応)に基づく human decision であり、structured anchor scope-reframe ではなく、issue-refinement-loop の human_escalation経由で得られた明示的な人間判断である。 docs/dev/schema-governance.mdは Allowed Paths に含めていません。catalog エントリの記法自体はschemas/catalog.yamlの既存エントリと.claude/skills/ci-test-performance/references/decision-matrix.md/SKILL.md(AC6・AC4 で追記対象)の説明で完結できるため、本 Issue のスコープでは同 doc への追記は不要と判断しました。- 同レビューで指摘された coverage-bound smoke execution artifact(P0-3 選択肢B)は Out of Scope のまま維持しています。
Activity
squne121 commentedon Jul 25, 2026
敵対的レビュー結果
判定: REQUEST_CHANGES。現状の Issue #1724 は実装着手可能な契約になっていません。
V1 を不変にして V2 を追加する方針、performance claim と evidence availability を分離する問題設定、fixture-driven validator を置く方向は妥当です。しかし現在は、次の三つが一つの「validator」に混在しています。
artifact が内部的に矛盾していないかという**契約妥当性
Check Run や smoke test が本当に実行されたかというprovenance/coverage 証明
この混同により、正直に「証拠不足」と記録した artifact を invalid にする一方、自己申告された diff classification や green Check Run を provenance と誤認する設計になっています。Issue #1724 には現在コメントがなく、この曖昧さを解消する owner clarification もありません。
P0-1: claim と evidence を分離すると言いながら、fixture が再結合している
Issue が予定している次の判定は、宣言された目的と矛盾しています。
no claim + improved conclusion → invalid
improvement claim + insufficient samples → invalid
non-regression claim + incomparable runner → invalid
no claim + observed regression → valid
claim.kind、観測結果、証拠の完全性が本当に直交するなら、claim があって証拠が不足している状態も、正当に表現できなければなりません。それは「承認不可」ではあっても「壊れた artifact」ではありません。修正後の期待値は次のようになります。
状態 | assessment の妥当性 | approval eligibility | 診断 -- | -- | -- | -- no claim + not instrumented | valid | change impact と functional evidence 次第 | なし no claim + complete + observed improvement | valid | 原則 eligible | claim_evaluation=not_applicable no claim + complete + observed regression | valid | review required | regression risk flag improvement claim + insufficient samples | valid | blocked | evidence incomplete non-regression claim + incomparable cohort | valid | blocked | cohort incomparable docs-only + runtime evidence | valid | 原則 eligible | warning insufficient samples + observation=improved | invalid | blocked | status/outcome contradiction no claim + claim_evaluation=satisfied | invalid | blocked | claim/evaluation contradictionしたがって、少なくとも以下の三軸に分ける必要があります。
さらに validator の出力も分離すべきです。
improvement + insufficient_samplesを validator error にしたいのであれば、それは assessment validator ではなく approval gate です。コマンド名、出力 schema、fixture の期待値をそのように変更しなければなりません。P0-2: functional evidence の参照先が旧 V1 であり、既存の canonical contract に逆行している
Issue は functional smoke provenance に旧
.claude/skills/pr-review-judge/scripts/ci_verdict_summary.pyのモデルを再利用するとしています。しかしリポジトリでは Issue #898/PR #918 によりci_verdict_summary_v2が既に実装され、現在の規範文書も V2 preferred / V1 fallback、canonical consumer はpr-review-judgeと明記しています。旧 V1 にはさらに具体的な危険があります。check が一件もない入力でも、フィルタ条件によっては
all_passを生成する分岐があります。V2 はこれを改め、空入力をno_required_evidenceとし、required/evidence check には正のcheck_run_id、current-head、completed/success を要求しています。GitHub Check Run 自体も
head_sha、check run ID、status、conclusionを別々に持ち、neutral、skipped、successは異なる conclusion です。単なる"passed": trueへの正規化では provenance を保持できません。(GitHub Docs)必須修正
Issue 本文の参照先を次へ変更してください。
zero selected checks は不可
ここで重要なのは、
expected_head_shaを assessment 自身から信用しないことです。validator の CLI 引数または parent reviewer が取得した trusted inventory と照合する必要があります。P0-3: green Check Run は「functional smoke が実行された」証明にならない
関連 Issue #1725 が、まさにこの問題を実証しています。
node-backed-hook-testsが green でも、宣言上 coverage されているtest_external_manifest_publish.pyが実際の workflow step に含まれておらず、テスト未実行の false-green が成立しています。ci_verdict_summary_v2は Check Run の current-head success は証明できますが、その check の中で期待したコマンド、test file、nodeid が実行されたかまでは証明しません。したがって、Issue #1724 の Out of Scope にある「cross-job coverage strengthening」を除外したまま、Outcome で “functional smoke provenance を意味検証する” と称するのは過大です。
次のどちらかが必要です。
選択肢 A: 保証範囲を狭める
functional_evidenceをcheck_run_evidenceに変更し、非保証事項を明示します。この場合、保証できるのは「current-head で指定 Check Run が success」までです。
選択肢 B: smoke execution artifact を追加する
Issue #1064 では、collected nodeid の件数・集合・hash の一致、parallel/serial union と scope の一致まで確認しており、これが coverage-bound evidence の参考実装です。
GitHub の upload-artifact は artifact ID、URL、SHA-256 digest を返し、artifact は ID 単位で immutable です。単なるパスや URL ではなく、ID と digest で evidence を束縛できます。(GitHub)
P0-4: 新規 schema がリポジトリの schema governance を迂回する
Issue #1724 は二つの新規 JSON Schema を追加します。
CI_TEST_PERFORMANCE_ASSESSMENT_V2ci_runtime_delta_v2このリポジトリでは、producer/consumer 境界を持つ machine-readable contract は schema governance の対象です。
schemas/catalog.yamlが SSOT とされ、schema の definition、producer、consumer、detection pattern、required test、compatibility、migration を登録する方針です。しかし #1724 の Allowed Paths には次がありません。
しかも catalog test は entry 数を現在
20に固定しているため、二つ追加すれば test の更新も必要です。現状の Allowed Paths では、次のどちらかになります。catalog に登録せず governance 違反
catalog に登録して Allowed Paths 違反
entry 数を更新せず catalog test failure
これは実装開始直後に Stop Condition へ入る P0 です。
Allowed Paths への追加が必要
また、PR contract に以下を要求すべきです。
producer: validate_ci_performance_assessment_v2.py / authoring tool
consumers:
schema_id: ci_runtime_delta_v2producer: runtime evidence aggregation
consumers:
CI_TEST_PERFORMANCE_ASSESSMENT_V2 validator
validator が machine-readable な validation result を出し、それを別 consumer が読むなら、その出力も第三の schema として catalog 登録が必要です。
P0-5:
impactは diff-derived ではなく、自己申告にすぎないIssue は diff-derived impact classification を semantic validation するとしていますが、予定 schema には次がありません。
trusted base SHA
trusted head SHA
merge-base
changed file の status
rename の旧パス
diff 取得成功/失敗
classification policy version
changed paths digest
assessment 内の
impact: docs_onlyをそのまま信用するなら、validator が検証しているのは自己申告同士の整合性だけです。リポジトリには既に、branch 名や shallow checkout に依存せず、明示的な
--base-sha/--head-shaで diff を取得し、diff_status.ok != trueを fail-close にする先行実装があります。必須入力
path: string
previous_path: string | null
status: added | modified | deleted | renamed | copied
changed_files_digest: sha256
validator は次のいずれかにすべきです。
trusted CLI 引数の base/head から自ら read-only に diff を導出する
parent が取得した diff inventory を別ファイルとして受け、その digest と SHA を照合する
これを実装しない場合、用語を
declared_impactに変更し、diff-derivedという保証を削除してください。P0-6: production consumer がなく、
policy:checkは fixture の自己検査にしかならないIssue は
pnpm policy:check:ci-performanceを追加するとしていますが、次が定義されていません。どの assessment file を読むのか
trusted expected head SHA をどこから得るのか
changed paths をどこから得るのか
CI verdict artifact をどう渡すのか
runtime evidence artifact をどう渡すのか
validator error と policy blocker の exit code
warning が global
policy:checkを失敗させるかreviewer gate がいつこのコマンドを呼ぶか
workflow wiring と
pr-review-judgeの V2 切替は Out of Scope なので、この Issue 単独では「reviewer gate の evidence quality が machine-validated された状態」には到達しません。CLI を二系統に分けるべき
推奨 exit code は以下です。
approval_eligible=falseは必ずしも exit 2 にしてはいけません。将来の gate 用に別のgatesubcommand を作るか、machine result のapproval_eligibleをpr-review-judgeが評価する方が明確です。現在の Issue で workflow wiring を実装しないなら、Outcome は次までに狭める必要があります。
そのうえで reviewer integration 用の追跡 Issue を事前にリンクしてください。
runtime evidence 設計の不足
P1-1:
absolute_budgetとci_runtime_delta_v2の形が一致していないimprovementとnon_regressionは before/after 比較ですが、absolute_budgetは after cohort と budget の比較です。必ずしも delta はありません。次のどちらかにしてください。
案 1: schema を一般化
案 2: delta schema を比較専用にする
現状のままでは、absolute budget に不要な before cohort を要求するか、
deltaという名前なのに before がない artifact が生まれます。P1-2: cohort comparability の必要条件が足りない
Issue #1064 の実測では、少なくとも次を固定しています。
base/head commit
pytest、Python、pytest-xdist version
worker 数
scheduler
exact runner image version
before/after 各二十 run
phase aggregation formula
run ID 一覧
collected nodeid hash
GitHub-hosted runner image は週次更新され、
ubuntu-latest自体も別 OS version へ段階移行し得ます。したがってruns-on: ubuntu-latestの一致だけでは比較可能性を保証できません。exactImageOS/ImageVersionが必要です。(GitHub)ci_runtime_delta_v2には最低限、次を要求すべきです。validator は precomputed P50/P95 を信用せず、raw sample から再計算して一致を検査すべきです。
追加の不変条件も必要です。
run_id + run_attemptは cohort 内で一意failed/cancelled run の短い duration を性能 sample として数えない
runner_imageがunknownの run は complete evidence に数えないbefore/after の metric/formula/selection/command 条件が違えば
incomparable_cohortclaim threshold は測定前に宣言する
外れ値を黙って除外しない
除外する場合は run ID、reason、事前定義された rule を残す
二十件未満でも artifact は valid。ただし
insufficient_samplesで gate blockedまた単一の
claimでは、typecheck は改善、build は退行といった複数 target を表現できません。一 assessment 一 target と固定するか、targets[]にしてください。P1-3: threshold がなく、noise と regression を区別できない
improvement、non_regression、absolute_budgetにはそれぞれ threshold が必要です。threshold なしで
after > beforeをすべて regression にすると、runner noise による微小差まで契約違反になります。一方、後から threshold を選べる設計では結果に合わせた判定が可能です。threshold は claim に含め、evidence から独立させる必要があります。JSON Schema/Python validator の実装要件
P1-4: schema の dialect、closedness、format validation が未指定
二つの schema には少なくとも次が必要です。
Draft 2020-12 の
if/then/elseとunevaluatedPropertiesは、claim kind ごとの構造差や、subschema 結合後の未知フィールド禁止に利用できます。複雑な cross-field 計算は Python semantic validator に残す方が保守しやすいです。(JSON Schema)Python 側では、最低限以下を実施してください。
python-jsonschemaのformatはデフォルトでは validation を強制しません。FormatCheckerを明示するか、SHA、timestamp、URI を semantic validator で直接検証する必要があります。(jsonschema)ただし format checker の追加 dependency が必要になる場合、現在の Allowed Paths には
pyproject.tomlがありません。追加 dependency を避けて手動検証するか、Allowed Paths を広げる必要があります。P1-5: strict JSON parsing が必要
Python 標準の
json.loadsは、デフォルトでは以下を安全に拒否しません。duplicate object key
NaNInfinity-InfinityJSON Schema Core でも duplicate property を含む JSON document の挙動は未定義です。(JSON Schema)
このリポジトリには既に duplicate key と non-finite constant を拒否する実装があります。同じ方針を採用すべきです。
加えて、入力 file size と最大 sample 数を制限し、validator が巨大 artifact で過剰なメモリを使わないようにしてください。
P1-6:
risk_acceptanceは authorization ではないassessment 作成者自身が次のように書ける設計では、
authorization の証明にはなりません。
validator が確認できるのは、せいぜい「risk acknowledgement field が存在する」ことまでです。最終承認は parent-owned inventory、GitHub review、trusted actor resolution などを持つ
pr-review-judgeが行うべきです。したがって、入力 field は次のように限定します。
そして
decisionは assessment 作成者が入力するのではなく、validator/reviewer が導出する出力にしてください。Acceptance Criteria と fixture の修正
fixture は最低でも次の分類が必要
構造/パーサー
valid minimal assessment
missing required property
unknown property
wrong schema ID/version
duplicate JSON key
NaN/Infinity
invalid SHA/digest
unresolved
$refinvalid schema 自体
claim/evidence 状態機械
no claim + not instrumented → valid
no claim + observed improvement → valid
no claim + observed regression → valid + blocker/warning
improvement + insufficient samples → valid + blocker
non-regression + incomparable cohort → valid + blocker
absolute budget + no before cohort + complete after cohort → valid
incomplete evidence + concrete observation → invalid
no claim + claim satisfied → invalid
complete evidence + missing raw samples → invalid
functional evidence
zero checks
synthetic
needs.resultmissing check run ID
stale head SHA
null head SHA
skipped
neutral
pending
unknown classification
success on expected head
success Check Run but coverage binding absent
artifact digest mismatch
performance cohort
exact image match
ubuntu-latestlabel matchだが ImageVersion mismatchworker count mismatch
scheduler mismatch
test selection digest mismatch
duplicate run ID
failed run included
sample count below twenty
threshold boundary exact match
recomputed percentile mismatch
diff impact
docs-only
workflow-only
mixed docs/workflow
renamed file
deleted workflow
diff derivation failure
self-declared impact differing from derived impact
negative fixture は「何らかの理由で失敗した」だけでは不足です。各 fixture が期待する stable reason code を exact match してください。
V1 不変性の検証も現状 AC では弱い
Issue は V1 definition を不変にするとしていますが、同じ
decision-matrix.mdに V2 文書を追加する予定なので、file 全体には当然 diff が出ます。rgで V1 identifier が残っていることを確認しても、enum や required key の変更は検出できません。必要なのは、V1 fenced block または正規化済み V1 contract の snapshot test です。
同様に
ci_runtime_delta_v1も exact snapshot または semantic key/enum comparison を行ってください。Issue 本文に最低限追加すべき変更
fixture の期待値を
assessment_validとapproval_eligibleに分離する。functional provenance source を旧 V1 から
ci_verdict_summary_v2に変更する。Check Run provenance と smoke coverage provenance の非保証境界を明記する。
coverage-bound を要求するなら command/selection/collected-target artifact を追加する。
schemas/catalog.yamlとschemas/tests/test_catalog.pyを Allowed Paths に追加する。trusted head SHA、trusted diff inventory、CI verdict artifact を受ける CLI contract を定義する。
impactを本当に diff-derived にするか、declared_impactに改名する。absolute_budgetと comparative delta の schema 分岐を定義する。raw samples から percentile と delta を再計算する。
runner image、workers、scheduler、selection digest、formula ID の comparability を固定する。
decisionと risk authorization を input artifact から分離する。strict JSON、offline
$ref、schema meta-validation、stable reason code を AC に追加する。V1 exact snapshot test を追加する。
workflow/reviewer integration の追跡 Issue を事前にリンクする。
related_issuesを machine-readable contract に追加する。Issue/PR 系譜の整理
確認した関連資産から見ると、系譜は次のように整理すべきです。
実装: CI performance baseline の性能主張・provisioning 判定境界を明確化する #1538: 元の boundary 修正。自己矛盾を含み、実装: CI performance decision契約をversioned schema (CI_TEST_PERFORMANCE_ASSESSMENT_V2) 化し claim/evidence/functional smoke provenance を意味検証するvalidatorを追加する #1724/実装: node-backed-hook-tests に test_external_manifest_publish.py の実行 step を追加し既知の宣言・実行不一致を解消する #1725 へ分割された。
PR feat: Codex scope-rollup capture を復旧 (#1527) #1534: correctness/provisioning 変更に性能 baseline 要求が波及した直接的な背景。
実装: CI verdict artifact を正規化し AIエージェントの CI 待機・判定を安定化する #898/PR implement(#898): CI verdict artifact を ci_verdict_summary_v2 として正規化し AIエージェントの CI 待機・判定を安定化する #918:
ci_verdict_summary_v2の既存 canonical provenance 実装。実装: CI test lane policy docs と ci-test-performance skill を追加する #1060: V1 performance decision/runtime delta 契約。
実装: pytest target plan を SSOT 化し serial→xdist 段階移行と ci_test_selection fail-close 化を行う(python-test 並列化 migration) #1064: exact runner image、二十 run、worker/scheduler、nodeid hash を含む実測比較の先行実装。
実装: node-backed-hook-tests に test_external_manifest_publish.py の実行 step を追加し既知の宣言・実行不一致を解消する #1725: green Check Run と実際の test coverage が乖離する false-green の sibling Issue。
CI python-test pytest実行phase高速化: test lane分類・pytest統合・Ruff導入・Skill化 #1059: delivery rollup parent が現在も open で、実測比較を closure gap に持つ。
#1724 は
parent_issue: noneの一方、Notes の prose にしか関連 Issue がなく、#1059 の closure gap との関係も machine-readable ではありません。parent_issue: "1059"にするか、少なくともrelated_issuesと #1059 側の Remaining Parent Gaps を同期してください。最終評価
#1724 は問題設定自体は必要ですが、現状のまま実装すると次の失敗形になります。
honest な
insufficient_samplesartifact を invalid として拒否するno-claim の改善観測だけを不当に拒否する
自己申告された impact classification を diff-derived と誤認する
旧 V1 の zero-check
all_pass経路を provenance に持ち込むgreen Check Run を functional smoke coverage の証明と誤認する
schema catalog を更新できず Stop Condition に入る
fixture は通るが、実 PR artifact を一度も検証しない policy script ができる
reviewer gate 未接続のまま Outcome だけが「machine-validated」となる
P0-1~P0-6 を Issue 本文へ反映してから implementation-ready にするべきです。特に「assessment validity」「approval eligibility」「evidence provenance」の三層分離が、この Issue の根本修正になります。
# 敵対的レビュー結果判定: REQUEST_CHANGES。現状の Issue #1724 は実装着手可能な契約になっていません。
V1 を不変にして V2 を追加する方針、performance claim と evidence availability を分離する問題設定、fixture-driven validator を置く方向は妥当です。しかし現在は、次の三つが一つの「validator」に混在しています。
この混同により、正直に「証拠不足」と記録した artifact を invalid にする一方、自己申告された diff classification や green Check Run を provenance と誤認する設計になっています。Issue #1724 には現在コメントがなく、この曖昧さを解消する owner clarification もありません。
P0-1: claim と evidence を分離すると言いながら、fixture が再結合している
Issue が予定している次の判定は、宣言された目的と矛盾しています。
claim.kind、観測結果、証拠の完全性が本当に直交するなら、claim があって証拠が不足している状態も、正当に表現できなければなりません。それは「承認不可」ではあっても「壊れた artifact」ではありません。修正後の期待値は次のようになります。
claim_evaluation=not_applicableobservation=improvedclaim_evaluation=satisfiedしたがって、少なくとも以下の三軸に分ける必要があります。
さらに validator の出力も分離すべきです。
improvement + insufficient_samplesを validator error にしたいのであれば、それは assessment validator ではなく approval gate です。コマンド名、出力 schema、fixture の期待値をそのように変更しなければなりません。P0-2: functional evidence の参照先が旧 V1 であり、既存の canonical contract に逆行している
Issue は functional smoke provenance に旧
.claude/skills/pr-review-judge/scripts/ci_verdict_summary.pyのモデルを再利用するとしています。しかしリポジトリでは Issue #898/PR #918 によりci_verdict_summary_v2が既に実装され、現在の規範文書も V2 preferred / V1 fallback、canonical consumer はpr-review-judgeと明記しています。旧 V1 にはさらに具体的な危険があります。check が一件もない入力でも、フィルタ条件によっては
all_passを生成する分岐があります。V2 はこれを改め、空入力をno_required_evidenceとし、required/evidence check には正のcheck_run_id、current-head、completed/success を要求しています。GitHub Check Run 自体も
head_sha、check run ID、status、conclusionを別々に持ち、neutral、skipped、successは異なる conclusion です。単なる"passed": trueへの正規化では provenance を保持できません。([GitHub Docs]1)必須修正
Issue 本文の参照先を次へ変更してください。
ここで重要なのは、
expected_head_shaを assessment 自身から信用しないことです。validator の CLI 引数または parent reviewer が取得した trusted inventory と照合する必要があります。P0-3: green Check Run は「functional smoke が実行された」証明にならない
関連 Issue #1725 が、まさにこの問題を実証しています。
node-backed-hook-testsが green でも、宣言上 coverage されているtest_external_manifest_publish.pyが実際の workflow step に含まれておらず、テスト未実行の false-green が成立しています。ci_verdict_summary_v2は Check Run の current-head success は証明できますが、その check の中で期待したコマンド、test file、nodeid が実行されたかまでは証明しません。したがって、Issue #1724 の Out of Scope にある「cross-job coverage strengthening」を除外したまま、Outcome で “functional smoke provenance を意味検証する” と称するのは過大です。
次のどちらかが必要です。
選択肢 A: 保証範囲を狭める
functional_evidenceをcheck_run_evidenceに変更し、非保証事項を明示します。この場合、保証できるのは「current-head で指定 Check Run が success」までです。
選択肢 B: smoke execution artifact を追加する
Issue #1064 では、collected nodeid の件数・集合・hash の一致、parallel/serial union と scope の一致まで確認しており、これが coverage-bound evidence の参考実装です。
GitHub の upload-artifact は artifact ID、URL、SHA-256 digest を返し、artifact は ID 単位で immutable です。単なるパスや URL ではなく、ID と digest で evidence を束縛できます。(GitHub)
P0-4: 新規 schema がリポジトリの schema governance を迂回する
Issue #1724 は二つの新規 JSON Schema を追加します。
CI_TEST_PERFORMANCE_ASSESSMENT_V2ci_runtime_delta_v2このリポジトリでは、producer/consumer 境界を持つ machine-readable contract は schema governance の対象です。
schemas/catalog.yamlが SSOT とされ、schema の definition、producer、consumer、detection pattern、required test、compatibility、migration を登録する方針です。しかし #1724 の Allowed Paths には次がありません。
しかも catalog test は entry 数を現在
20に固定しているため、二つ追加すれば test の更新も必要です。現状の Allowed Paths では、次のどちらかになります。catalog に登録せず governance 違反
catalog に登録して Allowed Paths 違反
entry 数を更新せず catalog test failure
これは実装開始直後に Stop Condition へ入る P0 です。
Allowed Paths への追加が必要
また、PR contract に以下を要求すべきです。
validator が machine-readable な validation result を出し、それを別 consumer が読むなら、その出力も第三の schema として catalog 登録が必要です。
P0-5:
impactは diff-derived ではなく、自己申告にすぎないIssue は diff-derived impact classification を semantic validation するとしていますが、予定 schema には次がありません。
assessment 内の
impact: docs_onlyをそのまま信用するなら、validator が検証しているのは自己申告同士の整合性だけです。リポジトリには既に、branch 名や shallow checkout に依存せず、明示的な
--base-sha/--head-shaで diff を取得し、diff_status.ok != trueを fail-close にする先行実装があります。必須入力
validator は次のいずれかにすべきです。
これを実装しない場合、用語を
declared_impactに変更し、diff-derivedという保証を削除してください。P0-6: production consumer がなく、
policy:checkは fixture の自己検査にしかならないIssue は
pnpm policy:check:ci-performanceを追加するとしていますが、次が定義されていません。policy:checkを失敗させるかworkflow wiring と
pr-review-judgeの V2 切替は Out of Scope なので、この Issue 単独では「reviewer gate の evidence quality が machine-validated された状態」には到達しません。CLI を二系統に分けるべき
推奨 exit code は以下です。
approval_eligible=falseは必ずしも exit 2 にしてはいけません。将来の gate 用に別のgatesubcommand を作るか、machine result のapproval_eligibleをpr-review-judgeが評価する方が明確です。現在の Issue で workflow wiring を実装しないなら、Outcome は次までに狭める必要があります。
そのうえで reviewer integration 用の追跡 Issue を事前にリンクしてください。
runtime evidence 設計の不足
P1-1:
absolute_budgetとci_runtime_delta_v2の形が一致していないimprovementとnon_regressionは before/after 比較ですが、absolute_budgetは after cohort と budget の比較です。必ずしも delta はありません。次のどちらかにしてください。
案 1: schema を一般化
案 2: delta schema を比較専用にする
現状のままでは、absolute budget に不要な before cohort を要求するか、
deltaという名前なのに before がない artifact が生まれます。P1-2: cohort comparability の必要条件が足りない
Issue #1064 の実測では、少なくとも次を固定しています。
base/head commit
pytest、Python、pytest-xdist version
worker 数
scheduler
exact runner image version
before/after 各二十 run
phase aggregation formula
run ID 一覧
collected nodeid hash
GitHub-hosted runner image は週次更新され、
ubuntu-latest自体も別 OS version へ段階移行し得ます。したがってruns-on: ubuntu-latestの一致だけでは比較可能性を保証できません。exactImageOS/ImageVersionが必要です。(GitHub)ci_runtime_delta_v2には最低限、次を要求すべきです。validator は precomputed P50/P95 を信用せず、raw sample から再計算して一致を検査すべきです。
追加の不変条件も必要です。
run_id + run_attemptは cohort 内で一意runner_imageがunknownの run は complete evidence に数えないincomparable_cohortinsufficient_samplesで gate blockedまた単一の
claimでは、typecheck は改善、build は退行といった複数 target を表現できません。一 assessment 一 target と固定するか、targets[]にしてください。P1-3: threshold がなく、noise と regression を区別できない
improvement、non_regression、absolute_budgetにはそれぞれ threshold が必要です。threshold なしで
after > beforeをすべて regression にすると、runner noise による微小差まで契約違反になります。一方、後から threshold を選べる設計では結果に合わせた判定が可能です。threshold は claim に含め、evidence から独立させる必要があります。JSON Schema/Python validator の実装要件
P1-4: schema の dialect、closedness、format validation が未指定
二つの schema には少なくとも次が必要です。
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://loop-protocol.local/schemas/...", "type": "object", "required": [], "unevaluatedProperties": false, "properties": {}, "$defs": {} }Draft 2020-12 の
if/then/elseとunevaluatedPropertiesは、claim kind ごとの構造差や、subschema 結合後の未知フィールド禁止に利用できます。複雑な cross-field 計算は Python semantic validator に残す方が保守しやすいです。([JSON Schema]4)Python 側では、最低限以下を実施してください。
python-jsonschemaのformatはデフォルトでは validation を強制しません。FormatCheckerを明示するか、SHA、timestamp、URI を semantic validator で直接検証する必要があります。([jsonschema]5)ただし format checker の追加 dependency が必要になる場合、現在の Allowed Paths には
pyproject.tomlがありません。追加 dependency を避けて手動検証するか、Allowed Paths を広げる必要があります。P1-5: strict JSON parsing が必要
Python 標準の
json.loadsは、デフォルトでは以下を安全に拒否しません。NaNInfinity-InfinityJSON Schema Core でも duplicate property を含む JSON document の挙動は未定義です。([JSON Schema]4)
このリポジトリには既に duplicate key と non-finite constant を拒否する実装があります。同じ方針を採用すべきです。
加えて、入力 file size と最大 sample 数を制限し、validator が巨大 artifact で過剰なメモリを使わないようにしてください。
P1-6:
risk_acceptanceは authorization ではないassessment 作成者自身が次のように書ける設計では、
authorization の証明にはなりません。
validator が確認できるのは、せいぜい「risk acknowledgement field が存在する」ことまでです。最終承認は parent-owned inventory、GitHub review、trusted actor resolution などを持つ
pr-review-judgeが行うべきです。したがって、入力 field は次のように限定します。
そして
decisionは assessment 作成者が入力するのではなく、validator/reviewer が導出する出力にしてください。Acceptance Criteria と fixture の修正
fixture は最低でも次の分類が必要
構造/パーサー
$refclaim/evidence 状態機械
functional evidence
needs.resultperformance cohort
ubuntu-latestlabel matchだが ImageVersion mismatchdiff impact
negative fixture は「何らかの理由で失敗した」だけでは不足です。各 fixture が期待する stable reason code を exact match してください。
V1 不変性の検証も現状 AC では弱い
Issue は V1 definition を不変にするとしていますが、同じ
decision-matrix.mdに V2 文書を追加する予定なので、file 全体には当然 diff が出ます。rgで V1 identifier が残っていることを確認しても、enum や required key の変更は検出できません。必要なのは、V1 fenced block または正規化済み V1 contract の snapshot test です。
同様に
ci_runtime_delta_v1も exact snapshot または semantic key/enum comparison を行ってください。Issue 本文に最低限追加すべき変更
assessment_validとapproval_eligibleに分離する。ci_verdict_summary_v2に変更する。schemas/catalog.yamlとschemas/tests/test_catalog.pyを Allowed Paths に追加する。impactを本当に diff-derived にするか、declared_impactに改名する。absolute_budgetと comparative delta の schema 分岐を定義する。decisionと risk authorization を input artifact から分離する。$ref、schema meta-validation、stable reason code を AC に追加する。related_issuesを machine-readable contract に追加する。Issue/PR 系譜の整理
確認した関連資産から見ると、系譜は次のように整理すべきです。
ci_verdict_summary_v2の既存 canonical provenance 実装。#1724 は
parent_issue: noneの一方、Notes の prose にしか関連 Issue がなく、#1059 の closure gap との関係も machine-readable ではありません。parent_issue: "1059"にするか、少なくともrelated_issuesと #1059 側の Remaining Parent Gaps を同期してください。最終評価
#1724 は問題設定自体は必要ですが、現状のまま実装すると次の失敗形になります。
insufficient_samplesartifact を invalid として拒否するall_pass経路を provenance に持ち込むP0-1~P0-6 を Issue 本文へ反映してから implementation-ready にするべきです。特に「assessment validity」「approval eligibility」「evidence provenance」の三層分離が、この Issue の根本修正になります。
squne121 commentedon Jul 25, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jul 25, 2026
スコープ拡張の反映(human decision)
前回 iteration の human_escalation で提起した P0-4 指摘(新規 schema の
schemas/catalog.yamlgovernance 登録が Allowed Paths 外である問題)について、OWNER(squne121) から明示的な決定がありました。この human decision に基づき本文を更新しました。
schemas/catalog.yaml/schemas/tests/test_catalog.pyを追加EXPECTED_ENTRY_COUNT更新(20 → 22)を追記EXPECTED_ENTRY_COUNT = 22・pytest schemas/tests/test_catalog.pypass)と対応する Verification Commands を追加既存 AC1〜AC5・既存 Verification Commands・Out of Scope の既存項目は変更していません。
squne121 commentedon Jul 25, 2026
Contract Review Result
squne121 commentedon Jul 25, 2026
implement-issue: overlap preflight readback evidence(proceed_with_collision_evidence)
check_implementation_overlap.py --issue-number 1724 --limit 2000の実装直前 recheck(Step 2 Major 1 drift gate)はroute: human_review_requiredを返しました(evidence_sha256: sha256:4854788ad153d73bfa7405fd5be4247e870066010358e698df3ec05ce28d1ed1、decision_inputs_sha256: sha256:2c949147c85f507f4e8cfed06168f09940ea093d04c71eb9542072bf3b6dd346、source.complete: true/source.saturated: false、fetched_count: 190)。candidate は
C1(duplicate route ではない)が 17 件あり、うちstructural_or_textual_collision_detected+independent_strong_signal_detectedを持つ候補(human readback が必要)は #166 / #521 / #1418 / #1425 / #1725 の5件、readback_incomplete_missing_outcome_or_in_scopeの候補は #754 の1件です。人間(squne121、control-plane 経由)による readback は本 Issue 実装着手前に完了・承認済みで、以下の通りです(再掲):repo_temp_folder_advice/v1の別エントリ追加。実装: CI performance decision契約をversioned schema (CI_TEST_PERFORMANCE_ASSESSMENT_V2) 化し claim/evidence/functional smoke provenance を意味検証するvalidatorを追加する #1724 はCI_TEST_PERFORMANCE_ASSESSMENT_V2/ci_runtime_delta_v2の別エントリを追加。両者とも catalog.yaml への additive エントリ追加であり disjoint。related_issuesに既出(Issue B、実装: CI performance baseline の性能主張・provisioning 判定境界を明確化する #1538 分割の対)。実装: node-backed-hook-tests に test_external_manifest_publish.py の実行 step を追加し既知の宣言・実行不一致を解消する #1725 の Out of Scope に「CI_TEST_PERFORMANCE_ASSESSMENT_V2等の判定契約スキーマ設計(→ Issue A)」と明記されており相互 disjoint 確認済み。SKILL.md は共有するが編集対象セクションが異なる。disjoint。残りの候補(#198 / #205 / #213 / #225 / #947 / #1283 / #1326 / #1388 / #1389 / #1433 / #1709)は本 recheck 時点で collision classifier 自身が
readback_confirmed_disjoint(low_specificity_path_only/broad_prefix_only/ordinal_ac_id_only)と分類しており、追加の human readback を要しません。上記の readback evidence(全 C1 candidates を human 承認済みの disjoint 判定で網羅)に基づき、
.claude/skills/implement-issue/SKILL.mdStep 2 の route 表に従ってproceed_with_collision_evidenceとして実装を継続します。open-prでは本コメントのevidence_sha256を PR 本文へ転記します。squne121 commentedon Jul 25, 2026
implement-issue: 実装完了・PR起票は overlap preflight hard gate でブロック
実装・検証(typecheck/lint/test/build、
pnpm policy:check:ci-performance76件、schemas/tests/test_catalog.py51件、model_routing 21件、ruff)はすべて完了し、ブランチも push 済みです。.claude/worktrees/issue-1724-ci-perf-assessment-v2worktree-issue-1724-ci-perf-assessment-v22b1b55b5d2e5eb193df4476fbf1e2098e18985faブロッカー:
open_pr.pyの overlap preflight hard gate(#1458/#1470/#1477/#1509)open_pr.py(open-prskill wrapper)はgh pr create直前にcheck_implementation_overlap.pyをオンライン再実行し、routeを再検証します。本 Issue は linked issue がphase/implementationラベルを持つため gate が強制されます(bypass 不可)。再検証結果は
route: human_review_requiredのままです。理由は、#166 / #521 / #1418 / #1425 / #1725 の各候補でstructural_or_textual_collision_detected(候補 Issue の## Outcome/## In Scope見出しテキストが本 Issue と字面上重なる)が検出されているためです。この人間 readback(issuecomment-5077194365)は disjoint と確認済みですが、open_pr.pyのoverlap_readback_waiver機構(_load_verified_generic_overlap_readback_waiver/_is_readback_incomplete_only_blocker)はreadback_incomplete理由の候補にしか適用できません。structural_or_textual_collision_detected理由の候補には waiver 経路が存在せず、gh pr createを呼ぶ前に fail-closed で停止します。つまり
.claude/skills/implement-issue/SKILL.mdStep 2 が定義する「readback evidence を記録してproceed_with_collision_evidenceとして継続する」手順と、open_pr.py側の実装(#1477/#1509 で追加された narrow waiver)との間に、structural collision candidate を human readback だけで解除する経路が存在しないというギャップがあります。選択肢(人間判断が必要)
gh pr createでブランチから Draft PR を作成する(open_pr.pyの validator/hygiene チェックは以下の通り事前に手元で PASS 確認済みなので、body はそのまま使える)open_pr.pyの waiver 機構をstructural_or_textual_collision_detected理由の候補にも拡張する follow-up Issue を起票する(本 Issue のスコープ外、tooling 変更)事前検証済みの PR body(そのまま
gh pr create --body-fileに使用可能)validate_pr_body.py: PASS(status: pass、LP050〜LP058 全通過)validate_japanese_content.py --threshold 0.1): PASS(aggregate_ratio: 0.36 以上)open_pr.py --dry-run: PASS(overlap gate 到達前の validation は全て通過)PR タイトル案:
実装: CI performance decision契約をversioned schema (CI_TEST_PERFORMANCE_ASSESSMENT_V2) 化するsqune121 commentedon Jul 25, 2026
Contract Review Result
fix: validate_ci_performance_assessment_v2 の command registry / test-…
squne121 commentedon Jul 25, 2026
Contract Review Result
fix: P1-2完全解消。CI_TEST_PERFORMANCE_ASSESSMENT_V2_VALIDATION_RESULT_V1の…
fix: RunDetail description の虚偽 enforcement 主張を除去する (#1724)
squne121 commentedon Jul 25, 2026
Contract Review Result