<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claudomator.git/internal/api/server.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-03T08:39:32+00:00</updated>
<entry>
<title>fix: remove drain-lock circuit breaker that halted all executions after 3 consecutive failures</title>
<updated>2026-04-03T08:39:32+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-04-03T08:39:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=5aa6a15ffdf68a8dbe12eb0fdfff93deafb9da10'/>
<id>urn:sha1:5aa6a15ffdf68a8dbe12eb0fdfff93deafb9da10</id>
<content type='text'>
Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: graceful shutdown — drain workers before exit (default 3m timeout)</title>
<updated>2026-03-26T09:14:14+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-26T09:09:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=3f9843b34d7ae9df2dd9c69427ecab45744b97e9'/>
<id>urn:sha1:3f9843b34d7ae9df2dd9c69427ecab45744b97e9</id>
<content type='text'>
- Add workerWg to Pool; Shutdown() closes workCh and waits for all
  in-flight execute/executeResume goroutines to finish
- Signal handler now shuts down HTTP first, then drains the pool
- ShutdownTimeout config field (toml: shutdown_timeout); default 3m
- Tests: WaitsForWorkers and TimesOut

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: cascade retry deps when running a task with failed dependencies</title>
<updated>2026-03-26T08:02:09+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-26T08:02:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=5f3e9900358649f1356d0a242e643790e29e3701'/>
<id>urn:sha1:5f3e9900358649f1356d0a242e643790e29e3701</id>
<content type='text'>
When /run is called on a CANCELLED/FAILED task that has deps in a terminal
failure state, automatically reset and resubmit those deps so the task
isn't immediately re-cancelled by the pool's dep check.

Also update reset-failed-tasks script to handle CANCELLED tasks and clean
up preserved sandbox workspaces.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: resolve dep-chain deadlock; broadcast task_started for UI visibility</title>
<updated>2026-03-26T05:45:19+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-26T05:45:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=2710eb8a3a58abbea95bd487797abbb3e67f0d0a'/>
<id>urn:sha1:2710eb8a3a58abbea95bd487797abbb3e67f0d0a</id>
<content type='text'>
With maxPerAgent=1, tasks with DependsOn were entering waitForDependencies
while holding the per-agent slot, preventing the dependency from ever running.

Fix: check deps before taking the slot. If not ready, requeue without holding
activePerAgent. Also accept StateReady (leaf tasks) as a satisfied dependency,
not just StateCompleted.

Add startedCh to pool and broadcast task_started WebSocket event when a task
transitions to RUNNING, so the UI immediately shows the running state during
the clone phase instead of waiting for completion.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: Phase 4 — story-aware execution, branch clone, story completion check, deployment status</title>
<updated>2026-03-23T07:12:08+00:00</updated>
<author>
<name>Claudomator Agent</name>
<email>agent@claudomator.dev</email>
</author>
<published>2026-03-23T07:12:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=b2e77009c55ba0f07bb9ff904d9f2f6cc9ff0ee2'/>
<id>urn:sha1:b2e77009c55ba0f07bb9ff904d9f2f6cc9ff0ee2</id>
<content type='text'>
- ContainerRunner: add Store field; clone with --reference when story has a
  local project path; checkout story branch after clone; push to story branch
  instead of HEAD
- executor.Store interface: add GetStory, ListTasksByStory, UpdateStoryStatus
- Pool.handleRunResult: trigger checkStoryCompletion when a story task succeeds
- Pool.checkStoryCompletion: transitions story to SHIPPABLE when all tasks done
- serve.go: wire Store into each ContainerRunner
- stories.go: update createStoryBranch to fetch+checkout from origin/master base;
  add GET /api/stories/{id}/deployment-status endpoint
- server.go: register deployment-status route
- Tests: TestPool_CheckStoryCompletion_AllComplete/PartialComplete,
  TestHandleStoryDeploymentStatus

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: color logo based on build version hash</title>
<updated>2026-03-22T09:13:51+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-22T09:13:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=d8939199f129ccb1abcf0150012bc23209facf12'/>
<id>urn:sha1:d8939199f129ccb1abcf0150012bc23209facf12</id>
<content type='text'>
Adds GET /api/version endpoint and uses the first 6 hex chars of the
commit hash to derive an HSL hue for the header h1 logo color.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: Phase 5 — story elaboration endpoint, approve flow, branch creation</title>
<updated>2026-03-22T08:56:21+00:00</updated>
<author>
<name>Claudomator Agent</name>
<email>agent@claudomator.local</email>
</author>
<published>2026-03-22T08:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=15a46b0e8d6fc9b986bce6b17b471c4a29cc950c'/>
<id>urn:sha1:15a46b0e8d6fc9b986bce6b17b471c4a29cc950c</id>
<content type='text'>
- POST /api/stories/elaborate: runs Claude/Gemini against project LocalPath
  to produce a structured story plan (name, branch_name, tasks, validation)
