<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/src/daemon/task, branch makima/auto-merge-local</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=makima%2Fauto-merge-local</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=makima%2Fauto-merge-local'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-01-30T03:28:40+00:00</updated>
<entry>
<title>Add auto_merge_local option for local-only contracts</title>
<updated>2026-01-30T03:28:40+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-30T03:28:40+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=4c09aa13a50064a4145ef53021490d303e46bc5e'/>
<id>urn:sha1:4c09aa13a50064a4145ef53021490d303e46bc5e</id>
<content type='text'>
When local_only=true on a contract, all completion actions are skipped.
This adds a new option auto_merge_local that, when enabled along with
local_only, will automatically merge completed task changes to the
master/main branch locally (without pushing or creating PRs).

Changes:
- Add auto_merge_local column to contracts table (migration)
- Add auto_merge_local field to Contract model and summary
- Update CreateContractRequest and UpdateContractRequest structs
- Update contract repository create/update functions
- Add auto_merge_local to WebSocket protocol StartTask command
- Pass auto_merge_local through spawn_task and run_task functions
- Modify task manager completion logic: if local_only=true AND
  auto_merge_local=true, execute 'merge' completion action locally
- Update all server handlers to retrieve and pass auto_merge_local
- Add TypeScript types to frontend components

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Rename to command mode and update worktree to show committed changes</title>
<updated>2026-01-29T17:23:03+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-29T17:22:59+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=55bf0714a20e651ab70b1eed01ec665cfefac6b4'/>
<id>urn:sha1:55bf0714a20e651ab70b1eed01ec665cfefac6b4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add autodetection of master for PR creation</title>
<updated>2026-01-29T17:23:03+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-29T16:43:07+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=4f1d67797dd56046665b772702b6b38fda9aa039'/>
<id>urn:sha1:4f1d67797dd56046665b772702b6b38fda9aa039</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix worktree cleanup to not run for shared worktrees</title>
<updated>2026-01-29T02:30:16+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-29T02:30:16+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=7af8561677cfdcfd23d099a25783c7fef51d1ba6'/>
<id>urn:sha1:7af8561677cfdcfd23d099a25783c7fef51d1ba6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix makima supervisor pr CLI command</title>
<updated>2026-01-29T01:14:17+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-29T01:14:17+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=f6a40e2304585f140ed5766b25fe71a6958f4425'/>
<id>urn:sha1:f6a40e2304585f140ed5766b25fe71a6958f4425</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add patch merging and fix task healthcheck failing due to worktrees</title>
<updated>2026-01-27T11:03:58+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T11:03:45+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b6f239c19f0d3130515f3745f842e17a69212295'/>
<id>urn:sha1:b6f239c19f0d3130515f3745f842e17a69212295</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Default to shared worktree and add worktree endpoint</title>
<updated>2026-01-27T01:25:40+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T01:25:29+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b0d0b4848b2fc8a44c2575e09a08b34aaf6e1484'/>
<id>urn:sha1:b0d0b4848b2fc8a44c2575e09a08b34aaf6e1484</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix supervisor merge and PR commands (#36)</title>
<updated>2026-01-27T01:22:11+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T01:22:11+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b28345d15730ffbefe81244d06c06fe13c30b0ea'/>
<id>urn:sha1:b28345d15730ffbefe81244d06c06fe13c30b0ea</id>
<content type='text'>
* Task completion checkpoint

* Task completion checkpoint

* Task completion checkpoint

* Fix supervisor merge for completed tasks and make PR command synchronous

## Issue 1: makima supervisor merge doesn't work for completed tasks

When a task completes, the daemon removes it from in-memory task tracking.
This caused merge operations to fail with "Task not found".

Fixed by updating handle_merge_task_to_target() to use get_task_worktree_path()
which scans the worktrees directory as a fallback when the task is not in memory.
Also updated handle_create_pr() with the same pattern for consistency.

## Issue 2: makima supervisor pr returns immediately without result

The create_pr handler was asynchronous - it sent the CreatePR command to the
daemon and immediately returned without waiting for the result.

Fixed by:
1. Adding PrResultNotification struct and pr_results broadcast channel to AppState
2. Updating mesh_daemon.rs to broadcast PRCreated results to the channel
3. Updating create_pr() handler to subscribe to pr_results and wait for the
   result with a 60-second timeout (matching the merge command pattern)

Now the PR command returns the actual pr_url and pr_number from the daemon.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Terminate all processes on makima CLI SIGTERM</title>
<updated>2026-01-26T22:41:30+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-26T22:41:18+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=de1eb0a923f6c5b768ac49f0425b7213a89301b7'/>
<id>urn:sha1:de1eb0a923f6c5b768ac49f0425b7213a89301b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add local-only mode for contracts with patch export support (#34)</title>
<updated>2026-01-26T22:12:57+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-26T22:12:57+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=d1f5dadb549d499c5aeee9cacf6c9aa0a233c198'/>
<id>urn:sha1:d1f5dadb549d499c5aeee9cacf6c9aa0a233c198</id>
<content type='text'>
* Add local_only flag to contracts database and models

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Task completion checkpoint

* Skip automatic completion actions in local_only mode

Add `local_only` flag to contracts that prevents automatic completion
actions (branch, merge, pr) from executing when tasks complete. This
allows users to manually handle code changes via patch files or other
means when operating in local-only mode.

Changes:
- Add `local_only` field to Contract model and request types
- Add database migration for the new column
- Add `local_only` parameter to SpawnTask command in both state.rs and
  daemon protocol.rs
- Modify task manager to skip completion action execution when
  `local_only` is true, with appropriate logging
- Pass `local_only` flag through all task spawning paths:
  - mesh_supervisor.rs (task spawn, retry, resume)
  - mesh.rs (task start, reassign, continue)
  - mesh_chat.rs (run task)
  - contract_chat.rs (run task)
- Update repository create/update functions to handle `local_only`

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Task completion checkpoint

* Implement core patch export system

Add functionality to create uncompressed, human-readable git patches
for export. This enables users to generate patches that can be manually
applied or shared, without the compression used for internal checkpoints.

Changes:
- Add ExportPatchResult struct with patch content, file count, and line stats
- Add create_export_patch() function that generates diffs against a base SHA
- Add get_head_sha() utility function
- Add parse_diff_stat() helper to extract line counts from git output
- Add CreateExportPatch command to daemon protocol
- Add ExportPatchCreated response message to protocol
- Add handler in task manager to process export patch requests
- Add server-side handling to broadcast patch results to UI

The export patch system automatically finds the merge-base when no base
SHA is provided, trying upstream tracking branch first, then common
default branches (origin/main, origin/master, main, master).

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Task completion checkpoint

* Add GitActionsPanel frontend component

* Add WorktreeFilesPanel and PatchesListPanel components

* Add local-only mode toggle to contract creation

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
</feed>
