Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

grep: unexpected stdout diff for recursive -R search

Open
#253 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
go
Domain
cli

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

QA

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.

Dominant language
Go
Stars
31
Forks
3
Avg merge
1d 4h
Merged PRs (30d)
14

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/rshell

All issues in DataDog/rshell

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.