# 같은 카테고리에서 동일한 태그 사용 권한이 일관되지 않음

**URL:** https://meta.discourse.org/t/inconsistent-permission-to-use-the-same-tag-in-the-same-category/400696
**Category:** Bug
**Tags:** composer, tags
**Created:** [4월 15, 2026, 1:27오후 UTC](https://meta.discourse.org/t/inconsistent-permission-to-use-the-same-tag-in-the-same-category/400696 "2026-04-15T13:27:36Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [4월 15, 2026, 8:31오후 UTC](https://meta.discourse.org/t/inconsistent-permission-to-use-the-same-tag-in-the-same-category/400696/4 "2026-04-15T20:31:07Z")

</div>

아하, 내 실수였어 🤦‍♂️ [기능](https://github.com/discourse/discourse/pull/39072)이 **제한** 관련해서 조금 더 "지능적"이어야 했어 🙂

> <https://github.com/discourse/discourse/pull/39300>
>
> When searching tags in the composer, \`filter\_allowed\_tags\` applies a LIMIT (\`max…\_tag\_search\_results\`, default 5). If more allowed tags match the query than fit under the limit, the overflow is silently dropped.
> 
> \`append\_disabled\_tags\` then ran a naive substring query for visible tags matching the term, assumed any tag not in the allowed list must be excluded by filter rules, and asked \`explain\_exclusion\` to fabricate a reason. Allowed-but-cut-off tags leaked into the disabled list and showed the vague fallback "\\"X\\" cannot be used in this category".
> 
> Because \`filter\_allowed\_tags\` orders by term (\`DISTINCT ON (lower(name) = lower(term), ...)\`), the same tag could appear allowed under one search term (prefix match, ranks high, fits in the limit) and disabled under another (mid-string match, ranks lower, gets cut off) — producing inconsistent verdicts for the same tag in the same category.
> 
> Before labeling any tag as disabled or forbidden, re-run \`filter\_allowed\_tags\` scoped to the candidate names (no limit) and drop any that come back allowed. Extracted to \`reject\_allowed\_tags\` so both \`append\_disabled\_tags\` and \`detect\_forbidden\_tag\` go through the same verification. The probe is skipped when the allowed result didn't saturate its limit, since no cutoff is possible in that case.
> 
> https://meta.discourse.org/t/400696

---

_[View the full topic](https://meta.discourse.org/t/inconsistent-permission-to-use-the-same-tag-in-the-same-category/400696)._
