diff --git a/package-lock.json b/package-lock.json index 3fa58666..a1ad386e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "antfarm", - "version": "0.4.1", + "version": "0.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "antfarm", - "version": "0.4.1", + "version": "0.5.1", "dependencies": { "json5": "^2.2.3", "yaml": "^2.4.5" diff --git a/package.json b/package.json index c3af3fbf..fd067fae 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ }, "scripts": { "build": "tsc -p tsconfig.json && cp src/server/index.html dist/server/index.html && chmod +x dist/cli/cli.js && node scripts/inject-version.js", - "start": "node dist/cli/cli.js" + "start": "node dist/cli/cli.js", + "test": "node --test tests/*.test.ts", + "typecheck": "tsc --noEmit" }, "dependencies": { "json5": "^2.2.3", diff --git a/src/installer/step-ops.ts b/src/installer/step-ops.ts index bf47b057..ae8bc1d8 100644 --- a/src/installer/step-ops.ts +++ b/src/installer/step-ops.ts @@ -502,6 +502,15 @@ export function claimStep(agentId: string): ClaimResult { WHERE prev.run_id = s.run_id AND prev.step_index < s.step_index AND prev.status NOT IN ('done', 'skipped') + -- Allow verify step to claim when previous step is a loop in verify_each mode that's 'running' + AND NOT (prev.type = 'loop' AND prev.loop_config IS NOT NULL AND prev.status = 'running' + AND EXISTS ( + SELECT 1 FROM steps curr + WHERE curr.run_id = s.run_id + AND curr.step_index > prev.step_index + AND curr.step_index <= s.step_index + AND curr.status = 'pending' + )) ) ORDER BY s.step_index ASC, s.step_id ASC LIMIT 1`