Skip to content

[bug] quest post: ID allocation race under concurrent writers #26

Description

@kunallanjewar

Summary

Concurrent quest.Post calls within the same project can surface duplicate-ID or primary-key conflicts to callers. The current allocation path doesn't guarantee uniqueness under contention from multiple writers (e.g. parallel agents or scripts hitting the same project).

Affected files

  • internal/quest/post.go
  • internal/quest/post_test.go

Acceptance

  • Concurrent quest.Post calls in the same project succeed without surfacing duplicate-ID or PK conflicts.
  • Allocated quest IDs remain unique and monotonic within a project under concurrent posting.
  • Add regression coverage with multiple concurrent posters under the current SQLite WAL setup.
  • Code comments accurately describe the concurrency guarantee the implementation provides.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: questQuest board / task coordinationbugSomething isn't workingneeds-triageAwaiting initial reviewpriority: P2Normal prioritysize: M< 200 lines

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions