Skip to content

fix(pixel): charge suppressed errors in chained grep lookups - #7702

Draft
Lightheartdevs wants to merge 1 commit into
mainfrom
codex/pixel-hidden-grep-errors-20261016
Draft

Lightheartdevs wants to merge 1 commit into
mainfrom
codex/pixel-hidden-grep-errors-20261016

Conversation

@Lightheartdevs

Copy link
Copy Markdown
Collaborator

An earlier grep -s can fail silently with exit 2, while a later empty grep makes the whole command exit 1. The empty-lookup exemption added in #7701 then treated the failed chain as discovery and did not charge its failure budget.

Require an earlier grep with diagnostic suppression to retain its own final exit status, matching the existing restriction for rg. This covers grep/egrep/fgrep, clustered short flags, GNU's long-option abbreviation and quoted options. Final bare lookups and ordinary search chains retain their existing behavior; progress limits and tool permissions are unchanged. Option-shaped operands are conservatively charged.

Validation:

  • 35 focused tests passed, none skipped, using Node 24.14.1 and actual GNU grep 3.0 under dash on Windows.
  • Real shell cases cover silent earlier errors, short/long/quoted options, pipeline status masking, valid final lookups and standalone exit-2 errors.
  • The identical actual-shell regression fails against exact main 29d01c60819ae830412c7dea01c47e00f03a430c.
  • Direct and Tool Search hook tests confirm failure charging; existing allowance and round-limit controls pass.

Draft pending installed qualification. No product runtime or host was changed by this patch.

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.

1 participant