Skip to content

refactor(tool-manager): integrate portability infrastructure across Tool Manager#603

Open
adarsh-7-satyam wants to merge 1 commit into
FOSSEE:feature/tool-manager-integrationfrom
adarsh-7-satyam:portability/phase-2-consolidation
Open

refactor(tool-manager): integrate portability infrastructure across Tool Manager#603
adarsh-7-satyam wants to merge 1 commit into
FOSSEE:feature/tool-manager-integrationfrom
adarsh-7-satyam:portability/phase-2-consolidation

Conversation

@adarsh-7-satyam

Copy link
Copy Markdown

Related Issues

Continuation of the Tool Manager portability and path resolution enhancement work.

This PR builds directly upon PR #571, which introduced the foundational portability infrastructure for the Tool Manager subsystem, including:

  • constants.py
  • paths.py
  • config.py
  • platform_utils.py
  • registry.py

PR #571 established the shared portability architecture while intentionally leaving the existing Tool Manager runtime unchanged. This PR completes the next phase by integrating that infrastructure into the core Tool Manager implementation.


Purpose

The primary objective of this PR is to integrate the portability infrastructure introduced in PR #571 into the existing Tool Manager runtime.

Rather than introducing new functionality, this PR replaces duplicated implementations with the centralized utilities established in PR #571. The focus is to improve maintainability, reduce code duplication, and ensure that the runtime actively uses the shared portability layer while preserving existing behavior.


Approach

This PR performs behavior-preserving integration of the portability infrastructure introduced in PR #571.

The major changes include:

  • Integrating centralized path resolution from paths.py into the Tool Manager runtime.
  • Replacing duplicated default installation path definitions with shared constants from constants.py.
  • Migrating subprocess creation logic to the shared utilities provided by platform_utils.py.
  • Replacing manual installation state management with the centralized ConfigManager.
  • Integrating the shared Tool Registry into main.py where the existing metadata matched exactly.
  • Replacing duplicated platform detection logic with centralized platform constants.
  • Removing redundant implementations that are now provided by the shared portability infrastructure.

Only integrations that were behaviorally equivalent were performed. Components whose data structures or semantics differed from the centralized infrastructure (such as GUI metadata and updater-specific version mappings) were intentionally left unchanged to avoid introducing functional regressions.


What This Achieves

With this PR:

  • The core Tool Manager runtime now uses centralized path resolution.
  • Installation state management is now handled through a shared configuration manager instead of manual JSON operations.
  • Platform-specific behavior now relies on centralized platform utilities instead of duplicated platform checks.
  • Shared metadata is reused wherever exact equivalence exists, reducing duplicated definitions.
  • The portability infrastructure introduced in PR feat(tool-manager): implement foundational portability infrastructure #571 is now fully integrated into the Tool Manager runtime.
  • Together, PR feat(tool-manager): implement foundational portability infrastructure #571 and this PR complete the migration of the core Tool Manager runtime to the centralized portability architecture, providing a cleaner and more maintainable foundation for future enhancements while preserving existing behavior.

Testing

  • Verified that existing Tool Manager workflows continue to function without behavioral changes.
  • Confirmed that centralized path resolution produces the same runtime locations as the previous implementation.
  • Verified compatibility of ConfigManager with existing information.json files.
  • Confirmed compatibility with the active feature/tool-manager-integration branch.
  • Reviewed all migrated code paths to ensure no functional regressions were introduced.

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.

1 participant