Skip to content

Commit 32d8f8f

Browse files
test(server): prune low-value tests in orchestration-v2 (second pass) (pingdotgg#22599)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 8feddd6 commit 32d8f8f

63 files changed

Lines changed: 732 additions & 11367 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts‎

Lines changed: 234 additions & 2819 deletions
Large diffs are not rendered by default.

‎apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts‎

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,7 @@ describe("AcpRegistryAdapterV2", () => {
757757
}).pipe(Effect.provide(layerTest), Effect.scoped),
758758
);
759759

760+
// regression: #19519 models come from session model state, not a hardcoded list
760761
it.effect("leaves unadvertised model IDs alone in both model selection protocols", () =>
761762
Effect.gen(function* () {
762763
const { configurations } = yield* openWithStoredPicks({
@@ -898,73 +899,7 @@ describe("AcpRegistryAdapterV2", () => {
898899
);
899900
});
900901

901-
it.effect("offers client terminals to Devin only and client fs to no registry agent", () =>
902-
Effect.gen(function* () {
903-
const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
904-
const path = yield* Path.Path;
905-
const mockAgentPath = yield* path.fromFileUrl(
906-
new URL("../../../scripts/acp-mock-agent.ts", import.meta.url),
907-
);
908-
const advertisedCapabilities = Effect.fn("advertisedCapabilities")(function* (
909-
agentId: string,
910-
) {
911-
let clientCapabilities: unknown;
912-
const instanceId = ProviderInstanceId.make(`acp-registry-capabilities-${agentId}`);
913-
const adapter = yield* makeAcpRegistryAdapterV2({
914-
selfInvocation: yield* resolveSelfInvocation(),
915-
instanceId,
916-
settings: yield* decodeAcpRegistryAdapterSettings({ agentId, authMethodId: "test" }),
917-
environment: {},
918-
makeRuntime: (input) =>
919-
Effect.gen(function* () {
920-
clientCapabilities = input.clientCapabilities;
921-
const { processEnvironment: _processEnvironment, ...runtimeInput } = input;
922-
const context = yield* Layer.build(
923-
AcpSessionRuntime.layer({
924-
...runtimeInput,
925-
spawn: {
926-
command: process.execPath,
927-
args: [mockAgentPath],
928-
cwd: input.cwd,
929-
env: { T3_ACP_SESSION_LIFECYCLE: "1" },
930-
},
931-
authMethodId: "test",
932-
}).pipe(
933-
Layer.provide(
934-
Layer.succeed(ChildProcessSpawner.ChildProcessSpawner, childProcessSpawner),
935-
),
936-
),
937-
);
938-
return yield* Effect.service(AcpSessionRuntime.AcpSessionRuntime).pipe(
939-
Effect.provide(context),
940-
);
941-
}),
942-
}).pipe(Effect.provide(layerInjectedRuntimeCatalog));
943-
const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
944-
runtimeMode: "full-access",
945-
interactionMode: "default",
946-
cwd: process.cwd(),
947-
});
948-
yield* adapter.openSession({
949-
threadId: ThreadId.make(`thread-acp-registry-capabilities-${agentId}`),
950-
providerSessionId: ProviderSessionId.make(`provider-session-capabilities-${agentId}`),
951-
modelSelection: { instanceId, model: "default" },
952-
runtimePolicy,
953-
});
954-
return clientCapabilities;
955-
});
956-
957-
assert.deepInclude(yield* advertisedCapabilities("devin"), {
958-
fs: { readTextFile: false, writeTextFile: false },
959-
terminal: true,
960-
});
961-
assert.deepInclude(yield* advertisedCapabilities("gemini"), {
962-
fs: { readTextFile: false, writeTextFile: false },
963-
terminal: false,
964-
});
965-
}).pipe(Effect.provide(layerTest), Effect.scoped),
966-
);
967-
902+
// regression: #21618 Claude Agent needs ACP v2 for native background lifecycle
968903
it.effect("launches Claude Agent on ACP v2 unless its instance environment decides", () =>
969904
Effect.gen(function* () {
970905
const launchSwitch = Effect.fn("launchSwitch")(function* (

‎apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts‎

Lines changed: 0 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -377,111 +377,6 @@ describe("AntigravityAdapterV2 workspace changes", () => {
377377
);
378378
});
379379

380-
describe("AntigravityAdapterV2 client file system under restrictive policies", () => {
381-
it.effect("serves in-workspace reads and writes and still refuses outside paths", () =>
382-
Effect.gen(function* () {
383-
const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
384-
const fileSystem = yield* FileSystem.FileSystem;
385-
const path = yield* Path.Path;
386-
const crypto = yield* Crypto.Crypto;
387-
const mockAgentPath = yield* path.fromFileUrl(
388-
new URL("../../../scripts/acp-mock-agent.ts", import.meta.url),
389-
);
390-
type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"];
391-
const policies = [
392-
{
393-
name: "read-only sandbox",
394-
policy: {
395-
runtimeMode: "full-access",
396-
approvalPolicy: "never",
397-
sandboxPolicy: { type: "readOnly" },
398-
},
399-
},
400-
{ name: "approval-required", policy: { runtimeMode: "approval-required" } },
401-
] as const;
402-
for (const { name, policy } of policies) {
403-
let readTextFile: Parameters<RuntimeService["handleReadTextFile"]>[0] | undefined;
404-
let writeTextFile: Parameters<RuntimeService["handleWriteTextFile"]>[0] | undefined;
405-
const instanceId = ProviderInstanceId.make(`antigravity-restrictive-${policy.runtimeMode}`);
406-
const adapter = yield* makeAntigravityAdapterV2({
407-
instanceId,
408-
selfInvocation: yield* resolveSelfInvocation(),
409-
makeRuntime: (input) =>
410-
makeAntigravityAcpRuntime({
411-
...input,
412-
childProcessSpawner,
413-
spawn: {
414-
command: process.execPath,
415-
args: [mockAgentPath],
416-
cwd: input.cwd,
417-
env: { T3_ACP_ANTIGRAVITY: "1" },
418-
},
419-
}).pipe(
420-
Effect.provideService(Crypto.Crypto, crypto),
421-
Effect.map((runtime): RuntimeService => ({
422-
...runtime,
423-
handleReadTextFile: (handler) =>
424-
Effect.sync(() => {
425-
readTextFile = handler;
426-
}).pipe(Effect.andThen(runtime.handleReadTextFile(handler))),
427-
handleWriteTextFile: (handler) =>
428-
Effect.sync(() => {
429-
writeTextFile = handler;
430-
}).pipe(Effect.andThen(runtime.handleWriteTextFile(handler))),
431-
})),
432-
),
433-
withProcess: (_stop, task) => task,
434-
defaultModel: Effect.succeed(undefined),
435-
});
436-
const workspace = yield* fileSystem.makeTempDirectoryScoped({
437-
prefix: "t3-ag-restrictive-",
438-
});
439-
const outside = yield* fileSystem.makeTempDirectoryScoped({
440-
prefix: "t3-ag-restrictive-outside-",
441-
});
442-
yield* fileSystem.writeFileString(path.join(workspace, "existing.ts"), "existing");
443-
const threadId = ThreadId.make(`thread-antigravity-restrictive-${policy.runtimeMode}`);
444-
const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
445-
...policy,
446-
interactionMode: "default",
447-
cwd: workspace,
448-
});
449-
const modelSelection = { instanceId, model: "gemini-test-low" } as const;
450-
const session = yield* adapter.openSession({
451-
threadId,
452-
providerSessionId: ProviderSessionId.make(
453-
`provider-session-antigravity-restrictive-${policy.runtimeMode}`,
454-
),
455-
modelSelection,
456-
runtimePolicy,
457-
});
458-
yield* session.ensureThread({ threadId, modelSelection, runtimePolicy });
459-
if (readTextFile === undefined || writeTextFile === undefined) {
460-
return yield* Effect.die("Antigravity sessions must serve client file requests");
461-
}
462-
const context = (method: string) => ({ requestId: `test-${method}`, method });
463-
const read = yield* readTextFile(
464-
{ sessionId: "mock-session-1", path: path.join(workspace, "existing.ts") },
465-
context("fs/read_text_file"),
466-
);
467-
assert.equal(read.content, "existing", name);
468-
const written = path.join(workspace, "src", "edited.ts");
469-
yield* writeTextFile(
470-
{ sessionId: "mock-session-1", path: written, content: "edited" },
471-
context("fs/write_text_file"),
472-
);
473-
assert.equal(yield* fileSystem.readFileString(written), "edited", name);
474-
const outsideWrite = yield* writeTextFile(
475-
{ sessionId: "mock-session-1", path: path.join(outside, "x.ts"), content: "x" },
476-
context("fs/write_text_file"),
477-
).pipe(Effect.exit);
478-
assert.isTrue(Exit.isFailure(outsideWrite), name);
479-
assert.isFalse(yield* fileSystem.exists(path.join(outside, "x.ts")), name);
480-
}
481-
}).pipe(Effect.provide(layerSession), Effect.scoped),
482-
);
483-
});
484-
485380
describe("AntigravityAdapterV2 html_render pages", () => {
486381
it.effect("shows the page html_render published when the agent reports only a summary", () =>
487382
Effect.gen(function* () {

0 commit comments

Comments
 (0)