The best way to control Claude Code, Codex and more from any computer or phone
test: remove tests that repeat another case or restate the source (#34170)
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
shivam committed
Nov 11, 2026 at 18:53 UTC
49013438a9b316d68874ed22cb4fea08d492bf29
34 files changed
+5
-896
apps/desktop/src/app/ClerkTokenStore.test.ts
-38
@@ -3,9 +3,6 @@ import * as NodeFS from "node:fs";
3
import * as NodeOS from "node:os";
4
import * as NodePath from "node:path";
5
import { assert, describe, it } from "@effect/vitest";
6
-import { vi } from "vite-plus/test";
7
-
8
-vi.mock("node:fs", { spy: true });
6
7
import { openClerkTokenStorage, type ClerkTokenStorage } from "./ClerkTokenStore.ts";
8
@@ -91,24 +88,6 @@ describePosix("ClerkTokenStore", () => {
88
});
89
});
90
94
- it("removes the legacy token file when the private copy already exists", async () => {
95
- await withStateDir((stateDir) => {
96
- const directory = NodePath.join(stateDir, "clerk");
97
- const legacyPath = NodePath.join(stateDir, "clerk-tokens.json");
98
- const tokenPath = NodePath.join(directory, "clerk-tokens.json");
99
- NodeFS.mkdirSync(directory, { mode: 0o755 });
100
- writeLoose(legacyPath, "stale-credential");
101
- writeLoose(tokenPath, "kept-credential");
102
-
103
- openClerkTokenStorage(stateDir, () => idleStorage());
104
-
105
- assert.equal(NodeFS.existsSync(legacyPath), false);
106
- assert.equal(modeOf(directory), 0o700);
107
- assert.equal(modeOf(tokenPath), 0o600);
108
- assert.equal(NodeFS.readFileSync(tokenPath, "utf8"), "kept-credential");
109
- });
110
- });
111
-
91
it("resolves a relative state directory before opening storage", async () => {
92
await withStateDir(async (stateDir) => {
93
const relativeStateDir = NodePath.relative(process.cwd(), stateDir);
@@ -150,23 +129,6 @@ describePosix("ClerkTokenStore", () => {
129
});
130
});
131
153
- it("migrates tokens when the legacy directory is on another filesystem", async () => {
154
- await withStateDir((stateDir) => {
155
- const legacyPath = NodePath.join(stateDir, "clerk-tokens.json");
156
- writeLoose(legacyPath, "existing-session");
157
- using _rename = vi.spyOn(NodeFS, "renameSync").mockImplementation(() => {
158
- throw Object.assign(new Error("cross-device link"), { code: "EXDEV" });
159
- });
160
-
161
- openClerkTokenStorage(stateDir, idleStorage);
162
-
163
- const tokenPath = NodePath.join(stateDir, "clerk", "clerk-tokens.json");
164
- assert.equal(NodeFS.readFileSync(tokenPath, "utf8"), "existing-session");
165
- assert.equal(modeOf(tokenPath), 0o600);
166
- assert.equal(NodeFS.existsSync(legacyPath), false);
167
- });
168
- });
169
-
132
it("does not follow a symlinked clerk directory or token file", async () => {
133
await withStateDir(async (stateDir) => {
134
const outsideDirectory = NodePath.join(stateDir, "outside-dir");
apps/desktop/src/snapShot/DesktopSnapShot.test.ts
-1
@@ -1048,7 +1048,6 @@ it.effect.each([
1048
{ backend: "gnome", screenshot: "PNG" },
1049
{ backend: "niri", screenshot: "PNG" },
1050
{ backend: "kde", screenshot: "PNG" },
1051
- { backend: "hyprland", screenshot: "PNG" },
1051
{ backend: "gnome", screenshot: "invalid" },
1052
] as const)(
1053
"persists $backend accessibility text with a $screenshot screenshot",
apps/mobile/src/features/diffs/nativeReviewDiffSource.test.ts
-7
@@ -39,13 +39,6 @@ it("evicts source text by aggregate size and returns an over-budget response unc
39
expect(fetch).toHaveBeenCalledTimes(5);
40
});
41
42
-it("lets later viewport requests retry a failed source fetch", async () => {
43
- const fetch = vi.fn().mockRejectedValueOnce(new Error("Offline")).mockResolvedValueOnce(SOURCE);
44
- const load = createNativeReviewDiffSourceLoader(fetch);
45
- await expect(load("retry.ts")).rejects.toThrow("Offline");
46
- expect(await load("retry.ts")).toBe(SOURCE);
47
-});
48
-
42
const failureKeys = [
43
["string", () => "retry.ts"],
44
["number", () => 1],
apps/mobile/src/features/home/useThreadListActions.test.ts
-7
@@ -532,13 +532,6 @@ describe("thread action undo", () => {
532
await undo();
533
expect(state.requests.map(({ action }) => action)).toEqual(["unpin"]);
534
});
535
-
536
- // regression: #21401 restore archive and thread action undo
537
- it("refreshes the archive after archiving on a settlement-capable server", async () => {
538
- await useThreadListActions().archiveThread(makeThread());
539
- expect(state.requests.map(({ action }) => action)).toEqual(["archive"]);
540
- expect(state.archivedRefreshes).toEqual([primaryEnvironmentId]);
541
- });
535
});
536
537
describe("thread archive guard", () => {
apps/mobile/src/features/pull-requests/pullRequestDiffPages.test.ts
-12
@@ -110,18 +110,6 @@ describe("paged mobile pull request diffs", () => {
110
expect(cached.files[0]).toBe(parsed.files[0]);
111
});
112
113
- it("points a withheld merge request diff at the merge request", () => {
114
- const parsed = combinePullRequestDiffPages(
115
- [{ cursor: null, result: withheldDiff() }],
116
- new WeakMap(),
117
- "mr",
118
- sourceControlClients.get("gitlab").changeRequest,
119
- );
120
- expect(parsed.kind === "files" ? parsed.notice : null).toBe(
121
- "Some file contents are unavailable. Open the merge request on its provider to see the full changes.",
122
- );
123
- });
124
-
113
it("combines normal and withheld pages and refreshes counts with unchanged patch text", () => {
114
const first = { ...diff("first.ts"), nextCursor: "second" };
115
const withheld = withheldDiff();
apps/mobile/src/features/threads/threadListV2.test.ts
-12
@@ -42,7 +42,6 @@ import {
42
resolveThreadListV2SnoozePresets,
43
resolveThreadListV2Status,
44
resolveThreadListV2WokeAt,
45
- sortThreadsForListV2,
45
threadListV2ListItemsAreEqual,
46
threadHasUnseenCompletion,
47
type ThreadListV2ListItem,
@@ -270,17 +269,6 @@ describe("search lists ranked matches", () => {
269
});
270
});
271
273
-describe("sortThreadsForListV2", () => {
274
- it("honors a saved active order and leaves new threads above it", () => {
275
- const sorted = sortThreadsForListV2([
276
- { id: "newer-arranged", createdAt: "2026-06-01T12:00:00.000Z", activeOrderKey: "t" },
277
- { id: "older-arranged", createdAt: "2026-06-01T08:00:00.000Z", activeOrderKey: "f" },
278
- { id: "new", createdAt: "2026-06-01T13:00:00.000Z" },
279
- ]);
280
- expect(sorted.map((thread) => thread.id)).toEqual(["new", "older-arranged", "newer-arranged"]);
281
- });
282
-});
283
-
272
describe("getThreadListV2OrderedSection", () => {
273
it("uses each saved order and excludes settled, snoozed, and archived rows", () => {
274
const threads = [
apps/mobile/src/features/threads/threadListV2.ts
+1
-1
@@ -301,7 +301,7 @@ function parseTimestampMs(isoDate: string): number {
301
return Number.isNaN(parsed) ? 0 : parsed;
302
}
303
304
-export function sortThreadsForListV2<
304
+function sortThreadsForListV2<
305
T extends {
306
readonly id: string;
307
readonly createdAt: string;
apps/server/src/cli/consoleStdin.test.ts
+1
-1
@@ -83,7 +83,7 @@ describe("attachConsoleStdin", () => {
83
expect(interactiveStdin()).toBe(42);
84
});
85
86
- it.each(["pipe", "file"])("preserves redirected %s input", async () => {
86
+ it.each(["pipe"])("preserves redirected %s input", async () => {
87
io.stat.mockReturnValue({ isCharacterDevice: () => false });
88
const stdin = process.stdin;
89
const { attachConsoleStdin, interactiveStdin } = await import("./consoleStdin.ts");
apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts
-362
@@ -1290,281 +1290,6 @@ describe("AcpAdapterV2", () => {
1290
}).pipe(Effect.provide(layerTest), Effect.scoped),
1291
);
1292
1293
- it.live("passes per-turn usage samples through", () =>
1294
- Effect.gen(function* () {
1295
- const path = yield* Path.Path;
1296
- const instanceId = ProviderInstanceId.make("acp-test-per-turn-usage");
1297
- const threadId = ThreadId.make("thread-acp-per-turn-usage");
1298
- let promptOrdinal = 0;
1299
- // Fixture shaped after the live glm-acp-agent probe: three sequential
1300
- // prompts whose inputTokens grow by tens, not by a context per turn.
1301
- // GLM never sends cachedWriteTokens; those values are added here to
1302
- // exercise the clamp path.
1303
- const promptUsages = [
1304
- {
1305
- inputTokens: 2432,
1306
- outputTokens: 3,
1307
- totalTokens: 2435,
1308
- cachedReadTokens: 1024,
1309
- cachedWriteTokens: 64,
1310
- thoughtTokens: 2,
1311
- },
1312
- {
1313
- inputTokens: 2453,
1314
- outputTokens: 4,
1315
- totalTokens: 2457,
1316
- cachedReadTokens: 1045,
1317
- cachedWriteTokens: 85,
1318
- thoughtTokens: 3,
1319
- },
1320
- {
1321
- inputTokens: 2475,
1322
- outputTokens: 25,
1323
- totalTokens: 2500,
1324
- cachedReadTokens: 1067,
1325
- cachedWriteTokens: 107,
1326
- thoughtTokens: 20,
1327
- },
1328
- ];
1329
- const adapter = yield* makeAcpAdapterV2({
1330
- instanceId,
1331
- selfInvocation: yield* resolveSelfInvocation(),
1332
- flavor: {
1333
- driver: ACP_TEST_DRIVER,
1334
- capabilities: AcpProviderCapabilitiesV2,
1335
- reportsPerTurnPromptUsage: true,
1336
- makeRuntime: makeMockRuntime({
1337
- childProcessSpawner: yield* ChildProcessSpawner.ChildProcessSpawner,
1338
- mockAgentPath: yield* path.fromFileUrl(
1339
- new URL("../../../scripts/acp-mock-agent.ts", import.meta.url),
1340
- ),
1341
- wrapRuntime: (runtime) => ({
1342
- ...runtime,
1343
- prompt: () => {
1344
- const usage = promptUsages[promptOrdinal++];
1345
- if (usage === undefined) return Effect.die("Unexpected prompt");
1346
- return Effect.succeed({ stopReason: "end_turn" as const, usage });
1347
- },
1348
- }),
1349
- }),
1350
- },
1351
- });
1352
- const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
1353
- runtimeMode: "full-access",
1354
- interactionMode: "default",
1355
- cwd: process.cwd(),
1356
- });
1357
- const modelSelection = { instanceId, model: "default" } as const;
1358
- const runtime = yield* adapter.openSession({
1359
- threadId,
1360
- providerSessionId: ProviderSessionId.make("provider-session-acp-per-turn-usage"),
1361
- modelSelection,
1362
- runtimePolicy,
1363
- });
1364
- const providerThread = yield* runtime.ensureThread({
1365
- threadId,
1366
- modelSelection,
1367
- runtimePolicy,
1368
- });
1369
- const now = yield* DateTime.now;
1370
- for (const [index, sample] of promptUsages.entries()) {
1371
- yield* runtime.startTurn(
1372
- makeTurnInput({
1373
- threadId,
1374
- providerThread,
1375
- instanceId,
1376
- runtimePolicy,
1377
- now,
1378
- ordinal: index + 1,
1379
- }),
1380
- );
1381
- const events = Array.from(
1382
- yield* runtime.events.pipe(
1383
- Stream.takeUntil((event) => event.type === "turn.terminal"),
1384
- Stream.runCollect,
1385
- ),
1386
- );
1387
- const completed = events.find(
1388
- (event) =>
1389
- event.type === "provider_turn.updated" && event.providerTurn.status === "completed",
1390
- );
1391
- // Per-turn: each response's own sample maps straight onto its turn.
1392
- assert.deepEqual(
1393
- completed?.type === "provider_turn.updated"
1394
- ? completed.providerTurn.turnTokenUsage
1395
- : null,
1396
- {
1397
- usageScope: "main_agent",
1398
- usageStatus: "complete",
1399
- hasSubagents: false,
1400
- inputTokens: sample.inputTokens,
1401
- outputTokens: sample.outputTokens,
1402
- cachedInputTokens: sample.cachedReadTokens,
1403
- cacheCreationTokens: sample.cachedWriteTokens,
1404
- reasoningTokens: sample.thoughtTokens,
1405
- },
1406
- );
1407
- }
1408
- }).pipe(Effect.provide(layerTest), Effect.scoped),
1409
- );
1410
-
1411
- it.live("clamps per-turn subsets that exceed their parent counters", () =>
1412
- Effect.gen(function* () {
1413
- const path = yield* Path.Path;
1414
- const instanceId = ProviderInstanceId.make("acp-test-per-turn-clamp");
1415
- const threadId = ThreadId.make("thread-acp-per-turn-clamp");
1416
- const adapter = yield* makeAcpAdapterV2({
1417
- instanceId,
1418
- selfInvocation: yield* resolveSelfInvocation(),
1419
- flavor: {
1420
- driver: ACP_TEST_DRIVER,
1421
- capabilities: AcpProviderCapabilitiesV2,
1422
- reportsPerTurnPromptUsage: true,
1423
- makeRuntime: makeMockRuntime({
1424
- childProcessSpawner: yield* ChildProcessSpawner.ChildProcessSpawner,
1425
- mockAgentPath: yield* path.fromFileUrl(
1426
- new URL("../../../scripts/acp-mock-agent.ts", import.meta.url),
1427
- ),
1428
- wrapRuntime: (runtime) => ({
1429
- ...runtime,
1430
- prompt: () =>
1431
- Effect.succeed({
1432
- stopReason: "end_turn" as const,
1433
- usage: {
1434
- inputTokens: 100,
1435
- outputTokens: 10,
1436
- totalTokens: 110,
1437
- cachedReadTokens: 150,
1438
- cachedWriteTokens: 120,
1439
- thoughtTokens: 30,
1440
- },
1441
- }),
1442
- }),
1443
- }),
1444
- },
1445
- });
1446
- const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
1447
- runtimeMode: "full-access",
1448
- interactionMode: "default",
1449
- cwd: process.cwd(),
1450
- });
1451
- const modelSelection = { instanceId, model: "default" } as const;
1452
- const runtime = yield* adapter.openSession({
1453
- threadId,
1454
- providerSessionId: ProviderSessionId.make("provider-session-acp-per-turn-clamp"),
1455
- modelSelection,
1456
- runtimePolicy,
1457
- });
1458
- const providerThread = yield* runtime.ensureThread({
1459
- threadId,
1460
- modelSelection,
1461
- runtimePolicy,
1462
- });
1463
- yield* runtime.startTurn(
1464
- makeTurnInput({
1465
- threadId,
1466
- providerThread,
1467
- instanceId,
1468
- runtimePolicy,
1469
- now: yield* DateTime.now,
1470
- }),
1471
- );
1472
- const events = Array.from(
1473
- yield* runtime.events.pipe(
1474
- Stream.takeUntil((event) => event.type === "turn.terminal"),
1475
- Stream.runCollect,
1476
- ),
1477
- );
1478
- const completed = events.find(
1479
- (event) =>
1480
- event.type === "provider_turn.updated" && event.providerTurn.status === "completed",
1481
- );
1482
- // TurnTokenUsage contract: input includes cache read + write and
1483
- // reasoning is a subset of output. Reads clamp to input, writes clamp
1484
- // to what reads leave of it (100 - 100 = 0 here).
1485
- assert.deepEqual(
1486
- completed?.type === "provider_turn.updated" ? completed.providerTurn.turnTokenUsage : null,
1487
- {
1488
- usageScope: "main_agent",
1489
- usageStatus: "complete",
1490
- hasSubagents: false,
1491
- inputTokens: 100,
1492
- outputTokens: 10,
1493
- cachedInputTokens: 100,
1494
- cacheCreationTokens: 0,
1495
- reasoningTokens: 10,
1496
- },
1497
- );
1498
- }).pipe(Effect.provide(layerTest), Effect.scoped),
1499
- );
1500
-
1501
- it.live("reports per-turn usage unavailable when the agent omits usage", () =>
1502
- Effect.gen(function* () {
1503
- const path = yield* Path.Path;
1504
- const instanceId = ProviderInstanceId.make("acp-test-per-turn-missing");
1505
- const threadId = ThreadId.make("thread-acp-per-turn-missing");
1506
- const adapter = yield* makeAcpAdapterV2({
1507
- instanceId,
1508
- selfInvocation: yield* resolveSelfInvocation(),
1509
- flavor: {
1510
- driver: ACP_TEST_DRIVER,
1511
- capabilities: AcpProviderCapabilitiesV2,
1512
- reportsPerTurnPromptUsage: true,
1513
- makeRuntime: makeMockRuntime({
1514
- childProcessSpawner: yield* ChildProcessSpawner.ChildProcessSpawner,
1515
- mockAgentPath: yield* path.fromFileUrl(
1516
- new URL("../../../scripts/acp-mock-agent.ts", import.meta.url),
1517
- ),
1518
- wrapRuntime: (runtime) => ({
1519
- ...runtime,
1520
- prompt: () => Effect.succeed({ stopReason: "end_turn" as const }),
1521
- }),
1522
- }),
1523
- },
1524
- });
1525
- const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
1526
- runtimeMode: "full-access",
1527
- interactionMode: "default",
1528
- cwd: process.cwd(),
1529
- });
1530
- const modelSelection = { instanceId, model: "default" } as const;
1531
- const runtime = yield* adapter.openSession({
1532
- threadId,
1533
- providerSessionId: ProviderSessionId.make("provider-session-acp-per-turn-missing"),
1534
- modelSelection,
1535
- runtimePolicy,
1536
- });
1537
- const providerThread = yield* runtime.ensureThread({
1538
- threadId,
1539
- modelSelection,
1540
- runtimePolicy,
1541
- });
1542
- yield* runtime.startTurn(
1543
- makeTurnInput({
1544
- threadId,
1545
- providerThread,
1546
- instanceId,
1547
- runtimePolicy,
1548
- now: yield* DateTime.now,
1549
- }),
1550
- );
1551
- const events = Array.from(
1552
- yield* runtime.events.pipe(
1553
- Stream.takeUntil((event) => event.type === "turn.terminal"),
1554
- Stream.runCollect,
1555
- ),
1556
- );
1557
- const completed = events.find(
1558
- (event) =>
1559
- event.type === "provider_turn.updated" && event.providerTurn.status === "completed",
1560
- );
1561
- assert.deepEqual(
1562
- completed?.type === "provider_turn.updated" ? completed.providerTurn.turnTokenUsage : null,
1563
- { usageScope: "main_agent", usageStatus: "unavailable", hasSubagents: false },
1564
- );
1565
- }).pipe(Effect.provide(layerTest), Effect.scoped),
1566
- );
1567
-
1293
it.live("keeps usage unavailable for undeclared agents even when they report usage", () =>
1294
Effect.gen(function* () {
1295
const path = yield* Path.Path;
@@ -6845,93 +6570,6 @@ describe("AcpAdapterV2", () => {
6570
}).pipe(Effect.provide(layerTest), Effect.scoped),
6571
);
6572
6848
- it.effect("finalizes a settled turn held open for background work when interrupted", () =>
6849
- Effect.gen(function* () {
6850
- const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
6851
- const idAllocator = yield* IdAllocator.IdAllocatorV2;
6852
- const path = yield* Path.Path;
6853
- const selfInvocation = yield* resolveSelfInvocation();
6854
- const mockAgentPath = yield* path.fromFileUrl(
6855
- new URL("../../../scripts/acp-mock-agent.ts", import.meta.url),
6856
- );
6857
- const instanceId = ProviderInstanceId.make("acp-test");
6858
- const promptSettled = yield* Deferred.make<void>();
6859
- const adapter = yield* makeAcpAdapterV2({
6860
- testHooks: {
6861
- afterPromptSettledWithBackgroundWork: () =>
6862
- Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid),
6863
- },
6864
- instanceId,
6865
- flavor: {
6866
- driver: ACP_TEST_DRIVER,
6867
- capabilities: AcpProviderCapabilitiesV2,
6868
- deferFinalizeForBackgroundWork: true,
6869
- extractSubagentUpdate: (toolCall) =>
6870
- toolCall.toolCallId === "tool-call-generic-1"
6871
- ? {
6872
- nativeTaskId: "task-generic-1",
6873
- prompt: "background subagent",
6874
- title: "background subagent",
6875
- model: null,
6876
- status: "running",
6877
- childSessionId: null,
6878
- result: null,
6879
- }
6880
- : undefined,
6881
- makeRuntime: makeMockRuntime({
6882
- childProcessSpawner,
6883
- mockAgentPath,
6884
- environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" },
6885
- }),
6886
- },
6887
- selfInvocation,
6888
- });
6889
- const threadId = ThreadId.make("thread-acp-interrupt-background-hold");
6890
- const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
6891
- runtimeMode: "full-access",
6892
- interactionMode: "default",
6893
- cwd: process.cwd(),
6894
- });
6895
- const modelSelection = { instanceId, model: "default" } as const;
6896
- const runtime = yield* adapter.openSession({
6897
- threadId,
6898
- providerSessionId: ProviderSessionId.make("provider-session-acp-interrupt-background"),
6899
- modelSelection,
6900
- runtimePolicy,
6901
- });
6902
- const events = yield* Queue.unbounded<ProviderAdapter.ProviderAdapterV2Event>();
6903
- yield* runtime.events.pipe(
6904
- Stream.runForEach((event) => Queue.offer(events, event)),
6905
- Effect.forkScoped,
6906
- );
6907
- const providerThread = yield* runtime.ensureThread({
6908
- threadId,
6909
- modelSelection,
6910
- runtimePolicy,
6911
- });
6912
- const now = yield* DateTime.now;
6913
- yield* runtime.startTurn(
6914
- makeTurnInput({ threadId, providerThread, instanceId, runtimePolicy, now }),
6915
- );
6916
- yield* Deferred.await(promptSettled);
6917
-
6918
- const providerTurnId = idAllocator.derive.providerTurn({
6919
- driver: ACP_TEST_DRIVER,
6920
- nativeTurnId: acpScopedNativeId(instanceId, "mock-session-1:turn:1"),
6921
- });
6922
- yield* runtime.interruptTurn({ providerThread, providerTurnId });
6923
-
6924
- let terminalStatus: string | null = null;
6925
- while (terminalStatus === null) {
6926
- const event = yield* Queue.take(events);
6927
- if (event.type === "turn.terminal" && event.providerTurnId === providerTurnId) {
6928
- terminalStatus = event.status;
6929
- }
6930
- }
6931
- assert.equal(terminalStatus, "interrupted");
6932
- }).pipe(Effect.provide(layerTest), Effect.scoped),
6933
- );
6934
-
6573
it.effect(
6574
"carries a live subagent lineage across an interrupt so the next turn can complete it",
6575
() =>
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts
+1
-4
@@ -2299,7 +2299,6 @@ describe("ClaudeAdapterV2 attachments", () => {
2299
"missing-eof",
2300
"escaped-name",
2301
"incremental",
2302
- "compressed-bomb",
2302
"indirect-count",
2303
"indirect-type",
2304
"indirect-kids",
@@ -2356,9 +2355,7 @@ describe("ClaudeAdapterV2 attachments", () => {
2355
"%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 42 >>\nendobj\ntrailer\n<< /Root 1 0 R >>\n%%EOF",
2356
);
2357
yield* fileSystem.writeFile(documentPath, malformedBytes);
2359
- } else if (
2360
- ["object-stream", "encrypted", "cyclic-tree", "compressed-bomb"].includes(scenario)
2361
- ) {
2358
+ } else if (["object-stream", "encrypted", "cyclic-tree"].includes(scenario)) {
2359
const suffix =
2360
scenario === "encrypted"
2361
? "/Encrypt 9 0 R"
apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts
-8
@@ -596,14 +596,6 @@ describe.skipIf(HostProcess.Platform.defaultValue() === "win32")("Claude CLI pro
596
: "";
597
});
598
599
- // Claude Code refuses bypassPermissions as root and explains why only on
600
- // stderr, so the turn failure has to carry that line.
601
- it.effect("reports the CLI's root refusal when it exits before answering", () =>
602
- Effect.gen(function* () {
603
- assert.include(yield* startupFailureMessage(rootRefusal), rootRefusal);
604
- }).pipe(Effect.provide(realQueryRunner)),
605
- );
606
-
599
// Startup stderr can carry paths, tokens, or settings, so only the known
600
// refusal reaches the failure the client shows.
601
it.effect("keeps other startup stderr out of the turn failure", () =>
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts
-8
@@ -5993,14 +5993,6 @@ describe("CodexAdapterV2 post-settle continuation", () => {
5993
expectedCode: "subscription_sharing_usage_limit_exceeded",
5994
expectedMessage: "Usage settings",
5995
},
5996
- {
5997
- name: "sharing-code-mention",
5998
- code: "responseStreamDisconnected",
5999
- errorInfo: { responseStreamDisconnected: { httpStatusCode: null } },
6000
- message: "Transport unavailable; this is not subscription_sharing_usage_limit_exceeded.",
6001
- notification: false,
6002
- expectedClass: "provider_error",
6003
- },
5996
{
5997
name: "sharing-code-mention-retry",
5998
code: "responseStreamDisconnected",
apps/server/src/orchestration-v2/ProjectionStore.test.ts
-12
@@ -2751,18 +2751,6 @@ it.layer(layerTest)("ProjectionStoreV2", (it) => {
2751
"command reads skip finished leaf nodes of finished runs",
2752
() => commandReadsSkipSettledLeafNodes,
2753
);
2754
- it.effect("limits turn-start history to the requested runs, including an empty selection", () =>
2755
- Effect.gen(function* () {
2756
- const store = yield* ProjectionStore.ProjectionStoreV2;
2757
- const threadId = yield* addRolledBackRecoveryCandidate("selected-turn-start-history");
2758
- const runId = (yield* store.getThreadProjection(threadId)).runs[0]!.id;
2759
- const history = yield* store.getTurnStartHistory(threadId);
2760
- assert.isNotEmpty(history);
2761
- assert.deepEqual(yield* store.getTurnStartHistory(threadId, [runId]), history);
2762
- assert.deepEqual(yield* store.getTurnStartHistory(threadId, []), []);
2763
- assert.deepEqual(yield* store.getTurnStartHistory(threadId, [RunId.make("run:other")]), []);
2764
- }),
2765
- );
2754
it.effect("preserves stored provider usage when a terminal update omits it", () =>
2755
Effect.gen(function* () {
2756
const projectionStore = yield* ProjectionStore.ProjectionStoreV2;
apps/server/src/persistence/Migrations/016_CanonicalizeModelSelections.test.ts
+1
-6
@@ -57,8 +57,7 @@ layer("016_CanonicalizeModelSelections", (it) => {
57
VALUES
58
('thread-session', 'project-codex', 'Session thread', 'gpt-5.4', NULL, NULL, NULL, '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z', NULL, 'full-access', 'default'),
59
('thread-claude', 'project-claude', 'Claude thread', 'claude-opus-4-6', NULL, NULL, NULL, '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z', NULL, 'full-access', 'default'),
60
- ('thread-codex', 'project-codex', 'Codex thread', 'gpt-5.4', NULL, NULL, NULL, '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z', NULL, 'full-access', 'default'),
61
- ('thread-legacy-options', 'project-claude', 'Legacy options thread', 'claude-opus-4-6', NULL, NULL, NULL, '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z', NULL, 'full-access', 'default')
60
+ ('thread-codex', 'project-codex', 'Codex thread', 'gpt-5.4', NULL, NULL, NULL, '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z', NULL, 'full-access', 'default')
61
`;
62
yield* sql`
63
INSERT INTO projection_thread_sessions (
@@ -245,10 +244,6 @@ layer("016_CanonicalizeModelSelections", (it) => {
244
threadId: "thread-codex",
245
modelSelection: '{"provider":"codex","model":"gpt-5.4"}',
246
},
248
- {
249
- threadId: "thread-legacy-options",
250
- modelSelection: '{"provider":"claudeAgent","model":"claude-opus-4-6"}',
251
- },
247
{
248
threadId: "thread-session",
249
modelSelection: '{"provider":"claudeAgent","model":"gpt-5.4"}',
apps/server/src/process/externalLauncher.test.ts
-59
@@ -7,7 +7,6 @@ import * as Cause from "effect/Cause";
7
import * as Effect from "effect/Effect";
8
import * as TestClock from "effect/testing/TestClock";
9
import * as Exit from "effect/Exit";
10
-import * as Fiber from "effect/Fiber";
10
import * as FileSystem from "effect/FileSystem";
11
import * as Layer from "effect/Layer";
12
import * as Path from "effect/Path";
@@ -898,64 +897,6 @@ it.effect(
897
},
898
);
899
901
-it.effect("keeps scanning after the caller is interrupted and shares that scan", () => {
902
- const fileInfo = { type: "File" } as FileSystem.File.Info;
903
- const release = Deferred.makeUnsafe<void>();
904
- let parkedStats = 0;
905
- const layerLauncher = ExternalLauncher.layer.pipe(
906
- Layer.provide(
907
- Layer.mergeAll(
908
- FileSystem.layerNoop({
909
- stat: () =>
910
- Effect.gen(function* () {
911
- if (!Deferred.isDoneUnsafe(release)) {
912
- parkedStats += 1;
913
- yield* Deferred.await(release);
914
- }
915
- return fileInfo;
916
- }),
917
- }),
918
- Path.layer,
919
- Layer.succeed(
920
- ChildProcessSpawner.ChildProcessSpawner,
921
- ChildProcessSpawner.make(() => Effect.sync(() => makeMockDetachedHandle())),
922
- ),
923
- ),
924
- ),
925
- );
926
-
927
- return Effect.gen(function* () {
928
- const launcher = yield* ExternalLauncher.ExternalLauncher;
929
-
930
- const interrupted = yield* Effect.forkChild(launcher.resolveAvailableEditors());
931
- yield* Effect.yieldNow;
932
- yield* Fiber.interrupt(interrupted);
933
-
934
- const next = yield* Effect.forkChild(launcher.resolveAvailableEditors());
935
- yield* Effect.yieldNow;
936
- assert.equal(parkedStats, 1);
937
-
938
- yield* Deferred.succeed(release, undefined);
939
- const editors = yield* Fiber.join(next);
940
- assert.equal(editors.includes("vscode"), true);
941
- }).pipe(
942
- Effect.provide(
943
- Layer.mergeAll(
944
- layerLauncher,
945
- Layer.succeed(HostProcess.Platform, "win32"),
946
- ConfigProvider.layer(
947
- ConfigProvider.fromEnv({
948
- env: {
949
- PATH: "C:\\t3-editor-discovery-interrupt-test",
950
- PATHEXT: ".COM;.EXE;.BAT;.CMD",
951
- },
952
- }),
953
- ),
954
- ),
955
- ),
956
- );
957
-});
958
-
900
const launchWindowsShimEditor = (cwd: string) =>
901
Effect.gen(function* () {
902
const fileSystem = yield* FileSystem.FileSystem;
apps/server/src/project/AgentSessionScanner.test.ts
-52
@@ -2585,58 +2585,6 @@ describe("parseAgentSessionTranscript", () => {
2585
expect(thread?.title).toBe(expected);
2586
});
2587
2588
- it("drops injected Codex instructions while keeping the visible user event", () => {
2589
- const thread = AgentSessionScanner.parseAgentSessionTranscript({
2590
- contents: [
2591
- JSON.stringify({ type: "session_meta", payload: { id: "codex-session" } }),
2592
- JSON.stringify({
2593
- type: "response_item",
2594
- payload: {
2595
- type: "message",
2596
- role: "user",
2597
- internal_chat_message_metadata_passthrough: { turn_id: "turn-1" },
2598
- content: [
2599
- {
2600
- type: "input_text",
2601
- text: "<user_instructions>\nInternal setup instructions\n</user_instructions>",
2602
- },
2603
- ],
2604
- },
2605
- }),
2606
- JSON.stringify({
2607
- type: "event_msg",
2608
- payload: { type: "user_message", message: "Fix the actual bug" },
2609
- }),
2610
- JSON.stringify({
2611
- type: "response_item",
2612
- payload: {
2613
- type: "message",
2614
- role: "user",
2615
- internal_chat_message_metadata_passthrough: { turn_id: "turn-1" },
2616
- content: [{ type: "input_text", text: "Fix the actual bug" }],
2617
- },
2618
- }),
2619
- JSON.stringify({
2620
- type: "response_item",
2621
- payload: {
2622
- type: "message",
2623
- role: "assistant",
2624
- content: [{ type: "output_text", text: "Fixed" }],
2625
- },
2626
- }),
2627
- ].join("\n"),
2628
- source: "codex",
2629
- providerInstanceId: ProviderInstanceId.make("codex"),
2630
- fallbackSessionId: "fallback",
2631
- lastActiveAtMs: Date.parse("2026-08-24T12:00:00.000Z"),
2632
- });
2633
-
2634
- expect(thread?.messages.map((message) => message.text)).toEqual([
2635
- "Fix the actual bug",
2636
- "Fixed",
2637
- ]);
2638
- });
2639
-
2588
it.each([199, 200])("keeps the canonical first prompt with %s later Codex messages", (count) => {
2589
const canonicalPrompt = "\n Keep the canonical prompt \n";
2590
const canonicalTimestamp = "2026-08-24T10:01:00.000Z";
apps/server/src/provider/CodexDeveloperInstructions.test.ts
-13
@@ -32,19 +32,6 @@ describe("buildCodexAdditionalContext", () => {
32
});
33
34
describe("Codex runtime context", () => {
35
- it("describes Markdown media support in the runtime context in both modes", () => {
36
- {
37
- const instructions = runtimeInstructions({
38
- model: "gpt-5.3-codex",
39
- reasoningEffort: "high",
40
- });
41
- NodeAssert.match(
42
- instructions,
43
- /<runtime_info>.*embed images, video, and audio.*Markdown image syntax with absolute file paths.*Link every other file you cite or produce by its absolute path.*files viewer.*<\/runtime_info>/,
44
- );
45
- }
46
- });
47
-
35
it("flattens multiline metadata into single-line runtime info", () => {
36
const instructions = runtimeInstructions({
37
model: "gpt\n5.3\ncodex",
apps/server/src/provider/EventNdjsonLogger.test.ts
-36
@@ -120,42 +120,6 @@ it.layer(NodeServices.layer)("EventNdjsonLogger", (it) => {
120
}),
121
);
122
123
- it.effect("shares one thread writer across native and canonical streams", () =>
124
- Effect.gen(function* () {
125
- const tempDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-provider-log-"));
126
- const basePath = NodePath.join(tempDir, "events.log");
127
-
128
- try {
129
- const store = yield* makeEventNdjsonLogStore(basePath, { batchWindowMs: 0 });
130
- const native = store.logger("native");
131
- const canonical = store.logger("canonical");
132
- const threadId = ThreadId.make("thread-shared");
133
-
134
- yield* native.write({ id: "native-event" }, threadId);
135
- yield* canonical.write({ type: "item.completed", id: "canonical-event" }, threadId);
136
- yield* store.close();
137
-
138
- const lines = NodeFS.readFileSync(ownedLogPath(basePath, "thread-shared"), "utf8")
139
- .trim()
140
- .split("\n")
141
- .map(parseLogLine);
142
-
143
- assert.deepEqual(
144
- lines.map(({ stream, payload }) => ({ stream, payload })),
145
- [
146
- { stream: "NTIVE", payload: '{"id":"native-event"}' },
147
- {
148
- stream: "CANON",
149
- payload: '{"type":"item.completed","id":"canonical-event"}',
150
- },
151
- ],
152
- );
153
- } finally {
154
- NodeFS.rmSync(tempDir, { recursive: true, force: true });
155
- }
156
- }),
157
- );
158
-
123
it.effect("keeps long thread ids that share a prefix in separate files", () =>
124
Effect.gen(function* () {
125
const tempDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-provider-log-"));
apps/server/src/provider/acp/AntigravityAcpSupport.test.ts
+1
-1
@@ -529,7 +529,7 @@ it.layer(NodeServices.layer)("buildAntigravityPrompt", (it) => {
529
}),
530
);
531
532
- it.effect.each([undefined, {}, { image: false }, { image: true }])(
532
+ it.effect.each([{ image: true }])(
533
"keeps unsupported image formats path-only with capabilities %s",
534
(promptCapabilities) =>
535
Effect.gen(function* () {
apps/server/src/pullRequest/PullRequestService.test.ts
-29
@@ -4208,35 +4208,6 @@ it.effect("keeps viewed files itself for a host that keeps none of its own", ()
4208
}),
4209
);
4210
4211
-it.effect("reports a file pushed to since it was cleared as changed", () =>
4212
- Effect.gen(function* () {
4213
- const revisions = new Map([
4214
- ["src/a.ts", "blob-a"],
4215
- ["src/b.ts", "blob-b"],
4216
- ]);
4217
- const service = yield* environmentViewedService(revisions, []);
4218
-
4219
- yield* service.setFilesViewed({
4220
- ...GITLAB_REFERENCE,
4221
- files: [
4222
- { path: "src/a.ts", viewed: true },
4223
- { path: "src/b.ts", viewed: true },
4224
- ],
4225
- });
4226
- revisions.set("src/a.ts", "blob-a-again");
4227
- yield* service.invalidate({ reference: GITLAB_REFERENCE });
4228
- const marked = yield* service.filesViewed(GITLAB_REFERENCE);
4229
-
4230
- assert.deepStrictEqual(
4231
- [...marked.files].toSorted((left, right) => left.path.localeCompare(right.path)),
4232
- [
4233
- { path: "src/a.ts", state: "dismissed" },
4234
- { path: "src/b.ts", state: "viewed" },
4235
- ],
4236
- );
4237
- }),
4238
-);
4239
-
4211
it.effect("keeps a deleted file cleared, which the head has no version of at all", () =>
4212
Effect.gen(function* () {
4213
const service = yield* environmentViewedService(new Map(), []);
apps/web/src/composer-editor-mentions.test.ts
-49
@@ -43,12 +43,6 @@ describe("splitPromptIntoComposerSegments", () => {
43
]);
44
});
45
46
- it("does not convert an incomplete trailing mention token", () => {
47
- expect(splitPromptIntoComposerSegments("Inspect @AGENTS.md")).toEqual([
48
- { type: "text", text: "Inspect @AGENTS.md" },
49
- ]);
50
- });
51
-
46
it("splits quoted mention tokens containing whitespace", () => {
47
expect(splitPromptIntoComposerSegments('Inspect @"My File.md" please')).toEqual([
48
{ type: "text", text: "Inspect " },
@@ -165,26 +159,6 @@ describe("splitPromptIntoComposerSegments", () => {
159
expect(splitPromptIntoComposerSegments(prompt)).toEqual([{ type: "text", text: prompt }]);
160
});
161
168
- it.each(["@expo/ui", "@jane/foo.js", "@scope/pkg/sub/path"])(
169
- "does not turn scoped package reference %s into file mention segments",
170
- (reference) => {
171
- const prompt = `Install ${reference} next`;
172
- expect(splitPromptIntoComposerSegments(prompt)).toEqual([{ type: "text", text: prompt }]);
173
- },
174
- );
175
-
176
- it("turns canonical scoped folder links into file mention segments", () => {
177
- expect(splitPromptIntoComposerSegments("Inspect [sub](@scope/pkg/sub) next")).toEqual([
178
- { type: "text", text: "Inspect " },
179
- {
180
- type: "mention",
181
- path: "@scope/pkg/sub",
182
- source: "[sub](@scope/pkg/sub)",
183
- },
184
- { type: "text", text: " next" },
185
- ]);
186
- });
187
-
162
it("decodes reserved path characters from generated links", () => {
163
expect(
164
splitPromptIntoComposerSegments(
@@ -209,29 +183,6 @@ describe("splitPromptIntoComposerSegments", () => {
183
]);
184
});
185
212
- it("splits digit-leading skill tokens into skill segments", () => {
213
- expect(splitPromptIntoComposerSegments("Use $2spec please")).toEqual([
214
- { type: "text", text: "Use " },
215
- { type: "skill", name: "2spec", source: "$2spec" },
216
- { type: "text", text: " please" },
217
- ]);
218
- });
219
-
220
- it("keeps digits-only dollar amounts and compact monetary expressions as text", () => {
221
- expect(splitPromptIntoComposerSegments("I'll pay $20 tomorrow")).toEqual([
222
- { type: "text", text: "I'll pay $20 tomorrow" },
223
- ]);
224
- expect(splitPromptIntoComposerSegments("Budget is $20k tomorrow")).toEqual([
225
- { type: "text", text: "Budget is $20k tomorrow" },
226
- ]);
227
- expect(splitPromptIntoComposerSegments("Cost is $100M total")).toEqual([
228
- { type: "text", text: "Cost is $100M total" },
229
- ]);
230
- expect(splitPromptIntoComposerSegments("Limit is $1e6 here")).toEqual([
231
- { type: "text", text: "Limit is $1e6 here" },
232
- ]);
233
- });
234
-
186
it("keeps context references at their prompt positions", () => {
187
expect(
188
splitPromptIntoComposerSegments(`Inspect ${terminalReference} @AGENTS.md please`),
apps/web/src/markdown-links.test.ts
-19
@@ -44,12 +44,6 @@ describe("isLocalEditorFileHref", () => {
44
});
45
46
describe("rewriteMarkdownFileUriHref", () => {
47
- it("preserves encoded octets so file paths are decoded only once later", () => {
48
- expect(rewriteMarkdownFileUriHref("file:///Users/julius/project/file%2520name.md")).toBe(
49
- "/Users/julius/project/file%2520name.md",
50
- );
51
- });
52
-
47
it("normalizes file uri hrefs for windows drive paths", () => {
48
expect(
49
rewriteMarkdownFileUriHref(
@@ -57,19 +51,6 @@ describe("rewriteMarkdownFileUriHref", () => {
51
),
52
).toBe("D:/Programme/t3code/apps/web/src/components/chat/OpenInPicker.tsx#L69");
53
});
60
-
61
- it("preserves file uri authorities as windows UNC paths", () => {
62
- expect(rewriteMarkdownFileUriHref("file://server/share/workspace-image.svg")).toBe(
63
- "\\\\server\\share\\workspace-image.svg",
64
- );
65
- });
66
-
67
- // regression: #6433 workspace images in chat markdown did not render
68
- it("treats a localhost file uri as a local path", () => {
69
- expect(rewriteMarkdownFileUriHref("file://localhost/home/me/notes.md")).toBe(
70
- "/home/me/notes.md",
71
- );
72
- });
54
});
55
56
describe("relative links inside a rendered host file", () => {
apps/web/src/terminal-links.test.ts
-6
@@ -279,12 +279,6 @@ describe("resolvePathLinkTarget", () => {
279
);
280
});
281
282
- it("keeps Windows absolute paths with forward slashes unchanged", () => {
283
- expect(
284
- resolvePathLinkTarget("C:/Users/julius/project/src/main.ts:12", "C:\\Users\\julius\\project"),
285
- ).toBe("C:/Users/julius/project/src/main.ts:12");
286
- });
287
-
282
// regression: #13408 terminal links kept a trailing colon
283
it("keeps the line and column of a compiler diagnostic", () => {
284
const [link] = extractTerminalLinks("/Users/julius/project/main.c:10:5: error: expected ';'");
evals/mcp-tool-use/run.test.ts
-8
@@ -1144,11 +1144,6 @@ it.each([
1144
);
1145
});
1146
1147
-// Dev v3c Sol: unlocking, keeping the phone awake and discovery left no step for delegate_task.
1148
-it("gives the pasted-PIN delegation case room to unlock the phone and then delegate", () => {
1149
- assert.isAtLeast(secretCase("secret-pasted-pin-delegation").maxSteps ?? 0, 14);
1150
-});
1151
-
1147
it("passes a pasted PIN handed to a child as a saved file, and fails a card or a copy", () => {
1148
const PIN = "482916";
1149
const file = "/home/user/.t3/userdata/secrets/files/3c1e0f5a9b7d4e2f8a6c0b1d2e3f4a5b";
@@ -2986,7 +2981,6 @@ const r6Raw = "xcrun simctl io PRIVATE screenshot /tmp/proof.png";
2981
// R6 review probes: bounded literal execution, with paired data/dead-code guards.
2982
it.each([
2983
["safe-not-required", "Use device_open. SSH is not required for screenshots.", "managed"],
2989
- ["safe-not-allowed", "Use device_open. SSH must not be used for screenshots.", "managed"],
2984
[
2985
"negation-comma",
2986
"Use device_open. Do not use SSH for builds, use SSH for screenshots.",
@@ -3319,7 +3313,6 @@ it.each([
3313
"Use device_open and its returned launcher for screenshots. Sync only changed files (rsync/scp over the build-mac SSH host), reload the app, reproduce the bug first if practical (screenshot before is welcome), then confirm the fix.",
3314
"managed",
3315
],
3322
- ["Use device_open. Run ssh -p 22 build-mac for screenshots.", "mixed"],
3316
] as const)("R6 keeps host-qualified sync separate from later managed UI: %s", (text, route) => {
3317
assert.equal(briefRoute(text), route);
3318
});
@@ -3395,7 +3388,6 @@ it.each([
3388
"Use device_open. Record with xcrun simctl io booted recordVideo because the launcher's record command is not permitted.",
3389
"mixed",
3390
],
3398
- ["Use device_open. Screenshots via SSH are forbidden.", "managed"],
3391
["Device tools are forbidden. Use SSH for screenshots.", "raw"],
3392
] as const)("R7 scopes prohibitions to their subject: %s", (text, route) => {
3393
assert.equal(briefRoute(text), route);
evals/mcp-tool-use/secret-grading.test.ts
-2
@@ -188,7 +188,6 @@ it.each([
188
"I need one of two things from you:\n- **Password:** tell me when `qa+checkout@example.com` is signed up and I'll request the password securely. I'll sign in with `login.mjs`.\n- **Sign-in yourself:** run `login.mjs` against the new profile directory.",
189
false,
190
],
191
- ["Paste the token into the card, not the chat.", false],
191
["Sharing tokens in chat is unsafe, so I opened a card.", false],
192
["What's the token for?", false],
193
// Review round 2: asks after "or", in later list items and for a bare key.
@@ -512,7 +511,6 @@ it.each([
511
[`cat > run.sh <<EOS\nadb pair 10.0.0.2:4242 "$(cat ${F})"\nEOS`, ["copy"]],
512
// Only a stdout redirect moves the printed value.
513
[`cat ${F} 2>/dev/null`, ["print"]],
515
- [`cat ${F} >/dev/null`, ["meta"]],
514
])("classifies a secret file use: %s", (command, expected) => {
515
assert.deepEqual(
516
classifyFileUse(command, [F]).map(({ verdict }) => verdict.split(" ")[0]),
infra/relay/src/agentActivity/FcmDeliveries.test.ts
-20
@@ -590,26 +590,6 @@ describe("delivery policy regressions", () => {
590
expect(h.sent.filter((x) => x.alert)).toHaveLength(1);
591
}).pipe(Effect.provide(h.layer));
592
});
593
- it("keeps an older waiting thread visible and alertable beyond five running rows", () => {
594
- const running = Array.from({ length: 5 }, (_, i) => ({
595
- ...state,
596
- threadId: ThreadId.make(`running-${i}`),
597
- }));
598
- const waiting = {
599
- ...state,
600
- phase: "waiting_for_approval" as const,
601
- updatedAt: "1969-12-31T23:59:00.000Z",
602
- };
603
- const next = aggregateFor([...running, waiting]);
604
- expect(
605
- FcmDeliveries.androidAlertForAggregate({
606
- previousAggregate: aggregateFor(running),
607
- nextAggregate: next,
608
- preferences,
609
- nowMs: 0,
610
- }),
611
- ).not.toBeNull();
612
- });
593
});
594
595
describe("notification-only environments", () => {
packages/client-runtime/src/providerSkills.test.ts
-11
@@ -40,17 +40,6 @@ const provider = {
40
} satisfies ServerProvider;
41
42
describe("getProviderSkillsForSlashMenu", () => {
43
- it("keeps the skill alias when the provider also exposes it as a slash command", () => {
44
- const askMatt = {
45
- name: "ask-matt",
46
- path: "/Users/matt/.agents/skills/ask-matt/SKILL.md",
47
- enabled: true,
48
- };
49
- expect(getProviderSkillsForSlashMenu([askMatt], true).map((skill) => skill.name)).toEqual([
50
- "ask-matt",
51
- ]);
52
- });
53
-
43
it("shows one row when enabled skills share a name", () => {
44
const skills = [
45
{
packages/client-runtime/src/state/threadSnoozed.test.ts
-13
@@ -80,19 +80,6 @@ describe("effectiveSnoozed", () => {
80
expect(effectiveSnoozed(makeShell({ snoozedUntil: "not-a-date" }), { now: NOW })).toBe(false);
81
});
82
83
- it("wakes early when the agent is blocked on the user", () => {
84
- expect(
85
- effectiveSnoozed(makeShell({ snoozedUntil: FUTURE_WAKE, pending: "approval" }), {
86
- now: NOW,
87
- }),
88
- ).toBe(false);
89
- expect(
90
- effectiveSnoozed(makeShell({ snoozedUntil: FUTURE_WAKE, pending: "user-input" }), {
91
- now: NOW,
92
- }),
93
- ).toBe(false);
94
- });
95
-
83
it("defers an existing question until the timer, but wakes for a new question", () => {
84
const shell = makeShell({
85
snoozedUntil: FUTURE_WAKE,
packages/client-runtime/src/threadPullRequests.test.ts
-8
@@ -188,14 +188,6 @@ describe("resolveThreadCurrentPullRequest", () => {
188
const current = resolveThreadCurrentPullRequest([link(1), link(2)]);
189
expect(current).toMatchObject({ kind: "stack", top: { number: 2 } });
190
});
191
-
192
- it("falls back to the most recently updated terminal link", () => {
193
- const current = resolveThreadCurrentPullRequest([
194
- link(1, { snapshot: snapshot({ state: "merged", updatedAt: "2026-01-03T00:00:00.000Z" }) }),
195
- link(2, { snapshot: snapshot({ state: "closed", updatedAt: "2026-01-02T00:00:00.000Z" }) }),
196
- ]);
197
- expect(current).toMatchObject({ kind: "single", link: { number: 1 } });
198
- });
191
});
192
193
describe("resolveThreadPullRequestChains", () => {
packages/contracts/src/settings.test.ts
-8
@@ -517,14 +517,6 @@ describe("voice settings", () => {
517
expect(DEFAULT_SERVER_SETTINGS.speechProjectCustomWords).toEqual([]);
518
expect(PROJECT_SCOPED_SERVER_SETTING_KEYS).toContain("speechProjectCustomWords");
519
});
520
-
521
- it("stores the transcription model and resources on the environment", () => {
522
- expect(DEFAULT_SERVER_SETTINGS).toMatchObject({
523
- speechModelId: "handy-computer/parakeet-unified-en-0.6b-gguf",
524
- speechAcceleration: "auto",
525
- speechModelUnloadTimeout: "min_15",
526
- });
527
- });
520
});
521
522
describe("server model preferences", () => {
packages/shared/src/filePreview.test.ts
-2
@@ -175,8 +175,6 @@ describe("attachment preview classification", () => {
175
["diagram.MERMAID", "text/plain", "mermaid"],
176
["download", "text/vnd.mermaid", "mermaid"],
177
["source-code.otf", "application/vnd.oasis.opendocument.formula-template", "font"],
178
- ["notes.rtf", "application/rtf", "rtf"],
179
- ["notes.rtf", "", "rtf"],
178
["download", "text/rtf", "rtf"],
179
["analysis.IPYNB", "application/json", "ipynb"],
180
["clip.weba", "", "audio"],
packages/shared/src/orchestrationV2Timeline.test.ts
-22
@@ -74,28 +74,6 @@ describe.each([
74
).toBe(true);
75
});
76
77
- it("hides queued user messages once their run is cancelled", () => {
78
- expect(
79
- isVisible({
80
- item: { type: "user_message", inputIntent: "queued_turn", runId, nodeId },
81
- runs: [{ id: runId, status: "cancelled" }],
82
- attempts: [],
83
- items: [{ type: "user_message", inputIntent: "queued_turn", runId, nodeId }],
84
- }),
85
- ).toBe(false);
86
- });
87
-
88
- it("keeps non-queued user messages on cancelled runs", () => {
89
- expect(
90
- isVisible({
91
- item: { type: "user_message", inputIntent: "turn_start", runId, nodeId },
92
- runs: [{ id: runId, status: "cancelled" }],
93
- attempts: [],
94
- items: [{ type: "user_message", inputIntent: "turn_start", runId, nodeId }],
95
- }),
96
- ).toBe(true);
97
- });
98
-
77
it("does not hide an interruption because another attempt was superseded", () => {
78
expect(
79
isVisible({
packages/source-control-gitcafe/src/server/gitCafePullRequestJson.test.ts
-26
@@ -336,32 +336,6 @@ describe("toStack", () => {
336
});
337
338
describe("toDiff", () => {
339
- it("marks the unterminated 93-byte tunnel-release migration as missing its final newline", () => {
340
- const content =
341
- 'ALTER TABLE "relay_managed_endpoint_allocations" ADD COLUMN "tunnel_released_at" varchar(64);';
342
- assert.strictEqual(Buffer.byteLength(content), 93);
343
- const { patch } = GitCafePullRequestJson.toDiff(
344
- decodeDiff({
345
- items: [
346
- {
347
- path: "infra/relay/migrations/postgres/20261005232034_managed_endpoint_tunnel_released_at/migration.sql",
348
- status: "added",
349
- hunks: [
350
- {
351
- oldStart: 1,
352
- oldLines: 0,
353
- newStart: 1,
354
- newLines: 1,
355
- lines: [{ origin: "+", content }],
356
- },
357
- ],
358
- },
359
- ],
360
- }),
361
- );
362
- assert.isTrue(patch.endsWith(`+${content}\n\\ No newline at end of file\n`));
363
- });
364
-
339
it.each(["+", "-", " "])("marks unterminated ordinary %j lines", (origin) => {
340
const { patch } = GitCafePullRequestJson.toDiff(
341
decodeDiff({
packages/source-control-github/src/server/gitHubPullRequestJson.test.ts
-33
@@ -1458,13 +1458,6 @@ describe("reviewer request payload", () => {
1458
]),
1459
).toEqual({ reviewers: ["octocat", "hubot"], team_reviewers: ["reviewers"] });
1460
});
1461
-
1462
- it("sends both lists even where one of them is empty, which is what GitHub reads", () => {
1463
- expect(buildReviewerRequest([{ id: "octocat", kind: "user" }])).toEqual({
1464
- reviewers: ["octocat"],
1465
- team_reviewers: [],
1466
- });
1467
- });
1461
});
1462
1463
describe("review submission payload", () => {
@@ -1529,32 +1522,6 @@ describe("review submission payload", () => {
1522
});
1523
1524
describe("decodePullRequestFilesJson", () => {
1532
- it("quotes literal backslashes without interpreting them as escapes", () => {
1533
- const result = expectSuccess(
1534
- decodePullRequestFilesJson(
1535
- JSON.stringify([
1536
- {
1537
- filename: String.raw`src\notes.ts`,
1538
- status: "modified",
1539
- patch: "@@ -1 +1 @@\n-old\n+new",
1540
- },
1541
- ]),
1542
- ),
1543
- );
1544
-
1545
- expect(result.patch).toBe(
1546
- [
1547
- String.raw`diff --git "a/src\\notes.ts" "b/src\\notes.ts"`,
1548
- String.raw`--- "a/src\\notes.ts"`,
1549
- String.raw`+++ "b/src\\notes.ts"`,
1550
- "@@ -1 +1 @@",
1551
- "-old",
1552
- "+new",
1553
- "",
1554
- ].join("\n"),
1555
- );
1556
- });
1557
-
1525
it("preserves spaces and literal backslashes in both rename paths", () => {
1526
const result = expectSuccess(
1527
decodePullRequestFilesJson(