mirror of
https://github.com/stablyai/orca.git
synced 2026-11-03 10:37:35 +00:00
fix(persistence): repo writes take the row's identity, never a bare id (#30616)
* fix(persistence): repo writes take the row's identity, never a bare id updateRepo(target, updates) now takes Pick<Repo,'id'|'connectionId'|'executionHostId'> (RepoHostTarget) and resolves the host from it, so a caller that holds the row can no longer drop its host and write a same-id sibling on another host. The id-only callers (project host setup controller and IPC handler, folder-to-Git upgrade watch, both clone paths, registration adoption, fork backfill) pass the row they resolved. Co-Authored-By: Claude <noreply@anthropic.com> * test: migrate the remaining Store.updateRepo callers to row targets Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,7 @@ function makeController(): {
|
||||
const store = {
|
||||
getProjects: () => projectHostSetupProjectionFromRepos([repo]).projects,
|
||||
getProjectHostSetups: () => [],
|
||||
updateRepo: (_id: string, updates: Record<string, unknown>) => ({ ...repo, ...updates })
|
||||
updateRepo: (_target: unknown, updates: Record<string, unknown>) => ({ ...repo, ...updates })
|
||||
}
|
||||
const addRepo = vi.fn().mockResolvedValue(repo)
|
||||
const cloneRepo = vi.fn().mockResolvedValue(repo)
|
||||
|
||||
Reference in New Issue
Block a user