test(issues): use a valid anchor in the handoff count-exclusion test

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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
Walt
2026-06-22 12:56:15 +08:00
parent d8289aa0e4
commit aa33aa1ecb

View File

@@ -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.