|
| 1 | +# TEST-NEEDS.md — panll |
| 2 | + |
| 3 | +> Generated 2026-03-29 by punishing audit. |
| 4 | +
|
| 5 | +## Current State |
| 6 | + |
| 7 | +| Category | Count | Notes | |
| 8 | +|-------------|-------|-------| |
| 9 | +| Unit tests | ~20 | JS engine tests: tentacles, network_topology, level_architect, cloudguard, security, ums, automation_router, accessibility, seam, focus_dimming, help, tiling, anti_crash, contractiles, orbital_sync, menu_bar | |
| 10 | +| Integration | ~6 | TEA framework: tea_app_test, tea_cmd_test, tea_sub_test, tea_render_test | |
| 11 | +| E2E | 0 | None | |
| 12 | +| Benchmarks | 0 | Files named "Workbench" are components, NOT benchmarks | |
| 13 | + |
| 14 | +**Source modules:** ~686 ReScript .res files (not counting compiled .res.js). Massive TEA architecture with engines, models, views, components, core modules. Also: 116 Rust files, 15 Elixir, 5 Zig FFI, Idris2 ABI. |
| 15 | + |
| 16 | +## What's Missing |
| 17 | + |
| 18 | +### P2P (Property-Based) Tests |
| 19 | +- [ ] TEA Model: property tests for state transition invariants |
| 20 | +- [ ] Panel layout: property tests for tiling constraints (no overlapping, no gaps) |
| 21 | +- [ ] Network topology: graph property tests (connectivity, acyclicity where required) |
| 22 | +- [ ] Security engine: policy evaluation property tests |
| 23 | + |
| 24 | +### E2E Tests |
| 25 | +- [ ] Full panel lifecycle: create -> layout -> interact -> resize -> close |
| 26 | +- [ ] Multi-panel: open multiple panels, tile, switch focus, close |
| 27 | +- [ ] Accessibility: keyboard navigation through all panel types |
| 28 | +- [ ] Theme/variant: each visual theme renders correctly |
| 29 | +- [ ] Gossamer integration: panel communication round-trips |
| 30 | + |
| 31 | +### Aspect Tests |
| 32 | +- **Security:** 1 security_engine_test exists but for 686 modules — ZERO tests for panel isolation, IPC sanitization, plugin sandboxing |
| 33 | +- **Performance:** ZERO benchmarks. No render frame budget tests, no panel creation overhead measurement, no memory leak detection for long-running sessions |
| 34 | +- **Concurrency:** No tests for concurrent panel operations, WebSocket message ordering, subscription race conditions |
| 35 | +- **Error handling:** 1 anti_crash_test exists. No tests for panel crash recovery, malformed IPC messages, subscription failure handling |
| 36 | + |
| 37 | +### Build & Execution |
| 38 | +- [ ] ReScript build (686 modules!) |
| 39 | +- [ ] JS test runner for tests/ |
| 40 | +- [ ] Rust cargo test |
| 41 | +- [ ] Elixir mix test |
| 42 | + |
| 43 | +### Benchmarks Needed |
| 44 | +- [ ] Panel creation/destruction time |
| 45 | +- [ ] TEA update cycle latency |
| 46 | +- [ ] Render time per panel type |
| 47 | +- [ ] IPC message throughput |
| 48 | +- [ ] Memory usage per panel count |
| 49 | +- [ ] Layout algorithm time vs panel count |
| 50 | + |
| 51 | +### Self-Tests |
| 52 | +- [ ] Panel manifest validation |
| 53 | +- [ ] TEA framework self-test (model/view/update cycle) |
| 54 | +- [ ] Component registry consistency |
| 55 | +- [ ] Accessibility compliance check (WCAG) |
| 56 | + |
| 57 | +### CRITICAL GAPS |
| 58 | + |
| 59 | +| Area | Modules | Tests | Coverage | |
| 60 | +|------|---------|-------|----------| |
| 61 | +| Components (.res) | ~200+ | 0 direct | **0%** | |
| 62 | +| Core engines | ~50+ | ~16 | **~32%** | |
| 63 | +| Models | ~100+ | 0 direct | **0%** | |
| 64 | +| Views | ~100+ | 0 direct | **0%** | |
| 65 | +| TEA framework | ~20 | 4 | **20%** | |
| 66 | +| Rust crates | 116 files | 0 | **0%** | |
| 67 | + |
| 68 | +## Priority |
| 69 | + |
| 70 | +**CRITICAL.** 686 ReScript modules with ~26 test files is 3.8% coverage. The TEA engine tests are a good start but the component, model, and view layers are completely untested. 116 Rust files with ZERO tests. ZERO benchmarks for a UI framework where performance is user-visible. The "DebuggingWorkbench" and "ExploratoryWorkbench" files in bench results are components, not benchmarks — do not be fooled. |
| 71 | + |
| 72 | +## FAKE-FUZZ ALERT |
| 73 | + |
| 74 | +- `tests/fuzz/placeholder.txt` is a scorecard placeholder inherited from rsr-template-repo — it does NOT provide real fuzz testing |
| 75 | +- Replace with an actual fuzz harness (see rsr-template-repo/tests/fuzz/README.adoc) or remove the file |
| 76 | +- Priority: P2 — creates false impression of fuzz coverage |
0 commit comments