Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): surface provider CLI startup diagnostics #22763

Closedjuliusmarmingewants to merge 2 commits intomain fromfix/issue-5943opened View on GitHub

Showing 7 changed files with 156 additions and 12 deletions (loading 4).

x
0 of 7 viewed, 7 left
58 additions and 1 deletionapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -88,7 +88,10 @@
import * as ProviderEventLoggers from "@t3tools/provider-core/server/ProviderEventLoggers";
import * as ProviderAdapter from "@t3tools/provider-core/server/ProviderAdapter";
import type * as ProviderContinuationRequests from "@t3tools/provider-core/server/ProviderContinuationRequests";
-import { makeProviderFailure } from "@t3tools/provider-core/server/failure";
+import {
+ makeProviderFailure,
+ MAX_PROVIDER_FAILURE_MESSAGE_LENGTH,
+} from "@t3tools/provider-core/server/failure";
import * as ClaudeAdapterV2 from "./ClaudeAdapterV2.ts";
import * as IdAllocator from "@t3tools/provider-core/server/IdAllocator";
import { ClaudeOrchestratorReplayHarness } from "./ClaudeAdapterV2.testkit.ts";
@@ -1778,6 +1781,60 @@
+describe("ClaudeAdapterV2 startup failure diagnostics", () => {
+ it.live.each([
+ { label: "short", code: 1, paddingBytes: 0 },
+ { label: "oversized", code: 23, paddingBytes: 512 * 1024 },
+ ])("surfaces startup exit code and bounded $label stderr", ({ code, paddingBytes }) =>
+ Effect.gen(function* () {
+ const fileSystem = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const directory = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-claude-startup-" });
+ const cliPath = path.join(directory, "cli.js");
+ const diagnostic = "error: An internal error occurred (EPERM): issue-5943 startup fixture";
+ yield* fileSystem.writeFileString(
+ cliPath,