Skip to content

fix(agentstack): assignTask refuses tasks in a terminal status#47

Open
quappefeeder wants to merge 1 commit into
profullstack:masterfrom
quappefeeder:fix/agentstack-assign-terminal-guard
Open

fix(agentstack): assignTask refuses tasks in a terminal status#47
quappefeeder wants to merge 1 commit into
profullstack:masterfrom
quappefeeder:fix/agentstack-assign-terminal-guard

Conversation

@quappefeeder

Copy link
Copy Markdown
Contributor

Fixes #46.

assignTask now rejects tasks whose status is terminal (complete/failed/cancelled), reusing the existing TERMINAL set so it matches updateTaskStatus's guard. This prevents silent reassignment of finished/paid tasks and the spurious task.assigned event that followed.

Adds a regression test covering the terminal-assign rejection and asserting the terminal task is left untouched.

Verification:

  • git diff --check
  • node --check packages/agentstack/src/index.ts
  • Full npm/vitest workspace test was not run locally because this Codex Windows environment has Node but no npm/pnpm/yarn binary available.

via ugig gig, ugig user liudong-design

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.

agentstack: assignTask can reassign a task that is already in a terminal status

1 participant