- POST /api/stories/approve: creates story + sequentially-wired tasks/subtasks
  from the elaborate output and pushes the story branch to origin
- createStoryBranch helper: git checkout -b + push -u origin
- Tests: TestBuildStoryElaboratePrompt, TestHandleStoryApprove_WiresDepends

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: Phase 3 — stories data model, ValidStoryTransition, storage CRUD, API endpoints</title>
<updated>2026-03-22T00:56:54+00:00</updated>
<author>
<name>Claudomator Agent</name>
<email>agent@claudomator.local</email>
</author>
<published>2026-03-22T00:56:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=5081b0c014d8e82e7be1907441c246fbd01ca21e'/>
<id>urn:sha1:5081b0c014d8e82e7be1907441c246fbd01ca21e</id>
<content type='text'>
- internal/task/story.go: Story struct, StoryState constants, ValidStoryTransition
- internal/task/task.go: add StoryID field
- internal/storage/db.go: stories table + story_id on tasks migrations; CreateStory,
  GetStory, ListStories, UpdateStoryStatus, ListTasksByStory; update all task
  SELECT/INSERT to include story_id; scanTask extended with sql.NullString for story_id;
  added modernc timestamp format to GetMaxUpdatedAt
- internal/storage/sqlite_cgo.go + sqlite_nocgo.go: build-tag based driver selection
  (mattn/go-sqlite3 with CGO, modernc.org/sqlite pure-Go fallback) so tests run
  without a C compiler
- internal/api/stories.go: GET/POST /api/stories, GET /api/stories/{id},
  GET/POST /api/stories/{id}/tasks (auto-wires depends_on chain),
  PUT /api/stories/{id}/status (validates transition)
- internal/api/server.go: register all story routes
- go.mod/go.sum: add modernc.org/sqlite pure-Go dependency

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: executor reliability — per-agent limit, drain gate, pre-flight creds, auth recovery</title>
<updated>2026-03-21T23:18:50+00:00</updated>
<author>
<name>Claudomator Agent</name>
<email>agent@claudomator.local</email>
</author>
<published>2026-03-21T23:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=8dca9bbb0baee59ffe0d3127180ef0958dda8b91'/>
<id>urn:sha1:8dca9bbb0baee59ffe0d3127180ef0958dda8b91</id>
<content type='text'>
- maxPerAgent=1: only 1 in-flight execution per agent type at a time; excess tasks are requeued after 30s
- Drain gate: after 2 consecutive failures the agent is drained and a question is set on the task; reset on first success; POST /api/pool/agents/{agent}/undrain to acknowledge
- Pre-flight credential check: verify .credentials.json and .claude.json exist in agentHome before spinning up a container
- Auth error auto-recovery: detect auth errors (Not logged in, OAuth token has expired, etc.) and retry once after running sync-credentials and re-copying fresh credentials
- Extracted runContainer() helper from ContainerRunner.Run() to support the retry flow
- Wire CredentialSyncCmd in serve.go for all three ContainerRunner instances
- Tests: TestPool_MaxPerAgent_*, TestPool_ConsecutiveFailures_*, TestPool_Undrain_*, TestContainerRunner_Missing{Credentials,Settings}_FailsFast, TestIsAuthError_*, TestContainerRunner_AuthError_SyncsAndRetries

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: Phase 2 — project registry, legacy field cleanup, credential path fix</title>
<updated>2026-03-21T21:23:42+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-21T21:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=888f3014b42ff48f597d0a81e9f52104d19be6db'/>
<id>urn:sha1:888f3014b42ff48f597d0a81e9f52104d19be6db</id>
<content type='text'>
- task.Project type + storage CRUD + UpsertProject + SeedProjects
- Remove AgentConfig.ProjectDir, RepositoryURL, SkipPlanning
- Remove ContainerRunner fallback git init logic
- Project API endpoints: GET/POST /api/projects, GET/PUT /api/projects/{id}
- processResult no longer extracts changestats (pool-side only)
- claude_config_dir config field; default to credentials/claude/
- New scripts: sync-credentials, fix-permissions, check-token

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