Location
plugins/tps-meter.tsx — entire file (319 lines)
Problem
The TUI plugin adapter has zero behavioral tests. It contains:
- 6 event bus subscriptions:
message.part.updated, message.part.removed, message.updated, message.removed, session.status, session.idle
- setInterval-driven resampling at
cfg.pollMs
- Per-message GenerationTimer lifecycle: create, push, setTokens, cleanup
- chars→tokens calibration via
calibrateRatio (EWMA)
- buildView composition from reactive state
- onCleanup handlers (interval clearing, event unsubscription)
- SolidJS reactive memo recomputing on every tick
The only existing verification is tools/verify-plugin.mjs, which confirms the module loads and registers a slot renderer — it does not test any behavior.
Missing Scenarios (minimum)
- Timer lifecycle: create on stream start, push tokens through streaming, setTokens on completion, remove on message removal
- Ratio calibration convergence across multiple messages
- Event handler error resilience (malformed events should not corrupt state)
- Cross-session isolation (events from session A must not contaminate session B)
- Concurrent streaming messages (two assistant messages streaming simultaneously)
- Cleanup verification (onCleanup removes intervals and unsubscribes events)
Impact
The most complex file in the codebase has no regression protection. Any change to event wiring, timer lifecycle, or reactive memo can silently break runtime behavior.
Severity
High — no automated protection for the runtime integration layer.
Location
plugins/tps-meter.tsx— entire file (319 lines)Problem
The TUI plugin adapter has zero behavioral tests. It contains:
message.part.updated,message.part.removed,message.updated,message.removed,session.status,session.idlecfg.pollMscalibrateRatio(EWMA)The only existing verification is
tools/verify-plugin.mjs, which confirms the module loads and registers a slot renderer — it does not test any behavior.Missing Scenarios (minimum)
Impact
The most complex file in the codebase has no regression protection. Any change to event wiring, timer lifecycle, or reactive memo can silently break runtime behavior.
Severity
High — no automated protection for the runtime integration layer.