|
| 1 | +# TEST-NEEDS.md — polysafe-gitfixer |
| 2 | + |
| 3 | +> Generated 2026-03-29 by punishing audit. |
| 4 | +
|
| 5 | +## Current State |
| 6 | + |
| 7 | +| Category | Count | Notes | |
| 8 | +|-------------|-------|-------| |
| 9 | +| Unit tests | 0 | No inline tests, no test files | |
| 10 | +| Integration | 0 | None | |
| 11 | +| E2E | 0 | None | |
| 12 | +| Benchmarks | 0 | None | |
| 13 | + |
| 14 | +**Source modules:** 6 Rust source files across 4 crates: capability (audit_log.rs, dir_capability.rs, lib.rs), fs_ops (lib.rs), git_ops (lib.rs), polysafe_nifs (lib.rs). |
| 15 | + |
| 16 | +## What's Missing |
| 17 | + |
| 18 | +### P2P (Property-Based) Tests |
| 19 | +- [ ] Dir capability: property tests for capability creation/verification invariants |
| 20 | +- [ ] Audit log: property tests for log entry integrity |
| 21 | +- [ ] fs_ops: property tests for filesystem operation safety (no escaping sandbox) |
| 22 | +- [ ] git_ops: property tests for git operation correctness |
| 23 | + |
| 24 | +### E2E Tests |
| 25 | +- [ ] Full fix cycle: detect issue -> create capability -> apply fix -> audit -> verify |
| 26 | +- [ ] Git operation: clone -> modify -> commit -> verify integrity |
| 27 | +- [ ] Capability lifecycle: create -> use -> revoke -> verify revoked |
| 28 | + |
| 29 | +### Aspect Tests |
| 30 | +- **Security:** A git fixing tool with capabilities and audit logging has ZERO security tests. Capability bypass, audit log tampering, path traversal in fs_ops, git injection — ALL untested |
| 31 | +- **Performance:** No benchmarks for fix throughput |
| 32 | +- **Concurrency:** No tests for concurrent fix operations, capability contention |
| 33 | +- **Error handling:** No tests for git operation failure, filesystem permission denied, corrupted audit log |
| 34 | + |
| 35 | +### Build & Execution |
| 36 | +- [ ] `cargo test` across all 4 crates |
| 37 | + |
| 38 | +### Benchmarks Needed |
| 39 | +- [ ] Git operation speed |
| 40 | +- [ ] Capability validation overhead |
| 41 | +- [ ] Audit logging throughput |
| 42 | + |
| 43 | +### Self-Tests |
| 44 | +- [ ] Fix its own repository as smoke test |
| 45 | +- [ ] Capability system self-test |
| 46 | +- [ ] Audit log integrity verification |
| 47 | + |
| 48 | +## Priority |
| 49 | + |
| 50 | +**CRITICAL.** 6 source files, ZERO tests of any kind. A capability-based security tool with an audit log that has never been tested. The capability and audit_log modules are security-critical and completely unverified. This is one of the worst test situations in the entire scan. |
| 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