Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): import valid conversations within each transcript record limit #23192

Mergedjuliusmarmingemerged 8 commits intomain fromrefs/pull/23192/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 55 additions and 24 deletions.

x
0 of 2 viewed, 2 left
51 additions and 8 deletionsapps/server/src/project/AgentSessionScanner.test.tsModified
View file
@@ -1408,9 +1408,11 @@
const claudeHomePath = yield* makeTempDir("t3code-record-budget-claude-");
const codexHomePath = yield* makeTempDir("t3code-record-budget-codex-");
const workspace = yield* makeTempDir("t3code-record-budget-workspace-");
- for (const [sessionId, padding, mtimeMs] of [
- ["excessive", "\n".repeat(100_001), nowMs],
- ["older", "", nowMs - 1_000],
+ const exactLimit = makeRecordLimitTranscript(workspace, false);
+ // The newer transcript has 100,001 records; the older one has exactly 100,000.
+ for (const [sessionId, contents, mtimeMs] of [
+ ["excessive", exactLimit.replace("record-limit-session", "excessive") + "{}\n", nowMs],
+ ["older", exactLimit, nowMs - 1_000],
] as const) {
yield* writeTranscript({
filePath: path.join(
@@ -1421,18 +1423,56 @@
"24",
`rollout-${sessionId}.jsonl`,
+ contents,
+ mtimeMs,
+ });
+ }
+ const outcomes = yield* runRecentThreadOutcomes({
+ claudeHomePath,
+ codexHomePath,
+ workspaceRoot: workspace,
+ });
+ expect(outcomes.map((outcome) => outcome._tag)).toEqual(["Skipped", "Importable"]);