diff --git a/docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md b/docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md index 98c6c62..6dec278 100644 --- a/docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md +++ b/docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md @@ -9,6 +9,9 @@ are known, and both read the same tag shape: - **Renovate's `apm` manager** (≥ 44.153.0) looks up a dependency on a `plugins/` subpath through the `git-tags` datasource. It considers only tags of the form `-v`. + *Amended 2026-11-29 (holocron#235, #236): this is wrong for Holocron consumers. The manager reads + only the shorthand form, which apm cannot install for a Gitea subpath, so it does not serve them + today. See consequence 3.* - **`apm outdated`** matches the tag pattern `{name}-v{version}`. This was verified with apm 0.28.0 against a synthetic repo, and `apm_cli/marketplace/tag_pattern.py` lists `{name}-v{version}` among its patterns. @@ -159,20 +162,29 @@ cuts the same tags on the same commits. **2. The root catalogue's version is not tagged per plugin.** Only the `plugins//apm.yml` versions get `-v*` tags. The marketplace catalogue's own version is out of scope. -**3. Renovate consumers on this Gitea need an `overridePackageName` rule until upstream fixes -it.** On hosts other than GitHub and GitLab, Renovate's apm manager does not strip `/plugins/` -from the package URL (`lib/modules/manager/apm/extract.ts`, `resolveRepoPath`), so its `git-tags` -lookup targets a repo that does not exist. A consumer-side `packageRules` entry along these lines -rewrites it. **It is untested.** +**3. Consumers pin with the object form; the `apm` manager does not update them.** *Amended +2026-11-29 (holocron#235, #236); this replaces the original consequence 3, an `overridePackageName` +`packageRules` entry, which is withdrawn.* It was untested and cannot work, for any form: -```json -{ - "matchManagers": ["apm"], - "matchDatasources": ["git-tags"], - "matchPackageNames": ["/\\/plugins\\/[^/]+$/"], - "overridePackageName": "{{{replace '/plugins/[^/]+$' '' packageName}}}" -} -``` +- On a generic git host such as this Gitea, apm (0.28.0, and still on `main` at 0.39.1) cannot + resolve a plugin subdirectory from the shorthand form. `/Mortis/Holocron/plugins/#ref` + folds `plugins/` into the repo path, and an install clones `.../plugins/.git` and + fails with "Not found". The separate `rstrip(".git")` parse bug (0.28.0) is already fixed upstream + (microsoft/apm#3715, PR #3767). +- The object form (`git:` + `path:` + `ref:`) is the only working way to pin a Holocron plugin. + Consumers set `ref: -v`. +- Renovate's `apm` manager (schema `apm: LooseArray(z.string())`) extracts only shorthand strings and + silently drops object-form entries. No `apm.yml` entry is both installable by apm and updatable by + that manager for a Gitea subpath, so no `packageRules` entry can fix it. + +The planned route is a Renovate `customManagers` regex manager on the object-form `ref:` line: the +`git-tags` datasource, a `currentValue` capturing only the version after `-v`, an +`extractVersion` scoped to that plugin's own prefix, and automerge off. **This is planned and +untested, and no snippet is given.** The verified rule goes in a later amendment, after a live +consumer proof. Two upstream reports are to be filed: an apm issue for generic-host subpath folding, +and a Renovate Discussion for object-form extraction. + +The Decision, the tag shape `-v`, is unchanged by this amendment. **4. For a maintainer, Gitea's `create_tag` is an equivalent way to cut a tag**, provided `git cat-file -t ` reports `tag` after fetching. That confirms it is annotated; the script