Keep the launch dump out of the session's git status
The .orchestra directory showed up as untracked work in the very worktree whose own launch context said "uncommitted changes: false". It would have polluted the quality gate, the review diff, and the agent's reading of git status. A .gitignore of "*" inside the directory ignores it including itself. The worker's done marker lives there too and had the same problem. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -120,7 +120,15 @@ const LaunchContextFile = ".orchestra/launch.md"
|
||||
// evidence is worth having, and is not worth refusing to start work over.
|
||||
func WriteLaunchContext(worktree, prompt string) error {
|
||||
path := filepath.Join(worktree, LaunchContextFile)
|
||||
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
|
||||
dir := filepath.Dir(path)
|
||||
if err := os.MkdirAll(dir, 0o755); err != nil {
|
||||
return err
|
||||
}
|
||||
// Orchestra's own scratch directory must not show up as the session's
|
||||
// work. A .gitignore of "*" ignores the directory including itself, so the
|
||||
// tree stays clean for the agent, for the gate, and for review evidence.
|
||||
// The worker's done marker lives here too and had the same problem.
|
||||
if err := os.WriteFile(filepath.Join(dir, ".gitignore"), []byte("*\n"), 0o644); err != nil {
|
||||
return err
|
||||
}
|
||||
return os.WriteFile(path, []byte(prompt), 0o644)
|
||||
|
||||
Reference in New Issue
Block a user