feat(FN-2274): block stale manual activation at dashboard run-start route

- POST /api/agents/:id/runs now performs preflight validation of effective task
- Rejects closed tasks (done/archived) with 409 before calling executeHeartbeat
- 409 response includes clear error string naming task ID + column and structured details
- Existing active-run 409 behavior remains unchanged and still takes precedence
- Added tests for stale-task preflight validation
This commit is contained in:
gsxdsm
2026-04-22 21:15:58 -07:00
parent 9dabb87c30
commit cf9b8f2f85
2 changed files with 109 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
"scripts": {
"dev": "node scripts/dev-with-memory.mjs",
"dev:ui": "pnpm --filter @fusion/dashboard dev",
"dev:hmr": "node scripts/dev-hmr.mjs",
"lint": "eslint .",
"build": "pnpm -r build",
"build:exe": "pnpm build && pnpm --filter @runfusion/fusion build:exe",