<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claudomator.git/internal/task/task_test.go, branch story/task-project-fk</title>
<subtitle>claudomator — task automation server
</subtitle>
<id>https://git.terst.org/claudomator.git/atom?h=story%2Ftask-project-fk</id>
<link rel='self' href='https://git.terst.org/claudomator.git/atom?h=story%2Ftask-project-fk'/>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/'/>
<updated>2026-04-03T23:31:15+00:00</updated>
<entry>
<title>refactor: replace Task.Project+RepositoryURL+BranchName with ProjectID FK</title>
<updated>2026-04-03T23:31:15+00:00</updated>
<author>
<name>Claude Agent</name>
<email>agent@claudomator.local</email>
</author>
<published>2026-04-03T23:31:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=97eef0c964fb5d0dd53c66cec389831de8316fe0'/>
<id>urn:sha1:97eef0c964fb5d0dd53c66cec389831de8316fe0</id>
<content type='text'>
- Task.Project (human-readable name) replaced by Task.ProjectID (FK to Project.ID)
- Task.RepositoryURL changed to derived-only (yaml:"-"), computed at runtime from ProjectID
- Validator now accepts project_id OR repository_url (either satisfies the requirement)
- Update task_test.go and validator_test.go accordingly

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: add Project field to Task struct and YAML parsing</title>
<updated>2026-03-16T20:01:13+00:00</updated>
<author>
<name>Claudomator Agent</name>
<email>agent@claudomator</email>
</author>
<published>2026-03-16T20:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=054ec8b653b175917ef8bea45d55025e6775f187'/>
<id>urn:sha1:054ec8b653b175917ef8bea45d55025e6775f187</id>
<content type='text'>
Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: cancel blocked tasks + auto-complete completion reports</title>
<updated>2026-03-14T00:33:46+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-14T00:33:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=6ac15be438e3692cbc2ae2f36ab2d69468fc6372'/>
<id>urn:sha1:6ac15be438e3692cbc2ae2f36ab2d69468fc6372</id>
<content type='text'>
Two fixes for BLOCKED task issues:

1. Allow BLOCKED → CANCELLED state transition so users can cancel tasks
   stuck waiting for input. Adds Cancel button to BLOCKED task cards in
   the UI alongside the question/answer controls.

2. Detect when agents write completion reports to $CLAUDOMATOR_QUESTION_FILE
   instead of real questions. If the question JSON has no options and no "?"
   in the text, treat it as a summary (stored on the execution) and fall
   through to normal completion + sandbox teardown rather than blocking.
   Also tightened the preamble to make the distinction explicit.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>task: promote validTransitions to package-level var; fix ADR</title>
<updated>2026-03-10T17:16:49+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-10T17:16:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=3226af322cb7c7f7a93a91e98651538b1bec54ee'/>
<id>urn:sha1:3226af322cb7c7f7a93a91e98651538b1bec54ee</id>
<content type='text'>
Hoists the map out of ValidTransition so it's not reallocated on every
call. Adds missing CANCELLED→QUEUED and BUDGET_EXCEEDED→QUEUED entries
to the ADR transition table to match the implemented state machine.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>task: allow requeueing BUDGET_EXCEEDED tasks</title>
<updated>2026-03-09T01:11:05+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-09T01:11:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=1b4be14d02d3fd17beeddcce8d5056d51b19296c'/>
<id>urn:sha1:1b4be14d02d3fd17beeddcce8d5056d51b19296c</id>
<content type='text'>
Permitted BUDGET_EXCEEDED -&gt; QUEUED transition in ValidTransition. Updated frontend to show 'Restart' button for BUDGET_EXCEEDED tasks, allowing them to be requeued after failure.
</content>
</entry>
<entry>
<title>task: add BLOCKED→READY to ValidTransition</title>
<updated>2026-03-08T22:11:53+00:00</updated>
<author>
<name>Claudomator Agent</name>
<email>agent@claudomator</email>
</author>
<published>2026-03-08T22:11:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=fab59cf8e669fe9ec34b30586f07b7478e897c31'/>
<id>urn:sha1:fab59cf8e669fe9ec34b30586f07b7478e897c31</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: blocked task state for agent questions via session resume</title>
<updated>2026-03-06T00:07:18+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-06T00:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=7466b1751c4126735769a3304e1db80dab166a9e'/>
<id>urn:sha1:7466b1751c4126735769a3304e1db80dab166a9e</id>
<content type='text'>
When an agent needs user input it writes a question to
$CLAUDOMATOR_QUESTION_FILE and exits. The runner detects the file and
returns BlockedError; the pool transitions the task to BLOCKED and
stores the question JSON on the task record.

