Copilot commented on code in PR #405:
URL: https://github.com/apache/airflow-steward/pull/405#discussion_r3329826567


##########
tools/skill-and-tool-validator/src/skill_and_tool_validator/__init__.py:
##########
@@ -245,6 +245,21 @@ def _read_mode_table() -> dict[str, str]:
         LOWERCASE_F_FIELD_CATEGORY,
     }
 )
+ALL_CATEGORIES: frozenset[str] = frozenset(
+    {
+        TOOL_README_CATEGORY,
+        TOOL_CAPABILITY_CATEGORY,
+        CAPABILITY_SYNC_CATEGORY,
+        PRINCIPLE_CATEGORY,
+        TRIGGER_PRESERVATION_CATEGORY,
+        INJECTION_GUARD_CATEGORY,
+        INJECTION_GUARD_TODO_CATEGORY,
+        GH_LIST_CATEGORY,
+        SECURITY_PATTERN_CATEGORY,
+        PRIVACY_CATEGORY,
+        LOWERCASE_F_FIELD_CATEGORY,
+    }
+)

Review Comment:
   `ALL_CATEGORIES` is a manually maintained enumeration that duplicates the 
list of category constants. If a new category constant is added in the future, 
contributors must remember to also append it here, or `--list-categories` will 
silently omit it. Consider deriving this set from a single source of truth — 
for example, by composing it as the union of `SOFT_CATEGORIES` and the existing 
hard-category sets, or by introducing a registry/enum of categories that both 
this set and the individual constants reference. This avoids the silent-drift 
failure mode.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to