fix(errors): pre-serialize error responses to bypass response-schema … #36
Annotations
24 errors and 4 warnings
|
typecheck:
src/routes/demo/index.ts#L214
'apiKey' is declared but its value is never read.
|
|
typecheck:
src/routes/conversations/index.ts#L146
Property '_count' does not exist on type '{ userId: string; id: string; metadata: JsonValue; createdAt: Date; updatedAt: Date; topic: string | null; lastActiveBranchId: string | null; active: boolean; }'.
|
|
typecheck:
src/routes/conversations/index.ts#L141
Parameter 'b' implicitly has an 'any' type.
|
|
typecheck:
src/routes/conversations/index.ts#L141
Parameter 'sum' implicitly has an 'any' type.
|
|
typecheck:
src/routes/conversations/index.ts#L141
Property 'branches' does not exist on type '{ userId: string; id: string; metadata: JsonValue; createdAt: Date; updatedAt: Date; topic: string | null; lastActiveBranchId: string | null; active: boolean; }'.
|
|
typecheck:
src/routes/conversations/index.ts#L139
Property 'branches' does not exist on type '{ userId: string; id: string; metadata: JsonValue; createdAt: Date; updatedAt: Date; topic: string | null; lastActiveBranchId: string | null; active: boolean; }'.
|
|
typecheck:
src/routes/conversations/index.ts#L114
Type 'string | null' is not assignable to type 'string | StringFilter<"Conversation"> | undefined'.
|
|
typecheck:
src/routes/branches/index.ts#L324
Argument of type '500' is not assignable to parameter of type '200 | 404 | 403'.
|
|
typecheck:
src/routes/branches/index.ts#L258
Property 'fact' does not exist on type '{ value: string; key: string; id: string; createdAt: Date; branchId: string; confidence: number; messageIds: string[]; }'.
|
|
typecheck:
src/routes/branches/index.ts#L168
Argument of type '500' is not assignable to parameter of type '200 | 404 | 403'.
|
|
lint
Process completed with exit code 1.
|
|
lint:
src/plugins/env.ts#L22
Delete `·`
|
|
lint:
src/plugins/env.ts#L7
Delete `·`
|
|
lint:
src/plugins/cors.ts#L12
Replace `'Content-Type',·'Authorization',·'X-LLM-Key',·'X-Routing-Provider',·'x-routing-provider'` with `⏎······'Content-Type',⏎······'Authorization',⏎······'X-LLM-Key',⏎······'X-Routing-Provider',⏎······'x-routing-provider',⏎····`
|
|
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts > buildPrompt > formats multiple branches correctly:
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts#L73
AssertionError: expected 'You are a conversation router. Your j…' to contain '- a: Topic A\n- b: Topic B\n- c: Topi…'
- Expected
+ Received
- - a: Topic A
- - b: Topic B
- - c: Topic C
+ You are a conversation router. Your job: Route the message to the right branch.
+
+ WHY: Each branch has separate memory. Splitting too early = AI loses context.
+
+ Current topic: None
+ Other topics:
+ 1. Topic A
+ 2. Topic B
+ 3. Topic C
+
+ New message: "Test"
+
+ ROUTING RULES:
+ - STAY: Message relates to current topic, or would benefit from current context
+ - ROUTE: Message fits an OTHER topic better - semantically related topics should share branches (return topic NUMBER)
+ - BRANCH: Message is fundamentally different - needs separate memory. MUST provide a short topic name (3-6 words).
+
+ Ask: "Would the AI respond BETTER with current context?" → Yes = STAY
+ Ask: "Is this semantically related to an existing topic?" → Yes = ROUTE to that topic
+ Ask: "Is this a completely different domain/category?" → Yes = BRANCH
+
+ Examples of ROUTE (not BRANCH):
+ - "golden retrievers" → "cavoodles" (both dog breeds, same domain)
+ - "Paris hotels" → "London hotels" (both travel/hotels, same domain)
+ - "mortgage rates" → "property tax" (both home buying, same domain)
+
+ Examples of BRANCH:
+ - "Paris hotels" → "what's the weather?" (travel → weather, different domains)
+ - "golden retrievers" → "recipe for pasta" (dogs → cooking, different domains)
+
+ Default to STAY if uncertain.
+ Confidence: How certain are you? 0 = no idea, 0.5 = uncertain, 0.8 = confident, 1 = absolutely certain.
+
+ IMPORTANT: If action=BRANCH, you MUST provide a newBranchTopic (3-6 words describing the new topic).
❯ src/services/drift/operations/classify-route/helpers/build-prompt.test.ts:73:20
|
|
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts > buildPrompt > uses fallback text when no current branch:
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts#L61
AssertionError: expected 'You are a conversation router. Your j…' to contain 'STAY: Message DIRECTLY continues disc…'
- Expected
+ Received
- STAY: Message DIRECTLY continues discussing "the current topic"
+ You are a conversation router. Your job: Route the message to the right branch.
+
+ WHY: Each branch has separate memory. Splitting too early = AI loses context.
+
+ Current topic: None
+ Other topics:
+ None
+
+ New message: "Test"
+
+ ROUTING RULES:
+ - STAY: Message relates to current topic, or would benefit from current context
+ - ROUTE: Message fits an OTHER topic better - semantically related topics should share branches (return topic NUMBER)
+ - BRANCH: Message is fundamentally different - needs separate memory. MUST provide a short topic name (3-6 words).
+
+ Ask: "Would the AI respond BETTER with current context?" → Yes = STAY
+ Ask: "Is this semantically related to an existing topic?" → Yes = ROUTE to that topic
+ Ask: "Is this a completely different domain/category?" → Yes = BRANCH
+
+ Examples of ROUTE (not BRANCH):
+ - "golden retrievers" → "cavoodles" (both dog breeds, same domain)
+ - "Paris hotels" → "London hotels" (both travel/hotels, same domain)
+ - "mortgage rates" → "property tax" (both home buying, same domain)
+
+ Examples of BRANCH:
+ - "Paris hotels" → "what's the weather?" (travel → weather, different domains)
+ - "golden retrievers" → "recipe for pasta" (dogs → cooking, different domains)
+
+ Default to STAY if uncertain.
+ Confidence: How certain are you? 0 = no idea, 0.5 = uncertain, 0.8 = confident, 1 = absolutely certain.
+
+ IMPORTANT: If action=BRANCH, you MUST provide a newBranchTopic (3-6 words describing the new topic).
❯ src/services/drift/operations/classify-route/helpers/build-prompt.test.ts:61:20
|
|
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts > buildPrompt > references current topic in STAY description:
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts#L55
AssertionError: expected 'You are a conversation router. Your j…' to contain 'STAY: Message DIRECTLY continues disc…'
- Expected
+ Received
- STAY: Message DIRECTLY continues discussing "Machine Learning"
+ You are a conversation router. Your job: Route the message to the right branch.
+
+ WHY: Each branch has separate memory. Splitting too early = AI loses context.
+
+ Current topic: Machine Learning
+ Other topics:
+ None
+
+ New message: "Test"
+
+ ROUTING RULES:
+ - STAY: Message relates to current topic, or would benefit from current context
+ - ROUTE: Message fits an OTHER topic better - semantically related topics should share branches (return topic NUMBER)
+ - BRANCH: Message is fundamentally different - needs separate memory. MUST provide a short topic name (3-6 words).
+
+ Ask: "Would the AI respond BETTER with current context?" → Yes = STAY
+ Ask: "Is this semantically related to an existing topic?" → Yes = ROUTE to that topic
+ Ask: "Is this a completely different domain/category?" → Yes = BRANCH
+
+ Examples of ROUTE (not BRANCH):
+ - "golden retrievers" → "cavoodles" (both dog breeds, same domain)
+ - "Paris hotels" → "London hotels" (both travel/hotels, same domain)
+ - "mortgage rates" → "property tax" (both home buying, same domain)
+
+ Examples of BRANCH:
+ - "Paris hotels" → "what's the weather?" (travel → weather, different domains)
+ - "golden retrievers" → "recipe for pasta" (dogs → cooking, different domains)
+
+ Default to STAY if uncertain.
+ Confidence: How certain are you? 0 = no idea, 0.5 = uncertain, 0.8 = confident, 1 = absolutely certain.
+
+ IMPORTANT: If action=BRANCH, you MUST provide a newBranchTopic (3-6 words describing the new topic).
❯ src/services/drift/operations/classify-route/helpers/build-prompt.test.ts:55:20
|
|
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts > buildPrompt > includes quick check guidelines:
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts#L46
AssertionError: expected 'You are a conversation router. Your j…' to contain 'Filler (Yes, Ok, Sure, Thanks) → STAY'
- Expected
+ Received
- Filler (Yes, Ok, Sure, Thanks) → STAY
+ You are a conversation router. Your job: Route the message to the right branch.
+
+ WHY: Each branch has separate memory. Splitting too early = AI loses context.
+
+ Current topic: None
+ Other topics:
+ None
+
+ New message: "Test"
+
+ ROUTING RULES:
+ - STAY: Message relates to current topic, or would benefit from current context
+ - ROUTE: Message fits an OTHER topic better - semantically related topics should share branches (return topic NUMBER)
+ - BRANCH: Message is fundamentally different - needs separate memory. MUST provide a short topic name (3-6 words).
+
+ Ask: "Would the AI respond BETTER with current context?" → Yes = STAY
+ Ask: "Is this semantically related to an existing topic?" → Yes = ROUTE to that topic
+ Ask: "Is this a completely different domain/category?" → Yes = BRANCH
+
+ Examples of ROUTE (not BRANCH):
+ - "golden retrievers" → "cavoodles" (both dog breeds, same domain)
+ - "Paris hotels" → "London hotels" (both travel/hotels, same domain)
+ - "mortgage rates" → "property tax" (both home buying, same domain)
+
+ Examples of BRANCH:
+ - "Paris hotels" → "what's the weather?" (travel → weather, different domains)
+ - "golden retrievers" → "recipe for pasta" (dogs → cooking, different domains)
+
+ Default to STAY if uncertain.
+ Confidence: How certain are you? 0 = no idea, 0.5 = uncertain, 0.8 = confident, 1 = absolutely certain.
+
+ IMPORTANT: If action=BRANCH, you MUST provide a newBranchTopic (3-6 words describing the new topic).
❯ src/services/drift/operations/classify-route/helpers/build-prompt.test.ts:46:20
|
|
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts > buildPrompt > handles no other branches:
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts#L32
AssertionError: expected 'You are a conversation router. Your j…' to contain 'Other branches:\nNone'
- Expected
+ Received
- Other branches:
+ You are a conversation router. Your job: Route the message to the right branch.
+
+ WHY: Each branch has separate memory. Splitting too early = AI loses context.
+
+ Current topic: Current topic
+ Other topics:
None
+
+ New message: "Test message"
+
+ ROUTING RULES:
+ - STAY: Message relates to current topic, or would benefit from current context
+ - ROUTE: Message fits an OTHER topic better - semantically related topics should share branches (return topic NUMBER)
+ - BRANCH: Message is fundamentally different - needs separate memory. MUST provide a short topic name (3-6 words).
+
+ Ask: "Would the AI respond BETTER with current context?" → Yes = STAY
+ Ask: "Is this semantically related to an existing topic?" → Yes = ROUTE to that topic
+ Ask: "Is this a completely different domain/category?" → Yes = BRANCH
+
+ Examples of ROUTE (not BRANCH):
+ - "golden retrievers" → "cavoodles" (both dog breeds, same domain)
+ - "Paris hotels" → "London hotels" (both travel/hotels, same domain)
+ - "mortgage rates" → "property tax" (both home buying, same domain)
+
+ Examples of BRANCH:
+ - "Paris hotels" → "what's the weather?" (travel → weather, different domains)
+ - "golden retrievers" → "recipe for pasta" (dogs → cooking, different domains)
+
+ Default to STAY if uncertain.
+ Confidence: How certain are you? 0 = no idea, 0.5 = uncertain, 0.8 = confident, 1 = absolutely certain.
+
+ IMPORTANT: If action=BRANCH, you MUST provide a newBranchTopic (3-6 words describing the new topic).
❯ src/services/drift/operations/classify-route/helpers/build-prompt.test.ts:32:20
|
|
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts > buildPrompt > handles no current branch (new conversation):
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts#L23
AssertionError: expected 'You are a conversation router. Your j…' to contain 'Current branch topic: None (new conve…'
- Expected
+ Received
- Current branch topic: None (new conversation)
+ You are a conversation router. Your job: Route the message to the right branch.
+
+ WHY: Each branch has separate memory. Splitting too early = AI loses context.
+
+ Current topic: None
+ Other topics:
+ None
+
+ New message: "Hello there"
+
+ ROUTING RULES:
+ - STAY: Message relates to current topic, or would benefit from current context
+ - ROUTE: Message fits an OTHER topic better - semantically related topics should share branches (return topic NUMBER)
+ - BRANCH: Message is fundamentally different - needs separate memory. MUST provide a short topic name (3-6 words).
+
+ Ask: "Would the AI respond BETTER with current context?" → Yes = STAY
+ Ask: "Is this semantically related to an existing topic?" → Yes = ROUTE to that topic
+ Ask: "Is this a completely different domain/category?" → Yes = BRANCH
+
+ Examples of ROUTE (not BRANCH):
+ - "golden retrievers" → "cavoodles" (both dog breeds, same domain)
+ - "Paris hotels" → "London hotels" (both travel/hotels, same domain)
+ - "mortgage rates" → "property tax" (both home buying, same domain)
+
+ Examples of BRANCH:
+ - "Paris hotels" → "what's the weather?" (travel → weather, different domains)
+ - "golden retrievers" → "recipe for pasta" (dogs → cooking, different domains)
+
+ Default to STAY if uncertain.
+ Confidence: How certain are you? 0 = no idea, 0.5 = uncertain, 0.8 = confident, 1 = absolutely certain.
+
+ IMPORTANT: If action=BRANCH, you MUST provide a newBranchTopic (3-6 words describing the new topic).
❯ src/services/drift/operations/classify-route/helpers/build-prompt.test.ts:23:20
|
|
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts > buildPrompt > builds prompt with current branch and other branches:
src/services/drift/operations/classify-route/helpers/build-prompt.test.ts#L14
AssertionError: expected 'You are a conversation router. Your j…' to contain 'Current branch topic: Discussing Type…'
- Expected
+ Received
- Current branch topic: Discussing TypeScript
+ You are a conversation router. Your job: Route the message to the right branch.
+
+ WHY: Each branch has separate memory. Splitting too early = AI loses context.
+
+ Current topic: Discussing TypeScript
+ Other topics:
+ 1. Python tutorials
+ 2. Database design
+
+ New message: "What about generics?"
+
+ ROUTING RULES:
+ - STAY: Message relates to current topic, or would benefit from current context
+ - ROUTE: Message fits an OTHER topic better - semantically related topics should share branches (return topic NUMBER)
+ - BRANCH: Message is fundamentally different - needs separate memory. MUST provide a short topic name (3-6 words).
+
+ Ask: "Would the AI respond BETTER with current context?" → Yes = STAY
+ Ask: "Is this semantically related to an existing topic?" → Yes = ROUTE to that topic
+ Ask: "Is this a completely different domain/category?" → Yes = BRANCH
+
+ Examples of ROUTE (not BRANCH):
+ - "golden retrievers" → "cavoodles" (both dog breeds, same domain)
+ - "Paris hotels" → "London hotels" (both travel/hotels, same domain)
+ - "mortgage rates" → "property tax" (both home buying, same domain)
+
+ Examples of BRANCH:
+ - "Paris hotels" → "what's the weather?" (travel → weather, different domains)
+ - "golden retrievers" → "recipe for pasta" (dogs → cooking, different domains)
+
+ Default to STAY if uncertain.
+ Confidence: How certain are you? 0 = no idea, 0.5 = uncertain, 0.8 = confident, 1 = absolutely certain.
+
+ IMPORTANT: If action=BRANCH, you MUST provide a newBranchTopic (3-6 words describing the new topic).
❯ src/services/drift/operations/classify-route/helpers/build-prompt.test.ts:14:20
|
|
src/services/drift/operations/validate-input.test.ts > validateInput > accepts assistant role:
src/services/drift/operations/validate-input.ts#L24
Error: userId is required for authenticated requests
❯ Module.validateInput src/services/drift/operations/validate-input.ts:24:11
❯ src/services/drift/operations/validate-input.test.ts:75:26
|
|
src/services/drift/operations/validate-input.test.ts > validateInput > accepts user role:
src/services/drift/operations/validate-input.ts#L24
Error: userId is required for authenticated requests
❯ Module.validateInput src/services/drift/operations/validate-input.ts:24:11
❯ src/services/drift/operations/validate-input.test.ts:68:26
|
|
src/services/drift/operations/validate-input.test.ts > validateInput > passes with valid input:
src/services/drift/operations/validate-input.ts#L24
Error: userId is required for authenticated requests
❯ Module.validateInput src/services/drift/operations/validate-input.ts:24:11
❯ src/services/drift/operations/validate-input.test.ts:31:26
|
|
typecheck
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
build
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4, actions/upload-artifact@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
lint
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
test
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
dist
Expired
|
91.2 KB |
sha256:0ea23bd40229e618647bc5bf6a2c92e2d677700319965eed96b39d6fbaa1a41c
|
|