The user answers via POST /api/tasks/{id}/answer. The server looks up
the claude session_id from the most recent execution and submits a
resume execution (claude --resume &lt;session-id&gt; "&lt;answer&gt;"), freeing the
executor slot entirely while waiting.

Changes:
- task: add StateBlocked, transitions RUNNING→BLOCKED, BLOCKED→QUEUED
- storage: add session_id to executions, question_json to tasks;
  add GetLatestExecution and UpdateTaskQuestion methods
- executor: BlockedError type; ClaudeRunner pre-assigns --session-id,
  sets CLAUDOMATOR_QUESTION_FILE env var, detects question file on exit;
  buildArgs handles --resume mode; Pool.SubmitResume for resume path
- api: handleAnswerQuestion rewritten to create resume execution
- preamble: add question protocol instructions for agents
- web: BLOCKED state badge (indigo), question text + option buttons or
  free-text input with Submit on the task card footer

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add READY state for human-in-the-loop verification</title>
<updated>2026-03-04T21:25:34+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-04T21:25:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=6511d6e0ff139495413c7848a9b4aabb9d9ee4e2'/>
<id>urn:sha1:6511d6e0ff139495413c7848a9b4aabb9d9ee4e2</id>
<content type='text'>
Top-level tasks now land in READY after successful execution instead of
going directly to COMPLETED. Subtasks (with parent_task_id) skip the gate
and remain COMPLETED. Users accept or reject via new API endpoints:

  POST /api/tasks/{id}/accept  → READY → COMPLETED
  POST /api/tasks/{id}/reject  → READY → PENDING (with rejection_comment)

- task: add StateReady, RejectionComment field, update ValidTransition
- storage: migrate rejection_comment column, add RejectTask method
- executor: route top-level vs subtask to READY vs COMPLETED
- api: /accept and /reject handlers with 409 on invalid state

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add subtask support: parent_task_id, ListSubtasks, UpdateTask</title>
<updated>2026-03-03T21:15:01+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-03T21:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=704d007a26cac804148a51d35e129beaea382fb0'/>
<id>urn:sha1:704d007a26cac804148a51d35e129beaea382fb0</id>
<content type='text'>
- Task struct gains ParentTaskID field
- DB schema adds parent_task_id column (additive migration)
- DB.ListSubtasks fetches children of a parent task
- DB.UpdateTask allows partial field updates (name, description, state, etc.)
- Templates table added to initial schema

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Initial project: task model, executor, API server, CLI, storage, reporter</title>
<updated>2026-02-09T07:35:45+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-02-09T07:35:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=2e2b2187b957e9af78797a67ec5c6874615fae02'/>
<id>urn:sha1:2e2b2187b957e9af78797a67ec5c6874615fae02</id>
<content type='text'>
Claudomator automation toolkit for Claude Code with:
- Task model with YAML parsing, validation, state machine (49 tests, 0 races)
- SQLite storage for tasks and executions
- Executor pool with bounded concurrency, timeout, cancellation
- REST API + WebSocket for mobile PWA integration
- Webhook/multi-notifier system
- CLI: init, run, serve, list, status commands
- Console, JSON, HTML reporters with cost tracking

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
