Skip to content

[FEATURE] Decide the bare 'apm install -g' contract when no user manifest exists #4544

Closed

Description

Proposals are welcome before implementation. For substantive changes, wait
for a responsible human maintainer to approve the scope and identify a review
contact. An automated recommendation, label alone, or silence is not approval.
See Contributing.

Is your feature request related to a problem? Please describe.
apm install -g --target copilot with no user manifest (~/.apm/apm.yml) exits 1 with "No ~/.apm/apm.yml found" and a hint to run apm install -g <org/repo>. The behavior #650 asked for is delivered, and the command is not silent. But tests/integration/test_target_resolution_e2e.py::test_s13_global_copilot_no_silent_skip still expects exit 0 and a copilot deploy line for a bare install -g on a fresh home, so it stays an xfail.

Describe the solution you'd like
Decide the contract for a bare apm install -g when no user manifest exists:

  • (a) succeed as a no-op that names the user-scope target (copilot) and its path, consistent with apm install --frozen with nothing to install; or
  • (b) keep the error, and update S13 to assert the error and its next step.

Done when S13 asserts the chosen contract and its xfail marker is removed.

Describe alternatives you've considered
Keep the current error and leave S13 as an xfail.

Additional context
Follow-up to #650 (closed). Related test: S14 asserts that a project apm install with no apm.yml is a user error.

Activity

  1. added
    type/feature
    on Nov 21, 2026
  2. danielmeppiel commented on Nov 21, 2026

    @danielmeppiel
    CollaboratorAuthor

    Decision: approve
    Area: project
    Scope: Keep the current contract for a bare apm install -g when no user manifest exists. It exits 1, names the missing user manifest path ($APM_HOME/apm.yml), and gives the next step apm install -g <org/repo>, consistent with project-scope apm install without apm.yml (S14). S13 in tests/integration/test_target_resolution_e2e.py asserts this contract instead of a successful deploy, and the reference documents it.
    Done when: S13 runs the installed CLI (apm install -g --target copilot with an isolated HOME and no APM_HOME, APM_TARGET or APM_CONFIG). It asserts exit 1, the missing user manifest path and the apm install -g <org/repo> next step in the output, and that nothing was created under the fake HOME (no .apm/, no copilot files). Its strict xfail marker is removed. Controls: S14 is unchanged, and apm install -g <org/repo> with no user manifest still bootstraps it (existing coverage, or one added case). Docs: reference/cli/install.md (--global row or the auto-bootstrap note) states the bare -g contract next to the project-scope sentence. No CHANGELOG line, because behavior is unchanged (changelog rules exclude test-only changes); if the PR changes any user-visible text, add one line under Changed.
    Out of scope: changing the error into a no-op; bootstrap or --mcp user-scope paths; project-root discovery (#4545).
    Review contact: Daniel Meppiel (@danielmeppiel)

  3. added
    status/accepted
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/acceptedtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions