|
| 1 | +# TEST-NEEDS: valence-shell |
| 2 | + |
| 3 | +## Current State |
| 4 | + |
| 5 | +| Category | Count | Details | |
| 6 | +|----------|-------|---------| |
| 7 | +| **Source modules** | 77 | Rust CLI (~32: parser, commands, arith, glob, job, pager, etc.), Zig impl (~12: root, audit, daemon, demo, path, preconditions, prover, etc.), Elixir (2: application, NIF), 3 Idris2 ABI | |
| 8 | +| **Unit tests (Rust inline)** | ~250+ | parser=112, commands=27, state=34, posix_builtins=18, quotes=17, arith=13, external=13, functions=13, glob=8, job=8, highlighter=6, etc. | |
| 9 | +| **Integration tests (Rust)** | 11 files | parameter_expansion=67, extended_test=55, integration=35, correspondence=35, function_and_script=24, property_correspondence=19, property=28, lean4_proptest=16, security=15, stress=11, integration_tests=10 | |
| 10 | +| **Elixir tests** | 1 file | vsh_test.exs (13 assertions) | |
| 11 | +| **Zig tests** | ~21 | Inline test functions across src files | |
| 12 | +| **Shell integration test** | 1 | integration_test.sh (70 assertions) | |
| 13 | +| **E2E tests** | 0 | None | |
| 14 | +| **Benchmarks** | 0 | None | |
| 15 | + |
| 16 | +## What's Missing |
| 17 | + |
| 18 | +### P2P Tests |
| 19 | +- [ ] No tests for Rust CLI <-> Zig backend <-> Elixir NIF pipeline |
| 20 | +- [ ] No tests for Lean4 prover integration in practice (only proptest correspondence) |
| 21 | + |
| 22 | +### E2E Tests |
| 23 | +- [ ] No test running valence-shell as an actual shell (interactive session) |
| 24 | +- [ ] No POSIX compliance test suite |
| 25 | +- [ ] No test for script execution end-to-end |
| 26 | + |
| 27 | +### Aspect Tests |
| 28 | +- [ ] **Security**: security_tests.rs exists (15 tests) -- good start but insufficient for a shell (needs injection, escape, privilege escalation tests) |
| 29 | +- [ ] **Performance**: No benchmarks for shell startup time, command dispatch latency |
| 30 | +- [ ] **Concurrency**: No tests for job control with concurrent processes |
| 31 | +- [ ] **Error handling**: stress_tests.rs exists (11 tests) -- needs expansion |
| 32 | + |
| 33 | +### Benchmarks Needed |
| 34 | +- [ ] Shell startup time |
| 35 | +- [ ] Command parsing throughput |
| 36 | +- [ ] Pipeline execution overhead vs bash/zsh |
| 37 | +- [ ] Glob expansion performance (1000/10000 files) |
| 38 | + |
| 39 | +### Self-Tests |
| 40 | +- [ ] No `valence-shell --self-test` mode |
| 41 | +- [ ] No POSIX conformance self-check |
| 42 | + |
| 43 | +## FLAGGED ISSUES |
| 44 | +- **Best tested repo in the scan** -- 250+ inline + 315+ integration tests across 3 languages |
| 45 | +- **Property-based testing exists** (proptest, lean4 correspondence) -- rare and excellent |
| 46 | +- **No benchmarks at all for a SHELL** -- startup time and command latency are critical |
| 47 | +- **Elixir layer has only 13 tests** compared to 300+ Rust tests |
| 48 | +- **Zig layer has only ~21 inline tests for 12 modules** -- undertested |
| 49 | + |
| 50 | +## Priority: P2 (MEDIUM) -- strong test foundation, needs benchmarks and E2E |
| 51 | + |
| 52 | +## FAKE-FUZZ ALERT |
| 53 | + |
| 54 | +- `tests/fuzz/placeholder.txt` is a scorecard placeholder inherited from rsr-template-repo — it does NOT provide real fuzz testing |
| 55 | +- Replace with an actual fuzz harness (see rsr-template-repo/tests/fuzz/README.adoc) or remove the file |
| 56 | +- Priority: P2 — creates false impression of fuzz coverage |
0 commit comments