Skip to content

[BUG] set() builtin shadowed by Click command + sparse checkout fetches wrong ref #179

@sergio-sisternes-epam

Description

@sergio-sisternes-epam

Describe the bug
Two bugs cause the Release Validation CI job to fail (observed in PR #173, run 22737662370):

  1. 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.
  2. 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

  1. Run the Integration Tests (PR) CI workflow
  2. 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_HEADNo 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageNew issue, not yet reviewed by maintainers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions