Skip build for lightweight stages (analyse, architect, release, maintenance)

These stages only read code and post comments — no need for npm install,
frontend build, Playwright, or migrations. Saves several minutes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel Samson
2026-04-12 14:47:48 +01:00
co-authored by Claude Opus 4.6
parent d220623a9f
commit 9bca465565
+6
View File
@@ -460,6 +460,11 @@ resource "coder_agent" "main" {
# Switch to develop branch if it exists
git fetch origin develop 2>/dev/null && git checkout develop 2>/dev/null || true
# Lightweight stages only need the code, not a full build
LIGHT_STAGES="analyse architect release maintenance"
if echo "$LIGHT_STAGES" | grep -qw "$TASK_TYPE"; then
echo "Lightweight stage ($TASK_TYPE) — skipping build"
else
# Install deps if package.json exists
if [ -f package.json ]; then
npm ci --legacy-peer-deps || npm ci
@@ -481,6 +486,7 @@ resource "coder_agent" "main" {
echo "Local migrations applied"
fi
fi
fi
# --- Automated task execution ---
if [ -n "$TASK_TYPE" ] && [ -d ~/project ]; then