fix(coven): drop unused runtime cwd metadata

This commit is contained in:
Val Alexander
2026-04-27 11:30:48 -05:00
parent 377da09828
commit 895d16ffd1
2 changed files with 8 additions and 8 deletions

View File

@@ -347,11 +347,14 @@ describe("CovenAcpRuntime", () => {
mode: "oneshot",
cwd: workspaceDir,
});
handle.runtimeSessionName = __testing.encodeRuntimeSessionName({
agent: "codex",
mode: "prompt",
cwd: "/tmp/attacker",
});
handle.runtimeSessionName = `coven:${Buffer.from(
JSON.stringify({
agent: "codex",
mode: "prompt",
cwd: "/tmp/attacker",
}),
"utf8",
).toString("base64url")}`;
await collect(
runtime.runTurn({
@@ -611,7 +614,6 @@ describe("CovenAcpRuntime", () => {
agent: "A".repeat(5_000),
mode: "prompt".repeat(1_000),
sessionMode: "persistent".repeat(1_000),
cwd: "/workspace/".repeat(1_000),
});
expect(Buffer.byteLength(encoded, "utf8")).toBeLessThanOrEqual("coven:".length + 2_048);

View File

@@ -51,7 +51,6 @@ type CovenRuntimeSessionState = {
agent: string;
mode: string;
sessionMode?: string;
cwd?: string;
};
type CovenAcpRuntimeParams = {
@@ -109,7 +108,6 @@ function decodeRuntimeSessionName(value: string): CovenRuntimeSessionState | nul
agent,
mode: typeof parsed.mode === "string" ? parsed.mode : "prompt",
...(typeof parsed.sessionMode === "string" ? { sessionMode: parsed.sessionMode } : {}),
...(typeof parsed.cwd === "string" && parsed.cwd.trim() ? { cwd: parsed.cwd.trim() } : {}),
};
} catch {
return null;