mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-21 04:00:14 +00:00
Remove temporary actor key version prefix
Railway has no persistent volumes so stale actors are wiped on each deploy. The v2 key rotation is no longer needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
58c695e8b4
commit
1ac2dec220
1 changed files with 8 additions and 10 deletions
|
|
@ -1,36 +1,34 @@
|
||||||
export type ActorKey = string[];
|
export type ActorKey = string[];
|
||||||
|
|
||||||
const ACTOR_KEY_SCHEMA_VERSION = "v2";
|
|
||||||
|
|
||||||
export function workspaceKey(workspaceId: string): ActorKey {
|
export function workspaceKey(workspaceId: string): ActorKey {
|
||||||
return ["ws", ACTOR_KEY_SCHEMA_VERSION, workspaceId];
|
return ["ws", workspaceId];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function projectKey(workspaceId: string, repoId: string): ActorKey {
|
export function projectKey(workspaceId: string, repoId: string): ActorKey {
|
||||||
return ["ws", ACTOR_KEY_SCHEMA_VERSION, workspaceId, "project", repoId];
|
return ["ws", workspaceId, "project", repoId];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function taskKey(workspaceId: string, repoId: string, taskId: string): ActorKey {
|
export function taskKey(workspaceId: string, repoId: string, taskId: string): ActorKey {
|
||||||
return ["ws", ACTOR_KEY_SCHEMA_VERSION, workspaceId, "project", repoId, "task", taskId];
|
return ["ws", workspaceId, "project", repoId, "task", taskId];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sandboxInstanceKey(workspaceId: string, providerId: string, sandboxId: string): ActorKey {
|
export function sandboxInstanceKey(workspaceId: string, providerId: string, sandboxId: string): ActorKey {
|
||||||
return ["ws", ACTOR_KEY_SCHEMA_VERSION, workspaceId, "provider", providerId, "sandbox", sandboxId];
|
return ["ws", workspaceId, "provider", providerId, "sandbox", sandboxId];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function historyKey(workspaceId: string, repoId: string): ActorKey {
|
export function historyKey(workspaceId: string, repoId: string): ActorKey {
|
||||||
return ["ws", ACTOR_KEY_SCHEMA_VERSION, workspaceId, "project", repoId, "history"];
|
return ["ws", workspaceId, "project", repoId, "history"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function projectPrSyncKey(workspaceId: string, repoId: string): ActorKey {
|
export function projectPrSyncKey(workspaceId: string, repoId: string): ActorKey {
|
||||||
return ["ws", ACTOR_KEY_SCHEMA_VERSION, workspaceId, "project", repoId, "pr-sync"];
|
return ["ws", workspaceId, "project", repoId, "pr-sync"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function projectBranchSyncKey(workspaceId: string, repoId: string): ActorKey {
|
export function projectBranchSyncKey(workspaceId: string, repoId: string): ActorKey {
|
||||||
return ["ws", ACTOR_KEY_SCHEMA_VERSION, workspaceId, "project", repoId, "branch-sync"];
|
return ["ws", workspaceId, "project", repoId, "branch-sync"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function taskStatusSyncKey(workspaceId: string, repoId: string, taskId: string, sandboxId: string, sessionId: string): ActorKey {
|
export function taskStatusSyncKey(workspaceId: string, repoId: string, taskId: string, sandboxId: string, sessionId: string): ActorKey {
|
||||||
// Include sandbox + session so multiple sandboxes/sessions can be tracked per task.
|
// Include sandbox + session so multiple sandboxes/sessions can be tracked per task.
|
||||||
return ["ws", ACTOR_KEY_SCHEMA_VERSION, workspaceId, "project", repoId, "task", taskId, "status-sync", sandboxId, sessionId];
|
return ["ws", workspaceId, "project", repoId, "task", taskId, "status-sync", sandboxId, sessionId];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue