AkarinLiu
(阿卡林刘(刘贤宏))
13 يونيو 2026، 12:09م
1
أثناء إدارة أوصاف البلاغات، اكتشفت خطأً برمجياً (Bug)؛ حيث يؤدي تعطيل أي وصف (باستثناء “إرسال رسالة إلى @%{username}”) إلى إخفاء أوصاف البلاغات الأخرى التي أنشأتها.
قبل التعطيل:
بعد التعطيل:
إعجابَين (2)
نعتذر عن ذلك، يجب أن تكون المشكلة قد أُصلحت عبر
main ← fix-flag-name-key-uniqueness
opened 03:17PM - 15 Jun 26 UTC
Previously, flag names with no ASCII word characters (e.g. Chinese) all normaliz… ed to the same `name_key` of `custom_`, because `set_name_key` stripped non-`\w` characters and Ruby's `\w` is ASCII-only. The flag system keys lookups by `name_key` (the `disabled_flag_types` enum, the frontend `actionByName` map), so once two flags shared a key, disabling one of them flipped `can_act` for the whole group and hid every other flag that shared it.
This makes `name_key` reliably unique:
- `set_name_key` falls back to `custom_flag` when the slug is empty and appends a counter (`_2`, `_3`, ...) on collision, so distinct names always produce distinct keys. It now only re-derives the key when the name actually changes, keeping it stable across other saves.
- A post-deploy migration backfills existing duplicate keys and adds the unique index on `flags.name_key` that the original `create_flags` migration intended (`unique: true` is a no-op in `create_table`).
https://meta.discourse.org/t/405254
إعجابَين (2)
يبدو أنكم لم تنتهوا من إصلاح الأخطاء البرمجية، فبعد التحديث، لا تزال الأخطاء غير مُصلحة.
هذا لأن طلب السحب لم يتم دمجه بعد ؛)