fix(kanban): reject late-link after child start - #31265
Closed
crayfish-ai wants to merge 2 commits into
Closed
Conversation
Collaborator
|
Resubmission of closed #29737 (same author, same fix — closed-not-merged). Prior attempt had identical late-link rejection logic. |
Contributor
Author
|
Resubmitting after fixing the check-attribution CI failure. The previous PR was closed because the commit email wasn't mapped in AUTHOR_MAP — first contribution needed the email registered. That's now resolved and all CI checks are green. Same fix, clean base. |
crayfish-ai
added a commit
to crayfish-ai/hermes-agent
that referenced
this pull request
Jun 3, 2026
When archive_task() archives a task, it does not remove task_links entries where the archived task is a parent. recompute_ready() treats archived parents as done (archived ≈ done), promoting child tasks to ready. The children's workers may then try to access the archived parent's scratch workspace, which was already cleaned up on task completion — causing worker crashes with 'File not found'. This fix adds DELETE FROM task_links WHERE parent_id = ? inside the archive_task write transaction, matching the behavior already present in delete_archived_task() (which deletes both parent_id and child_id links). Case study: In a 3-task kanban pipeline (T1 reviewer → T2 writer → T3 reviewer), T2 completed and was archived. T3 remained linked to the archived T2 via task_links. When recompute_ready promoted T3, its worker attempted to read T2's scratch workspace and crashed 3 times before the stale link was manually corrected. This bug was previously identified and submitted as PR NousResearch#31265, but the new case study provides a cleaner reproduction path and isolates the fix to the archive_task path only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reject kanban link requests when child task has already started to prevent stale state.