Gitea webhook payloads use "type" (e.g. "pull_request_review_rejected")
instead of "state" (e.g. "REQUEST_CHANGES"). Map both formats so
the pr-rework handler works with all Gitea webhook variations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gitea sends review objects without a state field in some cases.
Use optional chaining and log the review payload for debugging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a review requests changes on a docs/ branch (architect PR), trigger
the rework-spec task type instead of rework-pr. This re-runs the architect
persona to fix the design docs based on review feedback.
- Add rework-spec to Coder template task_type options and lightweight stages
- Detect architect PRs via docs/ branch prefix in pr-rework handler
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- issue-label: Accept action "created" from Gitea (in addition to
"labeled" and "label_updated") — Gitea sends "created" for new labels
- pr-rework: Guard against missing review object to prevent TypeError
crash when Gitea sends review webhook without review data
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the volatile in-memory Map/Set queue with BullMQ backed by Redis
for persistence across restarts, automatic retry with exponential backoff,
and non-blocking workspace cleanup.
- Two queues: workspace-create (concurrency-limited) and workspace-cleanup
(with polling instead of sleep-based stop→delete)
- Active workspaces tracked in Redis hash for dedup across restarts
- Stale sweep every 10 minutes catches orphaned workspaces
- Graceful shutdown on SIGTERM/SIGINT
- Replace node-cron with BullMQ repeatable jobs
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>
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>