test: remove redundant default-root explicit fallback case

This commit is contained in:
Peter Steinberger
2026-02-16 08:23:09 +00:00
parent e72e8ebe62
commit 49d383ba7c

View File

@@ -148,20 +148,6 @@ describe("session path safety", () => {
).toThrow(/within sessions directory/);
});
it("uses explicit agentId fallback for absolute sessionFile outside sessionsDir", () => {
const mainSessionsDir = path.dirname(resolveStorePath(undefined, { agentId: "main" }));
const opsSessionsDir = path.dirname(resolveStorePath(undefined, { agentId: "ops" }));
const opsSessionFile = path.join(opsSessionsDir, "abc-123.jsonl");
const resolved = resolveSessionFilePath(
"sess-1",
{ sessionFile: opsSessionFile },
{ sessionsDir: mainSessionsDir, agentId: "ops" },
);
expect(resolved).toBe(path.resolve(opsSessionFile));
});
it("uses sibling fallback for custom per-agent store roots", () => {
const mainSessionsDir = "/srv/custom/agents/main/sessions";
const opsSessionFile = "/srv/custom/agents/ops/sessions/abc-123.jsonl";