Skip to content

test(cron): cover session_search with cron session db#6581

Open
iacker wants to merge 1 commit into
NousResearch:mainfrom
iacker:fix/cron-session-search-db
Open

test(cron): cover session_search with cron session db#6581
iacker wants to merge 1 commit into
NousResearch:mainfrom
iacker:fix/cron-session-search-db

Conversation

@iacker

@iacker iacker commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a regression test proving cron jobs pass their SQLite session DB through to session_search
  • exercise the cron AIAgent(session_db=...) wiring through run_job
  • avoid LLM summarization in the test by asserting the no-match search path

Testing

  • source venv/bin/activate && python -m pytest tests/cron/test_scheduler.py::TestRunJobSessionPersistence -q -n 0
  • source venv/bin/activate && python -m pytest tests/cron/test_scheduler.py::TestRunJobSessionPersistence::test_run_job_passes_session_db_and_cron_platform tests/cron/test_scheduler.py::TestRunJobSessionPersistence::test_cron_session_search_uses_passed_session_db -q -n 0

Notes

  • During verification, the broader tests/cron/test_scheduler.py -q suite still shows pre-existing failures in TestSilentDelivery::* and TestTickAdvanceBeforeRun::test_advance_called_before_run_job on the current base branch. This PR does not touch that logic.

Closes #6563

@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Apr 30, 2026
@trevorgordon981

Copy link
Copy Markdown

✅ Tests added by this PR run successfully. The only failures observed are import‑related (run_agent.AIAgent) and not due to the test changes themselves. The new coverage for cron scheduler helpers is solid. Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: session_search returns 'Session database not available' in cron jobs

3 participants