Skip to content

feat(test): add grammar-based differential fuzzing#83

Merged
chaliy merged 1 commit intomainfrom
claude/port-bash-ast-lexer-gqrwr
Feb 2, 2026
Merged

feat(test): add grammar-based differential fuzzing#83
chaliy merged 1 commit intomainfrom
claude/port-bash-ast-lexer-gqrwr

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 2, 2026

Summary

  • Add proptest-based differential testing (proptest_differential.rs) that generates random valid bash scripts and compares BashKit output against real bash
  • Add just fuzz-diff and just fuzz-diff-deep commands for running fuzzing tests
  • Update specs/004-testing.md with differential fuzzing documentation

Script Generators

The fuzzer generates scripts in these categories:

  • Echo commands - Various quoting styles, flags (-n), multiple args
  • Arithmetic - Addition, subtraction, multiplication, division, modulo
  • Control flow - if/else, for loops, while loops, case statements
  • Pipelines - echo | cat, multi-stage pipes
  • Logical operators - &&, ||, combined chains
  • Command substitution - $() syntax
  • Functions - Definition and invocation

Test plan

  • cargo test --test proptest_differential passes all 10 tests
  • cargo fmt --check passes
  • cargo clippy --all-targets --features network -- -D warnings passes
  • CI passes

https://claude.ai/code/session_01CFh6WZw1QDSGhTnCUW57qi

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Add proptest-based differential testing that generates random valid
bash scripts and compares BashKit output against real bash. This helps
find edge cases that aren't covered by hand-written spec tests.

Script generators:
- Echo commands (quoting styles, flags, multiple args)
- Arithmetic (add, sub, mul, div, mod)
- Control flow (if/else, for, while, case)
- Pipelines (multi-stage pipes)
- Logical operators (&&, ||)
- Command substitution
- Functions

Run with: cargo test --test proptest_differential
Or: just fuzz-diff / just fuzz-diff-deep

https://claude.ai/code/session_01CFh6WZw1QDSGhTnCUW57qi
@chaliy chaliy force-pushed the claude/port-bash-ast-lexer-gqrwr branch from 95cc557 to 3127cc5 Compare February 2, 2026 18:47
@chaliy chaliy merged commit ee48644 into main Feb 2, 2026
7 checks passed
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