fix(dedup): registry-authoritative isDupAssign closes >30 s concurrent dispatch window #601
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!601
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/597"
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
Fixes the >30 s concurrent same-type dispatch window that caused 4 boss runs on issue #596 (~124 turns wasted).
isDupAssignis now two-tier: BoundedMap fast-path (millisecond-apart double-assigns) + authoritative registry walk (inspectscurrentTask+queuefor all workers of the matching type, independent of wall-clock).cancelStaleIssueTaskbroadcasts adispatch.duplicate_runningSSE event when a prior different-type task is already running (was log-only).queryConcurrentRuns()— backfill SQL query surfacing overlappingtask_historyrows for diagnostics.concurrent_countwarning chip;last_event_labellists all running instances.assign-dedup.test.ts(fast-path, registry walk, 60 s regression, SSE broadcast, backfill).concurrent_count: 2.Closes #597
Registry walk is correct and closes the >30 s window cleanly. All AC from #597 met; tests cover fast-path, registry walk, 60 s regression, cleared-task regression, SSE broadcast, queue dedup, and backfill diagnostic.
nit (non-blocking):
primary = runInsts[0] ?? instances[0]— the?? instances[0]fallback is dead code (runInsts is never empty here) but the guard comment explains it well enough.Registry walk is correct and closes the >30 s window cleanly. All AC from #597 met; tests cover fast-path, registry walk, 60 s regression, cleared-task regression, SSE broadcast, queue dedup, and backfill diagnostic.
nit (non-blocking):
primary = runInsts[0] ?? instances[0]— the?? instances[0]fallback is dead code (runInsts is never empty here) but the guard comment explains it well enough.Registry walk is correct and closes the >30 s window cleanly. All AC from #597 met; tests cover fast-path, registry walk, 60 s regression, cleared-task regression, SSE broadcast, queue dedup, and backfill diagnostic.
nit (non-blocking): primary fallback is dead code but guard comment explains it.