refactor(daemon): remove global ReposRoot, use per-task RepoPath from server
ReposRoot was a daemon-level config that locked all tasks to a single git repo. Replace with RepoPath in TaskContext so the server can specify the repo per task. When not provided, daemon falls back to directory mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aa3f927a37
commit
7b4a73c989
7 changed files with 15 additions and 36 deletions
|
|
@ -96,7 +96,7 @@ func TestPrepareDirectoryMode(t *testing.T) {
|
|||
|
||||
env, err := Prepare(PrepareParams{
|
||||
WorkspacesRoot: workspacesRoot,
|
||||
ReposRoot: reposRoot,
|
||||
RepoPath: reposRoot,
|
||||
TaskID: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
AgentName: "Test Agent",
|
||||
Task: TaskContextForEnv{
|
||||
|
|
@ -176,7 +176,7 @@ func TestPrepareGitWorktreeMode(t *testing.T) {
|
|||
|
||||
env, err := Prepare(PrepareParams{
|
||||
WorkspacesRoot: workspacesRoot,
|
||||
ReposRoot: reposRoot,
|
||||
RepoPath: reposRoot,
|
||||
TaskID: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
||||
AgentName: "Code Reviewer",
|
||||
Task: TaskContextForEnv{
|
||||
|
|
@ -334,7 +334,7 @@ func TestCleanupGitWorktree(t *testing.T) {
|
|||
|
||||
env, err := Prepare(PrepareParams{
|
||||
WorkspacesRoot: workspacesRoot,
|
||||
ReposRoot: reposRoot,
|
||||
RepoPath: reposRoot,
|
||||
TaskID: "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
||||
AgentName: "Cleanup Test",
|
||||
Task: TaskContextForEnv{IssueTitle: "Cleanup test"},
|
||||
|
|
@ -477,7 +477,7 @@ func TestCleanupPreservesLogs(t *testing.T) {
|
|||
|
||||
env, err := Prepare(PrepareParams{
|
||||
WorkspacesRoot: workspacesRoot,
|
||||
ReposRoot: t.TempDir(), // not a git repo
|
||||
RepoPath: t.TempDir(), // not a git repo
|
||||
TaskID: "d4e5f6a7-b8c9-0123-defa-234567890123",
|
||||
AgentName: "Preserve Test",
|
||||
Task: TaskContextForEnv{IssueTitle: "Preserve test"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue