Skip to content

Commit b0cf761

Browse files
committed
fix(release): clean up one-shot gateway MCP runtimes
1 parent 38e162d commit b0cf761

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

scripts/e2e/lib/kitchen-sink-plugin/sweep.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ while IFS='|' read -r label spec plugin_id source expectation surface_mode perso
121121
export KITCHEN_SINK_SOURCE="$source"
122122
export KITCHEN_SINK_SURFACE_MODE="$surface_mode"
123123
export KITCHEN_SINK_PERSONALITY="${personality:-}"
124+
export OPENCLAW_KITCHEN_SINK_PERSONALITY="${personality:-}"
124125
case "$expectation" in
125126
success)
126127
run_success_scenario

src/gateway/server-methods/agent.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,21 @@ describe("gateway agent handler", () => {
12121212
);
12131213
});
12141214

1215+
it("forwards one-shot bundle MCP cleanup from agent RPC into the runner", async () => {
1216+
primeMainAgentRun();
1217+
mocks.agentCommand.mockClear();
1218+
1219+
await invokeAgent({
1220+
message: "cleanup probe",
1221+
sessionKey: "agent:main:subagent:cleanup-probe",
1222+
idempotencyKey: "test-idem-agent-cleanup-bundle-mcp",
1223+
cleanupBundleMcpOnRunEnd: true,
1224+
});
1225+
1226+
const call = await waitForAgentCommandCall();
1227+
expect(call.cleanupBundleMcpOnRunEnd).toBe(true);
1228+
});
1229+
12151230
it.each(
12161231
(["channel", "replyChannel"] as const).flatMap((field) =>
12171232
(["heartbeat", "cron", "webhook"] as const).map((channel) => [field, channel] as const),

src/gateway/server-methods/agent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,7 @@ export const agentHandlers: GatewayRequestHandlers = {
13731373
acpTurnSource: request.acpTurnSource,
13741374
internalEvents: request.internalEvents,
13751375
inputProvenance,
1376+
cleanupBundleMcpOnRunEnd: request.cleanupBundleMcpOnRunEnd,
13761377
abortSignal: activeRunAbort.controller.signal,
13771378
// Internal-only: allow workspace override for spawned subagent runs.
13781379
workspaceDir: resolveIngressWorkspaceOverrideForSpawnedRun({

test/scripts/plugin-prerelease-test-plan.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => {
108108
expect(script).toContain("scripts/e2e/lib/kitchen-sink-plugin/sweep.sh");
109109
expect(sweepScript).toContain('plugins install "$KITCHEN_SINK_SPEC"');
110110
expect(sweepScript).toContain("KITCHEN_SINK_PERSONALITY");
111+
expect(sweepScript).toContain("OPENCLAW_KITCHEN_SINK_PERSONALITY");
111112
expect(sweepScript).toContain('plugins uninstall "$KITCHEN_SINK_SPEC" --force');
112113
const successScenario = sweepScript.slice(
113114
sweepScript.indexOf("run_success_scenario()"),

0 commit comments

Comments
 (0)