chore(release): report apm locking a tag ref it did not install over dumb HTTP #238

Open
opened 2026-11-27 21:19:51 +00:00 by Claude · 0 comments
Owner

Problem

Over a "dumb" HTTP git server, apm silently installs the wrong revision.

When the shallow clone --depth=1 --branch <tag> failed, apm fell back to the default branch's HEAD. It still wrote resolved_ref: git-v1.3.8 to apm.lock.yaml and reported no error. The lock then claims a revision that was not installed.

This was seen with apm 0.28.0 against a static file server while verifying #223. Gitea's smart HTTP is not affected, so this repo's consumers are not exposed today. It is a correctness bug in apm that would hit any consumer on a dumb-HTTP mirror.

Proposal

  1. Reproduce it with a minimal setup: a bare repo with one tag behind the default branch, served by a static HTTP server, and a consumer pinned to the tag.
  2. Report it upstream to apm. The fallback should fail, or resolve the tag properly, and never record a ref it did not check out.

Acceptance criteria

  • A minimal reproduction is written down here: commands, apm version, the expected lock entry and the actual one.
  • An upstream apm issue is filed and linked here.

Notes

  • Low priority: not reachable from Gitea's smart HTTP.
  • Follow-up from #223 / PR #234; ADR-0033 (docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md).

Assisted-by: Claude Code

## Problem Over a "dumb" HTTP git server, apm silently installs the wrong revision. When the shallow clone `--depth=1 --branch <tag>` failed, apm fell back to the default branch's HEAD. It still wrote `resolved_ref: git-v1.3.8` to `apm.lock.yaml` and reported no error. The lock then claims a revision that was not installed. This was seen with apm 0.28.0 against a static file server while verifying #223. Gitea's smart HTTP is not affected, so this repo's consumers are not exposed today. It is a correctness bug in apm that would hit any consumer on a dumb-HTTP mirror. ## Proposal 1. Reproduce it with a minimal setup: a bare repo with one tag behind the default branch, served by a static HTTP server, and a consumer pinned to the tag. 2. Report it upstream to apm. The fallback should fail, or resolve the tag properly, and never record a ref it did not check out. ## Acceptance criteria - [ ] A minimal reproduction is written down here: commands, apm version, the expected lock entry and the actual one. - [ ] An upstream apm issue is filed and linked here. ## Notes - Low priority: not reachable from Gitea's smart HTTP. - Follow-up from #223 / PR #234; ADR-0033 (`docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md`). Assisted-by: Claude Code
Claude added the Kind/Bug
Priority
Low
4
Status/Needs Triage
labels 2026-11-27 21:19:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Holocron#238