fix(plugin): unify data dir resolver and fix standalone diagnostics (#1225)#1229
Merged
Conversation
…1225) Centralize plugin data directory resolution into hooks/lib/data_dir.py so all modules respect CLAUDE_PLUGIN_DATA env var instead of hardcoding ~/.codingbuddy. Also fix health_check standalone diagnostics to treat missing .ai-rules/ as PASS (ModeEngine has template fallback).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 3, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
✅ Review complete — all comments addressed
Code Review:
- New
data_dir.py:resolve_data_dir()→ CLAUDE_PLUGIN_DATA env → ~/.codingbuddy — clean single source of truth - 5 modules updated to use
resolve_data_dir(): agent_memory, event_bridge, history_db, health_check, onboarding_tour - Hardcoded
~/.codingbuddyremoved from all modules health_check.pycheck_standalone_readiness(): .ai-rules missing now treated as expected for npm installs (not WARN)test_data_dir.py: env var and default path tests- Updated health_check and onboarding tests
- No unused imports, consistent import pattern
- CI: 28/28 checks pass
LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hooks/lib/data_dir.pywithresolve_data_dir()that respectsCLAUDE_PLUGIN_DATAenv varhistory_db.py,event_bridge.py,agent_memory.py,health_check.py,onboarding_tour.pyto use it instead of hardcoding~/.codingbuddycheck_standalone_readiness()to treat missing.ai-rules/as PASS with "template fallback" message (ModeEngine gracefully falls back)Test plan
test_data_dir.py— 6 tests covering env var and module integrationtest_health_check.py— standalone readiness reflects new PASS behaviortest_onboarding_tour.py— adapted to function-based flag resolutionCloses #1225