Skip to content

fix(tags): free a slot for each removed tag - #968

Merged
pbleser-oc merged 1 commit into
opencloud-eu:mainfrom
pbleser-oc:fix/967-tags-remove-count
Nov 4, 2026
Merged

pbleser-oc merged 1 commit into
opencloud-eu:mainfrom
pbleser-oc:fix/967-tags-remove-count

Conversation

@pbleser-oc

Copy link
Copy Markdown
Member

Tags.Remove deleted a tag without decrementing the tag count, so Add on the same Tags object could refuse new tags after others were removed, although there was room. Remove now decrements the count.

Fixes #967

Tests: TestAddAfterRemoveAtMaximum fills a Tags object up to the maximum, removes tags and adds new ones. It covers a single slot, several slots, removing the same tag twice, removing an unknown tag, and adding a removed tag again. It fails without the fix.

AI assistance: Claude Code (claude-opus-5-5) wrote the fix and the test.

Remove deleted the tag but kept counting it towards the maximum number
of tags, so Add on the same Tags object could refuse new tags after
removing others although there was room. Decrement the count in Remove.

Fixes opencloud-eu#967

Assisted-by: Claude Code:claude-opus-5-5

@aduffeck aduffeck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@pbleser-oc
pbleser-oc merged commit 30b93c3 into opencloud-eu:main Nov 4, 2026
4 of 22 checks passed
@openclouders openclouders mentioned this pull request Nov 4, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkg/tags: Remove doesn't decrement the tag count, so Add hits the limit too early

2 participants