Runtime Radar has two test layers: deterministic Swift tests for parser/model behavior, and live hold tests for real local ports.
- Scanner:
lsofparsing, IPv4/IPv6 endpoints, wildcard hosts, malformed rows, duplicate listening entries, and stderr/non-zero command failures. - HTTP classifier:
200..<500islive, ordinary connection failures arelocal, and cancellation propagates as cancellation. - Runtime detector: label merge, inferred names/kinds, stable sorting, duplicate filtering, project inference, visibility classification, project snapshot building, offline labeled services, and tmux metadata attachment.
- tmux: pane parsing, process ancestry lookup, direct pane PID mapping, missing tmux/no server behavior, and attached/detached state.
- Projects: git-root ownership, subsystem extraction, project/tool/system snapshot grouping, git state, and worker assignment.
- Workers: Codex/Claude tmux worker detection, PID, project/subsystem mapping, and attached/detached state.
- Labels: save/load, corrupt-file tolerance, and loopback canonicalization.
- CLI: default table output, flat JSON output, project-first snapshot JSON, and bad argument handling.
Run:
swift testThe live hold test starts a disposable HTTP server, runs the real scanner, and
asserts that the CLI reports that port as live.
Default port:
./script/live_port_hold_test.shUse a different port when 5000 is already occupied:
RUNTIME_RADAR_TEST_PORT=5050 ./script/live_port_hold_test.shLet the script choose a free port:
RUNTIME_RADAR_TEST_PORT=auto ./script/live_port_hold_test.sh- Empty state: no detected services.
- Small state: one live service, one local service, and one offline labeled service.
- Busy state: many services with scrolling.
- Long text: long process names, project names, tmux sessions, and paths.
- Filters:
Dev,All, andSystem. - Noise filter:
Devhides known system listeners,Systemshows them. - Category folding: fold all groups to one-line summaries, expand all groups, individually fold/expand a single group, and confirm the popover shrinks to the collapsed content height instead of leaving empty space.
- Group summary: git status, live count, offline count, and tmux worker count.
- Project order: enable reorder mode, move a project up/down, refresh, relaunch, and confirm the order persists.
- Project hiding: hide a project in reorder mode, confirm it disappears outside reorder mode, then re-enter reorder mode and unhide it.
- Nested folding: project row is the parent, with clearly indented
Portsandtmuxchild sections that can fold independently. - tmux workers: friendly role label, owner tag such as
codex,claude, orgemini, attached/detached state, and command hint. - Row expansion: label editing, tmux details, copy address, copy URL, and open URL.
- Label save feedback: saving state, saved confirmation, failed state, row title update, and confirmation pulse.
- Refresh: services appear, disappear, and update without layout drift; the app refreshes in the background while the popover is closed.
Run/build:
swift build --product RuntimeRadarMenu
./script/build_and_run.sh --verify