fix(ploeg): settle stopped Work Items whose tracker task was closed #200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ryangr0/ploeg-settle-closed-stopped-items"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closing a tracker task now settles a stopped Work Item (needs_human or awaiting_review) instead of leaving it in Vloer's "Needs you" list. Before this change, Ploeg withdrew a Work Item on close only while it was queued and no Run had started.
withdrawnwith reasonwithdrawn_closedand an audit row with actorwebhook:<provider>(store.SettleClosedInTracker). An item with a running Run is not touched, and an operator-owned item is left unchanged.sweep:<provider>). Each read has a 10 s timeout and each sweep reads at most 20 items. Migration0036_tracker_checked_at.sqladdswork_items.tracker_checked_at.FetchItemreports a closed task through the newWorkItem.Closedfield (json:"-", so no contract schema changes) for Vikunja and ClickUp.docs/concepts/journeys.mdanddocs/how-to/assign-work-to-an-agent.md.Ticket: https://vikunja.webgrip.dev/tasks/1615
Tests
TestClosingATaskSettlesStoppedWorkWithoutAComment(httpapi). It fails on the old code: "closing a awaiting_review item left it {state:awaiting_review ...}".TestSettleClosedInTracker*,TestReassigningASettledItemStartsNewWorkandTestClaimStoppedTrackerChecksIsRateLimitedPerItem(store), andTestSweepSettlesStoppedItemsWhoseTaskClosedWithoutAWebhook(shiftengine, against an httptest Vikunja).cd apps/ploeg && go test -count=1 ./...: 34 packages ok, 0 failed.go vet ./...: clean.mise run verify: all gates passed (vloer 7, demo-replay 1, vloer-extension 4, ploeg 7, brand 1, site 5, site-demo 1, helm 15, release 3, integration 1, docs 1).Checks left to CI
None. Every gate ran locally. The docs gate used a scratchpad virtualenv (
UV_PROJECT_ENVIRONMENT) because the worktree's.venvcould not be created.After deploy
VIK-1279's Work Item should settle on the first sweep without anyone touching it. Check that the operator API no longer lists it under "Needs you".
🤖 Generated with Claude Code