Skip to content

[FEATURE] Enhance apm.lock.yaml to Include Installed Package Name and Version Metadata #1888

Closed

Description

@jiteshjadav-rogers

Is your feature request related to a problem? Please describe.

APM packages require a name and version in apm.yml, but after apm install consumers cannot easily determine which package versions are installed because apm.lock.yaml only records repository, path, commit, and hash information.

This becomes more challenging when packages have transitive dependencies. For example, installing a Spring Boot package may automatically install additional packages such as Mermaid, documentation standards, or other shared packages. While these dependencies appear in apm.lock.yaml, their package versions are not visible.

As a result, it is difficult to answer:

  • Which version of the Spring Boot package is installed?
  • Which versions of transitive dependencies were installed?
  • Which repositories are using older package versions?
  • What changed between two package upgrades?

Describe the solution you'd like

Enhance apm.lock.yaml to include package metadata extracted from each package's apm.yml, such as package name and version.

Example:

dependencies:
  - name: springboot
    version: 1.2.2
    resolved_commit: b62358...
    virtual_path: packages/springboot

  - name: mermaid
    version: 1.0.4
    resolved_commit: b62358...
    virtual_path: packages/mermaid

  - name: documentations
    version: 2.1.0
    resolved_commit: b62358...
    virtual_path: packages/documentations

Ideally this information should be available for both direct and transitive dependencies.

Describe alternatives you've considered

Generating a custom inventory file by parsing apm.lock.yaml and then reading each package's apm.yml to determine the package version. While this works, it requires additional scripts and custom tooling in every consuming repository.

Additional context

Our organization maintains shared APM packages such as Spring Boot, Angular, Mermaid, and documentation standards. Developers often need to understand exactly which package versions are installed in a repository, including automatically installed dependencies.

Having package name and version information directly available in apm.lock.yaml would make dependency inventory, auditing, troubleshooting, and upgrade planning much easier while preserving the existing commit-based lockfile behavior.

