fix: getBuildId & failedTestIds mcp tool#323
Conversation
SavioBS629
left a comment
There was a problem hiding this comment.
Claude Code Review (automated) — 1 inline finding(s). Full report in the PR comment below. Verdict: Passed.
Claude Code PR ReviewPR: #323 • Head: 35b9a51 • Reviewers: stack:code-review SummaryTwo RCA-agent utility bug fixes: Review Table
Findings
Pre-existing (not introduced here, not blocking)
Verdict: PASS — two reasonable bug fixes, no Critical/High issues; add test coverage for |
SavioBS629
left a comment
There was a problem hiding this comment.
Claude Code Review (automated) — 2 inline finding(s). Full report in the PR comment below. Verdict: Passed.
| } | ||
| } | ||
|
|
||
| if (!data?.pagination?.has_next || !data.pagination.next_page) { |
There was a problem hiding this comment.
[Medium] Newest builds can be silently missed when a window exceeds the page cap
Pages are oldest-first and next_page walks forward toward newer builds; tail keeps only the last limit. If a window exceeds MAX_PAGES_PER_WINDOW (60) pages, the loop breaks mid-window and returns builds from the middle — not the newest at the window's end. The outer loop then sees collected.length >= limit and stops, silently returning stale builds. Only triggers if a build name runs >~600 times inside the narrowest 2-day window, so impact is low — but it's a silent-correctness gap.
Suggestion: If the cap is hit while has_next is still true, reach the newest page (descending sort or smaller window) or surface that results may be incomplete, rather than returning the middle of the window.
Reviewer: stack:code-review
|
|
||
| for (const build of data?.builds ?? []) { | ||
| if (build.build_id) { | ||
| tail.push({ |
There was a problem hiding this comment.
[Low] Required BuildSummary fields sourced from untyped JSON
build_number/status/started_at are typed required, but they come from response.json() (any) and only build.build_id is null-checked. A build missing those fields yields undefined in a non-optional field — no crash (output is JSON-stringified), but the type is dishonest.
Suggestion: Mark these fields optional, or default them when mapping.
Reviewer: stack:code-review
Claude Code PR ReviewPR: #323 • Head: cb612fc • Reviewers: stack:code-review SummaryAdds a new Review Table
Findings
Notes (not blocking)
Verdict: PASS — no Critical/High issues; build, type-check, and tests pass. The page-cap silent edge case (#1) is the only correctness item worth a follow-up guard. |
No description provided.