Skip to content

test: smoke-test the PR review agent#2

Closed
markphelps wants to merge 2 commits into
mainfrom
test/pr-review-smoke
Closed

test: smoke-test the PR review agent#2
markphelps wants to merge 2 commits into
mainfrom
test/pr-review-smoke

Conversation

@markphelps
Copy link
Copy Markdown
Contributor

A throwaway file with a few intentional issues (loop bound, empty-input
division, missing input validation) so the review workflow has something to
find. Not imported anywhere; delete after verifying.

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Verdict: request changes

This PR introduces a smoke-test fixture with intentional issues for the review agent. The file contains several correctness problems that must be fixed before merging. See below for details on ranking and problems found.

examples/_smoke-test/sample.ts

  • critical (L8): The loop in averageScore should iterate up to i < scores.length, not i <= scores.length, to avoid accessing out-of-bounds array elements and including undefined in the sum.
  • major (L9): The addition total += scores[i]; may sum an undefined value due to the loop bounds. Bounds logic should be corrected.
  • major (L11): If the input array is empty, scores.length is zero, resulting in a division by zero. Handle empty arrays gracefully (e.g. return 0 or throw).

@markphelps markphelps closed this May 27, 2026
@markphelps markphelps deleted the test/pr-review-smoke branch May 27, 2026 23:03
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