From caffc0d40d46a96d01347544995797c2401a8dcb Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sat, 18 Jul 2026 06:07:04 -0700 Subject: [PATCH] fix(dashboard): mock store.getTask for tracking done comments (#2300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Full Suite [29644469846](https://github.com/Runfusion/Fusion/actions/runs/29644469846): shards 1–3 green; shard 4 failed `github-issue-comment` (`this.store.getTask is not a function`). - Tracking Done comments re-read the task for landing-commit metadata; MockStore now implements `getTask` (null → product snapshot fallback). ## Test plan - [x] `github-issue-comment.test.ts` — 33 passed - [ ] Full Suite all 4 shards green on main ## Summary by CodeRabbit * **Tests** * Updated GitHub issue comment test scaffolding to support task lookups during completion handling. * Kept comment-posting assertions deterministic. --- .../dashboard/src/__tests__/github-issue-comment.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/dashboard/src/__tests__/github-issue-comment.test.ts b/packages/dashboard/src/__tests__/github-issue-comment.test.ts index 2d3c8ea985..3e260b7d0b 100644 --- a/packages/dashboard/src/__tests__/github-issue-comment.test.ts +++ b/packages/dashboard/src/__tests__/github-issue-comment.test.ts @@ -26,11 +26,20 @@ vi.mock("../github-auth.js", () => ({ class MockStore extends EventEmitter { private settings: Record; logEntry: Mock; + /* + FNXC:DashboardTests 2026-07-18-12:55: + GitHubTrackingCommentService re-reads the authoritative task via store.getTask on done moves + so Done comments can include a landing commit that was not yet on the task:moved snapshot. + MockStore must implement getTask; returning null keeps the product's snapshot fallback so + comment-posting assertions stay deterministic. + */ + getTask: Mock; constructor(settings: Record) { super(); this.settings = settings; this.logEntry = vi.fn().mockResolvedValue(undefined); + this.getTask = vi.fn().mockResolvedValue(null); } async getSettings(): Promise> {