From aa33aa1ecb7d9cd86cb76d4e7447dbd0caa82c64 Mon Sep 17 00:00:00 2001 From: Walt Date: Mon, 22 Jun 2026 12:56:15 +0800 Subject: [PATCH] test(issues): use a valid anchor in the handoff count-exclusion test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CountNewCommentsSince filters id <> @anchor_id; SQL id <> NULL is NULL and excludes every row, so an empty anchor made the control assertion read 0. The production caller always passes a real anchor — mirror that with a non-matching sentinel uuid. Co-Authored-By: Claude Opus 4.8 Co-authored-by: multica-agent --- server/internal/handler/handoff_count_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/internal/handler/handoff_count_test.go b/server/internal/handler/handoff_count_test.go index d0d307171..cb19d225f 100644 --- a/server/internal/handler/handoff_count_test.go +++ b/server/internal/handler/handoff_count_test.go @@ -26,8 +26,11 @@ func TestHandoffRecordExcludedFromNewCommentCount(t *testing.T) { IssueID: issueUUID, WorkspaceID: wsUUID, Since: since, - AnchorID: pgtype.UUID{}, // no anchor to exclude - AuthorID: parseUUID(agentID), + // A valid anchor that matches no real comment id. The query uses + // `id <> @anchor_id`, and SQL `id <> NULL` is NULL (excludes every row), + // so the production caller always passes a real anchor — mirror that. + AnchorID: parseUUID("00000000-0000-0000-0000-000000000001"), + AuthorID: parseUUID(agentID), } // A normal member comment is counted.