Skip to content

Commit de09c91

Browse files
only21milclaude
andcommitted
test(server): adapt the ACP import fixtures to main
Main's layerWsRpc takes the client's settings capabilities, so the ACP session RPC test passes them. Effect 4.1.2 flags process.env reads inside Effect code, so the mock agent reads its close-session flag at module load like its other flags. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 93ca03c commit de09c91

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/server/scripts/acp-mock-agent.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const emitInterleavedAssistantToolCalls =
2828
process.env.T3_ACP_EMIT_INTERLEAVED_ASSISTANT_TOOL_CALLS === "1";
2929
const emitV2Fidelity = process.env.T3_ACP_EMIT_V2_FIDELITY === "1";
3030
const emitNotice = process.env.T3_ACP_EMIT_NOTICE === "1";
31+
const hangCloseSession = process.env.T3_ACP_HANG_CLOSE_SESSION === "1";
3132
const vibeRetryOutcome = process.env.T3_ACP_VIBE_RETRY_OUTCOME;
3233
const emitGenericToolPlaceholders = process.env.T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS === "1";
3334
const emitInTurnTaskOutputThenLateDuplicate =
@@ -731,7 +732,7 @@ const program = Effect.gen(function* () {
731732
yield* agent.handleCloseSession(() =>
732733
Effect.gen(function* () {
733734
yield* requireAuthentication();
734-
if (process.env.T3_ACP_HANG_CLOSE_SESSION === "1") {
735+
if (hangCloseSession) {
735736
return yield* Effect.never;
736737
}
737738
return {};

‎apps/server/src/ws.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,7 @@ it.effect("ACP session RPCs list a thread missing its history and repair it on i
18151815
{},
18161816
yield* ServerBrowser.ServerBrowser,
18171817
() => Effect.void,
1818+
{ secretReferences: true },
18181819
).pipe(
18191820
Layer.provide(services),
18201821
Layer.merge(

0 commit comments

Comments
 (0)