<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claudomator.git/internal/executor/container.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-03-26T08:56:04+00:00</updated>
<entry>
<title>fix: ensure story branch exists before cloning at task start</title>
<updated>2026-03-26T08:56:04+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-26T08:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=909fa86bea1f55acc1ccb119e9509d2c724f6b5b'/>
<id>urn:sha1:909fa86bea1f55acc1ccb119e9509d2c724f6b5b</id>
<content type='text'>
Add ensureStoryBranch() that runs git ls-remote to check, then clones
into a temp dir to create and push the branch if missing. Called before
the task's own clone so checkout is guaranteed to succeed.

Removes the post-checkout fallback hack added in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: auto-create story branch if missing at clone time</title>
<updated>2026-03-26T08:28:02+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-26T08:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=6dcd26901b862aa680a1cb501f24183bcf854abc'/>
<id>urn:sha1:6dcd26901b862aa680a1cb501f24183bcf854abc</id>
<content type='text'>
If git checkout of the story branch fails (branch never pushed to bare
repo), create it from HEAD and push to origin instead of hard-failing
the task.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>chore: replace all master branch references with main</title>
<updated>2026-03-25T05:31:14+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-25T05:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=9fe915674ee7e1f91771eb5fa5a73f99bcecef88'/>
<id>urn:sha1:9fe915674ee7e1f91771eb5fa5a73f99bcecef88</id>
<content type='text'>
- executor.go: merge story branch to main before deploy
- container.go: error messages reference git push origin main
- api/stories.go: create story branch from origin/main (drop master fallback)
- executor_test.go: test setup uses main branch

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: resolve merge conflict — integrate agent's story-aware ContainerRunner</title>
<updated>2026-03-24T21:54:31+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-24T21:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=407fbc8d346b986bf864452c865282aa726272e2'/>
<id>urn:sha1:407fbc8d346b986bf864452c865282aa726272e2</id>
<content type='text'>
Agent added: Store on ContainerRunner (direct story/project lookup), --reference
clone for speed, explicit story branch push, checkStoryCompletion → SHIPPABLE.
My additions: BranchName on Task as fallback when Store is nil, tests updated
to match checkout-after-clone approach.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: clone story branch in ContainerRunner (ADR-007)</title>
<updated>2026-03-24T21:35:12+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-24T21:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=e3954992af63440986bd39cce889e9c62e1a6b92'/>
<id>urn:sha1:e3954992af63440986bd39cce889e9c62e1a6b92</id>
<content type='text'>
- Add BranchName field to task.Task (populated from story at execution time)
- Add GetStory to executor Store interface; resolve BranchName from story in both
  execute() and executeResume() parallel to RepositoryURL resolution
- Pass --branch &lt;name&gt; to git clone when BranchName is set; default clone otherwise

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: 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>fix: copy .claude.json (account settings) alongside credentials</title>
<updated>2026-03-21T21:44:41+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-21T21:44:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=2c57f8e0b0ac637eac689a89bdf5498227b78a93'/>
<id>urn:sha1:2c57f8e0b0ac637eac689a89bdf5498227b78a93</id>
<content type='text'>
ClaudeConfigDir moved from /root/.claude to credentials/claude/, but
container.go was still deriving .claude.json from filepath.Dir which
no longer pointed anywhere useful. Claude CLI needs .claude.json for
OAuth account info or it says "Not logged in".

Also update sync-credentials to copy /root/.claude.json into the
credentials dir so it stays fresh alongside the token.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: fail loudly when agent leaves uncommitted work in sandbox</title>
<updated>2026-03-21T21:34:45+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-21T21:34:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=bb599880f9b84088c2e9ffc63b1c2e0a7e9484ff'/>
<id>urn:sha1:bb599880f9b84088c2e9ffc63b1c2e0a7e9484ff</id>
<content type='text'>
After a successful run with no commits pushed, detectUncommittedChanges
checks for modified tracked files and untracked source files. If any
exist the task fails with an explicit error rather than silently
succeeding while the work evaporates when the sandbox is deleted.

Scaffold files written by the harness (.claudomator-env,
.claudomator-instructions.txt, .agent-home/) are excluded from the check.

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>
