fix: address CodeRabbit review — remove side-effectful test import and normalize timeline depth params

- tests/servers/mcp-tool-schemas.test.ts: remove `import '../../src/servers/mcp-server.js'`
  which triggered server startup side effects; test only needs to read the TS source as text
- src/services/worker/SearchManager.ts: add Number() coercion for depth_before/depth_after
  in timeline(), getContextTimeline(), getTimelineByQuery() — HTTP query strings deliver
  these as strings, coercion ensures they are always numbers before being passed to
  filterByDepth() and getTimelineAround*()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ousama Ben Younes
2026-04-07 17:30:59 +00:00
parent 8cdabe6315
commit 64062ac761
2 changed files with 29 additions and 26 deletions
+1 -4
View File
@@ -6,10 +6,7 @@
*/
import { describe, it, expect } from 'bun:test';
// Import the tools array directly — static schema validation, no server needed
import '../../src/servers/mcp-server.js';
// Re-import via dynamic require to access the tools array
// Static schema validation — reads source as text, no server startup needed
const mcpServerPath = new URL('../../src/servers/mcp-server.ts', import.meta.url).pathname;
describe('MCP tool inputSchema declarations', () => {