<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/src/daemon/task/manager.rs, branch makima/fix-supervisor-merge</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=makima%2Ffix-supervisor-merge</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=makima%2Ffix-supervisor-merge'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-01-27T01:18:55+00:00</updated>
<entry>
<title>Fix supervisor merge for completed tasks and make PR command synchronous</title>
<updated>2026-01-27T01:18:55+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T01:14:17+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=d2ae4ce4f5808f823a77c79afb37ca089a04431c'/>
<id>urn:sha1:d2ae4ce4f5808f823a77c79afb37ca089a04431c</id>
<content type='text'>
## 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;
</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>
<entry>
<title>Add completion phases</title>
<updated>2026-01-26T20:19:30+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-26T20:19:30+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=04e1e8f0dd85d19917ac5ba0b73cba65ebac8976'/>
<id>urn:sha1:04e1e8f0dd85d19917ac5ba0b73cba65ebac8976</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix branching to restore from checkpoint</title>
<updated>2026-01-26T14:26:06+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-26T14:26:06+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=d569985bbf8dbe07f05a76a198a6dd76ef3304e2'/>
<id>urn:sha1:d569985bbf8dbe07f05a76a198a6dd76ef3304e2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add automatic phase transitions and fix PR creation</title>
<updated>2026-01-25T04:39:37+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-25T04:39:37+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=cb4f2fc40dbabb40de948512eee74c7e46264665'/>
<id>urn:sha1:cb4f2fc40dbabb40de948512eee74c7e46264665</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Increase concurrency limit</title>
<updated>2026-01-24T15:43:45+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-24T15:43:45+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=4ea35373c08ca7c212dbc7739901168ee4b30753'/>
<id>urn:sha1:4ea35373c08ca7c212dbc7739901168ee4b30753</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix pushing heartbeat commits</title>
<updated>2026-01-24T14:17:30+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-24T14:17:30+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=1abc91f1da9beb96a54e466102f97e8e8c0b70e5'/>
<id>urn:sha1:1abc91f1da9beb96a54e466102f97e8e8c0b70e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add resume to daemon tasks</title>
<updated>2026-01-23T23:52:35+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-23T23:52:35+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=579c983d3efb8f1414ffb45b9e031f741cce5f76'/>
<id>urn:sha1:579c983d3efb8f1414ffb45b9e031f741cce5f76</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add patch checkpointing</title>
<updated>2026-01-23T01:03:04+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-22T22:32:46+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=1ed362424dafec690f919154f5116471951cda9c'/>
<id>urn:sha1:1ed362424dafec690f919154f5116471951cda9c</id>
<content type='text'>
</content>
</entry>
</feed>
