Skip to content

Malformed BUGS_JSON can incorrectly produce PASS outcome #18

Description

@0xroylee

Source workflow reported a bug.

Linear: https://linear.app/roy/issue/ROY-29/improve-codebase
PR: #17

Details:
In src/review.ts, extractBugs returns [] when BUGS_JSON parsing fails. parseReviewOutcome then sets passed to passed && bugs.length===0. If review output includes RESULT: PASS plus malformed/non-JSON BUGS_JSON, the parser returns passed=true instead of failing closed. This can cause src/workflow.ts to mark the issue done and skip bug issue creation even though review output is invalid. Repro: call parseReviewOutcome with RESULT: PASS\nSUMMARY: ...\nBUGS_JSON:\n[{"title":"Bug A" (truncated JSON) and observe outcome.passed === true. Expected: invalid BUGS_JSON should force failure or explicit parse-error handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions