test(e2e): align H5 assertion with actual on-disk session-dir layout

The wrapper writes agentctl.pid and agentctl.log to <sessionDir>; the
remote agentctl port travels via AGENTCTL_PORT env + ExecutorRunning
metadata, not a separate .port file. Assert the files that actually
exist and the metadata field that carries the port.
This commit is contained in:
José Almeida
2026-05-17 17:10:46 +01:00
parent 2b3b08344e
commit d744a4e60c
+4 -1
View File
@@ -159,7 +159,10 @@ test.describe("ssh executor — task launch", () => {
const sessionDir = `${row!.remote_task_dir}/.kandev/sessions/${row!.session_id}`;
expect(remotePathExists(seedData.sshTarget, sessionDir)).toBe(true);
const entries = listRemoteDir(seedData.sshTarget, sessionDir);
expect(entries).toEqual(expect.arrayContaining(["agentctl.pid", "agentctl.port"]));
// The wrapper writes the pid file and the log; the port travels via the
// AGENTCTL_PORT env var and the ExecutorRunning metadata, not a file.
expect(entries).toEqual(expect.arrayContaining(["agentctl.pid", "agentctl.log"]));
expect(row!.remote_agentctl_port).toBeGreaterThan(0);
});
test("stopping the session cleans up the session runtime dir but leaves the task dir", async ({