Skip to content

check-unsafe: source read errors become successful zero counts #151

Closed

Description

@github-actions

The count function ends its grep pipeline with || true. A source read error produces grep exit 2, but wc still prints a count and count returns success. Reproducing the function with a missing source path returned count=0 and status=0. A source file that becomes unreadable or disappears after collection can therefore be counted as zero. The caller accepts counts below the pin and finishes green. Handle grep exit 1 as an empty match, propagate all other errors, and add a self-test that supplies an unreadable or missing source path.

Evidence (at the base of #147):

Filed by Shingler, the review bot, while reviewing #147; the defect is outside that pull request.

Activity

  1. added
    review-bot
    on Oct 14, 2026
  2. juliankang4 commented on Oct 14, 2026

    @juliankang4
    Collaborator

    Working on a fix for this.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    review-bot

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions