feat(codex-lsp): lazy-start mcp backend

This commit is contained in:
YeonGyu-Kim
2026-05-29 12:18:24 +09:00
parent 5030a116f3
commit 4bf9095456
14 changed files with 1013 additions and 10 deletions
@@ -0,0 +1,21 @@
import { describe, expect, it } from "vitest";
import { resolveLazyLspIdleTimeoutMs } from "../src/lazy-lsp-mcp.js";
import { DEFAULT_LAZY_MCP_IDLE_TIMEOUT_MS } from "../src/lazy-mcp-proxy.js";
describe("lazy LSP MCP config", () => {
it("#given idle timeout env input #when resolving lazy LSP config #then default and malformed values are safe", () => {
// given
const fallback = DEFAULT_LAZY_MCP_IDLE_TIMEOUT_MS;
// when
const missing = resolveLazyLspIdleTimeoutMs(undefined, fallback);
const valid = resolveLazyLspIdleTimeoutMs("25", fallback);
const malformed = resolveLazyLspIdleTimeoutMs("abc", fallback);
// then
expect(missing).toEqual({ value: fallback });
expect(valid).toEqual({ value: 25 });
expect(malformed.value).toBe(fallback);
expect(malformed.warning).toContain("Ignoring malformed lazy MCP idle timeout");
});
});