Promote dev to main: serialize backlog-manager + guard MoveWorkItem#1258
Merged
zbigniewsobiecki merged 1 commit intomainfrom May 6, 2026
Merged
Promote dev to main: serialize backlog-manager + guard MoveWorkItem#1258zbigniewsobiecki merged 1 commit intomainfrom
zbigniewsobiecki merged 1 commit intomainfrom
Conversation
…arallel races (#1257) * fix(router): serialize backlog-manager + guard MoveWorkItem against parallel races Live incident 2026-05-06 (ucho): two `backlog-manager` runs auto-chained in parallel — one from MNG-536's PR-merge, one from MNG-537's splitting auto-chain — both scanned the same backlog, both selected MNG-538, both moved it to TODO. The two `pm:status-changed` webhooks each fired the implementation trigger, producing duplicate PRs (#287 and #288). Two complementary defenses: 1. **Project-singleton lock for `backlog-manager`** (primary): the per-(projectId, workItemId, agentType) lock did NOT serialize the two runs because their nominal workItemId differed (MNG-536 vs MNG-537). `work-item-lock.ts` now collapses workItemId to a sentinel for project-singleton agents — both in-memory and the DB count — so a second backlog-manager dispatch on the same project is blocked while the first is in flight. 2. **MoveWorkItem `expectedSourceState` guard** (defense-in-depth): if a second run somehow proceeds (lock TTL expiry, restart, future regression), the gadget refuses to move an item whose current status doesn't match the caller's expectation, and treats already-at- destination as a silent no-op. The backlog-manager prompt now instructs the agent to pass `expectedSourceState: <%= backlogSourceLabel %>` on every move-to-TODO. The label is provider-correct (Trello list ID, JIRA/Linear status name) and case-insensitive matched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(deps): npm audit fix to clear high-severity axios advisories Pre-existing dep drift on dev — `npm audit --omit=dev --audit-level=high` started failing CI when new axios advisories were published since the last dev push (2026-05-03). `npm audit fix` (no --force) bumps axios 1.15.0 → 1.16.0 inside the trello.js / jira.js subtrees via lockfile- only updates; no package.json changes, no breaking-change cascade. After: 5 moderate advisories remain (all transitive ip-address via @modelcontextprotocol/sdk → express-rate-limit) but the high-severity axios block is cleared, so the audit step exits 0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
Promotes #1257 to production.
backlog-managerso two parallel auto-chains can't both move the same backlog item to TODO (live incident 2026-05-06, ucho/MNG-538: duplicate PRs Merge dev to main #287 and feat: agent runs dashboard with tRPC API and React frontend #288).MoveWorkItemgains an optionalexpectedSourceStateguard; backlog-manager prompt passes the provider-correct backlog label on every move-to-TODO.npm audit fixbumps axios in the trello.js / jira.js subtrees (lockfile-only) to clear high-severity advisories that began failing CI after 2026-05-03.Test plan
🤖 Generated with Claude Code