GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(server): fold Claude metadata budget cases into the scanner suite · pingdotgg/t3code@f0211e2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/project
    • AgentSessionScanner.metadataBudget.test.ts
    • AgentSessionScanner.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/project/AgentSessionScanner.metadataBudget.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/project/AgentSessionScanner.metadataBudget.test.ts
-116Lines changed: 0 additions & 116 deletions
This file was deleted.
Collapse file

‎apps/server/src/project/AgentSessionScanner.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/project/AgentSessionScanner.test.ts
+57Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,6 +2564,63 @@ it.layer(NodeServices.layer)("AgentSessionScanner", (it) => {
25642564
}),
25652565
);
25662566

2567+
it.effect.each([
2568+
{ name: "a newer transcript too large to finish", sizes: [63, 2], skipped: 1 },
2569+
{
2570+
name: "a transcript that only fits when each byte is read once",
2571+
sizes: [63.5],
2572+
skipped: 0,
2573+
},
2574+
])("shares the Claude metadata budget across $name", ({ sizes, skipped }) =>
2575+
Effect.gen(function* () {
2576+
const path = yield* Path.Path;
2577+
const nowMs = Date.parse("2026-08-24T12:00:00.000Z");
2578+
yield* TestClock.setTime(nowMs);
2579+
const claudeHomePath = yield* makeTempDir("t3code-metadata-budget-claude-");
2580+
const codexHomePath = yield* makeTempDir("t3code-metadata-budget-codex-");
2581+
const workspace = yield* makeTempDir("t3code-metadata-budget-workspace-");
2582+
// Sizes in MiB against the 64 MiB per-source budget; cwd follows the image.
2583+
const sessions = sizes.map((size, index) => ({ sessionId: `image-${index}`, size }));
2584+
for (const [index, { sessionId, size }] of [
2585+
...sessions,
2586+
{ sessionId: "older", size: 0 },
2587+
].entries()) {
2588+
const image = {
2589+
type: "image",
2590+
source: {
2591+
type: "base64",
2592+
media_type: "image/png",
2593+
data: "A".repeat(size * 1024 * 1024),
2594+
},
2595+
};
2596+
yield* writeTranscript({
2597+
filePath: path.join(claudeHomePath, "projects", "-budget", `${sessionId}.jsonl`),
2598+
contents: encodeTranscriptRecord({
2599+
type: "user",
2600+
sessionId,
2601+
message: {
2602+
role: "user",
2603+
content: [{ type: "text", text: "Review this" }, ...(size === 0 ? [] : [image])],
2604+
},
2605+
cwd: workspace,
2606+
}),
2607+
mtimeMs: nowMs - (index + 1) * 60_000,
2608+
});
2609+
}
2610+
2611+
const threads = yield* runRecentThreads({
2612+
claudeHomePath,
2613+
codexHomePath,
2614+
workspaceRoot: workspace,
2615+
});
2616+
2617+
expect(threads.map((thread) => thread.providerSessionId)).toEqual([
2618+
...sessions.slice(skipped).map(({ sessionId }) => sessionId),
2619+
"older",
2620+
]);
2621+
}),
2622+
);
2623+
25672624
it.effect("imports every transcript that fits the per-file record limit", () =>
25682625
Effect.gen(function* () {
25692626
const path = yield* Path.Path;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.