Activity

  1. added
    type/feature
    on Jun 24, 2026
  2. changed the title [-][FEATURE] Expose Package Version Information to Consumers (apm.lock.yaml / apm list / apm outdated)[/-] [+][FEATURE] Enhance apm.lock.yaml to Include Installed Package Name and Version Metadata[/+] on Jun 24, 2026
  3. github-actions commented on Jun 25, 2026

    @github-actions

    Triage decision

    accept

    Proposed labels

    theme/portability
    area/lockfile
    area/docs-site
    type/feature
    status/accepted
    priority/high
    

    Milestone

    null (no open minor milestone exists in the repository; assign to next minor once one is created)

    Suggested next action

    Implement the lockfile enrichment in the install pipeline to read name and version from each installed package's apm.yml and write them as optional fields in each apm.lock.yaml entry.

    Suggested issue comment

    Thank you for this well-thought-out feature request. Your diagnosis is spot-on:
    `apm.lock.yaml` currently records only the commit/hash binding, which makes it hard
    for organizations managing many shared packages to answer "which version of X is
    installed?" without cross-referencing every package's `apm.yml` manually.
    
    This aligns directly with how mature package managers handle lockfiles: npm's
    `package-lock.json` records `version`, Cargo's `Cargo.lock` records `version`, and
    pip's requirements lock records the pinned specifier. Adding `name` and `version`
    metadata to each lock entry is a natural extension of APM's lockfile contract, and it
    does not change the trust model -- the commit hash remains the binding record.
    
    Accepted. The implementing PR will:
    - Read `name` and `version` from each installed package's `apm.yml` at install time
      (both direct and transitive dependencies).
    - Write them as optional fields in each `apm.lock.yaml` entry (optional for backward
      compat with packages that omit these fields).
    - Update the lockfile reference docs to document the new fields.
    
    If you would like to contribute the fix, the lockfile writer lives in `src/apm_cli/`
    and the schema examples are in `docs/src/content/docs/reference/`. Happy to review a PR.

    Per-lens notes (collapsed)

    DevX UX Expert -- User-Need Reviewer

    The request maps directly to a real surface gap. apm.lock.yaml is the primary
    installed-state record, and the omission of package name and version forces
    enterprise users to cross-reference every installed package's apm.yml manually to
    answer basic audit questions. The npm/pip/cargo precedent is strong: all record the
    resolved semantic version in the lockfile alongside the content binding. The request
    is grounded in a concrete organizational use case (transitive deps in a shared-package
    org), the proposed yaml shape is clean and consistent with the existing lockfile
    structure, and the alternative (custom scripts) is correctly dismissed as unmaintainable.

    Supply Chain Security Expert -- Risk-Surface Reviewer

    No new risk-surface implication. The name and version fields are read from the
    already-installed package's own apm.yml at install time -- they do not expand the
    trust boundary. The commit hash and file hashes remain the binding security record;
    the new fields are metadata-only enrichments. This is a portability and auditability
    improvement. area/lockfile is required; theme/portability is the correct mega-theme.

    OSS Growth Hacker -- Contributor-Tone Reviewer

    Author jiteshjadav-rogers has author_association: NONE -- first-time external
    contributor from an enterprise organization. The issue is exceptionally well-structured
    with concrete yaml examples, alternatives considered, and an organizational context
    narrative. Tone in the reply should be warm and professional, affirm the legitimacy of
    the enterprise use case, and offer a concrete contributing path (point to the relevant
    source file and docs location). Avoid generic phrasing -- the quality of the report
    deserves specific acknowledgment of the enterprise audit angle.

    Python Architect -- Architecture Reviewer

    Adding name and version to lock entries is a bounded, well-precedented change.
    The data is available at install time (from each package's apm.yml). Implementation
    touches: (1) the lockfile entry writer to read and record name/version, (2) the
    lockfile schema definition, (3) potentially apm deps list and apm outdated to
    surface the new metadata. Backward compat: make the fields optional so lockfiles from
    packages that omit name/version remain valid. Only open question: whether a
    missing name/version in a package's apm.yml should warn or silently omit.
    Recommendation: silently omit (conservative default). No new design decisions needed.
    Clear accept.

    Doc Writer -- Documentation Reviewer

    Docs work is implied. The lockfile reference will need to be updated to include the
    new name and version fields with examples showing both the present and absent-field
    cases (backward compat). area/docs-site should ride as a secondary label so the
    implementing PR author is reminded to update the lockfile reference page.

    APM CEO -- Triage Arbiter

    Clear accept. APM positions itself as a first-class dependency manager for AI agents,
    and enterprise adoption depends on observable, auditable installed state. The lockfile
    currently underserves organizations by omitting semantic version metadata that every
    comparable tool records. The fix is bounded, the precedent (npm/pip/cargo) is strong,
    and the Python Architect confirms no new design decisions are required. Priority: high
    -- genuine gap for enterprise/audit workflows. No open minor milestone exists today;
    maintainers should create one and assign the issue.

    {
      "decision": "accept",
      "decision_detail": "",
      "theme": "theme/portability",
      "areas": ["area/lockfile", "area/docs-site"],
      "type": "type/feature",
      "status": "status/accepted",
      "priority": "priority/high",
      "preserved_labels": [],
      "milestone": null,
      "next_action": "Implement the lockfile enrichment in the install pipeline to read name and version from each installed package's apm.yml and write them as optional fields in each apm.lock.yaml entry.",
      "comment_markdown": "Thank you for this well-thought-out feature request. Adding name and version metadata to apm.lock.yaml entries is accepted. The implementing PR will read name/version from each installed package's apm.yml, write them as optional fields in lock entries, and update the lockfile reference docs."
    }

    Triage status: agentic proposal pending human ratification.
    Silence is approval. Maintainers can:

    • Override any label or milestone above by editing it directly --
      human edits are authoritative and will not be reverted on
      subsequent runs.
    • Re-trigger triage by applying the status/needs-triage label, or
      by removing status/triaged to enroll the issue in the next
      daily sweep.

    Posted by the Triage Panel workflow. See .apm/skills/apm-triage-panel for the panel skill.

    Generated by Triage Panel · sonnet46 4.2M · ◷

  4. added
    area/docs-site
    area/lockfile
    priority/high
    status/accepted
    status/triaged
    on Jun 25, 2026
  5. moved this from Todo to In Progress in APM Roadmapon Jun 25, 2026
  6. moved this from In Progress to Done in APM Roadmapon Jun 25, 2026
  7. jiteshjadav-rogers commented on Jul 16, 2026

    @jiteshjadav-rogers
    Author
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

    area/docs-sitearea/lockfilepriority/highstatus/acceptedstatus/triagedtype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions