fix(manager): allow session provider switches (#240)

This commit is contained in:
Lyon
2026-06-24 10:17:18 +08:00
committed by GitHub
parent 0f9e742ed1
commit 685a0504f5
2 changed files with 9 additions and 10 deletions
+2 -3
View File
@@ -685,9 +685,8 @@ export function assertSessionBoundary(existing: SessionRecord, input: CreateRunI
if (existing.tenantId !== input.tenantId || existing.projectId !== input.projectId) {
throw new AgentRunError("tenant-policy-denied", "sessionRef cannot be reused across tenant or project boundary", { httpStatus: 403, details: { sessionId: existing.sessionId, valuesPrinted: false } });
}
if (existing.backendProfile !== input.backendProfile) {
throw new AgentRunError("schema-invalid", "sessionRef cannot be reused across backendProfile boundary", { httpStatus: 400, details: { sessionId: existing.sessionId, existingBackendProfile: existing.backendProfile, requestedBackendProfile: input.backendProfile, valuesPrinted: false } });
}
// backendProfile is run-scoped, not session/PVC-scoped. A HWLAB session must be
// able to switch providers without losing its session storage or workspace.
}
export function statusFromTerminal(terminalStatus: TerminalStatus): RunRecord["status"] {