Skip to content

perf(retrieval): keep agent explore results, cut DB waits - #423

Merged
EricNGOntos merged 1 commit into
mainfrom
feat/wuchengke/2026-09-15
Sep 15, 2026
Merged

EricNGOntos merged 1 commit into
mainfrom
feat/wuchengke/2026-09-15

Conversation

@EricNGOntos

Copy link
Copy Markdown
Contributor

Summary

  • Give agent_explore its own 180s DB timeout so tool queries are not killed by the global 30s cap; default engine stays 30s.
  • Batch corpus.read section/body fetches after per-ref path resolution, filter node_filter sections by current revision, and run grep COUNT + rows on two connections. Same SQL predicates, same returned rows/errors, fewer round trips.
  • Publish map-unit index readiness in the background so Redis status writes do not hold the discovery result.

Test plan

  • make check
  • test_agent_tools_read.py / test_agent_tools_grep.py / test_map_unit_index_readiness.py / agent_explore db_factory contract
  • After merge: cut v1.2.11 from main and confirm production deploy

Made with Cursor

- Replaced `safe_dispose_engine` with `dispose_all_engines` for better engine management during application shutdown.
- Enhanced `ToolContext` to include `db_factory` for improved database session handling.
- Introduced new context manager `get_db_context_with_timeouts` to manage sessions with specific timeouts.
- Updated various tools to utilize the new `db_factory` parameter for database operations, ensuring consistent session management across the application.
@EricNGOntos
EricNGOntos merged commit bd38e2d into main Sep 15, 2026
6 checks passed
@EricNGOntos
EricNGOntos deleted the feat/wuchengke/2026-09-15 branch September 15, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant