fix(persistence): worktree meta and lineage writes take the row's host, not the id (R4-2b) (#30811)

* fix(persistence): worktree meta and lineage writes take the row's host, not the id (R4-2b)

* fix(persistence): review fixes for host-targeted worktree writes

* test: SAFETY notes on partial runtime store mocks

* test: drop imports duplicated by the rebase onto #30797
This commit is contained in:
Neil
2026-10-19 11:39:54 -07:00
committed by GitHub
parent 86ef00ad55
commit eedca5ee1c
142 changed files with 1625 additions and 772 deletions
@@ -3,6 +3,7 @@
import { describe, expect, it, vi } from 'vitest'
import type { Repo } from '../../shared/repo-types'
import { createRuntimeFolderWorktree } from './runtime-folder-worktree-create'
import type { HostWorktreeTarget } from '../../shared/worktree/host-qualified-identity'
type CreateArgs = Parameters<typeof createRuntimeFolderWorktree>[0]
@@ -20,7 +21,7 @@ function createDeps() {
.mockResolvedValue({ handle: 'term-1', worktreeId: 'folder-1', title: null })
const store = {
getSettings: () => ({ workspaceDir: '/ws', nestWorkspaces: false }),
setWorktreeMeta: (_id: string, meta: Record<string, unknown>) => meta,
setWorktreeMeta: (_target: HostWorktreeTarget, meta: Record<string, unknown>) => meta,
getProjectHostSetups: () => []
}
const deps: CreateArgs['deps'] = {