<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claudomator.git/internal/executor/claude_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-03-18T07:54:48+00:00</updated>
<entry>
<title>fix: comprehensive addressing of container execution review feedback</title>
<updated>2026-03-18T07:54:48+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-18T00:52:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=5814e7d6bdec659bb8ca10cc18447a821c59ad4c'/>
<id>urn:sha1:5814e7d6bdec659bb8ca10cc18447a821c59ad4c</id>
<content type='text'>
- Fix Critical Bug 1: Only remove workspace on success, preserve on failure/BLOCKED.
- Fix Critical Bug 2: Use correct Claude flag (--resume) and pass instructions via file.
- Fix Critical Bug 3: Actually mount and use the instructions file in the container.
- Address Design Issue 4: Implement Resume/BLOCKED detection and host-side workspace re-use.
- Address Design Issue 5: Consolidate RepositoryURL to Task level and fix API fallback.
- Address Design Issue 6: Make agent images configurable per runner type via CLI flags.
- Address Design Issue 7: Secure API keys via .claudomator-env file and --env-file flag.
- Address Code Quality 8: Add unit tests for ContainerRunner arg construction.
- Address Code Quality 9: Fix indentation regression in app.js.
- Address Code Quality 10: Clean up orphaned Claude/Gemini runner files and move helpers.
- Fix tests: Update server_test.go and executor_test.go to work with new model.
</content>
</entry>
<entry>
<title>fix: repair test regressions and add pre-commit/pre-push verification gates</title>
<updated>2026-03-16T19:46:44+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-16T19:46:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=17a36cc83980d278a8cab5132bf14de731b352ca'/>
<id>urn:sha1:17a36cc83980d278a8cab5132bf14de731b352ca</id>
<content type='text'>
Fix four pre-existing bugs exposed after resolving a build failure:
- sandboxCloneSource: accept any URL scheme for origin remote (was filtering out https://)
- setupSandbox callers: fix := shadow variable so sandboxDir is set on BlockedError
- parseGeminiStream: parse result lines to return execution errors and cost
- TestElaborateTask_InvalidJSONFromClaude: stub Gemini fallback so test is hermetic

Add verification infrastructure:
- scripts/verify: runs go build + go test -race, used by hooks and deploy
- scripts/hooks/pre-commit: blocks commits that don't compile
- scripts/hooks/pre-push: blocks pushes where tests fail
- scripts/install-hooks: symlinks version-controlled hooks into .git/hooks/
- scripts/deploy: runs scripts/verify before building the binary

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: run build (Makefile, gradlew, or go build) before sandbox autocommit</title>
<updated>2026-03-15T09:19:43+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-15T06:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=5fccaa636cd400cd7809a1d2e4f254c3fff58218'/>
<id>urn:sha1:5fccaa636cd400cd7809a1d2e4f254c3fff58218</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: fix task failures via sandbox improvements and display commits in Web UI</title>
<updated>2026-03-15T03:39:49+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-15T03:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=6ff67a57d72317360cacd4b41560395ded117d20'/>
<id>urn:sha1:6ff67a57d72317360cacd4b41560395ded117d20</id>
<content type='text'>
- Fix ephemeral sandbox deletion issue by passing $CLAUDOMATOR_PROJECT_DIR to agents and using it for subtask project_dir.
- Implement sandbox autocommit in teardown to prevent task failures from uncommitted work.
- Track git commits created during executions and persist them in the DB.
- Display git commits and changestats badges in the Web UI execution history.
- Add badge counts to Web UI tabs for Interrupted, Ready, and Running states.
- Improve scripts/next-task to handle QUEUED tasks and configurable DB path.
</content>
</entry>
<entry>
<title>fix: surface agent stderr, auto-retry restart-killed tasks, handle stale sandboxes</title>
<updated>2026-03-14T07:37:20+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-14T07:37:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=4029fdd82bdd657ed862c89f20eb03ff2594cde9'/>
<id>urn:sha1:4029fdd82bdd657ed862c89f20eb03ff2594cde9</id>
<content type='text'>
#1 - Diagnostics: tailFile() reads last 20 lines of subprocess stderr and
appends to error message when claude/gemini exits non-zero. Previously all
exit-1 failures were opaque; now the error_msg carries the actual subprocess
output.

#4 - Restart recovery: RecoverStaleRunning() now re-queues tasks after
marking them FAILED, so tasks killed by a server restart automatically
retry on the next boot rather than staying permanently FAILED.

#2 - Stale sandbox: If a resume execution's preserved SandboxDir no longer
exists (e.g. /tmp purge after reboot), clone a fresh sandbox instead of
failing immediately with "no such file or directory".

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: trust all directory owners in sandbox git commands</title>
<updated>2026-03-14T07:24:10+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-14T07:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=02b35218d9aadcaa6a3b52f218b71577ab72c811'/>
<id>urn:sha1:02b35218d9aadcaa6a3b52f218b71577ab72c811</id>
<content type='text'>
Sandbox setup runs git commands against project_dir which may be owned
by a different OS user, triggering git's 'dubious ownership' error.
Fix by passing -c safe.directory=* on all git commands that touch
project directories. Also add wildcard to global config for immediate
effect on the running server.

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>fix: resume BLOCKED tasks in preserved sandbox so Claude finds its session</title>
<updated>2026-03-11T07:40:48+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-11T07:40:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=1b5e7177769c79f9e836a55f9c008a295e2ff975'/>
<id>urn:sha1:1b5e7177769c79f9e836a55f9c008a295e2ff975</id>
<content type='text'>
When a task ran in a sandbox (/tmp/claudomator-sandbox-*) and went BLOCKED,
Claude stored its session under the sandbox path as the project slug. The
resume execution was running in project_dir, causing Claude to look for the
session in the wrong project directory and fail with "No conversation found".

Fix: carry SandboxDir through BlockedError → Execution → resume execution,
and run the resume in that directory so the session lookup succeeds.

- BlockedError gains SandboxDir field; claude.go sets it on BLOCKED exit
- storage.Execution gains SandboxDir (persisted via new sandbox_dir column)
- executor.go stores blockedErr.SandboxDir in the execution record
- server.go copies SandboxDir from latest execution to the resume execution
- claude.go uses e.SandboxDir as working dir for resume when set

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>test: sandbox coverage + fix WebSocket races</title>
<updated>2026-03-10T23:58:00+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-10T23:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=1aea271363884f7d616d95971fd25b6c4d87de85'/>
<id>urn:sha1:1aea271363884f7d616d95971fd25b6c4d87de85</id>
<content type='text'>
executor: add 7 tests for sandboxCloneSource, setupSandbox, and
teardownSandbox (uncommitted-changes error, clean-no-commits removal).

api: fix two data races in WebSocket tests — wsPingInterval/Deadline
are now captured as locals before goroutine start; maxWsClients is
moved from a package-level var into Hub.maxClients (with SetMaxClients
method) so concurrent tests don't stomp each other.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>executor: fix session ID on second block-and-resume cycle</title>
<updated>2026-03-10T17:16:42+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-10T17:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=65c7638bbb5819b9997cb6cb1b0fb54f3361347f'/>
<id>urn:sha1:65c7638bbb5819b9997cb6cb1b0fb54f3361347f</id>
<content type='text'>
When a resumed execution is blocked again, SessionID was set to the new
exec's own UUID instead of the original ResumeSessionID. The next resume
would then pass the wrong --resume argument to claude and fail.

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