Skip to content

EPMRPP-113709 || Introduce the retry_of property for JS agents#264

Open
maria-hambardzumian wants to merge 2 commits into
developfrom
feat/EPMRPP-113709
Open

EPMRPP-113709 || Introduce the retry_of property for JS agents#264
maria-hambardzumian wants to merge 2 commits into
developfrom
feat/EPMRPP-113709

Conversation

@maria-hambardzumian

@maria-hambardzumian maria-hambardzumian commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Retry requests now automatically link to the immediately preceding attempt when available, improving retry-chain tracking and query performance.
    • Added options for marking test items as retries and referencing a previous attempt.
  • Documentation
    • Updated API documentation to explain automatic retry linking and supported retry options.
  • Tests
    • Added coverage for retry linking, missing previous attempts, and non-retry scenarios.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@AmsterGet, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f3b53425-c222-498a-9854-788c69ca3272

📥 Commits

Reviewing files that changed from the base of the PR and between d9e480f and 5fc6c5e.

📒 Files selected for processing (1)
  • index.d.ts

Walkthrough

startTestItem now automatically includes the previous retry item’s UUID as retry_of when applicable. Type declarations, tests, and the changelog document and verify the updated payload behavior.

Changes

Retry payload linking

Layer / File(s) Summary
Retry contract and payload propagation
index.d.ts, lib/report-portal-client.js
Adds optional retry fields to StartTestItemOptions and populates retry_of from the previous response during retry starts.
Retry payload validation
__tests__/report-portal-client.spec.js, CHANGELOG.md
Tests inclusion and omission conditions for retry_of, and documents the automatic payload behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: amsterget

Poem

A rabbit hops through retry’s chain,
Linking old attempts like drops of rain.
A UUID tucked in payload bright,
Tests guard the path both day and night.
“No prior hop?” No link is shown! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding the retry_of property for JS agents.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/EPMRPP-113709

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@maria-hambardzumian

maria-hambardzumian commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@maria-hambardzumian
maria-hambardzumian deleted the feat/EPMRPP-113709 branch June 4, 2026 01:22
@AmsterGet
AmsterGet restored the feat/EPMRPP-113709 branch July 13, 2026 09:09
@AmsterGet AmsterGet reopened this Jul 13, 2026
@AmsterGet AmsterGet self-assigned this Jul 13, 2026
@AmsterGet AmsterGet added the ai-workflow Generated by ai-workflow pipeline label Jul 13, 2026
@AmsterGet AmsterGet changed the title [EPMRPP-113709] [AGENT] Introduce the retry_of property for JS agents (ai) EPMRPP-113709 || Introduce the retry_of property for JS agents Jul 13, 2026
@AmsterGet
AmsterGet force-pushed the feat/EPMRPP-113709 branch from c50c914 to d9e480f Compare July 13, 2026 10:49

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
__tests__/report-portal-client.spec.js (1)

882-977: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Tests are correct and cover the three key scenarios well.

The assertions properly verify retry_of inclusion when retry: true with a prior entry, and omission in the other two cases. The use of expect.objectContaining / expect.not.objectContaining is appropriate for partial payload matching.

Two optional improvements to consider:

  1. Setup duplication: All three tests repeat the RPClient construction, client.map setup, and jest.spyOn mocking. Extracting these into a shared helper or beforeEach would reduce maintenance burden if the setup needs to change.

  2. Missing edge case: No test covers the scenario where the prior attempt's promise resolves without an id field (e.g., Promise.resolve({})). The code at line 572 handles this via prevResponse?.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

📥 Commits

Reviewing files that changed from the base of the PR and between 97b9c82 and d9e480f.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • __tests__/report-portal-client.spec.js
  • index.d.ts
  • lib/report-portal-client.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-workflow Generated by ai-workflow pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants