refactor: replace autoChain with projectTick queue scanning

Remove hard-coded auto-chain dispatch (DEV done→QA, QA fail→DEV) and
replace with a general-purpose projectTick service that scans the queue
and fills free worker slots after every state transition.

- Create lib/services/tick.ts: consolidates shared helpers and core
  projectTick() function from duplicated code in work-start/auto-pickup
- work_finish: replaces auto-chain block with projectTick call
- work_start: adds projectTick after dispatch to fill parallel slots
- auto_pickup: delegates per-project loop to projectTick
- Remove autoChain from Project type, migration code, and project-register
- Remove scheduling config dependency from work_finish
- Net -112 lines: simpler, self-healing pipeline

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lauren ten Hoor
2026-02-10 21:46:11 +08:00
parent d7178bb8e5
commit 55b062ac76
8 changed files with 246 additions and 171 deletions

View File

@@ -204,7 +204,6 @@ export function createProjectRegisterTool(api: OpenClawPluginApi) {
deployUrl,
baseBranch,
deployBranch,
autoChain: false,
channel: context.channel,
roleExecution,
dev: emptyWorkerState([...DEV_TIERS]),