Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): harden managed Codex ChatGPT sharing and recover rejected input history #46389

OpenCiastekbatak(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/46389/headopened View on GitHub

Showing 5 changed files with 94 additions and 8 deletions (loading 2).

x
0 of 5 viewed, 5 left
2 additions and 4 deletionsapps/server/src/orchestration-v2/ProviderTurnStartService.tsModified
View file
@@ -1,4 +1,4 @@
-import { classifyCodexManagedError } from "../provider/CodexManagedErrors.ts";
+import { isCodexRejectedHistoryFailure } from "../provider/CodexManagedErrors.ts";
import { modelSelectionsEqual } from "@t3tools/shared/model";
import { projectComposerContextForProvider } from "@t3tools/shared/composerContextReferences";
import { expandAssistantCitationsForProvider } from "@t3tools/shared/assistantCitations";
@@ -2051,9 +2051,7 @@
(item) =>
item.type === "error" &&
item.nodeId === previous.rootNodeId &&
- (item.failure.code === "invalid_encrypted_content" ||
- classifyCodexManagedError(item.failure.message)?.code ===
- "invalid_encrypted_content"),
+ isCodexRejectedHistoryFailure(item.failure),
const failForPendingWork = loadFromProvider(
50 additions and 1 deletionapps/server/src/provider/CodexManagedErrors.test.tsModified
View file
@@ -1,5 +1,5 @@
import { assert, it } from "@effect/vitest";
-import { classifyCodexManagedError } from "./CodexManagedErrors.ts";
+import { classifyCodexManagedError, isCodexRejectedHistoryFailure } from "./CodexManagedErrors.ts";
it("maps streamed failures to safe actionable messages and reconnect decisions", () => {
assert.deepEqual(
classifyCodexManagedError({
@@ -108,3 +108,52 @@
assert.deepInclude(classifyCodexManagedError(value), { code, usageLimit: true });