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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user