fix(atlas): address review findings for task session reuse

This commit is contained in:
YeonGyu-Kim
2026-03-18 18:44:42 +09:00
parent 33ef4db502
commit 3c7e6a3940
5 changed files with 289 additions and 4 deletions
+6
View File
@@ -9,6 +9,8 @@ import { dirname, join, basename } from "node:path"
import type { BoulderState, PlanProgress, TaskSessionState } from "./types"
import { BOULDER_DIR, BOULDER_FILE, PROMETHEUS_PLANS_DIR } from "./constants"
const RESERVED_KEYS = new Set(["__proto__", "prototype", "constructor"])
export function getBoulderFilePath(directory: string): string {
return join(directory, BOULDER_DIR, BOULDER_FILE)
}
@@ -113,6 +115,10 @@ export function upsertTaskSessionState(
return null
}
if (RESERVED_KEYS.has(input.taskKey)) {
return null
}
const taskSessions = state.task_sessions ?? {}
taskSessions[input.taskKey] = {
task_key: input.taskKey,