smlflg's picture
Initial public upload from Projekte/CodexDashBoard
981aa5d verified
|
Raw History Blame Contribute Delete
3.67 kB
# Test gaps
## Existing test coverage observed
Test modules inspected:
- tests/test_codex_data.py
- tests/test_processes.py
- tests/test_startup.py
- tests/test_packaging.py
- tests/test_crash_safety.py
Commands run:
- `python3 -m pytest`: 16 passed.
- `python3 -m compileall -q src tests`: passed.
Covered areas:
- Codex thread listing hides archived sessions by default.
- Archived search path works.
- Missing state DB returns zero stats.
- Locked SQLite DBs return quickly without exceptions.
- Process scanner filters simple ps output and reads /proc metadata in mocked live mode.
- Uptime formatting.
- Optional GUI dependency packaging.
- Missing GI/GTK startup message.
- Refresh fan-out and in-flight guards via AST tests.
- systemd restart policy guard.
- WebKit exclusion.
## Important gaps
1. GUI behavior is mostly untested.
- No tests instantiate/render rows under GTK.
- No tests validate button wiring for resume/open-folder/stop.
- No tests cover tray menu behavior, close-to-tray behavior, or status text transitions.
- No tests cover search entry behavior beyond data-layer query filtering.
2. SQLite schema-drift handling is under-tested.
- The locked-DB test uses a minimal table that triggers sqlite errors safely, but there are no explicit tests for real Codex schema changes.
- Missing columns, renamed columns, null-heavy rows, unexpected timestamp units, or invalid token types are not separately asserted.
- `list_logs` has no normal-path fixture test for logs_2.sqlite structure.
3. Silent failure behavior is untested from the UI perspective.
- Data functions return empty lists/stats on sqlite errors. No tests assert whether the UI can tell "no sessions" apart from "database unreadable".
4. Process matching false positives are under-tested.
- Current tests use simple positive/negative lines.
- No tests cover command arguments, paths, or filenames containing keywords accidentally.
- No tests define which process families should be stoppable in a Codex-first dashboard.
5. Destructive process action is minimally covered.
- `terminate_process` directly sends SIGTERM, but no tests cover `_confirm_stop` wiring with mocked dialog response and mocked termination.
- No test ensures the app never stops its own dashboard process from the UI list beyond scanner-level filtering.
6. Packaging/install behavior is lightly checked only.
- No tests for desktop entry correctness beyond WebKit absence.
- No tests that hard-coded service paths match current repo or installed package entry points.
- No console_scripts entry point exists to test.
7. Claude data helpers have no tests.
- `claude_data.py` includes JSON, JSONL, grouping, stats, session, and event parsing helpers but is not covered by the current test suite.
- If this module stays in scope, it needs malformed-input and large-directory tests. If it is intentionally out of P0 scope, the repo should clarify that.
## Suggested next test additions
- `tests/test_logs_data.py`: fixture logs database; normal listing, search, missing/corrupt DB behavior.
- `tests/test_schema_drift.py`: expected Codex schema variants; missing/renamed columns; invalid/null values.
- `tests/test_process_false_positives.py`: keyword-in-path/argument cases and family/stoppable policy.
- `tests/test_ui_actions.py`: command construction and stop confirmation with GTK/subprocess/os.kill mocked or moved behind adapter functions.
- `tests/test_install_assets.py`: service/desktop paths, relocatability assumptions, package launch entry point if added.
- `tests/test_claude_data.py` only if Claude helpers remain maintained code.