Skip to content

tagging delete bugs: prevent triggering tag deletion if its deletion is pending#138

Merged
mdolina merged 5 commits into
develop-multi-tenantfrom
fix/tagging-delete-bugs
Jul 5, 2026
Merged

tagging delete bugs: prevent triggering tag deletion if its deletion is pending#138
mdolina merged 5 commits into
develop-multi-tenantfrom
fix/tagging-delete-bugs

Conversation

@mdolina

@mdolina mdolina commented Jul 5, 2026

Copy link
Copy Markdown
Contributor
  • deleteBucketMembers returns an error on partial XDAS removal
    instead of nil, so DeleteTag no longer reports a half-deleted tag as a
    completed deletion; bucket metadata survives for retry
  • per-instance in-flight guard in DeleteTagHandler deduplicates
    concurrent background deletions of the same tag (interim until the tag
    registry provides cross-instance state)
  • GetTagById returns a typed 404 error; handler no longer matches
    the error message by string comparison
  • remove min/max helpers shadowing Go builtins; skip the COUNT(*)
    metadata-cleanup check for buckets whose batch delete failed
  • add exported template setters to GroupServiceSyncConnector so tests can
    point it at a mock XDAS server; extend the mock DatabaseClient with
    batch/modify support

mdolina and others added 5 commits July 5, 2026 18:36
- BUG-1: propagate Cassandra errors from getPopulatedBuckets in
  GetMembersPaginated as 500 instead of masking them as 404 "tag not found"
- BUG-2: a failed bucket read now fails the page (500) instead of silently
  omitting the bucket's members and advancing the cursor past them; same
  fix applied to the non-paginated read path (GetTagById /
  GetMembersNonPaginated)
- BUG-3: a cursor pointing past the last populated bucket ends the
  enumeration instead of wrapping around to bucket 0 and re-delivering the
  whole tag; invalid/corrupt cursors now return 400 Bad Request instead of
  silently restarting from the beginning
- Remove unused BucketedCursor.TotalCollected field
- Add a mock DatabaseClient test seam and service-level tests covering all
  three bugs plus a two-page pagination regression walk

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- BUG-4: deleteBucketMembers returns an error on partial XDAS removal
  instead of nil, so DeleteTag no longer reports a half-deleted tag as a
  completed deletion; bucket metadata survives for retry
- BUG-5: per-instance in-flight guard in DeleteTagHandler deduplicates
  concurrent background deletions of the same tag (interim until the tag
  registry provides cross-instance state)
- BUG-6: GetTagById returns a typed 404 error; handler no longer matches
  the error message by string comparison
- BUG-7: remove min/max helpers shadowing Go builtins; skip the COUNT(*)
  metadata-cleanup check for buckets whose batch delete failed
- Add exported template setters to GroupServiceSyncConnector so tests can
  point it at a mock XDAS server; extend the mock DatabaseClient with
  batch/modify support

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- BUG-4: deleteBucketMembers returns an error on partial XDAS removal
  instead of nil, so DeleteTag no longer reports a half-deleted tag as a
  completed deletion; bucket metadata survives for retry
- BUG-5: per-instance in-flight guard in DeleteTagHandler deduplicates
  concurrent background deletions of the same tag (interim until the tag
  registry provides cross-instance state)
- BUG-6: GetTagById returns a typed 404 error; handler no longer matches
  the error message by string comparison
- BUG-7: remove min/max helpers shadowing Go builtins; skip the COUNT(*)
  metadata-cleanup check for buckets whose batch delete failed
- Add exported template setters to GroupServiceSyncConnector so tests can
  point it at a mock XDAS server; extend the mock DatabaseClient with
  batch/modify support

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 5, 2026 19:42
@mdolina mdolina merged commit 0270860 into develop-multi-tenant Jul 5, 2026
2 checks passed
@mdolina mdolina deleted the fix/tagging-delete-bugs branch July 5, 2026 19:46
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant