test: remove stale trajectory sidecar assumptions

This commit is contained in:
Peter Steinberger
2026-05-09 21:11:00 +01:00
parent 6028631f31
commit 2398cf35c8
3 changed files with 4 additions and 19 deletions

View File

@@ -334,7 +334,7 @@ describe("cron service timer regressions", () => {
});
it("retries OpenAI-compatible server_error payloads when retryOn only includes server_error", async () => {
const store = timerRegressionFixtures.makeStorePath();
const store = timerRegressionFixtures.makeStoreKey();
const scheduledAt = Date.parse("2026-03-14T00:00:00.000Z");
const serverErrorPayload =
'Codex error: {"type":"error","error":{"type":"server_error","code":"server_error","message":"An error occurred while processing your request."},"sequence_number":2}';
@@ -347,7 +347,7 @@ describe("cron service timer regressions", () => {
payload: { kind: "agentTurn", message: "remind me" },
state: { nextRunAtMs: scheduledAt },
});
await writeCronJobs(store.storePath, [cronJob]);
await writeCronJobs(store.storeKey, [cronJob]);
let now = scheduledAt;
const runIsolatedAgentJob = vi
@@ -356,7 +356,7 @@ describe("cron service timer regressions", () => {
.mockResolvedValueOnce({ status: "ok", summary: "done" });
const state = createCronServiceState({
cronEnabled: true,
storePath: store.storePath,
storeKey: store.storeKey,
log: noopLogger,
nowMs: () => now,
enqueueSystemEvent: vi.fn(),

View File

@@ -33,7 +33,7 @@ function logLiveStep(step: string, details?: Record<string, unknown>): void {
}
function snapshotEnv(): LiveEnvSnapshot {
return snapshotLiveEnv(["OPENCLAW_TRAJECTORY", "OPENCLAW_TRAJECTORY_DIR"]);
return snapshotLiveEnv(["OPENCLAW_TRAJECTORY"]);
}
function restoreEnv(snapshot: LiveEnvSnapshot): void {
@@ -191,7 +191,6 @@ describeLive("gateway live trajectory export", () => {
});
const stateDir = path.join(tempDir, "state");
const trajectoryDir = path.join(tempDir, "runtime-traces");
const { workspaceDir } = await createBootstrapWorkspace(tempDir);
const configPath = path.join(tempDir, "openclaw.json");
const token = `test-${randomUUID()}`;
@@ -211,10 +210,8 @@ describeLive("gateway live trajectory export", () => {
process.env.OPENCLAW_SKIP_GMAIL_WATCHER = "1";
process.env.OPENCLAW_STATE_DIR = stateDir;
process.env.OPENCLAW_TRAJECTORY = "1";
process.env.OPENCLAW_TRAJECTORY_DIR = trajectoryDir;
await fs.mkdir(stateDir, { recursive: true });
await fs.mkdir(trajectoryDir, { recursive: true });
await writeLiveGatewayConfig({ configPath, modelKey, port, token, workspace: workspaceDir });
logLiveStep("config-written", { configPath, modelKey, port, workspaceDir });
@@ -249,10 +246,6 @@ describeLive("gateway live trajectory export", () => {
logLiveStep("agent-turn:done", { firstReply });
expect(firstReply.trim()).toBe(replyToken);
const trajectoryFiles = await listDirectoryNames(trajectoryDir);
logLiveStep("runtime-traces", { trajectoryDir, files: trajectoryFiles });
expect(trajectoryFiles.length).toBeGreaterThan(0);
const bundleDir = path.join(workspaceDir, ".openclaw", "trajectory-exports", "bundle");
const beforeExport = new Set(await listDirectoryNames(tempDir));
const exportRunId = `chat-export-${randomUUID()}`;

View File

@@ -83,14 +83,6 @@ describe("deriveSessionChatTypeFromKey", () => {
] as const)("derives chat type for %j => $expected", ({ key, expected }) => {
expect(deriveSessionChatTypeFromKey(key)).toBe(expected);
});
it("uses plugin-owned legacy chat-type hooks after generic token parsing", () => {
expect(
deriveSessionChatTypeFromKey("legacy-room:abc", [
(sessionKey) => (sessionKey.startsWith("legacy-room:") ? "channel" : undefined),
]),
).toBe("channel");
});
});
describe("thread session suffix parsing", () => {