Skip to content

test(spec): import 1,044 bash-verified cases from the BashBox test suite - #2575

Merged
chaliy merged 2 commits into
mainfrom
claude/project-thread-eafupr-bashbox-corpus
Oct 7, 2026
Merged

chaliy merged 2 commits into
mainfrom
claude/project-thread-eafupr-bashbox-corpus

Conversation

@chaliy

@chaliy chaliy commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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

What changed

Adds 65 spec files (spec_cases/bash/bashbox-*.test.sh, one per BashBox test file) with 1,044 bash-parity cases copied from shipfastlabs/bashbox, a MIT-licensed PHP port of just-bash. BashBox records its expected stdout from GNU bash.

  • 624 cases pass and now run in both the spec suite and the real-bash comparison gate.
  • 420 cases are ### skip: TODO bashbox corpus gap. These are real bugs, where bashkit's stdout or exit status differs from bash. Each follow-up fix PR deletes the skip lines it fixes.

Attribution is in NOTICE and THIRD_PARTY_LICENSES/README.md. The import rules and how to fix cases are in knowledge/operations/testing.md.

Why

This is a large bash-verified corpus that covers areas our own specs miss: declare/local attributes, sort and xargs flags, arithmetic on arrays, declare -f/type printing, named fds, ERR traps, printf and tr escapes.

Before / After

Import filter: 1,753 pairs were extracted. 1,095 matched host bash 5.2 (LANG=C.UTF-8, fresh temp dir). 46 were dropped because the spec format can't represent them (no trailing newline, CR or NUL). 5 were dropped where bashkit matches host bash but the recorded 5.3 output differs.

Before: Total: 2392 | Skipped: 26.
After (cargo test -p bashkit --test integration --features http_client,ssh -- spec_tests::bash_spec_tests spec_tests::bash_comparison_tests --include-ignored):

Total: 3436 | Passed: 2990 | Failed: 0 | Skipped: 446

The comparison gate reports no bashbox mismatches locally. Two existing non-bashbox cases (empty_heredoc, heredoc_empty) mismatch the bash 5.2 in my container and are unrelated to this change.

Risk

  • Low. This only adds tests and docs.
  • CI's host bash could differ from 5.2 on a few passing cases. If one does, it gets the same skip or a bash_diff marker.

Checklist

  • Tests added or updated
  • Backward compatibility considered

Copies (script, stdout) pairs from shipfastlabs/bashbox (MIT) into
spec_cases/bash/bashbox-*.test.sh, keeping only cases whose recorded
output matches host bash. 624 pass and join the bash comparison gate;
420 are marked TODO skips: real gaps where bashkit differs from bash.
Attribution in NOTICE; process in knowledge/operations/testing.md.
@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 76f2857 Commit Preview URL

Branch Preview URL
Oct 07 2026, 06:18 PM

…-eafupr-bashbox-corpus

# Conflicts:
#	THIRD_PARTY_LICENSES/README.md
@chaliy
chaliy merged commit 8d47605 into main Oct 7, 2026
33 checks passed
@chaliy
chaliy deleted the claude/project-thread-eafupr-bashbox-corpus branch October 7, 2026 18:40
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