check-pr
Analyzes GitHub/GitLab/Perforce PRs/MRs/CLs for review comments, failed checks, and incomplete descriptions to prepare changes for submission.
Pass rate with the skill minus without, same tasks, same model.
- Content Lift forced arm
- 0pp [−38, +38]
- Trigger rate
- 100%
- Trials
- 24 · 8 tasks
- Model
- GLM-5.3-flash
- Measured
- 2026-10-15
Content Lift = the skill's instructions injected into the system prompt, so it measures what the content does once loaded, apart from whether the agent chooses to load it. Method →
Embed this score · live badge for your README
The badge shows the real benchmark number and updates itself when we re-bench — including the honest states (“did not trigger”, “not benched yet”). All badge options →
[](https://skillzbench.com/skills/check-pr)[](https://skillzbench.com/skills/check-pr)<a href="https://skillzbench.com/skills/check-pr"><img src="https://skillzbench.com/api/badge/check-pr.svg" alt="SkillzBench benchmark" height="20"></a>A/B outputs — median trial per arm
Chat harness (v2): the agent's final message without the skill (left) vs with it (right).
check-pr--m1
Here's what to fix before merging PR #42:
Review comments (1 unresolved)
- @alice: Replace
get()withOptional.ofNullableinAvatarService— address this and reply to the comment.
Failing CI checks (1)
lint: Remove the unused importjava.util.ListinAvatarService.java, then re-run checks.
Body gaps
- The body ("Adds avatar endpoint.") is too thin. Add:
- What the endpoint does (route, method, request/response shape)
- Why it's needed / linked issue
- Testing notes (how it was verified)
- Any auth/permissions considerations for the avatar data
Suggested order: fix lint → apply Alice's Optional change → expand the PR description → push, confirm all checks pass, and get Alice's approval before merging.
Here's the review summary for PR #42 "Add user avatar endpoint":
| Area | Issue | Status | Action Needed |
|---|---|---|---|
| Status Checks | lint failed — "Unused import java.util.List in AvatarService.java" | ❌ Failing | Remove the unused import |
| Status Checks | tests | ✅ Passed | None |
| Review | @alice: "Please use Optional.ofNullable instead of get() in AvatarService" | Actionable | Refactor to Optional.ofNullable(...) in AvatarService |
| Description | Body is just "Adds avatar endpoint." | Gap | Expand it (see below) |
What to fix before merging:
- Fix the failing lint check — remove the unused
import java.util.List;fromAvatarService.java. This is blocking CI. - Address @alice's review comment — replace the
.get()call inAvatarServicewithOptional.ofNullable(...)(e.g.,Optional.ofNullable(user).map(User::getAvatar)), which avoids a rawget()on a possibly-empty Optional and is safer. Reply to/resolve her thread once done. - Flesh out the PR body — currently it's too thin. Add:
- What/why: what the avatar endpoint does, why it's needed
- API details: route, method, request/response shape, auth requirements
- Testing: how it was tested (unit/integration tests, manual verification)
- Any screenshots or example responses if applicable
Once the lint failure is fixed, Alice's comment is addressed, and the description is expanded, the PR should be ready to merge. Want me to help draft the fixes or the updated PR description?
check-pr--m2
I can't actually inspect the MR directly (no GitLab access is enabled here), but based on everything you've shared, here's a clear action plan for MR !123:
Issues to address
1. Failing test — PaymentServiceTest.testRefund: expected 100 but got 99
This is a real functional bug, likely the same rounding issue @qa flagged. A refund of some amount is being truncated/rounded down (e.g., 99.999 → 99).
2. @qa: Use BigDecimal, not double
This is the root-cause fix for the test failure. In the payment service:
// Before
double refund = amount * 0.99; // floating-point drift
// After
BigDecimal refund = amount.multiply(rate)
.setScale(2, RoundingMode.HALF_UP);
Avoid double/float for money entirely; use BigDecimal (or integer minor units, e.g., cents). Update testRefund to assert with assertEquals(0, expected.compareTo(actual)) since BigDecimal.equals is scale-sensitive.
3. @devops: Add a changelog entry
Add to your changelog (e.g., CHANGELOG.md):
### Changed
- Refund calculation now uses BigDecimal with HALF_UP rounding to 2 decimal places (#45)
4. @lead: Add linked issue context
The body says Closes #45, but the reviewer wants the issue description context in the MR itself. Either:
- Expand the MR description with a summary of #45 (what the refund bug is, why the refactor is needed, scope of changes), or
- If #45 has no description, write one and link it.
Suggested commit checklist
- Replace
doublerefund math withBigDecimal+RoundingMode.HALF_UP - Fix/verify
testRefundpasses (expected 100) - Add changelog entry referencing #45
- Expand MR description with issue context
- Re-run pipeline; confirm test stage is green
If you paste the relevant refund method and test code, I can write the exact fix for you.
MR !123 — "Refactor payment service" — Findings
| Area | Issue | Status | Action Needed |
|---|---|---|---|
| Pipeline | PaymentServiceTest.testRefund failed: expected 100, got 99 | ❌ Failing | Fix refund rounding (likely truncation vs. rounding) |
| Review | @qa: use BigDecimal, not double, for refund rounding | Actionable | Refactor refund calculation to BigDecimal |
| Review | @devops: add changelog entry for refund rounding change | Actionable | Add entry to CHANGELOG.md |
| Review | @lead: no linked issue description/context | Actionable | Expand MR body beyond Closes #45 |
| Description | Body is only 'Closes #45' | Actionable | Add summary, rationale, testing notes |
Suggested fixes
1. Fix the failing test + @qa's BigDecimal feedback (same root cause):
// Before (double — causes 99 due to floating-point truncation)
double refund = amount * refundRate; // e.g. 0.99 * 100.0 -> 98.99999...
// After
import java.math.BigDecimal;
import java.math.RoundingMode;
private static final BigDecimal REFUND_RATE = new BigDecimal("0.99");
public BigDecimal calculateRefund(BigDecimal amount) {
return amount.multiply(REFUND_RATE)
.setScale(2, RoundingMode.HALF_UP); // 100 * 0.99 -> 99.00
}
Key points: construct BigDecimal from a String (never double), and pick an explicit RoundingMode — HALF_UP gives the "expected 100" behavior if the test expects rounding up, or use HALF_EVEN if the test expects banker's rounding. Check the test's exact expectation before choosing.
2. Changelog entry (Keep a Changelog style):
## [Unreleased]
### Fixed
- Refund calculation now uses `BigDecimal` with `HALF_UP` rounding to avoid
floating-point precision loss in refund amounts. (#45)
3. Improved MR body:
## Summary
Refactors the payment service refund logic to use `BigDecimal` instead of
`double`, eliminating floating-point rounding errors in refund amounts.
## Changes
- Replace `double` refund math with `BigDecimal` (`RoundingMode.HALF_UP`, scale 2)
- Update `PaymentServiceTest` expectations accordingly
## Testing
- `PaymentServiceTest.testRefund` now passes (refund of 100 at 0.99 rate → 99.00)
Closes #45
Next steps
- Apply the
BigDecimalchange and confirmtestRefundpasses locally. - Add the changelog entry.
- Update the MR body with the template above.
- Commit and push (
git commit -m "Use BigDecimal for refund rounding; add changelog and MR context"), then reply on each thread and resolve them once addressed.
Want me to draft the exact code diff if you share the current PaymentService refund method?
check-pr--m3
Here's a review of your CL 12345:
Failing Checks
- spellcheck: failed — flagged
timeout. This is likely a false positive; "timeout" is standard technical usage (and your description "Fix login timeout" is fine). You can dismiss it or note it in the review, unless your team style guide prefers "time-out."
Review Comments to Address
- Use
std::chrono::secondsinstead of raw int for timeout — refactor the timeout parameter/constant inlogin.cpptostd::chrono::seconds(orstd::chrono::duration). This is a substantive code change; make it before re-review. - Add a test for the 30s timeout boundary — add a case in
login_test.cppcovering the exact 30-second boundary (e.g., expires at 30s, still valid just under 30s).
Description Gaps
- "Fix login timeout" is terse. Consider expanding: what was broken (e.g., "Login session expired prematurely / timeout was never applied"), and mention the fix approach.
- No mention of the test added — reviewers like seeing that noted.
- Optionally reference the Swarm review or bug ticket ID if one exists.
Suggested Next Steps
- Refactor to
std::chrono::seconds. - Add the 30s boundary test.
- Expand the description, e.g.:
"Fix login timeout: session timeout was not enforced correctly. Switched to std::chrono::seconds and added a 30s boundary test."
- Dismiss/annotate the spellcheck warning as a false positive.
- Re-run checks and update the Swarm review.
CL 12345 Review Summary — "Fix login timeout"
| Area | Issue | Status | Action Needed |
|---|---|---|---|
| Automated checks | build | ✅ Passed | None |
| Automated checks | test | ✅ Passed | None |
| Automated checks | spellcheck | ❌ Failed | Fix "timeout" → "time-out" (or add to allowlist) |
| Review comment | Use std::chrono::seconds instead of raw int for timeout | Actionable | Refactor timeout parameter in login.cpp |
| Review comment | Add a test for the 30s timeout boundary | Actionable | Add boundary test in login_test.cpp |
| Description | Missing testing notes / rationale | Actionable | Expand description |
Details
1. Failing check — spellcheck The only failing automated check. Either change "timeout" to "time-out" in the description/comments, or if "timeout" is the correct term for your codebase (it's standard in C++ contexts), add it to the spellcheck allowlist so the check passes.
2. Unaddressed review comments (2)
std::chrono::secondsrefactor — replace the rawinttimeout inlogin.cppwithstd::chrono::seconds. This is a type-safety improvement; do it before submitting.- 30s boundary test —
login_test.cppis already in the CL, so add a test that verifies behavior exactly at the 30-second timeout boundary (e.g., a request completing at 29.9s succeeds, at 30.0s+ times out).
3. Description gaps "Fix login timeout" is too terse. A complete Perforce CL description should include:
- What/why: e.g., "Login was timing out prematurely due to X; increase/fix the timeout handling."
- Testing notes: mention that build and test checks pass, and note the new boundary test once added.
Suggested next steps
- Refactor timeout to
std::chrono::secondsinlogin.cpp. - Add the 30s boundary test to
login_test.cpp. - Resolve the spellcheck failure (word change or allowlist).
- Expand the description with rationale and testing notes.
- Re-shelve:
p4 shelve -f -c 12345, then reply to the Swarm comments marking them addressed.
Want me to draft the code changes for the std::chrono::seconds refactor and the boundary test?
check-pr--m4
Here's a review of PR #987 and what to do before merging:
✅ What's in good shape
- Build check passes.
- Resolved feedback handled: Sarah's "remove debug print" and Mike's "use a constant for the default timeout" are marked resolved — nice work addressing those.
🔴 Blockers to fix before merge
1. Failing CI — unit-tests
TestSessionTimeout.testDefaultTimeout timed out after 10s- This is a hard blocker. Likely causes:
- The test waits on real time instead of a mocked clock (a 5-minute timeout test would obviously exceed a 10s limit — mock the timer/clock).
- Or the timeout logic itself is hanging (e.g., blocking call that never fires).
- Fix the test (or the code), then re-run CI until green.
2. Unresolved review comments (active)
- @sarah — "Can we make the timeout configurable per environment?" → Add a config option (e.g.,
SESSION_TIMEOUTenv var or per-environment config entry) with the 5-minute value as the default. This pairs well with Mike's earlier "use a constant" suggestion: defineDEFAULT_TIMEOUT = 5 * 60and let config override it. - @mike — "Please add a test for the 5-minute timeout." → Add a test covering the 5-minute timeout path (using a mocked clock so it runs fast). This may also be related to the failing test.
📝 Housekeeping
- Link the issue: Body says
Fixes #88— good, that will auto-close the issue on merge. Just confirm #88 is the right issue for "session timeout config." - Title: Consider making it more descriptive, e.g., "Add configurable per-environment session timeout (default 5 min)" — especially if you implement Sarah's suggestion.
Suggested order of work
- Make timeout configurable per environment (Sarah's comment).
- Add the 5-minute timeout test with a mocked clock (Mike's comment) — this likely fixes the failing CI too.
- Push, confirm all checks green and both comments resolved.
- Request re-review from Sarah and Mike, then merge.
Want help drafting the config change or the mocked-clock test?
PR #987 Review Summary — "Add session timeout config"
| Area | Issue | Status | Action Needed |
|---|---|---|---|
| CI | unit-tests failed — TestSessionTimeout.testDefaultTimeout timed out after 10s | ❌ Failing | Fix flaky/hanging test (see below) |
| CI | build | ✅ Passed | None |
| Review | "Make timeout configurable per environment" — @sarah | 🔧 Actionable | Add env-based config (e.g., SESSION_TIMEOUT env var or per-env config file) |
| Review | "Add a test for the 5-minute timeout" — @mike | 🔧 Actionable | Add test case covering the 300s timeout path |
| Review | "Remove debug print" — @sarah | ✅ Resolved | None |
| Review | "Use a constant for default timeout" — @mike | ✅ Resolved | None |
| Description | Body is just "Fixes #88" | ⚠️ Thin | Add summary, what changed, and how it was tested |
Recommended steps to get merge-ready
-
Fix the failing test first.
testDefaultTimeouttiming out after 10s usually means the test is waiting on real time or a real session rather than a mocked clock. Suggested fixes:- Inject a fake clock / patch
time.sleepor the timeout mechanism. - Assert on the configured value rather than actually waiting for expiry.
- If the default timeout is 5 minutes, the test should never wait real seconds for it.
- Inject a fake clock / patch
-
Address @sarah's comment — make the timeout per-environment:
DEFAULT_SESSION_TIMEOUT = 300 # seconds SESSION_TIMEOUT = int(os.environ.get("SESSION_TIMEOUT", DEFAULT_SESSION_TIMEOUT))(or wire it into your existing config system per environment).
-
Address @mike's comment — add a test like:
def testFiveMinuteTimeout(self): with patch.dict(os.environ, {"SESSION_TIMEOUT": "300"}): self.assertEqual(get_session_timeout(), 300) -
Improve the PR body, e.g.:
Adds configurable session timeout. Defaults to 5 minutes (
DEFAULT_SESSION_TIMEOUT), overridable per environment viaSESSION_TIMEOUT. Fixes #88.Testing: added unit tests for default and 5-minute timeout; fixed flaky
testDefaultTimeoutby mocking the clock. -
Push the fixes, confirm
unit-testsgoes green, then reply/resolve Sarah's and Mike's threads so the PR shows no open review comments.
Want me to draft the exact code changes and updated PR description text for you?
check-pr--m5
Here's my review of PR #123 ("Add rate limiting to API"):
Overall
The PR is in decent shape — CI is green — but it's not ready to merge yet.
Needs attention
1. Unresolved review comment (blocking)
- @alice requested: "Please add a test for the 429 response."
- This is unresolved and is a legitimate gap: a rate-limiting feature should be tested for its core behavior (returning 429 when the limit is exceeded). Add that test, then resolve the thread.
2. Description gaps
- The body ("Closes #12. Adds rate limiting.") is too thin for a feature like this. It should explain:
- What limits are applied (per-user? per-IP? per-endpoint?)
- How (algorithm — token bucket, sliding window? middleware? which library?)
- Configuration (limit values, where they're set, env vars)
- Behavior details (429 response format,
Retry-Afterheader, rate-limit headers likeX-RateLimit-*) - Any rollout/migration notes or performance considerations
3. Checks
- No failing checks — CI / build and CI / test are both passing. ✅
Suggested next steps
- Add the 429 test and resolve @alice's comment.
- Expand the PR description with the details above.
- Request re-review from @alice before merging.
PR #123 Review Summary — "Add rate limiting to API"
| Area | Issue | Status | Action Needed |
|---|---|---|---|
| Status Checks | CI / build | ✅ Passing | None |
| Status Checks | CI / test | ✅ Passing | None |
| Review | "Please add a test for the 429 response." — @alice (unresolved) | ⚠️ Actionable | Add a test covering the 429 rate-limit response, then push and ask alice to re-review/resolve |
| Description | Body is minimal: "Closes #12. Adds rate limiting." | ⚠️ Actionable | Expand the description |
Details
1. Unresolved review comment (blocking for merge)
- @alice requested a test for the 429 (Too Many Requests) response. This is the only open thread and should be addressed before merge — especially important for a rate-limiting feature, where 429 behavior (status code, headers like
Retry-After, body shape) is the core contract.
2. Description gaps
- The body doesn't explain:
- What rate limiting approach is used (e.g., token bucket, fixed window, per-IP/per-user?)
- Where limits are enforced (middleware? per-endpoint?)
- How it was tested — worth noting once the 429 test is added
- Any config/env variables or default limits introduced
- Good: it links the issue via
Closes #12, so traceability is fine.
3. Checks
- Both CI checks (build, test) are passing — no action needed.
Recommended next steps
- Add a test asserting the API returns 429 when the limit is exceeded (and ideally that
Retry-After/rate-limit headers are present, if applicable). - Expand the PR description with the approach, scope, and testing notes.
- Push the changes, then reply to @alice and resolve the thread.
- Results are for the SkillzBench reference agent on GLM-5.3-flash. Switch models above — a skill can help one model and not another.
- Screen tier (1 trial per arm) is directional. Verified needs a full-tier run (≥ 8 tasks, ≥ 3 trials per arm) with the CI excluding zero.
- Task coverage: 8 generated tasks for this skill's category; a skill can shine elsewhere.