Story: Fix 17 failing tests (persistence, scheduled, web) #102

Open
opened 2026-02-26 14:48:56 +00:00 by doxios · 1 comment
Collaborator

Epic: #101

Description

17 tests are currently failing due to API changes that were not reflected in tests.

Failing Tests

test_persistence.py (10 failures):

  • TestPersistencePlugin::test_on_message_received_stores_user_message
  • TestPersistencePlugin::test_on_message_received_disabled
  • TestPersistencePlugin::test_on_after_send_stores_assistant_message
  • TestPersistencePlugin::test_transform_history_injects_previous_messages
  • TestPersistencePlugin::test_transform_history_empty_history
  • TestPersistencePlugin::test_transform_history_disabled
  • TestPersistencePlugin::test_conversation_flow
  • TestPersistencePlugin::test_separate_conversations_per_peer
  • TestStdinModePersistence::test_stdin_peer_conversation
  • TestStdinModePersistence::test_remember_numbers_scenario

test_scheduled.py (5 failures):

  • TestSubagentPlugin::test_spawn_no_llm
  • TestSubagentPlugin::test_spawn_success
  • TestSubagentPlugin::test_spawn_concurrency_limit
  • TestHeartbeatPlugin::test_start_disabled
  • TestHeartbeatPlugin::test_start_no_cron

web/test_plugin.py (2 failures):

  • TestLifecycle::test_start_when_disabled
  • TestLifecycle::test_stop_graceful

Acceptance Criteria

  • All 10 persistence tests pass
  • All 5 scheduled tests pass (subagent + heartbeat)
  • Both web plugin lifecycle tests pass
  • No new test failures introduced
  • ruff check cobot/ passes
**Epic:** #101 ## Description 17 tests are currently failing due to API changes that were not reflected in tests. ### Failing Tests **test_persistence.py (10 failures):** - `TestPersistencePlugin::test_on_message_received_stores_user_message` - `TestPersistencePlugin::test_on_message_received_disabled` - `TestPersistencePlugin::test_on_after_send_stores_assistant_message` - `TestPersistencePlugin::test_transform_history_injects_previous_messages` - `TestPersistencePlugin::test_transform_history_empty_history` - `TestPersistencePlugin::test_transform_history_disabled` - `TestPersistencePlugin::test_conversation_flow` - `TestPersistencePlugin::test_separate_conversations_per_peer` - `TestStdinModePersistence::test_stdin_peer_conversation` - `TestStdinModePersistence::test_remember_numbers_scenario` **test_scheduled.py (5 failures):** - `TestSubagentPlugin::test_spawn_no_llm` - `TestSubagentPlugin::test_spawn_success` - `TestSubagentPlugin::test_spawn_concurrency_limit` - `TestHeartbeatPlugin::test_start_disabled` - `TestHeartbeatPlugin::test_start_no_cron` **web/test_plugin.py (2 failures):** - `TestLifecycle::test_start_when_disabled` - `TestLifecycle::test_stop_graceful` ## Acceptance Criteria - [ ] All 10 persistence tests pass - [ ] All 5 scheduled tests pass (subagent + heartbeat) - [ ] Both web plugin lifecycle tests pass - [ ] No new test failures introduced - [ ] `ruff check cobot/` passes
Author
Collaborator

Finding: Tests are not actually broken

All 17 "failures" were caused by missing pytest-asyncio in the test environment. When run with pip install -e ".[dev]" (which installs pytest-asyncio), all 300 tests pass.

Root cause: Running pytest without first installing dev dependencies.

Fix needed: This is really a dev environment/CI story, not a test fix story. Options:

  1. Add a conftest.py that warns if pytest-asyncio is missing
  2. Document pip install -e ".[dev]" as prerequisite in CONTRIBUTING.md
  3. Ensure CI always uses .[dev]

Result: 300 passed, 0 failed, 18 warnings

This story can be closed or re-scoped to "ensure dev deps are documented/enforced."

## Finding: Tests are not actually broken All 17 "failures" were caused by missing `pytest-asyncio` in the test environment. When run with `pip install -e ".[dev]"` (which installs pytest-asyncio), all 300 tests pass. **Root cause:** Running `pytest` without first installing dev dependencies. **Fix needed:** This is really a dev environment/CI story, not a test fix story. Options: 1. Add a `conftest.py` that warns if pytest-asyncio is missing 2. Document `pip install -e ".[dev]"` as prerequisite in CONTRIBUTING.md 3. Ensure CI always uses `.[dev]` **Result:** 300 passed, 0 failed, 18 warnings This story can be closed or re-scoped to "ensure dev deps are documented/enforced."
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#102
No description provided.