fix(autopilot): sticky コメントのマーカー統一で重複投稿を防ぐ (#809)#810
Merged
Conversation
daemon の sticky upsert は正準マーカー autopilot-sticky-status と旧マーカー autopilot:sticky の両方にマッチし、既存 sticky を in-place 更新する。複数検出 時は先頭を残して残りを削除し 1 つに集約する。検出は純粋関数 isStickyComment / selectStickyCommentIds に切り出し unit test を追加。renderSticky はコントラクト 仕様の正準マーカーを出力するよう統一した。 Closes #809 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
🤖 autopilot status
Linked issue #809. Maintained by autopilot (single writer); do not edit. |
Author
🤖 autopilot 敵対的レビュー結果別レビュアー視点で差分を検証しました。自動修正が必要な明白な問題はなし。人間レビューへ渡します。 確認した観点と結果
軽微な指摘(非ブロッカー・対応不要)
LGTM。 |
takaokouji
approved these changes
Jun 28, 2026
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
PR #761(甲子園 Epic)で autopilot status sticky が 2 つ投稿された不具合を修正する。
原因は sticky コメントの識別マーカーが 2 種類に分裂していたこと:
<!-- autopilot-sticky-status -->(コントラクトdocs/autopilot/autonomous-contract.md§2/§7 の正準マーカー)<!-- autopilot:sticky -->(daemon feat(autopilot): daemon が PR ラベル/Draft/sticky を自動同期 #794 の PR 同期実装が使っていたマーカー)daemon が既存 sticky を自分のマーカーでしか検索しないため、別マーカーの既存 sticky を
見つけられず新規投稿し、重複していた。
Changes Made
autopilot-sticky-statusに統一(実装を spec に合わせる)。renderStickyは正準マーカーのみを出力する。autopilot:stickyは legacy として検出対象に残し、両マーカーにマッチさせて既存 sticky を in-place 更新する(
STICKY_MARKERS/isStickyComment/selectStickyCommentIds)。upsertStickyCommentを、両マーカーで検出 → 複数あれば先頭を PATCH・残りを DELETE して1 つに集約する実装に変更(重複を作らない・既存を吸収)。
listIssueComments(@base64 経由で改行安全)に切り出した。Test Coverage
isStickyComment/selectStickyCommentIdsが両マーカーにマッチする unit test を追加。STICKY_MARKERが正準マーカーであること、renderStickyが legacy を出力しないことを検証。node --test: 75 passed / 0 failed。Related Issues
Closes #809
🤖 Generated with Claude Code