Uses ERR/EXIT trap to ensure the orchestrator is notified when the
startup script fails (e.g. clone error, missing command file). Prevents
orphaned workspaces that never get cleaned up.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Workspaces are now fully immutable like GH Actions runners — no
persistent volume, no init container, no stale state between runs.
Fresh emptyDir on every workspace creation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Always rm -rf ~/project before cloning to avoid stale state from
previous workspace runs on the same PVC. Made setup steps generic
(detect frontend, playwright, migrations) instead of babble-specific.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The startup script already writes to stdout which the Coder agent
captures. No need for a separate HTTP log server or coder_app button.
Logs are visible via the Coder web terminal or agent log viewer.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add coder/workspace.Dockerfile with Node.js 22, wrangler, claude-code,
and Playwright deps pre-installed. Eliminates ~3 min of installs on
every workspace startup.
- Add CI workflow to build and push to registry.samson.media/coder-workspace
- Fix slash command: -p mode doesn't support /commands, so read the .md
file directly, strip frontmatter, substitute $ARGUMENTS, pass as prompt
- Switch workspace image from codercom/enterprise-base to custom image
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The project: prefix is not valid Claude Code syntax. Slash commands
in .claude/commands/ are invoked as /$TASK_TYPE directly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On boot, query Coder for running workspaces and re-adopt them into the
active queue. This prevents 409 conflicts after restarts and ensures
callbacks still work for in-flight tasks.
On 409: only delete stopped/failed workspaces. Running workspaces are
adopted — never killed based on age.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of blindly deleting on 409 conflict, now checks:
- Stopped/failed → safe to delete and recreate
- Running but >30 min old → stale, delete and recreate
- Running and <30 min old → adopt existing workspace (mid-task)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the orchestrator restarts, it loses in-memory queue state. If a
stale workspace still exists, createWorkspace now auto-deletes it and
retries instead of failing with 409. Also adds --verbose to Claude Code
invocation for better task log debugging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The tag `ubuntu-arm64` doesn't exist on Docker Hub. Switch to `latest`
which includes arm64 in its multi-arch manifest.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Workspaces curl POST /webhook/task-complete/{name} when done
- Orchestrator deletes the workspace via Coder API on callback
- Active workspaces count toward concurrency limit
- GET /queue now shows active workspaces with elapsed time
- Coder template gains callback_url parameter
- TTL becomes a safety net, not the primary shutdown mechanism
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Tasks keyed by {taskType}-{repo}-{issue} for deduplication
- Duplicate requests (pending or running) are dropped
- Configurable concurrency via QUEUE_CONCURRENCY env (default 2)
- Workspace names now {taskType}-{repo}-{issue} for observability
- GET /queue endpoint shows pending/running tasks
- All handlers route through the queue instead of calling Coder directly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
An edited comment during analysis is equally meaningful as a new one
for continuing the conversation with the analyst.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Builds and pushes to registry.samson.media on any version tag,
tagged with both the version and latest.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Lightweight Hono webhook router that receives Gitea events and creates
Coder workspaces for each SDLC stage (analyse, architect, develop,
review, test, rework, release, maintenance). Includes k8s manifests
for deployment and the Coder workspace template moved from babble.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>