|
Download artifacts/codex-audit/test-gaps.md from smlflg/CodexDashBoard: direct link, hf CLI and curl.
- Browser
- Download file 3.67 kB
-
https://huggingface.co/smlflg/CodexDashBoard/resolve/main/artifacts/codex-audit/test-gaps.md
- Command line
-
hf download hf://smlflg/CodexDashBoard/artifacts/codex-audit/test-gaps.md
-
curl -L -o test-gaps.md https://huggingface.co/smlflg/CodexDashBoard/resolve/main/artifacts/codex-audit/test-gaps.md
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
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.
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_logshas no normal-path fixture test for logs_2.sqlite structure.
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".
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.
Destructive process action is minimally covered.
terminate_processdirectly sends SIGTERM, but no tests cover_confirm_stopwiring 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.
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.
Claude data helpers have no tests.
claude_data.pyincludes 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.pyonly if Claude helpers remain maintained code.