Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): disclose truncated history in imported threads #27743

Mergedvoltcrash(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/27743/headmerged by maria-rcks View on GitHub

Showing 4 changed files with 90 additions and 2 deletions (loading 1).

x
0 of 4 viewed, 4 left
16 additions and 0 deletionsapps/server/src/project/AgentSessionImporter.test.tsModified
View file
@@ -75,6 +75,7 @@
model: modelSelection.model,
createdAt: timestamp,
updatedAt: timestamp,
+ omittedMessageCount: 0,
messages: [
{ role: "user" as const, text: "Fix it", createdAt: timestamp },
{ role: "assistant" as const, text: "Fixed", createdAt: timestamp },
@@ -273,6 +274,7 @@
"claudeAgent",
const unowned = candidate(CODEX_MODEL_SELECTION, "unowned");
+ unowned.thread.omittedMessageCount = 1;
const unownedPi = candidate(PI_MODEL_SELECTION, "unowned-pi", "pi");
const importer = yield* makeImporter([
active,
@@ -307,9 +309,23 @@
const threadId = importId(source);
const records = yield* projections.getThreadRecords(threadId, [
"messages",
+ "turnItems",
"providerThreads",
]);
expect(records.messages.map((message) => message.text)).toEqual(["Fix it", "Fixed"]);
+ const notices = records.turnItems.filter((item) => item.type === "system_notice");
+ if (source === unowned) {
+ expect(records.turnItems[0]).toBe(notices[0]);
+ expect(notices).toMatchObject([