[#109] Add CI smoke test to catch API mismatches #116

Merged
k9ert merged 1 commit from story-109 into main 2026-02-26 16:18:43 +00:00
Collaborator

Closes #109
Closes #101

Changes

New tests/test_smoke.py with 220 parametrized smoke tests that auto-discover all 27 plugins and verify:

Check Tests Catches
Plugin import 27 Missing/broken imports
create_plugin() exists 27 Missing factory function
Returns Plugin subclass 27 Wrong return type
Has valid PluginMeta 27 Missing id/version
Has configure() 27 Missing interface method
Has async start/stop 54 Sync/async mismatch
configure({}) safe 27 Crash on empty config
CLI entry point 3 #97-style method renames

Plugins with optional deps (nostr, telegram) are gracefully skipped when those deps are not installed.

Would have caught:

  • #97: run_loop_sync renamed to run_sync — smoke test checks Cobot class methods
  • #104: call_extension removed from registry — smoke test verifies all plugins import cleanly

Epic #101 Complete! 🎉

Story PR Tests Added
#102 N/A 0 (was env issue, not broken tests)
#103 #110 0 (import guards)
#104 #111 0 (runtime fix)
#105 #112 29 (security)
#106 #113 83 (cron, heartbeat, subagent)
#107 #114 54 (filedrop, wallet)
#108 #115 78 (compaction, logger, loop, ollama)
#109 this 220 (smoke tests)
Total 464 new tests

Final count: 836 tests passing (up from 300).

Verification

  • 836 passed, 1 skipped, 0 failed
  • ruff check — all passed
  • ruff format --check — all formatted
Closes #109 Closes #101 ## Changes New `tests/test_smoke.py` with 220 parametrized smoke tests that auto-discover all 27 plugins and verify: | Check | Tests | Catches | |-------|-------|---------| | Plugin import | 27 | Missing/broken imports | | create_plugin() exists | 27 | Missing factory function | | Returns Plugin subclass | 27 | Wrong return type | | Has valid PluginMeta | 27 | Missing id/version | | Has configure() | 27 | Missing interface method | | Has async start/stop | 54 | Sync/async mismatch | | configure({}) safe | 27 | Crash on empty config | | CLI entry point | 3 | #97-style method renames | Plugins with optional deps (nostr, telegram) are gracefully skipped when those deps are not installed. ### Would have caught: - **#97**: `run_loop_sync` renamed to `run_sync` — smoke test checks `Cobot` class methods - **#104**: `call_extension` removed from registry — smoke test verifies all plugins import cleanly ## Epic #101 Complete! 🎉 | Story | PR | Tests Added | |-------|----|-------------| | #102 | N/A | 0 (was env issue, not broken tests) | | #103 | #110 | 0 (import guards) | | #104 | #111 | 0 (runtime fix) | | #105 | #112 | 29 (security) | | #106 | #113 | 83 (cron, heartbeat, subagent) | | #107 | #114 | 54 (filedrop, wallet) | | #108 | #115 | 78 (compaction, logger, loop, ollama) | | #109 | this | 220 (smoke tests) | | **Total** | | **464 new tests** | Final count: **836 tests passing** (up from 300). ## Verification - 836 passed, 1 skipped, 0 failed - `ruff check` — all passed - `ruff format --check` — all formatted
[#109] test: add CI smoke test to catch API mismatches
All checks were successful
CI / lint (pull_request) Successful in 10s
CI / test (3.11) (pull_request) Successful in 23s
CI / test (3.12) (pull_request) Successful in 25s
CI / test (3.13) (pull_request) Successful in 25s
E2E Tests / e2e (pull_request) Successful in 16s
CI / build (pull_request) Successful in 7s
2ea8cc7c28
220 parametrized smoke tests that auto-discover all plugins and verify:
- Every plugin module can be imported (graceful skip for optional deps)
- Every plugin has create_plugin() returning a Plugin subclass
- Every plugin has valid PluginMeta (id, version)
- Every plugin has configure(), async start(), async stop()
- configure({}) doesn't crash on any plugin
- CLI entry point resolves (cobot.cli.main exists)
- Cobot class has run_sync() and NOT run_loop_sync() (#97)

These tests would have caught both #97 (run_loop_sync) and #104
(telegram call_extension) before they reached production.
k9ert approved these changes 2026-02-26 16:18:34 +00:00
k9ert merged commit 1ccd61cb3a into main 2026-02-26 16:18:43 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ultanio/cobot!116
No description provided.