Skip to content

grep: unexpected stdout diff for recursive -R search #253

@matt-dz

Description

@matt-dz

Summary

grep produced unexpected rshell/oracle diff candidates during agentic QA when recursive search was requested with -R.

Run Context

  • QA run id: run-20260517T165013Z-grep
  • Target builtin: grep
  • Scenario(s): 09_16897-eu1-event-query-errors, 12_13293-aws-kinesis-intakes-down-in-us1, 23_12641-check-run-pipeline-latency, 27_14312-vaultus3proddog-unavailable, 28_21355-data-streams-is-behind, 32_47212-us3-logs-rum-and-dataset-monitors-are-not-evaluating, 35_302-cloudflare-r2-february-2025-outage, 48_13802-up-to-25-of-points-for-org-5366-written-to-wrong-kafka-clust, 50_002-kubelet-kafka-saturation
  • Rshell commit/version: unknown
  • Artifact reference: invocation ids retained in QA workspace, including inv-20260517T190740.929615909Z-3057e4d1 and inv-20260517T191222.497275161Z-1407c8aa

Command

grep -R -n -E "kafka_sharding|kafka_sharding_use_next" <scenario log files> | head -40

Other matching command shapes included:

grep -R -n -i -E "error|exception|timeout|fail|..." <scenario log dirs> 2>/dev/null | head
grep -R -o "status_code" <scenario log dirs> 2>/dev/null | wc -l
grep -R -n "503" <scenario log dir> | head -10

Observed Difference

  • Differing dimension: stdout and sometimes stderr / exit code
  • Rshell exit code: commonly 0 or 1, depending on redirection/pipeline shape
  • Oracle exit code: commonly 0
  • Rshell stdout/stderr summary: recursive searches returned no matches when stderr was redirected; when stderr was visible, rshell printed grep: unknown shorthand flag: 'R' in -R
  • Oracle stdout/stderr summary: GNU grep recursively searched the provided directories and emitted matching lines

Notes

This is an unexpected diff candidate from the QA harness. The strongest reduced evidence in the run compared a non-recursive explicit-file grep that matched oracle with a corresponding grep -R form that returned unknown shorthand flag: 'R' in rshell while GNU grep returned matching lines. Full local artifacts are retained in the QA workspace. Maintainer judgment is still needed to decide whether rshell should support recursive grep, document an intentional divergence, or adjust the harness/oracle comparison.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions