Skip to content

fix(builtins): option gaps from gap telemetry (tar, gzip -c, grep -I/-r paths, join -o, xargs -r) - #2555

Open
chaliy wants to merge 2 commits into
mainfrom
claude/fidelity-option-gaps
Open

chaliy wants to merge 2 commits into
mainfrom
claude/fidelity-option-gaps

Conversation

@chaliy

@chaliy chaliy commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Михайло · project thread

What changed

Closes the most common option gaps found by replaying 4,030 recorded agent calls (gap telemetry, #2552):

  • tar: GNU long options (--strip-components, --exclude, --file, --directory, --create/--extract/--list, --to-stdout, no-op ownership flags), extract/list of named members ("Not found in archive", exit 2), unknown long option exits 2.
  • gzip/gunzip: -c/--stdout, -1..-9/--fast/--best, binary-safe stdin/stdout.
  • grep: -I / --binary-files=without-match|text|binary; grep -r prints GNU-style paths (d/b, ./b, bare b with no operand, no prefix for a single file operand) instead of absolute VFS paths; walks directories in name order.
  • join: rewritten to GNU semantics (-o FORMAT/auto, -e, -v, -a, -j, -i, --header, cartesian product, check-order flags).
  • xargs: empty input runs the command once (GNU default); -r/--no-run-if-empty skips it.

Why

These were top entries in the gap report: agents commonly run tar --strip-components=1, gzip -c, grep -rI, join -o and xargs -r, and failed or got wrong output.

Before

$ cd /tmp/g && grep -r needle .
/tmp/g/./a:needle
$ printf '' | xargs echo none
                      # (nothing; GNU prints "none")

xargs -r, gzip -c, grep -I, tar --strip-components/--exclude, and join -o were not supported.

After

$ cd /tmp/g && grep -r needle .
./a:needle
$ printf '' | xargs -r echo none
$ printf '' | xargs echo none
none
$ tar --strip-components=1 -xf t.tar   # extracts with first component stripped

New spec cases (tar, join, gzip, grep, xargs) pass against real bash/GNU tools and bashkit.

Risk

Low to medium. grep -r output paths changed from absolute to operand-relative (matches GNU; tests that grepped for absolute paths with an absolute operand are unaffected). xargs with empty input now runs the command once, as GNU does.

Checklist

  • Failing spec cases first, then fixes
  • cargo fmt, cargo clippy -D warnings
  • Full bashkit lib + integration tests
  • Knowledge log updated

https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA


Generated by Claude Code

@chaliy chaliy self-assigned this Oct 7, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 8756a09 Commit Preview URL

Branch Preview URL
Oct 07 2026, 09:47 AM

@chaliy
chaliy force-pushed the claude/fidelity-option-gaps branch 2 times, most recently from 549b5f2 to 7d9455e Compare October 7, 2026 09:24
@chaliy
chaliy force-pushed the claude/fidelity-option-gaps branch from 7d9455e to 8756a09 Compare October 7, 2026 09:46

This branch has not been deployed

No deployments
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