-
Notifications
You must be signed in to change notification settings - Fork 227
Description
Summary
Bundle loading emits false "Circular dependency detected" warnings for legitimate transitive dependencies within the foundation bundle hierarchy.
Reproduction
Using any bundle that includes amplifier-dev.yaml (which includes foundation):
includes:
- bundle: git+https://github.com/microsoft/amplifier-foundation@main#subdirectory=bundles/amplifier-dev.yamlWarnings Observed
Include failed (skipping): git+https://github.com/microsoft/amplifier-foundation@main - Circular dependency detected
Include failed (skipping): file:///.../behaviors/sessions.yaml - Circular dependency detected
Include failed (skipping): git+https://github.com/microsoft/amplifier-bundle-python-dev@main - Circular dependency detected
Include failed (skipping): git+https://github.com/microsoft/amplifier-bundle-shadow@main - Circular dependency detected
Expected Behavior
These are not circular dependencies - they are legitimate transitive dependencies:
amplifier-dev.yaml
└── foundation
├── python-dev
│ └── lsp-python
├── shadow
└── behaviors/sessions.yaml
└── behaviors/logging
The same bundle appearing in multiple paths of the dependency tree (diamond dependency) should be deduplicated, not flagged as circular.
Actual Behavior
The bundle resolver incorrectly flags these as "circular" and skips them with warnings. Despite the warnings, the bundle still works (the dependencies were likely already loaded).
Impact
- Confusing/alarming warnings on every session start
- May mask actual circular dependency issues
- User perception that something is broken
Suggested Fix
The circular dependency detection should track the actual dependency path, not just whether a bundle URL has been seen before. A bundle appearing multiple times via different paths is a diamond dependency (deduplicate silently), not a circular dependency (error).
Environment
- amplifier version: 2026.01.20-fafab09
- OS: WSL2 Ubuntu
Related
- Issue Bundle loader validates repo root instead of #subdirectory= path #180 (subdirectory validation bug) - separate issue