fix: lowercase PLUGIN_NAME to match directory name on case-sensitive …#1
fix: lowercase PLUGIN_NAME to match directory name on case-sensitive …#1PaoloC68 wants to merge 1 commit into3clyp50:mainfrom
Conversation
…filesystems
On Linux (case-sensitive filesystem), PLUGIN_NAME = "AutoDream" caused
find_plugin_dir() to look for /usr/plugins/AutoDream/ which does not exist.
The directory is named "autodream" (lowercase), matching plugin.yaml name field.
This caused get_plugin_config() to return None on every chain end, making
config.get("enabled") falsy and silently short-circuiting the extension
before any dream cycle could run.
Fix: lowercase PLUGIN_NAME to "autodream" in both affected files.
📝 WalkthroughWalkthroughPlugin configuration lookup keys are updated from PascalCase to lowercase across two files ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
extensions/python/process_chain_end/_60_auto_dream.py (1)
19-19: Consider reusingPLUGIN_NAMEinstead of duplicating the literal.The lowercase value is correct; importing the existing constant would keep the config key single-sourced and make future renames safer.
♻️ Proposed cleanup
-from usr.plugins.autodream.helpers.auto_dream import schedule_auto_dream +from usr.plugins.autodream.helpers.auto_dream import PLUGIN_NAME, schedule_auto_dream @@ - config = plugins.get_plugin_config("autodream", self.agent) or {} + config = plugins.get_plugin_config(PLUGIN_NAME, self.agent) or {}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@extensions/python/process_chain_end/_60_auto_dream.py` at line 19, Replace the hard-coded plugin name string in the call to plugins.get_plugin_config("autodream", self.agent) with the shared constant PLUGIN_NAME: import (or reference) PLUGIN_NAME from the module where it is defined and call plugins.get_plugin_config(PLUGIN_NAME, self.agent) so the config key is single-sourced and future renames stay consistent; keep the rest of the line assigning to config unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@extensions/python/process_chain_end/_60_auto_dream.py`:
- Line 19: Replace the hard-coded plugin name string in the call to
plugins.get_plugin_config("autodream", self.agent) with the shared constant
PLUGIN_NAME: import (or reference) PLUGIN_NAME from the module where it is
defined and call plugins.get_plugin_config(PLUGIN_NAME, self.agent) so the
config key is single-sourced and future renames stay consistent; keep the rest
of the line assigning to config unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a8aa6ff1-cc86-4aec-9da7-435b111386f9
📒 Files selected for processing (2)
extensions/python/process_chain_end/_60_auto_dream.pyhelpers/auto_dream.py
…filesystems
On Linux (case-sensitive filesystem), PLUGIN_NAME = "AutoDream" caused find_plugin_dir() to look for /usr/plugins/AutoDream/ which does not exist. The directory is named "autodream" (lowercase), matching plugin.yaml name field.
This caused get_plugin_config() to return None on every chain end, making config.get("enabled") falsy and silently short-circuiting the extension before any dream cycle could run.
Fix: lowercase PLUGIN_NAME to "autodream" in both affected files.
Summary by CodeRabbit