Skip to content

v7.1.15

Choose a tag to compare

@thedotmack thedotmack released this 14 Dec 19:38
· 26 commits to main since this release

🐛 Bug Fixes

Worker Service Initialization

  • Fixed 404 error on /api/context/inject during worker startup
  • Route is now registered immediately instead of after database initialization
  • Prevents race condition on fresh installs and restarts
  • Added integration test for early context inject route access

Technical Details

The context hook was failing with Cannot GET /api/context/inject because the route was registered only after database initialization completed. This created a race condition where the hook could attempt to access the endpoint before it existed.

Implementation:

  • Added initializationComplete Promise to track async background initialization
  • Register /api/context/inject route immediately in setupRoutes()
  • Early handler blocks requests until initialization resolves (30s timeout)
  • Route handler duplicates logic from SearchRoutes.handleContextInject by design to prevent 404s

Testing:

  • Added integration test verifying route registration and timeout handling

Fixes #305
Related: PR #310