release: auto-commit + push after chat workflow finish (#614)
Merged
SW
5mo ago+1877+1877+0123456789012345678901234567890123456789-0-0-0123456789
Summary
Releases PR #614 from `test` → `main`.
- After a chat workflow finishes naturally with sandbox changes, the workflow stages → generates a commit message (gpt-5.4-nano) → commits → pushes to the session's branch
- Emits `data-commit` chunks live (pending → resolved) so the open-agents `GitDataPartCard` UI renders during the stream
- Persists the resolved chunk onto the assistant message so the affordance survives page refresh
Test plan
- 3266 unit tests passing
- E2E preview: triggered chat that modifies files, commit landed on GitHub at
recoupable/org-myco-wtf-.../commit/66f7aa26,GitDataPartCardrendered on refresh ("Committed & pushed · 66f7aa2" + commit message subtitle) - Persistence verified directly via Supabase MCP —
chat_messages.partscontains the merged data-commit part - Post-merge: sanity check on
sandbox.recoupable.comagainsthttps://api.recoupable.com
🤖 Generated with Claude Code
Summary by cubic
Automatically commits and pushes sandbox changes at the end of a chat, streaming live commit status and persisting it so the Git card remains after refresh.
-
New Features
- On natural finish (not tool-calls), if the repo and sandbox are available and changes exist, stage → generate commit message via
openai/gpt-5.4-nano→ commit → push current branch. - Uses
GITHUB_TOKENif set to authorigin; falls back gracefully and reports errors without breaking the chat. - Emits
data-commitchunks (pending → success/error with commit URL) during the stream, and persists the final chunk tochat_messages.partsso the UI shows the commit after reload. - Derives
repoOwner/repoNamefromsession.clone_url, removing reliance on unused columns.
- On natural finish (not tool-calls), if the repo and sandbox are available and changes exist, stage → generate commit message via
-
Refactors
- Extracted auto-commit flow into
autoCommitChatTurnwith focused helpers (runAutoCommit,performAutoCommit,generateCommitMessage,hasAutoCommitChanges,sendCommitChunk,buildCommitData,persistAssistantDataPart), and threadedsessionTitle/repo IDs/sandbox state throughrunAgentWorkflow.
- Extracted auto-commit flow into