Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions .beads/issues.jsonl

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/defaults/prompts/default/finalize.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Run the stage command (skip if empty — some backends auto-stage):
```
Then exclude diagnostic artifacts that cause merge conflicts:
```
git reset HEAD SESSION_LOG.md RUN_LOG.md 2>/dev/null || true
git reset HEAD SESSION_LOG.md RUN_LOG.md .beads/issues.jsonl 2>/dev/null || true
```
SESSION_LOG.md and RUN_LOG.md are diagnostic artifacts that cause merge conflicts when multiple pipelines run concurrently. They remain in the worktree for debugging but are excluded from the commit.
SESSION_LOG.md and RUN_LOG.md are diagnostic artifacts that cause merge conflicts when multiple pipelines run concurrently. .beads/issues.jsonl is managed centrally by the bead-writer process — committing it from worktrees causes merge conflicts when multiple agents run in parallel. All three remain in the worktree for debugging but are excluded from the commit.

### Step 4: Commit
Run:
Expand Down Expand Up @@ -188,5 +188,5 @@ Use this format:
- **DO NOT modify any source code files** — only write FINALIZE_VALIDATION.md, FINALIZE_REPORT.md and run git commands
- Run steps in order — do not skip any step unless explicitly told to stop
- All failures except "nothing to commit" (for non-verification beads) are logged and continue (non-fatal) unless they prevent git push
- Do NOT commit SESSION_LOG.md or RUN_LOG.md — they are excluded from commits to prevent merge conflicts
- Do NOT commit SESSION_LOG.md, RUN_LOG.md, or .beads/issues.jsonl — they are excluded from commits to prevent merge conflicts when multiple agents run in parallel
- **If tests fail in Step 7, stop after writing FINALIZE_VALIDATION.md — do NOT run Steps 8 or 9**
2 changes: 1 addition & 1 deletion src/defaults/prompts/smoke/finalize.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Run `pwd` and confirm you are in `{{worktreePath}}`. If not, run `cd {{worktreeP
**1. Run stage and commit (skip stage command if empty — some backends auto-stage):**
```
{{vcsStageCommand}}
git reset HEAD SESSION_LOG.md RUN_LOG.md 2>/dev/null || true
git reset HEAD SESSION_LOG.md RUN_LOG.md .beads/issues.jsonl 2>/dev/null || true
{{vcsCommitCommand}}
```
If git reports "nothing to commit", that is fine — continue anyway (do not send an error).
Expand Down
8 changes: 7 additions & 1 deletion src/lib/vcs/git-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ export class GitBackend implements VcsBackend {
const { stdout } = await execFileAsync("git", args, {
cwd,
maxBuffer: 10 * 1024 * 1024,
env: { ...process.env, GIT_EDITOR: "true" },
timeout: 60_000,
env: {
...process.env,
GIT_EDITOR: "true",
GIT_TERMINAL_PROMPT: "0",
GIT_ASKPASS: "true",
},
});
return stdout.trim();
} catch (err: unknown) {
Expand Down
8 changes: 8 additions & 0 deletions src/lib/vcs/jujutsu-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class JujutsuBackend implements VcsBackend {
const { stdout } = await execFileAsync("jj", args, {
cwd,
maxBuffer: 10 * 1024 * 1024,
timeout: 60_000,
});
return stdout.trim();
} catch (err: unknown) {
Expand All @@ -87,6 +88,13 @@ export class JujutsuBackend implements VcsBackend {
const { stdout } = await execFileAsync("git", args, {
cwd,
maxBuffer: 10 * 1024 * 1024,
timeout: 60_000,
env: {
...process.env,
GIT_EDITOR: "true",
GIT_TERMINAL_PROMPT: "0",
GIT_ASKPASS: "true",
},
});
return stdout.trim();
} catch (err: unknown) {
Expand Down
6 changes: 6 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@ export default defineConfig({
"**/.claude/worktrees/**",
],
testTimeout: 30000,
hookTimeout: 30000,
env: {
// Prevent git from hanging on credential prompts during tests
GIT_TERMINAL_PROMPT: "0",
GIT_ASKPASS: "true",
},
},
});
Loading