Skip to content

fix: handle core-service dependencies and broken extension directories#738

Merged
Lightheartdevs merged 2 commits intoLight-Heart-Labs:mainfrom
yasinBursali:fix/extensions-core-dep-and-limbo-state
Apr 3, 2026
Merged

fix: handle core-service dependencies and broken extension directories#738
Lightheartdevs merged 2 commits intoLight-Heart-Labs:mainfrom
yasinBursali:fix/extensions-core-dep-and-limbo-state

Conversation

@yasinBursali
Copy link
Copy Markdown
Contributor

What

Fix enable_extension() incorrectly blocking extensions that depend on core services, and fix unrecoverable limbo state for broken extension directories.

Why

Core services (llama-server, open-webui, etc.) have their compose definitions in docker-compose.base.yml, not individual compose.yaml files. The filesystem-based dependency check was falsely reporting them as missing. Separately, extensions with corrupted directories (no compose file) were stuck — showing "Install" but returning 409.

How

  • Added CORE_SERVICE_IDS check before filesystem-based dependency lookup in enable_extension()
  • In install_extension(), detect broken directories (no compose.yaml or compose.yaml.disabled) and clean them up before reinstalling

Testing

  • Added test_install_cleans_broken_directory and test_enable_allows_core_service_dependency
  • Python syntax verified, existing tests pass

Review

Critique Guardian: APPROVED

Platform Impact

  • macOS: No impact (pure Python, runs inside Docker container)
  • Linux: No impact (same)
  • Windows/WSL2: No impact (same)

Note: This PR touches extensions.py which is also modified by #733. Rebase needed after #733 merges.

🤖 Generated with Claude Code

yasinBursali and others added 2 commits April 3, 2026 03:09
Extensions depending on core services (llama-server, open-webui, etc.)
were incorrectly blocked because the dependency check only looked for
compose.yaml files on the filesystem. Core services have their compose
definitions in docker-compose.base.yml, not individual files.

Additionally, extensions with corrupted directories (no compose.yaml or
compose.yaml.disabled) were stuck in limbo — showing as "not_installed"
but returning 409 on install attempts. Now detects and cleans up broken
directories before reinstalling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds test_install_cleans_broken_directory to verify that install
succeeds when destination has a broken (composeless) directory.
Adds test_enable_allows_core_service_dependency to verify that
enable succeeds when depends_on includes a core service.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Lightheartdevs Lightheartdevs merged commit d277622 into Light-Heart-Labs:main Apr 3, 2026
20 of 28 checks passed
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.

2 participants