Skip to content

fix(plugin): unify data dir resolver and fix standalone diagnostics (#1225)#1229

Merged
JeremyDev87 merged 1 commit into
masterfrom
fix/1225-unify-data-dir-resolver
Apr 3, 2026
Merged

fix(plugin): unify data dir resolver and fix standalone diagnostics (#1225)#1229
JeremyDev87 merged 1 commit into
masterfrom
fix/1225-unify-data-dir-resolver

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Add centralized hooks/lib/data_dir.py with resolve_data_dir() that respects CLAUDE_PLUGIN_DATA env var
  • Update history_db.py, event_bridge.py, agent_memory.py, health_check.py, onboarding_tour.py to use it instead of hardcoding ~/.codingbuddy
  • Fix check_standalone_readiness() to treat missing .ai-rules/ as PASS with "template fallback" message (ModeEngine gracefully falls back)

Test plan

  • New test_data_dir.py — 6 tests covering env var and module integration
  • Updated test_health_check.py — standalone readiness reflects new PASS behavior
  • Updated test_onboarding_tour.py — adapted to function-based flag resolution
  • All 515 Python tests pass
  • All 5822 workspace tests pass
  • Build succeeds

Closes #1225

…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).
@JeremyDev87 JeremyDev87 added the fix label Apr 3, 2026
@vercel

vercel Bot commented Apr 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 3, 2026 3:10pm

@JeremyDev87 JeremyDev87 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 ~/.codingbuddy removed from all modules
  • health_check.py check_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

@JeremyDev87 JeremyDev87 self-assigned this Apr 3, 2026
@JeremyDev87 JeremyDev87 merged commit 85af2b6 into master Apr 3, 2026
28 checks passed
@JeremyDev87 JeremyDev87 deleted the fix/1225-unify-data-dir-resolver branch April 3, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(plugin): unify plugin data dir resolver and fix health_check standalone diagnostics

1 participant