<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/src/server/handlers/files.rs, branch contract-lifecycle</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=contract-lifecycle</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=contract-lifecycle'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-05-08T11:12:21+00:00</updated>
<entry>
<title>feat(contracts): lifecycle — Lock/Start/Pause/Complete/Unlock + queue scheduler</title>
<updated>2026-05-08T11:12:21+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-08T11:12:21+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=bd1f21fe387ec57da76c300cbb1ebc0db48553a7'/>
<id>urn:sha1:bd1f21fe387ec57da76c300cbb1ebc0db48553a7</id>
<content type='text'>
Adds the contract lifecycle layer on top of the unified-contracts
backbone (#128). State machine:

    draft → queued → active → shipped → archived

At most one contract per directive sits in `active` at any time —
the queue is serialised because each directive owns a single shared
worktree. Repository helpers handle the transition checks AND
auto-promote the next-up `queued` contract whenever the active slot
frees (pause / complete / unlock-from-active / archive-from-active).

Endpoints (all under /api/v1/contracts/{id}):
  POST /start    draft → queued | active (depending on slot)
  POST /pause    active → queued; promotes next queued
  POST /complete active → shipped; optional pr_url + pr_branch
  POST /unlock   queued | active → draft; promotes if was active

Frontend wiring:
  * `DirectiveContractStatus` now includes `queued`.
  * Migration adds `queued` to the CHECK constraint on
    directive_documents.status.
  * `ContractHeader` component renders breadcrumb + status pill +
    status-driven action buttons + a merge-mode (shared / own_pr)
    radio. Merge mode is editable only while draft / queued so a
    running flow's branch target can't change mid-stream.
  * RepositoryError gains a `Validation(String)` arm; the three
    existing exhaustive matches (files, mesh, versions) get a
    400 BAD_REQUEST response for it.

Drag-to-reorder UI deferred to a small follow-up — the backend
endpoint already exists from the backbone PR.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title> Contract system</title>
<updated>2026-01-15T00:21:16+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-11T05:52:14+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=87044a747b47bd83249d61a45842c7f7b2eae56d'/>
<id>urn:sha1:87044a747b47bd83249d61a45842c7f7b2eae56d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial Control system</title>
<updated>2026-01-11T03:01:13+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-06T04:08:11+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=8b17a175c3e7e27b789812eba4e3cd760beadb10'/>
<id>urn:sha1:8b17a175c3e7e27b789812eba4e3cd760beadb10</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add conflict notification and file update WS endpoint</title>
<updated>2025-12-23T22:20:52+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2025-12-23T22:20:52+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=72c2590571104b8d10e3f72d7a5b984d0b520c51'/>
<id>urn:sha1:72c2590571104b8d10e3f72d7a5b984d0b520c51</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add Postgres for persistence and File cabinet</title>
<updated>2025-12-23T14:47:18+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2025-12-23T02:14:58+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=a32dc56d2e5447ef8988cb98b8686476cc94e70c'/>
<id>urn:sha1:a32dc56d2e5447ef8988cb98b8686476cc94e70c</id>
<content type='text'>
Migrations are local only currently, and must be run manually by setting POSTGRES_CONNECTION_URI
</content>
</entry>
</feed>
