Describe the bug
Two bugs cause the Release Validation CI job to fail (observed in PR #173, run 22737662370):
- In
cli.py, set(_pre_download_results.keys()) invokes Click's config set command instead of Python's builtin set(), because the @config.command decorator at line 4188 defines def set(key, value) which overwrites the set = builtins.set alias from line 17.
- In
_try_sparse_checkout(), when no ref is provided, git fetch origin --depth=1 fetches all branch tips and FETCH_HEAD points to the wrong commit, so the expected subdirectory is missing after checkout.
To Reproduce
- Run the Integration Tests (PR) CI workflow
- The "Release Validation" job's Hero Scenario 1 (
github/awesome-copilot/skills/architecture-blueprint-generator) fails with exit code 2 (bug 1) or missing subdirectory (bug 2)
Expected behavior
The Release Validation job should complete successfully — set() should create a Python set, and sparse checkout should fetch the correct branch tip.
Environment (please complete the following information):
- OS: Ubuntu (CI runner)
- Python Version: 3.12
- APM Version: development (main branch)
- VSCode Version: N/A
Logs
Bug 1 output: Usage: apm [OPTIONS] KEY VALUE / Error: Missing argument 'KEY'
Bug 2 verified locally:
git fetch origin --depth=1 + git checkout FETCH_HEAD → No such file or directory ❌
git fetch origin main --depth=1 + git checkout FETCH_HEAD → subdirectory found ✅
Additional context
Fix for bug 1: use builtins.set(...) explicitly.
Fix for bug 2: always pass an explicit ref — git fetch origin <ref or HEAD> --depth=1.
Describe the bug
Two bugs cause the Release Validation CI job to fail (observed in PR #173, run
22737662370):cli.py,set(_pre_download_results.keys())invokes Click'sconfig setcommand instead of Python's builtinset(), because the@config.commanddecorator at line 4188 definesdef set(key, value)which overwrites theset = builtins.setalias from line 17._try_sparse_checkout(), when norefis provided,git fetch origin --depth=1fetches all branch tips andFETCH_HEADpoints to the wrong commit, so the expected subdirectory is missing after checkout.To Reproduce
github/awesome-copilot/skills/architecture-blueprint-generator) fails with exit code 2 (bug 1) or missing subdirectory (bug 2)Expected behavior
The Release Validation job should complete successfully —
set()should create a Python set, and sparse checkout should fetch the correct branch tip.Environment (please complete the following information):
Logs
Bug 1 output:
Usage: apm [OPTIONS] KEY VALUE/Error: Missing argument 'KEY'Bug 2 verified locally:
git fetch origin --depth=1+git checkout FETCH_HEAD→No such file or directory❌git fetch origin main --depth=1+git checkout FETCH_HEAD→ subdirectory found ✅Additional context
Fix for bug 1: use
builtins.set(...)explicitly.Fix for bug 2: always pass an explicit ref —
git fetch origin <ref or HEAD> --depth=1.