Skip to content

fix(knowledge): exit when server startup fails - #1141

Open
kyletser wants to merge 1 commit into
TencentCloud:feat/server_teamfrom
kyletser:fix/knowledge-startup-exit
Open

kyletser wants to merge 1 commit into
TencentCloud:feat/server_teamfrom
kyletser:fix/knowledge-startup-exit

Conversation

@kyletser

Copy link
Copy Markdown

Summary

  • exit with status 1 when MemoryKnowledge fails during startup
  • add a regression test for an invalid SQLite path while Langfuse telemetry is active

Problem

The existing handler only assigned process.exitCode. If telemetry had already created active handles, the HTTP listener never started but the process stayed alive.

Testing

  • pnpm test
  • pnpm build
  • Ubuntu, Node.js 22: invalid KNOWLEDGE_DB_PATH with Langfuse enabled exits with status 1

pnpm typecheck currently fails in the unchanged src/middleware/response-envelope.ts:47 because Promise<string> is assigned to string.

Closes #1140

Copilot AI lite review requested due to automatic review settings August 24, 2026 06:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Thank you so much for your attention and contribution! We will arrange an internal review for this PR shortly, and all feedback will be shared right here in the discussion.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] MemoryKnowledge 启动失败后进程空转不退出

3 participants