Skip to content

plan skip exits 0 on a zero-match pattern, silently dropping the skip #674

Description

@samuelcollins1

Problem

desloppify plan skip --permanent <pattern> ... prints No matching issues found and exits 0. A caller scripting a triage stage has no way to distinguish "skipped 12 issues" from "skipped nothing", so a mistyped or superseded issue id silently no-ops.

How it bit

During an organize stage assigning 232 review issues to clusters-or-skips, one issue carried a superseded marker that put it outside the open pool. plan skip reported no match and returned 0. Because the exit status was clean, the orchestration treated the skip as applied. It was only caught by re-auditing all 85 skips directly against plan.json afterwards.

The validation requirement for that stage is that every issue ends up clustered or skipped, so a silent no-op here produces an invalid triage that still reports success.

Expected

Non-zero exit when a pattern matches nothing (or at minimum a --strict flag), so set -e orchestration fails loudly. A count of what was actually skipped in the success output would also let callers assert.

Repro

desloppify plan skip --permanent "definitely-not-a-real-issue-id" \
  --note "x" --attest "I have reviewed this triage skip against the code and I am not gaming the score by suppressing a real defect."
echo "exit=$?"   # prints exit=0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions