Skip to content

feat(pool): squash merge + persist review to SQLite#40

Merged
robotlearning123 merged 1 commit intomainfrom
feat/squash-and-persist
Mar 5, 2026
Merged

feat(pool): squash merge + persist review to SQLite#40
robotlearning123 merged 1 commit intomainfrom
feat/squash-and-persist

Conversation

@robotlearning123
Copy link
Member

Summary

  • Squash merge: release(name, true, taskId) squash-merges agent commits into a single result commit on main (task({id}): {summary}). Full agent history preserved at refs/tasks/{taskId}. Without taskId, falls back to legacy ff/merge for backward compat.
  • Review persistence: task.review (ReviewResult) persisted to SQLite via new review TEXT column. Round-trips correctly through save/get/update.
  • Types: Added ReviewResult interface and review?: ReviewResult to Task.

Key design decisions

  • Uses temp branch + update-ref pattern because git worktrees can't checkout main directly (it's already checked out by the parent repo)
  • refs/tasks/{id} only created after successful merge (no orphaned refs on conflict)
  • Extracted cleanupTmpBranch() helper to eliminate 4x copy-paste

Known follow-up

  • Duplicate ReviewResult interface exists in agent-runner.ts (lacks approve field). Should unify with types.ts version in a follow-up PR.

Test plan

  • npx tsc --noEmit — clean
  • npm test — 290/290 pass (0 fail)
  • New test: squash merge produces exactly 1 commit on main, refs/tasks/{id} preserves all agent commits
  • New test: legacy merge (no taskId) preserves all individual commits
  • New test: review field round-trips through save/get
  • New test: task without review → undefined after load
  • New test: update() can set review field

🤖 Generated with Claude Code

Squash merge: release(name, true, taskId) now squash-merges agent
commits into a single result commit on main. Full agent history
preserved at refs/tasks/{taskId}. Without taskId, falls back to
legacy ff/merge for backward compat. Uses temp branch + update-ref
pattern since worktrees can't checkout main directly.

Review persistence: task.review (ReviewResult) round-trips through
SQLite via new review TEXT column with JSON serialization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@robotlearning123 robotlearning123 merged commit ded33ec into main Mar 5, 2026
3 checks passed
@robotlearning123 robotlearning123 deleted the feat/squash-and-persist branch March 5, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant