Skip to content

fix: validate code assessment findings - #122

Open
NM3806 wants to merge 1 commit into
prooflinedev:mainfrom
NM3806:fix/validate-code-assessment-findings
Open

NM3806 wants to merge 1 commit into
prooflinedev:mainfrom
NM3806:fix/validate-code-assessment-findings

Conversation

@NM3806

@NM3806 NM3806 commented Dec 3, 2026

Copy link
Copy Markdown

Problem

codeAssessment() assumes every element in code_assessment.findings is an object.

Malformed API responses containing null cause an unhandled TypeError, while primitive values can incorrectly allow a review to complete.

Changes

  • Validate each finding using the existing isObject() helper.
  • Preserve the existing withheld-marker validation.
  • Add regression tests for null and primitive finding values.

Verification

  • Reproduced both failure cases before the fix.
  • Verified regression tests after the fix.
  • Ran build, lint, typecheck and full test suite.

Reproduction

Previously:

  • findings: [null] caused a TypeError.
  • findings: ["not-an-object"] incorrectly returned COMPLETED.

Both cases should now result in INCOMPLETE.

Copilot AI balanced review requested due to automatic review settings December 3, 2026 14:27

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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.

2 participants