Repository navigation
feat(local-agent-loop): 系列の止まった run を demo archive --series でまとめてアーカイブする - #295
Merged
Merged
Conversation
Refs #294 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuLK93sm6yjP1bMjmdQwMc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuLK93sm6yjP1bMjmdQwMc
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuLK93sm6yjP1bMjmdQwMc
…警告に限る Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuLK93sm6yjP1bMjmdQwMc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
demo archive --series <runId>を追加し、指定した run が属する系列(task: 最初の run とその下の修正 run すべて)の止まった run を 1 回の操作でアーカイブできるようにした。demo statusのテキスト表示は、各 task のブロックに未アーカイブの停止件数と、そのまま貼れるdemo archive --series <最初の run の ID>を出す。Closes #294
Changes
src/actions.ts:archiveSeriesを追加。系列の判定は既存のrepairParentId(repairOfラベル → 保存済み入力)とtaskRunIdsを使い、archivableが認める停止 run だけに既存のarchiveRunを古い順に適用する。判断待ち・実行中・納品済みの run はエラーにせず残す。アーカイブ済みの停止にもarchiveRunを回すので、worktree の片付けの再試行も系列単位でできる。1 件が失敗しても残りは続け、失敗した run を ID 付きで返す。src/cli.ts:archive --series(--runと排他、--delete-branchは各 run に既存規則で適用)、statusのstops:行、使い方。--runの挙動と出力は従来どおり。Task型、status --format json、web UI の/api/runsは変えていない。web UI に系列アーカイブのボタンは足していない(archiveSeriesは actions.ts にあるので後から足せる)。判断: 自動除外ではなく、まとめてアーカイブ
「最後の run が承認・納品された系列の停止を、最初から数えない」案は採らなかった。ADR-0028 で、停止した run の worktree の削除と
demo pruneの対象判定はアーカイブ(人が確認を終えた合図)に結び付いている。自動で数えなくすると、worktree が残ったまま prune にも status にも出ない run ができる。途中の run だけを残したい場合(受け入れ基準 2)にも、自動除外では個別に残せない。納品済みの系列に限って--seriesを許す案も、放棄した系列や修理中の系列の停止にも同じ片付けが要るため採らなかった。どちらも ADR-0033 に記録した。進めた工程
spec-implement-accept: 仕様草案 → 仕様レビュー(APPROVE)→ 実装 → 受け入れ検査(APPROVE)→ simplify → 最終確認(COMPLETE)→ ドキュメント確認(追加変更なし)。
Test plan
--seriesに渡しても、同じ task の停止 run がすべてアーカイブされる(tests/cli-config.test.tsのarchive --series)--delete-branchの有無でブランチ削除が既存規則どおりに分かれる--seriesと--runの同時指定、両方の省略、--seriesの値なし、存在しない ID は失敗するarchive --runは従来どおり 1 件だけを扱い、停止以外を拒否するstatusのstops:行に未アーカイブの停止件数(置き換え済みを含み、アーカイブ済みを含まない)と--series <最初の run>が出るstatus --format jsonの task と run のキーは変わらないpnpm validateが通る(local-agent-loop 610 件 pass、turbo 32/32)Review gate
GO。最終レビューの head は 218d942。全チェックの pass を確かめてから mark-ready.sh で Ready にした。
archiveSeriesがdiagnoseを per-run の try の外で呼んでいたため、1 件の診断が失敗すると残りの停止 run を処理しなかった(ADR-0033 と矛盾)pnpm validate: 218d942 で exit 0(local-agent-loop 610/610、turbo 32/32)git_info_failで失敗していた(Vercel が git 情報を取れず、ビルド前に失敗)。この head では再現していないui/server.tsのlineageOfと同じ手順を繰り返している。停止 run をarchiveRunの中でもう一度診断している(競合の防止も兼ねる)。毎回すべての run を読んでいるstops:行も出ない(既存の表示規則で、ADR-0033 でも維持)Base: main@82d2a849aca64b5f13f1ef5717cb6517a5719acb
Head: 218d942
Generated with spec-implement-accept skill
🤖 Generated with Claude Code
https://claude.ai/code/session_01DuLK93sm6yjP1bMjmdQwMc