Skip to content

Add configurable default install target (apm config target) with install-time fallback precedence#1881

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/feature-allow-default-target
Draft

Add configurable default install target (apm config target) with install-time fallback precedence#1881
Copilot wants to merge 2 commits into
mainfrom
copilot/feature-allow-default-target

Conversation

Copilot AI commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

apm install required repeating --target for common workflows. This change adds a persisted default target and wires it into target resolution without changing existing override semantics.

  • Config key surface

    • Added target to apm config:
      • apm config set target <value>
      • apm config get target
      • apm config unset target
    • Added config helpers in apm_cli.config:
      • get_install_target()
      • set_install_target()
      • unset_install_target()
  • Install resolution behavior

    • install/phases/targets.py now resolves target precedence as:
      1. CLI --target
      2. apm.yml target / targets
      3. persisted apm config target
      4. filesystem auto-detect
    • Explicit --target and manifest targets continue to override the config default.
  • Tests and docs alignment

    • Added focused unit coverage for config storage/CLI flows and target-phase precedence.
    • Updated CLI/reference docs and apm-guide command corpus to include the new key and precedence chain.
apm config set target claude
apm install                  # uses claude when --target and apm.yml target(s) are absent
apm install --target cursor  # explicit flag still wins

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Spec conformance (OpenAPM v0.1)

If this PR changes behaviour that an OpenAPM v0.1 req-XXX covers,
confirm the three-step ritual (see CONTRIBUTING.md "Adding or
changing a normative requirement"):

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed <a id="req-XXX"></a> anchor + prose + Appendix C
    row).
  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
    updated.
  • Test edit: a @pytest.mark.req("req-XXX") test under
    tests/spec_conformance/ added or extended.
  • CONFORMANCE.{md,json} regenerated via
    uv run --extra dev python -m tests.spec_conformance.gen_statement
    and committed.
  • N/A -- this PR does not change OpenAPM-observable behaviour.

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ability to save default target for apm install Add configurable default install target (apm config target) with install-time fallback precedence Jun 23, 2026
Copilot AI requested a review from danielmeppiel June 23, 2026 08:15
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