Skip to content

Commit 66a643c

Browse files
Solomonclaude
andcommitted
fix(rules): remove Shell.ActionMode.ALL from hallucinated-API list
Shell.ActionMode.ALL is a valid enum value — GNOME Shell's own js/ui/main.js calls wm.allowKeybinding(..., Shell.ActionMode.ALL) directly. Flagging it as a hallucinated API produced false-positive FAILs on caffeine and forge during field testing (R-SLOP-08 / R-SLOP-26). Changes: - R-SLOP-08: remove Shell.ActionMode.ALL from the pattern; update message - R-SLOP-26: remove entirely (rule was exclusively about Shell.ActionMode.ALL) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e74c508 commit 66a643c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

rules/patterns.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -641,10 +641,10 @@
641641
# LLMs frequently call methods that don't exist in GJS/GNOME Shell.
642642

643643
- id: R-SLOP-08
644-
pattern: "\\b(Meta\\.Screen|Meta\\.Cursor|Shell\\.ActionMode\\.ALL|Shell\\.WindowTracker\\.get_default\\(\\)\\.get_active_window)"
644+
pattern: "\\b(Meta\\.Screen|Meta\\.Cursor|Shell\\.WindowTracker\\.get_default\\(\\)\\.get_active_window)"
645645
scope: ["*.js"]
646646
severity: advisory
647-
message: "Likely hallucinated API — Meta.Screen, Meta.Cursor, Shell.ActionMode.ALL do not exist"
647+
message: "Likely hallucinated API — Meta.Screen and Meta.Cursor do not exist"
648648
category: ai-slop
649649
fix: "Check the GJS API docs: https://gjs-docs.gnome.org. Use Meta.Display, global.display, etc."
650650

@@ -707,14 +707,6 @@
707707
category: ai-slop
708708
fix: "Remove the call. Extension lifecycle is managed by GNOME Shell, not by the extension itself."
709709

710-
- id: R-SLOP-26
711-
pattern: "\\bShell\\.ActionMode\\.ALL\\b"
712-
scope: ["*.js"]
713-
severity: advisory
714-
message: "Shell.ActionMode.ALL does not exist; use Shell.ActionMode.NORMAL or combine specific modes"
715-
category: ai-slop
716-
fix: "Use Shell.ActionMode.NORMAL for most keybindings, or Shell.ActionMode.OVERVIEW | Shell.ActionMode.NORMAL for multi-mode"
717-
718710
# --- Code quality (advisory/blocking) ---
719711
# Module-scope GObject construction, unnecessary patterns, code smell detection.
720712

0 commit comments

Comments
 (0)