Skip to content

v1.5.1 - Performance Optimization, Security Audit & Bug Fixes

Choose a tag to compare

@Lotargo Lotargo released this 07 Aug 02:06
· 211 commits to main since this release

🚀 What's Changed in v1.5.1

This maintenance release focuses on major performance optimizations, security hardening across file/URL ingestion, code cleanup, and comprehensive unit test coverage.


⚡ Performance & Database Optimizations (N+1 Query Elimination)

  • Batched Retrieval in hybridQuery: Eliminated N+1 database queries during search when performing parent-child chunk rollups, section lookups, and graph symbol context fetching.
  • Batched Graph Symbols: Introduced getRelatedSymbolsBatch to fetch defined graph symbols for multiple sections in a single batched SQL query.
  • Bulk FTS Deletions: Replaced single-row micro_chunks_fts deletion loops with single-query bulk deletions during document ingestion updates and document deletion.

🛡️ Security Enhancements

  • SSRF Guard for URL Ingestion: Added URL validation to prevent Server-Side Request Forgery (fetchUrlContent). Safely blocks loopback addresses (127.0.0.1, localhost), cloud metadata services (169.254.169.254), and private subnets (10.x.x.x, 172.16-31.x.x, 192.168.x.x).
  • Path Traversal Protection: Enforced strict path normalization and .json/.json.gz extension checks for snapshot export and import operations (validateSnapshotPath).

🧹 Code Cleanup & Refactoring

  • Quality Evaluator Refactoring: Removed dead function runQueryForMode and unused imports in benchmark quality evaluation scripts.
  • Import Audit: Cleaned up unused imports across CLI and server entry points.

🧪 Unit Testing & Quality Assurance

  • Added new automated test suite test_unit_audit_fixes.js covering:
    • Multilingual symbol extraction (extractSymbolsFromContent).
    • Heading normalization and fallback title extraction (extractTitle).
    • Structured document JSON string exporting (exportDocumentToJsonString).
    • FTS query sanitization (sanitizeFtsQuery).
    • Config partial updates and file persistence (updateConfig).
  • Verified 100% pass rate across all existing Phase 1–5 and benchmark test suites.

Full Changelog: v1.5.0...v1.5.1