EPMRPP-113709 || Introduce the retry_of property for JS agents#264
EPMRPP-113709 || Introduce the retry_of property for JS agents#264maria-hambardzumian wants to merge 2 commits into
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Walkthrough
ChangesRetry payload linking
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
c50c914 to
d9e480f
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
__tests__/report-portal-client.spec.js (1)
882-977: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTests are correct and cover the three key scenarios well.
The assertions properly verify
retry_ofinclusion whenretry: truewith a prior entry, and omission in the other two cases. The use ofexpect.objectContaining/expect.not.objectContainingis appropriate for partial payload matching.Two optional improvements to consider:
Setup duplication: All three tests repeat the RPClient construction,
client.mapsetup, andjest.spyOnmocking. Extracting these into a shared helper orbeforeEachwould reduce maintenance burden if the setup needs to change.Missing edge case: No test covers the scenario where the prior attempt's promise resolves without an
idfield (e.g.,Promise.resolve({})). The code at line 572 handles this viaprevResponse?.id, but it's untested.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@__tests__/report-portal-client.spec.js` around lines 882 - 977, Reduce repeated RPClient setup across the three startTestItem retry tests by moving shared construction, client.map initialization, and spies into beforeEach or a local helper. Add a test covering a previous retry promise resolving without an id, and verify startTestItem omits retry_of when the previous response lacks that field, exercising the prevResponse?.id handling.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@__tests__/report-portal-client.spec.js`:
- Around line 882-977: Reduce repeated RPClient setup across the three
startTestItem retry tests by moving shared construction, client.map
initialization, and spies into beforeEach or a local helper. Add a test covering
a previous retry promise resolving without an id, and verify startTestItem omits
retry_of when the previous response lacks that field, exercising the
prevResponse?.id handling.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8678b439-d65e-4137-96d1-3ef56e9785a2
📒 Files selected for processing (4)
CHANGELOG.md__tests__/report-portal-client.spec.jsindex.d.tslib/report-portal-client.js
Summary by CodeRabbit