grep: unexpected stdout diff for recursive -R search
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the reduced grep -R reproduction in the issue and inspect the retained QA invocation artifacts, including inv-20260517T190740.929615909Z-3057e4d1 and inv-20260517T191222.497275161Z-1407c8aa. Then trace the grep builtin's handling of the -R flag and compare stdout, stderr, and exit-code behavior with the stated GNU grep result. Done requires a maintainer decision on supporting recursive search, documenting the divergence, or changing the harness.
Written by the indexing model from the issue text.
Description
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-3057e4d1andinv-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:
stdoutand sometimesstderr/ exit code - Rshell exit code: commonly
0or1, 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.
- Dominant language
- Go
- Stars
- 31
- Forks
- 3
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/rshell
-
QA
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DataDog/rshell#522 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Boolean flags accept --flag=value, diverging from GNU (only df rejects it)May be free again @julesmcrt claimed this 101 days ago, and no pull request is open. Open
DataDog/rshell#538 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#2966 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
blinklabs-io/dingo#4937 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getkin/kin-openapi#1284 ·
Maintainers usually reply within 1 day
-
software-development-practices software-development-practices:nist-ssdf
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
githubnext/gh-aw-cao#15860 ·
Maintainers usually reply within 1 day