Skip to content

Error on duplicate profile ID instead of appending number suffix#455

Merged
cmrigney merged 1 commit intomainfrom
error-on-duplicate-profile-id
Mar 30, 2026
Merged

Error on duplicate profile ID instead of appending number suffix#455
cmrigney merged 1 commit intomainfrom
error-on-duplicate-profile-id

Conversation

@cmrigney
Copy link
Copy Markdown
Contributor

Summary

  • Removes the FindWorkingSetsByIDPrefix DAO method and replaces the auto-increment suffix logic with a hard error when a duplicate profile ID is detected
  • Simplifies createWorkingSetID to use a single GetWorkingSet lookup and return an error if the ID already exists
  • Updates tests to reflect the new behavior (duplicate name → error instead of name_2, name_3, etc.)

Test plan

  • make test passes
  • Attempting to create two profiles with the same name returns an "already exists" error

🤖 Generated with Claude Code

@cmrigney cmrigney requested a review from a team as a code owner March 23, 2026 18:43
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff909d1622

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Collaborator

@slimslenderslacks slimslenderslacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

When creating a profile without an explicit ID, return an error if the
derived ID already exists rather than silently appending _2, _3, etc.
Removes the now-unused FindWorkingSetsByIDPrefix DB method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cmrigney cmrigney force-pushed the error-on-duplicate-profile-id branch from ff909d1 to 779d285 Compare March 30, 2026 19:55
@cmrigney cmrigney merged commit 684413a into main Mar 30, 2026
8 checks passed
@cmrigney cmrigney deleted the error-on-duplicate-profile-id branch March 30, 2026 20:06
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.

2 participants