Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "CI 各 job / step の実測所要時間を artifact と Step Summary に残し、高速化 PR で before/after 比較できる状態にする"
change_kind: mixedParent Issue
none(単独改善)
Parent Goal Ref
- Goal: CI Runtime Baseline を計測し、高速化施策の判断根拠を作る
- Desired Destination: .github/workflows/ci.yml に計測ステップが追加され、artifact と Step Summary で job 別所要時間が可視化された状態
Current Validated Scope
.github/workflows/ci.ymlに計測ステップを追加するdocs/dev/ci-performance.mdを新規作成する
Remaining Parent Gaps
- Node/pnpm/uv setup の Composite Action 化(別 Issue 化予定)
- Playwright E2E 安定化(別 Issue 化予定)
- CI verdict artifact v2 正規化(別 Issue 化予定)
- S3 cache / self-hosted runner の採用判断(計測結果後)
Outcome
.github/workflows/ci.yml に主要 step の所要時間計測が追加され、ci_runtime_baseline_v1.json artifact と GitHub Step Summary に job 別所要時間が出力された状態になり、docs/dev/ci-performance.md に記録フォーマットが追加される。
In Scope
.github/workflows/ci.ymlの主要 job(typecheck / lint / test / build / e2e / python-test / actionlint)に計測ステップを追加する- 計測対象:
pnpm install/pnpm typecheck/pnpm lint/pnpm test/pnpm build/playwright install/test:e2e:ci/uv python install/uv sync/ pytest 群 - 各 step の elapsed seconds を記録し
ci_runtime_baseline_v1.jsonとして artifact upload する $GITHUB_STEP_SUMMARYに job 別所要時間表を出力するdocs/dev/ci-performance.mdを新規作成し、3 回分の run 記録フォーマットを定義する- 計測追加により既存 CI の成否条件を変えない
- 失敗時も可能な範囲で計測結果を残す
date +%s%3Nによる ms 計測(SECONDSは使わない)- artifact 名の一意化(
ci-runtime-baseline-${{ github.job }}-${{ github.run_attempt }}) - command failure 時も measurement record を保持する
run_timedwrapper の実装 $GITHUB_STEP_SUMMARYへの job 別 duration table 出力(各 job 最終 summary step で 1 回 append)
Out of Scope
- 高速化そのものは行わない
node_modulescache の導入はしない- Playwright Docker 化はしない
- S3 cache の導入はしない
- CI job の統廃合は行わない
Required Design Constraints
ci_runtime_baseline_v1.jsonは runtime duration evidence であり、merge-ready verdict ではない。- CI verdict / required-advisory-evidence 判定は 実装: CI verdict artifact を正規化し AIエージェントの CI 待機・判定を安定化する #898 の
ci_verdict_summary_v2に委譲する。 - command の exit status を変更してはならない。
- failure 時も、既に取得できた measurement record は artifact として upload する。
SECONDSは authoritative metric として使わない。date +%s%3Nによる ms 計測を使う。- artifact 名は job ごとに一意にする(例:
ci-runtime-baseline-${{ github.job }}-${{ github.run_attempt }})。複数 job から同一 artifact 名へ upload しない。 $GITHUB_STEP_SUMMARYは各 job の最終 summary step で 1 回 append する。- baseline comparison 用に
run_id,run_attempt,head_sha,merge_sha,job,runner image,measurement_methodを必ず含める。 - Design A(Bash wrapper 方式)を採用する。権限追加なし。
date +%s%3Nで ms 計測する。
Acceptance Criteria
- AC1:
ci_runtime_baseline_v1schema がdocs/dev/ci-performance.mdに定義されている - AC2: artifact 名が job ごとに一意であり、同一 artifact 名へ複数 job が upload しない
- AC3: 各 measurement record に
run_id,run_attempt,head_sha,merge_sha,job,step_id,status,elapsed_msが含まれる - AC4: command failure 時も exit status を保持し、CI failure を mask しない(
run_timedwrapper または同等実装) - AC5: artifact upload は failure 時にも可能な範囲で実行され、
if: ${{ !cancelled() }}を使う - AC6:
$GITHUB_STEP_SUMMARYに job 別 duration table が出力され、既存 e2e visual summary を上書きしない - AC7:
docs/dev/ci-performance.mdに bootstrap 3 runs と decision baseline 20 runs / P50 / P95 の使い分けが記載されている - AC8: 実装: Node / pnpm / uv setup を Composite Action 化し CI YAML 重複を削減する #896 以降も比較できる stable phase id が定義されている
- AC9: 実装: CI verdict artifact を正規化し AIエージェントの CI 待機・判定を安定化する #898 の
ci_verdict_summary_v2と責務が分離されている - AC10: 既存 CI の
pnpm typecheck/pnpm lint/pnpm test/pnpm buildが通る
Verification Commands
# AC1
# baseline-expect: fail
$ rg -c "ci_runtime_baseline_v1" docs/dev/ci-performance.md
# AC2
# baseline-expect: fail
$ rg -c "github.job" .github/workflows/ci.yml
# AC3
# baseline-expect: fail
$ rg -c "ci_runtime_baseline_v1" .github/workflows/ci.yml
# AC4
# baseline-expect: fail
$ rg -c "status=|set +e|set -e" .github/workflows/ci.yml
# AC5
# baseline-expect: fail
$ rg -c "ci-runtime-baseline" .github/workflows/ci.yml
# AC6
# baseline-expect: fail
$ rg -c "ci-runtime-baseline" .github/workflows/ci.yml
# AC7
# baseline-expect: fail
$ rg -c "P50|P95" docs/dev/ci-performance.md
# AC8
# baseline-expect: fail
$ rg -c "phase_id|step_id|pnpm_install|uv_sync" .github/workflows/ci.yml
# AC9
# baseline-expect: fail
$ rg -c "ci_verdict_summary|898" docs/dev/ci-performance.md
# AC10
# baseline-expect: pass
$ pnpm typecheck
# Runtime Verification Applicability / CI syntax smoke
# baseline-expect: pass
$ rg -c "name: Run actionlint" .github/workflows/ci.ymlRuntime Verification Applicability
decision: not_applicable
CI workflow ファイルの変更は actionlint によるシンタックス検証のみをローカルで行える。
runtime 計測結果は実際の CI run が必要なため、本 AC の完全検証は CI で実施する。
Allowed Paths
- .github/workflows/ci.yml
- docs/dev/ci-performance.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- GitHub Actions(workflow syntax / artifact upload / step summary)
- Bash(
date +%s%3Nによる ms 計測、exit status 保持 wrapper)
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR。worktree を使用。Draft PR として起票し、CI 通過後に ready にする。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jun 14, 2026
結論
判定: このまま実装に渡すのは NG。Issue 本文をリファインしてから着手すべきです。
#895 の方向性自体は妥当です。CI 高速化の前に runtime baseline を取り、artifact と Step Summary に残すという目的は #894 の CI 運用設計とも整合します。#895 は
typecheck / lint / test / build / e2e / python-test / actionlintを対象に、ci_runtime_baseline_v1.jsonと$GITHUB_STEP_SUMMARYへ所要時間を残す契約です。 コメントは現時点で 0 件です。ただし、現契約は artifact の衝突、失敗時欠損、比較不能な timing、#898 との責務混線 を起こしやすいです。
関連 Issue / PR から見た位置づけ
#895 は単独改善扱いですが、実質的には CI 改善系列の先頭です。#896 は Node/pnpm/uv setup の Composite Action 化で、本文中でも「#895 が先行」とされています。つまり #895 の計測ラベルは、#896 実施後も before/after 比較できる stable phase 名で設計する必要があります。
#894 / PR #902 はすでに完了済みで、
docs/dev/ci-operations.mdに CI job taxonomy、agent merge-ready、artifact evidence、S3/external cache 判断基準を定義しています。#895 はこの方針を継承すべきです。 とくに #894 文書は、CI 高速化を baseline measurement → setup 重複削減 → E2E 安定化 → cache 拡張 の順に進め、S3/external cache は N=20 run の P50/P95 などを満たすまで採用しないと定義しています。#898 は
ci_verdict_summary_v2を扱う別 Issue で、required/advisory/evidence、head SHA、pending/skipped/cancelled などの判定 schema を定義します。#895 は runtime baseline だけを扱い、merge-ready 判定や CI verdict schema を侵食しない設計に分離すべきです。Blocking / High severity
1.
ci_runtime_baseline_v1.jsonの artifact topology が未定義#895 は
ci_runtime_baseline_v1.jsonartifact を upload するとしていますが、artifact 名なのかファイル名なのか、job ごとに分けるのか、最終集約するのかが未定義です。これは危険です。
actions/upload-artifactv4+ 系では artifact は immutable で、複数 job から同じ artifact 名へ追加 upload する運用はサポートされず、matrix/job ごとに一意名が必要です。if-no-files-foundもwarn/error/ignoreを明示できます。([GitHub]1)修正案:
ci_runtime_baseline_v1.jsonci-runtime-baseline-${{ github.job }}-${{ github.run_attempt }}runtime-baseline集約 job を追加し、各 job の artifact を download → 1 つのci-runtime-baselineartifact に再 upload最低限、Issue 本文に次を追加すべきです。
2.
$GITHUB_STEP_SUMMARYの扱いが甘いGitHub の job summary は
$GITHUB_STEP_SUMMARYに Markdown を追記しますが、このファイルは step ごとに unique で、step 完了後に後続 step から前 step の summary は編集できません。さらに 1 step あたり 1 MiB 制限があります。([GitHub Docs]2)現行
e2ejob はこの制約を理解しており、artifact upload 後に summary step を置く理由をコメントで明記しています。 #895 でも同じく、各 command step が個別に summary を書き散らすのではなく、最後に 1 回だけ runtime baseline summary を append する構造にすべきです。3. Bash
SECONDSは baseline 指標として弱い#895 の Required Skills は Bash
SECONDSを前提にしていますが、Bash manual 上SECONDSは shell 起動からの秒数で、解像度は秒単位です。代入で reset できる一方、短い step は0秒になり得ます。([GNU]3)GitHub Actions の
runstep はそれぞれ別 shell として実行されるため、SECONDSを複数 step にまたがる信頼できる accumulator として使う設計は不適です。現行 workflow もpnpm install,pnpm typecheck,pnpm lintなどが独立したrunstep です。推奨:
SECONDSではなく、少なくともdate +%s%3Nによる millisecond 計測、または GitHub REST API の workflow jobs / steps のstarted_at/completed_atを使うべきです。GitHub REST API は workflow job とその step 群のstarted_at/completed_atを返します。([GitHub Docs]4)4. 失敗時に計測 artifact が欠損しやすい
#895 は「失敗時も可能な範囲で計測結果を残す」としています。 しかし naive に、
のように書くと、
pnpm lintが失敗した時点で後続記録が実行されない可能性があります。逆にpnpm lint || trueにすると CI 失敗を隠します。必要なのは、exit status を保存して、計測 record を書いてから、元の status で exit する wrapper です。
artifact upload は既存
e2eと同様、if: ${{ !cancelled() }}を基本にすべきです。現行 workflow も Playwright report / test-results を!cancelled()で upload しています。5. REST API 集約方式を検討していない
高品質化するなら、各 step を Bash wrapper で包むより、最終 job で GitHub Actions の jobs API から実測 step duration を取る設計の方が保守性は高いです。API は workflow run attempt ごとの jobs と steps を返せます。([GitHub Docs]4)
ただし現行 workflow の permissions は
contents: readのみです。 API 集約方式でGITHUB_TOKENを使うならactions: readが必要になる可能性があり、#895 の Stop Conditions にある「権限昇格」に該当し得ます。したがって Issue 本文で次のどちらを採るか明示してください。uses:action の duration は取りにくい。actions: readpermission の要否を明記し、権限変更をレビュー対象にする。私は Design B を第一候補にします。ただし権限変更を嫌うなら Design A で MVP 化すべきです。
Issue 本文への改善草案
追加すべき Required Design Constraints
ci_runtime_baseline_v1schema 案{ "schema_version": "ci_runtime_baseline_v1", "workflow": "ci", "run_id": 123456789, "run_attempt": 1, "event_name": "pull_request", "head_sha": "PR head SHA", "merge_sha": "workflow checkout SHA", "job": "typecheck", "measurement_method": "wrapper_ms", "runner": { "os": "Linux", "arch": "X64", "image_os": "ubuntu24", "image_version": "unknown" }, "records": [ { "step_id": "pnpm_install", "label": "pnpm install --frozen-lockfile", "command": "pnpm install --frozen-lockfile", "status": 0, "conclusion": "success", "started_at": "2026-06-14T00:00:00Z", "completed_at": "2026-06-14T00:00:12Z", "elapsed_ms": 12000 } ] }docs/dev/ci-performance.mdに必要な内容#895 は「3 回分の run 記録フォーマット」としていますが、#894 側では S3/external cache 判断に N=20 run の P50/P95 を要求しています。 したがって文書は次の 2 段階に分けるべきです。
修正後 Acceptance Criteria 案
現在の AC は
rg -c "elapsed|SECONDS|baseline"のような文字列検査が中心で、実効性が弱いです。次に置き換えるべきです。最終レビュー判定
実装着手前に Issue #895 を修正してください。
最小修正で済ませるなら、artifact 名一意化、exit status 保持、
SECONDS非依存、schema 明文化、#894/#898 との責務分界だけは必須です。より高品質にするなら、REST API collector job 方式を採用し、GitHub Actions の実 step duration をそのまま baseline artifact 化する設計に寄せるのがよいです。squne121 commentedon Jun 14, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jun 14, 2026
▐▛███▜▌ Claude Code v2.1.177
▝▜█████▛▘ Sonnet 4.6 with medium effort · Claude Max
▘▘ ▝▝ ~/projects/LOOP_PROTOCOL
❯ /clear
❯ #895 (comment)
を対象に issue-refinement-loop を人間承認不要で行って。
● Skill(issue-refinement-loop)
⎿ Successfully loaded skill
● Issue #895 の refinement loop を開始します。まず preflight スクリプトを実行します。
● Bash(uv run python3
.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py
--issue-number 895 \…)
⎿ Error: Exit code 1
STATUS: warn
NEXT_ACTION: proceed_with_notes
MUST_READ:
- .github/workflows/ci.yml
- docs/dev/ci-performance.md
COMMANDS:
- [run_preflight] uv run python3
.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py --issue-number
895 --repo squne121/loop-protocol
ARTIFACT:
planner_input: /home/squne/projects/LOOP_PROTOCOL/.claude/artifacts/issue-refinement-
loop/895/planner_input.json
… +2 lines (ctrl+o to expand)
● warn で proceed_with_notes。preflight 結果と planner 入力を確認します。
Read 1 file (ctrl+o to expand)
● Bash(uv run python3 -c "
import json…)
⎿ {
"schema_version": "refinement_preflight_result/v1",
"status": "warn",
… +39 lines (ctrl+o to expand)
● Bash(uv run python3 -c "
import json…)
⎿ {
"schema_version": "refinement_loop_planner_input/v1",
"issue": {
… +198 lines (ctrl+o to expand)
● anchor comment の内容を確認。planner decisions を確認します。
● Bash(ls /home/squne/projects/LOOP_PROTOCOL/.claude/artifacts/issue-refinement-loop/895/
2>&1 &&
uv run python3 -c "…)
⎿ planner_input.json
raw_issue_snapshot.json
refinement_preflight_result_v1.json
… +2 lines (ctrl+o to expand)
● Bash(uv run python3 -c "
import json…)
⎿ {
"schema": "repair_issue_contract/v1",
"dry_run": true,
… +7 lines (ctrl+o to expand)
● Bash(uv run python3 .claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py
--input /home/squne/projects/LOOP_PROTOCOL/.claude/artifacts/issue-refin…)
⎿ Error: Exit code 2
{
"schema_version": "refinement_loop_plan/v1",
"source": {
"issue_number": null,
"issue_body_sha256": null,
"comments_sha256": null,
"known_context_sha256": null,
"generated_at": "2026-06-14T01:04:35.476791+00:00"
},
… +39 lines (ctrl+o to expand)
● Bash(uv run python3 .claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py
--help 2>&1 | head -30)
⎿ {
"schema_version": "refinement_loop_plan/v1",
"source": {
… +27 lines (ctrl+o to expand)
● Bash(uv run python3 .claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py
< /home/squne/projects/LOOP_PROTOCOL/.claude/artifacts/issue-refinement-…)
⎿ {
"schema_version": "refinement_loop_plan/v1",
"source": {
… +70 lines (ctrl+o to expand)
● scope_signal_guard が triggered。参照を確認します。
Read 2 files (ctrl+o to expand)
● Bash(uv run python3 -c "
with open('.claude/skills/issue-refinement-loop/references/scope-signal-guard.md') as
f:…)
⎿ # Scope Signal Guard
● investigation_policy.required = true。.github/workflows/ci.yml を調査します。
● Bash(uv run python3 -c "
with open('.github/workflows/ci.yml') as f:…)
⎿ name: ci
● 調査完了。docs/dev/ci-performance.md は未存在、ci.yml の現状を把握。Step 2: Review
を実行します。
● issue-reviewer(Step 2: Review issue #895)
⎿ Done (12 tool uses · 32.2k tokens · 1m 14s)
(ctrl+o to expand)
● needs-fix (4 ブロッカー)。Step 4: Rewrite に進みます。まず pre-author static readiness
check を実行します。
● Bash(gh issue view 895 --repo squne121/loop-protocol --json body -q .body >
/tmp/issue_895_body.md 2>&1 && echo "OK: $(wc -c < /tmp/issue_895_body.md) bytes")
⎿ OK: 4161 bytes
● Bash(uv run python3
.claude/skills/issue-contract-review/scripts/contract_readiness_check.py
--mode preflight-static \…)
⎿ {
"schema": "ISSUE_CONTRACT_READINESS_RESULT_V1",
"status": "go",
… +15 lines (ctrl+o to expand)
● readiness check は go (exit 0)。issue-author SubAgent を起動します。
● issue-author(Step 4: Rewrite issue #895 body)
… +15 lines (ctrl+o to expand)
● readiness check は go (exit 0)。issue-author SubAgent を起動します。
● issue-author(Step 4: Rewrite issue #895 body)
⎿ Done (49 tool uses · 50.5k tokens · 6m 23s)
(ctrl+o to expand)
● 本文更新成功(STATUS: ok)。Step 2 (Review) 2 回目を実行します。
⎿ {
"schema": "ISSUE_CONTRACT_READINESS_RESULT_V1",
"status": "go",
… +15 lines (ctrl+o to expand)
● readiness check は go (exit 0)。issue-author SubAgent を起動します。
● issue-author(Step 4: Rewrite issue #895 body)
⎿ Done (49 tool uses · 50.5k tokens · 6m 23s)
(ctrl+o to expand)
● 本文更新成功(STATUS: ok)。Step 2 (Review) 2 回目を実行します。
● issue-reviewer(Step 2 iteration 2: Review issue #895 after rewrite)
⎿ Done (9 tool uses · 31.5k tokens · 1m 2s)
(ctrl+o to expand)
● まだ needs-fix(残り 1 ブロッカー)。Step 4 iteration 2: Rewrite で残件を修正します。
● Bash(gh issue view 895 --repo squne121/loop-protocol --json body -q .body 2>&1)
⎿ ## Machine-Readable Contract
● 現在の本文を確認。3 つの修正が必要です:
Runtime Verification Applicability に decision: not_applicable フィールド追加
issue-author で残件を修正します。
● issue-author(Step 4 iteration 2: Fix remaining VC issues in issue #895)
⎿ Done (31 tool uses · 36.8k tokens · 3m 7s)
(ctrl+o to expand)
● iteration 2 の rewrite 完了。Step 2 (Review) iteration 3 を実行します。
● issue-reviewer(Step 2 iteration 3: Final review of issue #895)
⎿ Done (10 tool uses · 31.2k tokens · 1m 12s)
(ctrl+o to expand)
● iteration 3 で needs-fix かつ human_judgment_required、iteration 上限(3/3)に到達。Step 5:
Termination (human_escalation) に進みます。
● Bash(uv run python3 -c "
import json, sys…)
⎿ [publish_termination_report] comment posted for issue #895
● Bash(gh issue view 895 --repo squne121/loop-protocol --json url -q .url 2>&1)
⎿ #895
● refinement loop が完了しました。
結果サマリー:
上限到達)
+%s%3N 採用、failure 時 exit status 保持、Design A 採用など)
外 actionlint コマンド除去)
a. AC1/AC7/AC9 の VC が新規作成対象の docs/dev/ci-performance.md
を参照しており、baseline で rg exit 2 → human_judgment 分類(新規ファイル VC
の既知パターン)
b. AC10 pnpm typecheck が baseline で exit 1(現状の typecheck 状態確認、または inline #
baseline-expect: pass アノテーション形式の確認が必要)
c. actionlint VC が baseline でパス → # baseline-expect: pass アノテーション追加が必要
詳細は #895 のコメントを参照してください。
✻ Cooked for 19m 57s · 1 shell still running
※ recap: Issue #895(CI runtime baseline 計測)の refinement loop が完了し、anchor comment
の改善案を Issue 本文に反映済み。残り 3 件の VC 判定問題を人間が確認してください。
(disable recaps in /config)
❯ 結論: まだ実装に入れない方がよいです。
ただし、#895 の仕様本体はほぼ実装可能です。止まっている主因は、Issue の要求仕様ではなく
Verification Commands / refinement-loop 側の baseline 判定設計です。
判定
#895 は現在、CI runtime baseline を
.github/workflows/ci.ymlとdocs/dev/ci-performance.mdで実装する契約になっており、対象 job、artifact、StepSummary、失敗時保持、
date +%s%3N、#898との責務分離まで明記されています。ここは実装仕様として概ね妥当です。
ただし、最終コメントでは loop が
human_escalationで停止しており、残件は次の 3件です。特に
docs/dev/ci-performance.mdは新規作成対象なので baselineでは存在せず、
rgが exit 2 になって human judgment に分類されています。#895 の現在の
docs/dev/ci-performance.mdは実際に未存在です。一方で、
.github/workflows/ci.ymlにはRun actionlintが既に存在するため、rg -c "name: Run actionlint"は baseline で通ります。これをbaseline-expect: passと明示していないことが
VCP_UNEXPECTED_PASSの原因です。なぜ修正が完了しなかったか
主因は 3 つです。
新規ファイル対象 VC に
baseline-expect: failが付いていないdocs/dev/ci-performance.mdは 実装: CI Runtime Baseline を収集し job / step 単位の所要時間を可視化する #895 の成果物として新規作成するファイルです。baselineで存在しないのは正常ですが、現在の loop は
rg docs/dev/ci-performance.mdの exit 2を「期待された fail」ではなく human judgment に倒しています。
baseline-expectの書き方が間違っている実装: CI Runtime Baseline を収集し job / step 単位の所要時間を可視化する #895 の AC10 は
$ pnpm typecheck # baseline-expect: passのような inline注釈になっていますが、現行 parser は
baseline-expectを「コマンド直前のコメント行」から読む設計です。実装では直前行から annotation
を抽出しています。
つまり正しくは次です。
# baseline-expect: pass $ pnpm typecheck既存 pass の VC と実装差分 VC の分類が混ざっている
pnpm typecheckやRun actionlintの存在確認は baseline で通ってよい regressioncheck です。一方、
ci_runtime_baseline_v1やdocs/dev/ci-performance.mdの検索はbaseline では fail すべき implementation delta check です。この区別を全 VC
に明示しないと、loop が unexpected_pass / human_judgment を再発します。実装: baseline-expect VC annotation と deterministic repair pass で issue-refinement-loop 反復失敗を防ぐ #889 はこの問題を
baseline-expect: pass|fail|deferredで解く親 Issue ですが、実装: CI Runtime Baseline を収集し job / step 単位の所要時間を可視化する #895側の本文にはまだ十分反映されていません。
#895 の最小修正
#895 の
Verification Commandsは、最低限こう直すべきです。加えて、#895 本文中の AC3 は
merge_shaも含めるべきです。Required Design Constraintsでは
merge_sha必須と書いていますが、AC3には入っていません。ここは実装者が落としやすいです。
関連 Issue 側の問題
既存の改善 Issue 群を見ると、#900 は LLM rewrite 回数制限、#901 は annotation test の CI
gate 化です。どちらも今回の根本対策に近いです。
ただし #899 はタイトルと本文が食い違っています。タイトルは
baseline_vc_preflight.py に --strict フラグを追加...ですが、本文は #900 と同じ LLM rewrite回数制限の内容になっています。これは改善 Issue として壊れています。
改善 Issue 草案
新規 Issue でもよいですが、最短は #899 の本文をこの内容に差し替えることです。
実装: baseline_vc_preflight.py に --strict フラグと annotation
正規化を追加し、新規ファイル VC の human_escalation を防ぐ
Machine-Readable Contract
Parent Issue
Background
#895 の issue-refinement-loop で、Issue 本文の大部分は修正されたが、最終的に
human_escalation で停止した。
主な原因は以下。
docs/dev/ci-performance.mdを参照する VC が baseline で filenot found / rg exit 2 となり、期待された implementation delta ではなく human_judgment
に分類された。
pnpm typecheck # baseline-expect: passのような inline annotation が使われ、parserが
baseline-expectとして認識できなかった。delta VC の型付けが Issue 本文に不足していた。
Outcome
baseline_vc_preflight.py/contract_readiness_check.py/repair_issue_contract.pyが、baseline-expect annotation の欠落・inline 誤記・新規ファイル VC を deterministic
に検出または修復し、#895 型の Issue が不要に human_escalation しない状態になる。
In Scope
baseline_vc_preflight.pyに--strictフラグを追加するinline
# baseline-expect: pass|fail|deferredを検出し、needs_fix として修正指示を出す新規作成対象 Allowed Path を参照する
rg/test -fVC に対し、baseline-expect: failが欠落している場合は needs_fix にするrepair_issue_contract.pyが以下を deterministic repair する$ pnpm typecheck # baseline-expect: pass→ 直前行# baseline-expect: pass# baseline-expect: failを付与# baseline-expect: passを付与contract_readiness_check.pyが strict mode の結果を structured feedback として返すpytest を追加し、実装: CI Runtime Baseline を収集し job / step 単位の所要時間を可視化する #895 型 fixture で regression を固定する
Out of Scope
baseline-expectgrammar の根本変更Acceptance Criteria
baseline_vc_preflight.pyに--strictが追加されている# baseline-expect: pass|fail|deferredが invalid annotation placementとして検出される
repair_issue_contract.pyが inline baseline-expect を直前行 annotationに正規化できる
baseline-expect: fail欠落を検出できるdocs/dev/ci-performance.mdの baseline 未存在がhuman_judgment ではなく body-author-fixable needs_fix になる
pnpm typecheckは直前行# baseline-expect: passでexpected_pass / go になる
Run actionlintのような既存 pass VC は直前行# baseline-expect: passでexpected_pass / go になる
python-testで通るVerification Commands
decision: not_applicable
reason: "refinement-loop / issue-contract-review の静的検証・pytest 対象。ゲーム runtime
動作には影響しない。"
fix(#895): pytest namespace collision を個別ステップ分割で修正する
fix(#895): actionlint 計測追加・AC3 record 展開・pytest phase_id 統一・upload-ar…
fix(#895): playwright-report / test-results upload-artifact を @v6 に戻す…
implement(#895): CI Runtime Baseline 計測ステップと docs/dev/ci-performance.…
impl(#899): Add --strict flag to baseline_vc_preflight.py for annotat…
impl(#899): Add --strict flag to baseline_vc_preflight.py for annotat…
impl(#899): Add --strict flag to baseline_vc_preflight.py for annotat…
impl(#899): Add --strict flag to baseline_vc_preflight.py for annotat…