microsoft / microsoft/amplifier

Bundle loader validates repo root instead of #subdirectory= path

Open
#180 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.1k
Forks
261
Avg merge
3h 28m
Merged PRs (30d)
13

Description

Summary

When using #subdirectory= in bundle URLs, the loader validates the root of the cloned repository for bundle.md, pyproject.toml, or setup.py instead of validating the specified subdirectory.

Reproduction

Bundle include:

includes:
  - bundle: git+https://github.com/ramparte/amplifier-toolkit@main#subdirectory=bundles/deliberate-development

Error:

Clone missing expected files (pyproject.toml/setup.py/bundle.md): /home/user/.amplifier/cache/amplifier-toolkit-bb61039d65d7686a
Include failed (skipping): git+https://github.com/ramparte/amplifier-toolkit@main#subdirectory=bundles/deliberate-development - Clone of https://github.com/ramparte/amplifier-toolkit@main completed but result is invalid (missing pyproject.toml/setup.py/bundle.md).

Expected Behavior

The loader should validate the subdirectory path (bundles/deliberate-development/) for required files, not the repository root.

Actual Behavior

Repository structure:

amplifier-toolkit/           ← Loader validates HERE (no bundle.md)
├── README.md
├── bundles/
│   ├── deliberate-development/
│   │   └── bundle.md       ← Should validate HERE
│   └── m365-collab/
│       └── bundle.yaml

The clone succeeds, but validation fails because the root has no bundle.md/pyproject.toml/setup.py.

Impact

This breaks the monorepo pattern where multiple bundles live in subdirectories of a single repository. Users must create separate repos for each bundle as a workaround.

Suggested Fix

In the loader validation logic, when #subdirectory= is present in the URL:

  1. Clone the repo (current behavior ✓)
  2. Validate files exist in {clone_path}/{subdirectory}/ (not {clone_path}/)

Environment

  • amplifier version: 2026.01.20-fafab09
  • OS: WSL2 Ubuntu

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the bundle loader validation logic and tracing how the #subdirectory= value is parsed after cloning. Reproduce the provided amplifier-toolkit URL, then verify that required files are checked under bundles/deliberate-development/ and that the include loads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.