microsoft / microsoft/amplifier
Consolidate install-state.json manipulation with InstallStateManager
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 13
Description
Background
PR microsoft/amplifier-app-cli#68 introduced surgical module dependency invalidation after self-updates. This required direct manipulation of install-state.json in two places:
amplifier_app_cli/utils/update_executor.py- Invalidates modules with missing deps after updateamplifier_app_cli/commands/reset.py- Clears install state when cache is removed
Current State
Both files now use a shared get_install_state_path() function from paths.py, but still manipulate the JSON file directly rather than using the InstallStateManager class from amplifier-foundation.
Implementation Plan
We chose Option A: Add methods to InstallStateManager in amplifier-foundation, then update amplifier-app-cli to use the new API.
Sub-Issues
- #194 - [foundation] Add consolidation API to InstallStateManager
- #195 - [app-cli] Use InstallStateManager API instead of direct JSON manipulation
Dependency Order
- First: Merge #194 (foundation API)
- Then: Merge #195 (app-cli migration)
Files Involved
amplifier-foundation:amplifier_foundation/modules/install_state.pyamplifier-app-cli:amplifier_app_cli/utils/update_executor.pyamplifier-app-cli:amplifier_app_cli/commands/reset.pyamplifier-app-cli:amplifier_app_cli/paths.py
Context
This was flagged during code review by @robotdad as a nice-to-have improvement for future consolidation.
Related PR: https://github.com/microsoft/amplifier-app-cli/pull/68
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with amplifier_foundation/modules/install_state.py to understand the API added by sub-issue #194, then inspect direct install-state.json handling in amplifier_app_cli/utils/update_executor.py and amplifier_app_cli/commands/reset.py. Review amplifier_app_cli/paths.py for the shared path helper. Done means both app-cli locations use InstallStateManager rather than manipulating JSON directly, while preserving invalidation and reset behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100