fix(agents): stabilize flaky API tests — readLiveRunsQueryInt NaN guard + annotation wake determinism #187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/claude-fix-flaky-issue-list-limit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thinking Path
Linked Issues or Issue Description
Переоткрытие вместо закрытого #172 (flaky-тесты
Agents CI / API Tests, тот же корень проблемы).What Changed
readLiveRunsQueryInt: заменёнMath.min(undefined - max, parsed)(даёт NaN под mock-isolation) на defensiveNumber.isFinite(max)guard.queueAnnotationCommentWakeup(fire-and-forget после ответа), тест обновлён наexpect+vi.waitFor+mockClear.Verification
pnpm exec vitest runдля затронутых файлов: guard-тест 3/3, annotation wake-тест 6/6 в двух последовательных прогонах (детерминированность подтверждена повтором).pnpm typecheck(pre-push) — 0 ошибок.costs-DB) не относится к этому PR, не устраняется в его рамках.Risks
Низкий риск: изменения ограничены defensive guard и детерминизацией существующего теста, поведение production-кода не меняется вне обработки edge-case NaN.
Model Used
Claude (claude-sonnet-4-6), Claude Code CLI, tool use (Bash/Edit/Read), без extended thinking режима.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template#NNN/github.com/paperclipai/paperclipURLs)✅ All checks passing — ready for review and maintainer approval.
— paperclip-gates