Skip to content

Move the Remaining Prose-Matched Subprocess Failures Onto the Status-Code Rule #3378

Open

Description

@ptr727

Context

The CODESTYLE.md "Operations and Failure Messages" subprocess-failure bullet, as revised by #3377 for #3367, classifies a subprocess failure by which command failed and the status code it reports, never by the prose of its message. A printed code is read by the notation that marks it, and a match finding none counts as an unexpected failure. A local review pass on #3377 and a sweep of the scripts found these sites still classifying by prose. The unknown flag retry in scripts/pr_review.py is tracked separately in #3365.

Sites

  • spec/audit.py gh(), the ok404 branch: "HTTP 404" in r.stderr or "Not Found" in r.stderr. "Not Found" is prose, and a bare HTTP 404 substring is not the (HTTP 404) notation, so any message carrying either reads as absence rather than as an unexpected failure.
  • scripts/skills_install.py, the claude plugin marketplace add and claude plugin install calls: each treats a non-zero exit as success when "already" appears in its stdout or stderr. That is classification by the prose of the message, so a version that rewords it, or another failure that happens to say "already", is misread.

Remedy

Move each onto the rule in a change of its own: the status code the tool reports, a printed code read by its notation, or an operation of its own for the expected failure, such as a read that says whether the marketplace or plugin is already present.

Activity

  1. added
    pre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings
    scriptA defect in hub tooling
    on Oct 23, 2026
  2. ptr727 commented on Oct 23, 2026

    @ptr727
    OwnerAuthor

    One more site of the same class, found while reviewing the #3365 change: host-setup/linux/setup-github.sh gh_account() re-runs gh auth status without --active when its output contains unknown flag: --active, which classifies by the prose of the message. The capability probe the #3365 change uses for --allow-escape-sequences, gh auth status --active --help answered by its exit status, is one way onto the rule.

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

    pre-existingReview finding classed pre-existing per local-strict-review Disposing of FindingsscriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions