Commit graph

1 commit

Author SHA1 Message Date
emozilla
0d0549d834 test(telemetry): end-to-end plugin dispatch coverage
The existing hook tests call the plugin's _on_* callbacks directly, which passes
even if the bundled plugin stops auto-loading or a hook name drifts from what core
fires — real runs would go dark while the suite stays green.

Add test_plugin_e2e.py, which drives the real dispatch chain through public entry
points only (discover_plugins -> invoke_hook -> registered callback -> emitter ->
tel_* tables), exactly as core does:

  - one completed turn produces tel_runs / tel_model_calls / tel_tool_calls rows
    with real provider/model/tool values and correct counts;
  - telemetry.local=false means the plugin does not load and nothing is written.

Verified robust against test ordering (singleton resets for the plugin manager and
the emitter in the fixture).
2026-07-24 18:54:45 +00:00