Skip to content

fix(kanban): reject late-link after child start - #31265

Closed
crayfish-ai wants to merge 2 commits into
NousResearch:mainfrom
crayfish-ai:pr/kanban-late-link-guard
Closed

fix(kanban): reject late-link after child start#31265
crayfish-ai wants to merge 2 commits into
NousResearch:mainfrom
crayfish-ai:pr/kanban-late-link-guard

Conversation

@crayfish-ai

Copy link
Copy Markdown
Contributor

Reject kanban link requests when child task has already started to prevent stale state.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels May 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Resubmission of closed #29737 (same author, same fix — closed-not-merged). Prior attempt had identical late-link rejection logic.

@crayfish-ai

Copy link
Copy Markdown
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
crayfish-ai deleted the pr/kanban-late-link-guard branch May 26, 2026 09:46
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants