Skip to content

test(oils-spec): measure upstream Oils spec pass rate against real bash - #2640

Merged
chaliy merged 1 commit into
mainfrom
claude/oils-spec-rate
Oct 8, 2026
Merged

chaliy merged 1 commit into
mainfrom
claude/oils-spec-rate

Conversation

@chaliy

@chaliy chaliy commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

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

What changed

  • New scripts/oils-spec/run.py (stdlib Python): fetches the upstream Oils spec suite at a pinned commit (57d3f0d0, Apache-2.0, shallow-fetched at run time, not vendored), parses spec/*.test.sh with Oils' own sh_spec.py assertion rules for the bash column, and runs every case against bashkit and real bash.
  • Headline metric: cases bashkit passes / cases real bash passes, per spec file and total. Results saved as scripts/oils-spec/results/oils-spec-<platform>-<stamp>.{json,md} (JSON lists every missed case, so runs diff case by case).
  • just oils-spec builds the CLI with realfs, runs the suite, saves results, refreshes site data. /benches gets an Oils panel (latest rate, worst files, history).
  • Bash ports of Oils' Python 2 helpers (argv.py etc.) under scripts/oils-spec/bin/; harness tests in scripts/tests/test_oils_spec.py.

Why

Level-up roadmap, Step 5 "Measure real workloads": one headline number for "closer to real bash" that moves with each PR.

Before / After (verified)

First run (bash 5.2.21, 132 spec files that list bash, ~27 s with 4 jobs):

passes
real bash 2693 / 2759 (97.6%)
bashkit 2003 / 2759 (72.6%)
bashkit vs bash 1997 / 2693 = 74.2%

Most misses: builtin-completion 34, array 25, prompt 25, builtin-trap-bash 19, globignore 16, word-split 16. Full list in the committed results .md.

Risk

  • Scripts, docs and site only; no library code changes.
  • No CI gate or floor: the runner's bash version moves the denominator, so this is a headline metric. The 66 cases real bash fails here (python2 helpers, root [ -r ], newer-bash features, locales) are excluded from the rate.

Checklist

  • scripts/tests (158 tests), py_compile, cargo fmt --check, just check-okf, just check-doc-links, site pnpm run build
  • knowledge: new operations/oils-spec.md, performance-results, testing, log; THIRD_PARTY_LICENSES note

Generated by Claude Code

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

cloudflare-workers-and-pages Bot commented Oct 8, 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 8f40073 Commit Preview URL

Branch Preview URL
Oct 08 2026, 11:20 AM

@chaliy
chaliy force-pushed the claude/oils-spec-rate branch from d565387 to ea41cbf Compare October 8, 2026 11:07
Add scripts/oils-spec/run.py (`just oils-spec`): fetches the Oils spec
suite at a pinned commit (not vendored), runs every case of the 132
bash-column spec files through bashkit and real bash, scores the bash
column with Oils' own assertion rules, and saves JSON/Markdown results
under scripts/oils-spec/results/. Headline = bashkit passes among the
cases real bash passes.

First run: 74.2% (1997/2693); bash itself passes 2693/2759.

Bash stand-ins for Oils' Python 2 helpers live in scripts/oils-spec/bin.
The /benches page shows the latest rate, worst spec files and history.
Knowledge: operations/oils-spec, performance-results, testing, log.
@chaliy
chaliy force-pushed the claude/oils-spec-rate branch from ea41cbf to 8f40073 Compare October 8, 2026 11:19
@chaliy
chaliy merged commit b6ad18b into main Oct 8, 2026
25 checks passed
@chaliy
chaliy deleted the claude/oils-spec-rate branch October 8, 2026 11:47
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