diff --git a/packages/cli-workflow/src/__tests__/solve-issue-tea-worktree.test.ts b/packages/cli-workflow/src/__tests__/solve-issue-tea-worktree.test.ts index 5683213..cd93e01 100644 --- a/packages/cli-workflow/src/__tests__/solve-issue-tea-worktree.test.ts +++ b/packages/cli-workflow/src/__tests__/solve-issue-tea-worktree.test.ts @@ -24,7 +24,7 @@ describe("solve-issue workflow: tea pr create worktree fix", () => { "solve-issue.yaml", ); - test("committer procedure should include --repo flag in tea pr create command", async () => { + test("committer procedure should require running tea pr create from main repo directory", async () => { const yamlContent = await readFile(workflowPath, "utf-8"); const workflow = parse(yamlContent) as WorkflowPayload; @@ -32,19 +32,12 @@ describe("solve-issue workflow: tea pr create worktree fix", () => { const committerProcedure = workflow.roles.committer?.procedure; expect(committerProcedure).toBeDefined(); - // Verify the procedure includes tea pr create with --repo flag + // Verify the procedure includes tea pr create expect(committerProcedure).toContain("tea pr create"); - expect(committerProcedure).toContain("--repo"); - // Verify the --repo flag appears before or together with tea pr create - // This ensures the command is: tea pr create --repo ... - const teaPrCreateMatch = committerProcedure?.match(/tea pr create[^\n]*/); - expect(teaPrCreateMatch).not.toBeNull(); - - if (teaPrCreateMatch) { - const teaCommandLine = teaPrCreateMatch[0]; - expect(teaCommandLine).toContain("--repo"); - } + // Verify the procedure warns about running from main repo dir (not worktree) + expect(committerProcedure).toMatch(/main repo directory/i); + expect(committerProcedure).toMatch(/not a worktree/i); }); test("committer procedure should mention repo extraction from git remote", async () => { diff --git a/packages/workflow-agent-claude-code/src/cli.ts b/packages/workflow-agent-claude-code/src/cli.ts old mode 100644 new mode 100755