Skip to content

♻️ Consolidate mpm.json persistence through ProjectRepository#254

Merged
Nlkomaru merged 1 commit intomainfrom
fix/consolidate-mpm-json-persistence
Mar 29, 2026
Merged

♻️ Consolidate mpm.json persistence through ProjectRepository#254
Nlkomaru merged 1 commit intomainfrom
fix/consolidate-mpm-json-persistence

Conversation

@Nlkomaru
Copy link
Copy Markdown
Member

Summary

  • Route all mpm.json reads/writes exclusively through ProjectRepository instead of direct file I/O scattered across PluginInfoServiceImpl, PluginLifecycleServiceImpl, PluginUpdateServiceImpl, and ProjectServiceImpl
  • Add findOrError() method to ProjectRepository interface to distinguish between "file not found" and "parse error" (prevents behavioral regression where corrupt mpm.json would appear as "not initialized")
  • Use MpmProject domain model methods (addPlugin, removePlugin, getPluginSpec, toDto) instead of raw MpmConfig DTO manipulation in services

Test plan

  • ./gradlew check passes (all existing tests pass)
  • Manual test: mpm init creates mpm.json correctly
  • Manual test: mpm add <plugin> works with latest/fixed/sync version specifiers
  • Manual test: mpm remove <plugin> correctly updates mpm.json
  • Manual test: Corrupt mpm.json returns parse error (not "not initialized")

Closes #236

Route all mpm.json reads/writes exclusively through ProjectRepository instead of direct file I/O scattered across services.
@github-actions
Copy link
Copy Markdown
Contributor

@Nlkomaru Nlkomaru merged commit 9fff949 into main Mar 29, 2026
9 checks passed
@Nlkomaru Nlkomaru deleted the fix/consolidate-mpm-json-persistence branch March 29, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🏗️ Consolidate mpm.json persistence and remove PluginRepositoryImpl dead code

1 participant