Skip to content

Implement task assignment logic in coordinator after TaskClaim #24

Description

@iTranscend

When a TaskClaim is received, the coordinator only prints "Task claim received!!" to stdout. There is no:

  • Deduplication of multiple claims for the same task
  • Worker selection strategy (first-come, lowest estimated duration, capability match)
  • TaskAssignment message sent back to the selected worker
  • Task status update from PendingRunning

Location

src/node.rs, lines 500–503

Message::TaskClaim(task_claim) => {
    task_claim.validate()?;
    println!("Task claim received!!");
}

Suggested approach

  1. Add a TaskAssignment message variant to the Message enum.
  2. Track pending claims per TaskId in the coordinator.
  3. After a configurable claim window, select a worker and send TaskAssignment.
  4. Update TaskStatus accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions