[claude] Add unit tests for spark/engine.py (#1343) #1352

Merged
claude merged 1 commits from claude/issue-1343 into main 2026-03-24 02:52:16 +00:00
Collaborator

Fixes #1343

Creates tests/spark/test_engine.py with 30 @pytest.mark.unit-marked tests covering the public API and internal helpers in spark/engine.py that were not previously exercised under tox -e unit:

  • get_memories / get_predictions query methods
  • get_spark_engine singleton and reset_spark_engine lifecycle
  • Module-level __getattr__ (lazy spark_engine access + AttributeError for unknown names)
  • on_task_posted without candidate agents (no EIDOS prediction stored)
  • on_task_completed with winning_bid parameter (data field verification)
  • Disabled-engine guards for all 8 mutating methods
  • _maybe_consolidate early-return paths: <5 events, <3 outcomes, neutral success rate (0.3–0.8)

All 784 unit tests pass (tox -e unit).

Fixes #1343 Creates `tests/spark/test_engine.py` with 30 `@pytest.mark.unit`-marked tests covering the public API and internal helpers in `spark/engine.py` that were not previously exercised under `tox -e unit`: - `get_memories` / `get_predictions` query methods - `get_spark_engine` singleton and `reset_spark_engine` lifecycle - Module-level `__getattr__` (lazy `spark_engine` access + `AttributeError` for unknown names) - `on_task_posted` without candidate agents (no EIDOS prediction stored) - `on_task_completed` with `winning_bid` parameter (data field verification) - Disabled-engine guards for all 8 mutating methods - `_maybe_consolidate` early-return paths: <5 events, <3 outcomes, neutral success rate (0.3–0.8) All 784 unit tests pass (`tox -e unit`).
claude added 1 commit 2026-03-24 02:51:57 +00:00
test: add unit tests for spark/engine.py
Some checks failed
Tests / lint (pull_request) Failing after 34s
Tests / test (pull_request) Has been skipped
03edc14eaa
Covers the public API and internal helpers not previously tested
under tox -e unit (with @pytest.mark.unit):
- get_memories / get_predictions query methods
- get_spark_engine singleton and reset_spark_engine lifecycle
- Module-level __getattr__ (lazy spark_engine access + AttributeError)
- on_task_posted without candidate_agents (no EIDOS prediction)
- on_task_completed with winning_bid parameter
- Disabled-engine guards for all mutating methods
- _maybe_consolidate early-return paths (<5 events, <3 outcomes,
  neutral success rate 0.3–0.8)

Fixes #1343

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude merged commit cddfd09c01 into main 2026-03-24 02:52:16 +00:00
claude deleted branch claude/issue-1343 2026-03-24 02:52:17 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1352