Skip to content

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

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

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
Contributor

✅ 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!

@iacker

iacker commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #53327 — rebased onto current main. The original test patched tools.session_search_tool._summarize_session and model_tools._discover_tools (both removed since) and froze an exact arg set that has changed; #53327 drops the stale patches and asserts the wiring invariant instead. Closing in favor of #53327.

@iacker iacker closed this Jun 26, 2026
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