Repository navigation
Description
Describe the bug
On a machine without APM's per-user deployment receipts (~/.apm), such as a CI runner or a fresh clone, apm update cannot replace the committed, lock-recorded files of a package that moves to a new version:
- 0.35.0: the update resolves the new tag and rewrites
apm.lock.yaml, then printsCleaned N stale deployed files for <package>and deletes the updated package's files whose content changed between the versions (plus the files of a transitiveclaude_skilldependency). It exits 0. A followingapm installrestores the files with the new content. - 0.35.1 and
main(e49ba47): the update plan is printed, then every changed file is rejected withno trustworthy local deployment baseline. Move the conflicting file aside and retry; use --force only to intentionally overwrite it.It exits 1 and the lockfile stays at the old version. DespiteNo install transaction changes were committed, a file that is new in the target version is left behind in the working tree.
The files are unmodified: their hashes match deployed_file_hashes in apm.lock.yaml. A cold apm install of the same checkout succeeds on main (#3391 / #3564), so only the update path is affected.
This is the setup recommended for scheduled updates in CI (microsoft/apm-action with update: true), so every scheduled run starts without receipts. With 0.35.0, the generated pull request deletes skills unless apm install runs afterwards. With 0.35.1, the run fails.
To Reproduce
The package is internal, so the commands below show its structure.
Consumer apm.yml:
name: consumer
version: 1.0.0
targets:
- copilot
- opencode
dependencies:
apm:
- org/skills-package#>=0.1.0
mcp: []org/skills-package is an apm_package with .apm/skills/*, .apm/prompts/* and .apm/instructions/*, and a transitive claude_skill dependency (humanlayer/skills/plugins/show-me/skills/show-me#<sha>). apm.lock.yaml (lockfile_version 2, written by 0.35.0) records v0.4.1. v0.5.0 exists upstream and changes 10 files in two skills and adds one file.
git clone <consumer> fresh && cd fresh
HOME=$(mktemp -d) apm update --yes # empty HOME: no ~/.apm receipts
git status --shortResults
| APM | exit | lockfile | working tree |
|---|---|---|---|
| 0.35.0 | 0 | v0.5.0 |
18 files deleted (Cleaned 18 stale deployed files), 1 added |
| 0.35.1 | 1 | v0.4.1 |
1 untracked file (new in v0.5.0); 12 × no trustworthy local deployment baseline |
main e49ba47 |
1 | v0.4.1 |
1 untracked file (new in v0.5.0); 10 × no trustworthy local deployment baseline |
With 0.35.0, running apm install first (to create receipts) and then apm update still deletes the changed files. Only a second apm install after the update produces the expected result.
Excerpt from main:
[i] Update plan for apm.yml
[~] org/skills-package
ref: v0.4.1 -> v0.5.0 (f0b3d07 -> 87dc437)
...
[x] 1 package failed:
+- org/skills-package -- Skipped
.agents/skills/<skill>/SKILL.md: no trustworthy local deployment
baseline. Move the conflicting file aside and retry; use --force only to
intentionally overwrite it.
...
[x] Installation failed with 16 error(s). No install transaction changes were
committed.
Expected behavior
apm update replaces the unmodified, lock-recorded files of the updated package with the new version's content, exits 0, and leaves no partial changes when it fails. Files whose on-disk content matches deployed_file_hashes should be a trustworthy baseline even without receipts, as #3564 now does for cold restores.
Environment
- OS: macOS 27.2.1 (arm64), reproduced in GitHub Actions on
ubuntu-latest - Python: 3.15.2 (pip installs of 0.35.1 and
main); 0.35.0 via Homebrew andmicrosoft/apm-action@v1 - APM: 0.35.0, 0.35.1,
mainat e49ba47
Additional context
Related: #3372 / #3490 and #3391 / #3564 fixed the same missing-receipt problem for apm install and cold restores.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
danielmeppiel commentedon Nov 12, 2026
Decision: approve
Area: project
Scope: Make
apm updatework without per-user deployment receipts (CI runners, fresh clones, apm-action scheduled updates). Before replacing a package's deployed files, adopt as a trustworthy baseline the committed files that are byte-identical to the materialized source of the currently locked version, following the #3391 cold-restore rule. Then replace them with the new version's content. Update must be all-or-nothing: on failure, no new files, lockfile changes or partial deployments remain.Done when: The reported scenario (receipt-less checkout, locked v0.4.1, upstream v0.5.0 that changes and adds files, plus a transitive claude_skill dependency) exits 0. Files are replaced, the new file is added, and the lockfile moves to v0.5.0. Files modified locally still fail closed with the existing guidance. A failed update leaves the working tree and lockfile exactly as before, with no untracked leftovers. Regression tests run against a local git fixture with two tags, cover project scope, and pass on POSIX and Windows. They fail on main without the fix. The CHANGELOG is updated.
Out of scope: Trusting lockfile hashes alone as a baseline, new flags, changing --force semantics, receipt storage redesign, and changes to apm-action itself.
Review contact: Daniel Meppiel (@danielmeppiel)
danielmeppiel commentedon Nov 12, 2026
Thanks Alex Kucksdorf (@alex-kuck) for the precise, version-by-version report. Accepted as high priority (Daniel Meppiel (@danielmeppiel), 2026-11-12). Scheduled CI updates must work without receipts.
The fix extends the rule we applied to cold restores in #3391/#3564 to
apm update. Files that are byte-identical to the currently locked package source count as a trustworthy baseline even without receipts, so the update replaces them. The update must also leave nothing behind when it fails. Lockfile hashes alone are still not trusted as a baseline. Files you have changed locally keep failing closed. The record above is the exact scope. Delivery is starting now.Posted with AI assistance on behalf of Daniel Meppiel (@danielmeppiel).
milkshakeuk commentedon Nov 12, 2026
Dependabot's APM updater (dependabot/dependabot-core#16792) hits this on every update. Each Dependabot run is a fresh clone with no deployment receipts, and every update changes the package source, so
apm installafter the manifest edit is this cold-upgrade path.On main (
3948181, which includes #3564), a bump of a package whose deployed skill files are committed still fails closed unless those files are removed first. Removing each committed file that still matches its recordedsha256beforeapm installis the workaround #16792 carries. With it, every scenario we tested passes and the result passes a coldapm install --frozen.A related point on the error: when one committed file has been edited, APM refuses every file of the package without saying which one was edited. Naming the edited file (or files) would make this much easier to act on. #16792 checks the digests itself first so it can name them.
The harness and results are in this gist: https://gist.github.com/milkshakeuk/88dd2d4934c6bac1070de0d40741518f
fix(update): adopt unchanged locked skills when receipts are missing (m…
Hash deployed files the way APM does before removing them
fix(tests): restore release-gate lanes for 0.36.0 (#3723)
Stop removing committed deployed files before apm install
Hash deployed files the way APM does before removing them
Stop removing committed deployed files before apm install
Hash deployed files the way APM does before removing them
Stop removing committed deployed files before apm install
Hash deployed files the way APM does before removing them
Stop removing committed deployed files before apm install