Skip to content

[AREV-314] (ignore) incremental review test demo github prod#1884

Open
mchun2288 wants to merge 4 commits into
mainfrom
incrementaltest-new
Open

[AREV-314] (ignore) incremental review test demo github prod#1884
mchun2288 wants to merge 4 commits into
mainfrom
incrementaltest-new

Conversation

@mchun2288

@mchun2288 mchun2288 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

ignore. unrelated to atlascode dev


Rovo Dev code review: Rovo Dev has reviewed this pull request
Any suggestions or improvements have been posted as pull request comments.

Comment thread src/incrementaltest.py
Comment thread src/incrementaltest.py Outdated
@atlassian

atlassian Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The issue is ready for review.

Code Reviewer could not determine whether the following acceptance criteria have been met:

  • When fromCommit and toCommit are provided, call GET /2.0/repositories/{workspace}/{repo}/commits?include={toCommit}&exclude={fromCommit} to list all commits in the range with pagination handled.
  • Filter commits to non-merge commits only (parents.size == 1).
  • If no non-merge commits exist, return an empty diff.
  • Reverse the filtered commit list to give chronological (oldest-first) order for correct diff concatenation.
  • For each non-merge commit in chronological order, call GET /2.0/repositories/{workspace}/{repo}/diff/{commit} concurrently to get its diff against its parent.
  • Concatenate all diffs in chronological order and return.
  • When fromCommit/toCommit are absent, preserve existing full PR diff behaviour.
  • Handle Bitbucket API errors per commit gracefully.

Check Jira issue

Comment thread src/incrementaltest.py Outdated
@atlassian

atlassian Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The issue is ready for review.

Code Reviewer could not determine whether the following acceptance criteria have been met:

  • When fromCommit and toCommit are provided, call the commits endpoint and filter to non-merge commits only (parents.size == 1)
  • If no non-merge commits exist, return an empty diff
  • Reverse the filtered commit list and fetch each commit's diff concurrently, then concatenate all diffs in chronological order
  • When fromCommit/toCommit are absent, preserve existing full PR diff behaviour
  • Handle Bitbucket API errors per commit gracefully

Check Jira issue

Comment thread src/incrementaltest.py
for i in range(2, n + 1):
dp[i] = dp[i - 1] + dp[i - 2]

return dp[n - 1]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔥 Code Bugs

The function returns dp[n - 1] instead of dp[n], causing an off-by-one error — for example, climb_stairs(2) returns 1 instead of the correct 2.

Details

📖 Explanation: The dp table is computed correctly up to index n, but the final return uses n-1, which gives the answer for n-1 stairs instead of n stairs.

Suggested change
return dp[n - 1]
return dp[n]

Uses AI. Verify results. Give Feedback

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant