Skip to content

fix(task-system): sync blocks when adding blockedBy dependencies#85

Open
folook wants to merge 1 commit intoshareAI-lab:mainfrom
folook:fix/task_system_one_way_synchronization
Open

fix(task-system): sync blocks when adding blockedBy dependencies#85
folook wants to merge 1 commit intoshareAI-lab:mainfrom
folook:fix/task_system_one_way_synchronization

Conversation

@folook
Copy link

@folook folook commented Mar 15, 2026

Summary

This fixes an inconsistency in TaskManager.update() dependency synchronization.

Previously:

  • addBlocks updated both sides of the relationship
  • addBlockedBy only updated the current task's blockedBy

This could leave blocks and blockedBy out of sync.

Change

When calling TASKS.update(task_id, add_blocked_by=[...]), the task manager now also updates each blocker task's blocks list, making dependency
synchronization bidirectional.

Example

Before:

  • TASKS.update(3, add_blocked_by=[2])
  • Task 3 would get blockedBy: [2]
  • Task 2 would not get blocks: [3]

After:

  • Task 3 gets blockedBy: [2]
  • Task 2 also gets blocks: [3]

Validation

Verified with a minimal task setup that calling:

TASKS.update(3, add_blocked_by=[2])

updates both:

- task 3 blockedBy
- task 2 blocks

@vercel
Copy link

vercel bot commented Mar 15, 2026

Someone is attempting to deploy a commit to the crazyboym's projects Team on Vercel.

A member of the Team first needs to authorize it.

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