fix(release): clean up one-shot gateway MCP runtimes

This commit is contained in:
Peter Steinberger
2026-05-01 20:26:30 +01:00
parent 38e162dc71
commit b0cf76165c
4 changed files with 18 additions and 0 deletions

View File

@@ -121,6 +121,7 @@ while IFS='|' read -r label spec plugin_id source expectation surface_mode perso
export KITCHEN_SINK_SOURCE="$source"
export KITCHEN_SINK_SURFACE_MODE="$surface_mode"
export KITCHEN_SINK_PERSONALITY="${personality:-}"
export OPENCLAW_KITCHEN_SINK_PERSONALITY="${personality:-}"
case "$expectation" in
success)
run_success_scenario

View File

@@ -1212,6 +1212,21 @@ describe("gateway agent handler", () => {
);
});
it("forwards one-shot bundle MCP cleanup from agent RPC into the runner", async () => {
primeMainAgentRun();
mocks.agentCommand.mockClear();
await invokeAgent({
message: "cleanup probe",
sessionKey: "agent:main:subagent:cleanup-probe",
idempotencyKey: "test-idem-agent-cleanup-bundle-mcp",
cleanupBundleMcpOnRunEnd: true,
});
const call = await waitForAgentCommandCall();
expect(call.cleanupBundleMcpOnRunEnd).toBe(true);
});
it.each(
(["channel", "replyChannel"] as const).flatMap((field) =>
(["heartbeat", "cron", "webhook"] as const).map((channel) => [field, channel] as const),

View File

@@ -1373,6 +1373,7 @@ export const agentHandlers: GatewayRequestHandlers = {
acpTurnSource: request.acpTurnSource,
internalEvents: request.internalEvents,
inputProvenance,
cleanupBundleMcpOnRunEnd: request.cleanupBundleMcpOnRunEnd,
abortSignal: activeRunAbort.controller.signal,
// Internal-only: allow workspace override for spawned subagent runs.
workspaceDir: resolveIngressWorkspaceOverrideForSpawnedRun({

View File

@@ -108,6 +108,7 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => {
expect(script).toContain("scripts/e2e/lib/kitchen-sink-plugin/sweep.sh");
expect(sweepScript).toContain('plugins install "$KITCHEN_SINK_SPEC"');
expect(sweepScript).toContain("KITCHEN_SINK_PERSONALITY");
expect(sweepScript).toContain("OPENCLAW_KITCHEN_SINK_PERSONALITY");
expect(sweepScript).toContain('plugins uninstall "$KITCHEN_SINK_SPEC" --force');
const successScenario = sweepScript.slice(
sweepScript.indexOf("run_success_scenario()"),