Skip to content

Add set -o name alphabet matrix (mix bash_fixtures.gen seto) - #105

Draft
davydog187 wants to merge 2 commits into
mainfrom
cursor/seto-alphabet-matrix-b460
Draft

Add set -o name alphabet matrix (mix bash_fixtures.gen seto)#105
davydog187 wants to merge 2 commits into
mainfrom
cursor/seto-alphabet-matrix-b460

Conversation

@davydog187

@davydog187 davydog187 commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Implements #70 item 2 for the set -o / +o name alphabet only: a generated seto_matrix suite in the same generate / record / test path as date_matrix, printf_matrix, test_matrix, varop_matrix, and flags_matrix.

This is not the short-option cluster (-euo), set -o with no name (that lists every option), the item-3 filesystem-shape × command cube, Oils activation, or CI topology. It does not implement missing options.

What was enumerated

mix bash_fixtures.gen seto writes 60 cases (13 POSIX names + 14 bash extras + 3 unknown names) × { -o, +o }. Completeness is JustBash.Commands.Set.option_names/0 (errexit, nounset, pipefail): a newly implemented name that is not in the POSIX/bash alphabet fails generation, and every such name is generated unmarked.

  • POSIX: allexport errexit ignoreeof monitor noclobber noglob noexec nolog notify nounset verbose vi xtrace
  • Bash extras: braceexpand emacs errtrace functrace hashall histexpand history interactive-comments keyword onecmd physical pipefail posix privileged
  • Unknown (bash itself refuses): not-an-option jb-not-an-option ERREXIT (case trap)
  • Scripts are LC_ALL=C LANG=C set ±o 'name'; echo rc=$? so a wrong exit code is a stdout difference too. Names are quoted so a future unknown stays data.

mix bash_fixtures.gen seto --dry-run reports seto_matrix: 60 cases. mix bash_fixtures.gen now generates date, printf, test, varop, flags, and seto.

Recording

Docker was not available on the agent VM. Oracle output was recorded with the same test/fixtures/runner.sh the Docker task runs, under GNU bash 5.2.21 / Ubuntu 24.04 (uid ubuntu, not root), then pretty-printed through Mix.Tasks.BashFixtures.write_json!/2:

mix bash_fixtures.gen seto
bash test/fixtures/runner.sh < test/fixtures/bash_cases/seto_matrix.json > /tmp/seto_matrix_raw.json
# then Jason-pretty-print + Fixtures.validate, as `mix bash_fixtures` does

To re-record through Docker when it is available:

mix bash_fixtures seto_matrix

Known gaps (54 of 60)

No cell was omitted. Divergences are opts.known_gap (excluded from the digest). The fixture runner still executes them with the assertion inverted.

6 cells match bash unmarked: errexit, nounset, pipefail (both -o and +o).

Count Reason
48 JustBash rejects a real POSIX/bash name; bash accepts it
6 Unknown name: JustBash wording/order differs and rc=1; bash exits 2

JustBash.exec/2 did not raise on any cell. No missing set -o options were implemented in this PR — it is the enumeration + harness.

Cheap follow-ups the matrix now makes un-skippable

  • Accept (or implement) the remaining POSIX names agents actually write: noglob, noclobber, allexport, xtrace/verbose
  • Align unknown-name refusal with bash (name: invalid option name, exit 2)
  • set -o / +o with no name still lists (or dumps set commands); out of this alphabet

Not in this PR: sort -k / cut / od / xxd alphabets, the item-3 FS-shape × command cube, Oils activation, CI topology changes.

Tests

All local quality gates passed:

  • mix compile --warnings-as-errors
  • mix format --check-formatted
  • mix credo --strict (only the existing intentional banned_fixture_apply finding)
  • mix dialyzer (zero new errors; 13 skipped, same as main)
  • mix test — 2 doctests, 62 properties, 6877 tests, 0 failures
  • mix test --only suite:seto_matrix — 60 tests, 0 failures
  • mix bash_fixtures.gen seto --dry-runseto_matrix: 60 cases
  • mix bash_fixtures.verify seto_matrix — suite sound

Related Issues

Related to #70 (item 2, set -o name alphabet only; not closing the issue)

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

  • Added new tests
  • All existing tests pass
  • Tested manually (mix bash_fixtures.gen seto --dry-run, local runner.sh recording, JustBash vs oracle classification)

Checklist

  • My code follows the style guidelines of this project
  • I have run mix format
  • I have run mix credo and addressed any issues
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • I have updated the documentation accordingly
  • I have updated the CHANGELOG.md (for non-trivial changes)
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 23, 2026 17:08
Enumerate every POSIX and bash set -o/+o name JustBash implements,
plus unknown and unsupported names as known_gap, on the same generate /
record / test path as flags, printf, and varop.

Co-authored-by: Dave Lucia <davelucianyc@gmail.com>
assert supported != [] compared a non-empty list to [] at compile time.

Co-authored-by: Dave Lucia <davelucianyc@gmail.com>
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.

2 participants