--- id: TASK-334 title: Assess and address PR 57 latest CodeRabbit comments status: Done assignee: - '@codex' created_date: '2026-05-04 05:03' updated_date: '2026-05-04 05:07' labels: - pr-feedback - coderabbit dependencies: [] references: - 'https://github.com/ksyasuda/SubMiner/pull/57' priority: medium --- ## Description Assess the latest CodeRabbit review on PR #57 submitted 2026-05-04 and fix verified issues. Current scope: AniList post-watch duplicate-write race, known-word cache mutation return value, and manual-mark AniList rejection isolation with regression coverage. ## Acceptance Criteria - [x] #1 Each latest CodeRabbit comment is either fixed or explicitly assessed as not applicable against current code. - [x] #2 Regression tests cover behavior changes where practical. - [x] #3 Relevant focused tests and typecheck pass, or any blocked verification is documented. ## Implementation Plan 1. Verify each latest CodeRabbit finding against current code. 2. Update known-word cache append return semantics so cache clears are reported as mutations when state existed. 3. Acquire AniList post-watch in-flight before async gating and release in finally. 4. Isolate manual-mark AniList callback failures in IPC and add a rejection-path regression test. 5. Run focused tests for touched areas plus typecheck; document any blocked verification. ## Implementation Notes Verified latest CodeRabbit review submitted 2026-05-04 on PR #57. Fixed all three current items: known-word cache mutation return after cache reset, AniList post-watch concurrent in-flight race, and manual watched mark isolation from AniList callback failures. Added regression tests for each path and a changelog fragment. ## Final Summary Fixed latest PR #57 CodeRabbit feedback by reporting known-word cache clears as mutations during immediate append, acquiring AniList post-watch in-flight before awaited gates to prevent duplicate writes, and isolating manual watched mark success from AniList post-watch callback failures. Added focused regression coverage in known-word cache, AniList post-watch, and IPC tests, plus a changelog fragment. Verification: bun test src/anki-integration/known-word-cache.test.ts; bun test src/main/runtime/anilist-post-watch.test.ts; bun test src/core/services/ipc.test.ts; bun run typecheck; bun run format:check:src; bun run changelog:lint; bun run test:fast; bun run test:env; bun run build; bun run test:smoke:dist.