Skip to content

Make task dispatch atomic and idempotent - #460

Open
iqrahadian wants to merge 1 commit into
mainfrom
fix/watchtower-task-dispatch
Open

Make task dispatch atomic and idempotent#460
iqrahadian wants to merge 1 commit into
mainfrom
fix/watchtower-task-dispatch

Conversation

@iqrahadian

Copy link
Copy Markdown
Collaborator

External task producers can now assign and start a task without racing renderer triage or launching duplicate agent sessions. Agent startup context is also reduced to instructions relevant to the selected backend and task.

  • Persist agent_id and skill_ids atomically during task creation
  • Share one in-flight session start per task and reuse an existing healthy session
  • Respect disabled auto-start on recurring task instances
  • Generate only AGENTS.md or CLAUDE.md for the selected backend and remove volatile timestamps
  • Add heartbeat and task-orchestration instructions only when the task requires them
  • Add regression coverage for atomic assignment, duplicate starts, recurrence opt-out, and prompt generation

Validation:

  • 149 test files passed; 2,271 tests passed and 2 skipped
  • pnpm typecheck passed
  • pnpm build passed
  • pnpm lint passed with zero errors; existing warnings remain

Risk/rollback:

  • Changes task creation and session-start behavior for all callers. Reverting this commit restores the previous renderer-driven assignment and startup flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant