spec: consumer pinning and Renovate bumps for Holocron plugins #260

Open
opened 2026-12-01 20:12:01 +00:00 by Claude · 1 comment
Owner

Spec for #235 and #236. Decisions are recorded in ADR-0033's 2026-11-29 amendment (#258, merged). Consumer docs are in the README's "For external consumers" section (#259, merged).

Problem Statement

A consumer that wants to pin a Holocron plugin to a release, and have those pins bumped automatically, can do neither reliably today:

  • On this Gitea, apm cannot install the shorthand form of a plugin dependency (<host>/Mortis/Holocron/plugins/<name>#<ref>). It folds plugins/<name> into the repository path and fails with "Not found". This happens on apm 0.28.0 and still on 0.39.1. apm install --dry-run does not catch it. A separate parse bug (rstrip(".git")) made plugins/git fail even earlier, but it is already fixed upstream (microsoft/apm#3715, PR #3767).
  • The object form (git: + path: + ref:) works, but Renovate's built-in apm manager extracts only shorthand strings and silently drops object-form entries. No apm.yml entry is both installable by apm and updatable by that manager.
  • ADR-0033 used to tell consumers to add an overridePackageName packageRule. That rule could never work, and it has been withdrawn.

So consumers either track main (no pinning) or pin by hand and never hear about new releases.

Solution

Consumers pin with the object form, ref: <plugin>-v<x.y.z>, keys in the order git, path, ref. This is already documented. A Renovate regex custom manager reads the ref: line of each object-form entry and proposes a bump to the newest tag with the same plugin prefix. A post-upgrade task regenerates apm.lock.yaml in the same branch. Every bump is a reviewed PR, never automerged.

The route is proven end to end on one real consumer (Kamino) with a live bot PR. Holocron then publishes the verified config as a copy-paste snippet. Two upstream reports are filed in parallel so the native routes can replace the workaround one day:

  • an apm issue for generic-host subpath folding;
  • a Renovate Discussion for object-form extraction.

User Stories

  1. As a consumer, I want to pin a Holocron plugin to an exact release tag, so that my installed skills change only when I choose.
  2. As a consumer, I want one documented dependency form that works on this host, so that I do not lose time on the shorthand form, which fails.
  3. As a consumer, I want to know that apm install --dry-run does not prove a shorthand works, so that I trust only a real install.
  4. As a consumer, I want Renovate to open a PR when a newer <plugin>-v<x.y.z> tag exists, so that I learn about releases without polling.
  5. As a consumer, I want Renovate to consider only tags with my plugin's own prefix, so that a gitea-v* tag is never proposed for my git pin.
  6. As a consumer, I want the tag prefix kept in my apm.yml when Renovate bumps it, so that the result is still a valid ref.
  7. As a consumer, I want apm.lock.yaml regenerated in the same Renovate PR, so that the manifest and the lock never disagree.
  8. As a consumer, I want the regenerated lock to record the commit the tag points to, so that what is locked is what is installed.
  9. As a consumer maintainer, I want plugin bumps to never automerge, so that every change to agent instructions gets my code-owner review.
  10. As a consumer maintainer, I want my bot-PR diff gate to accept a ref: version bump and its lock churn, and nothing else, so that the gate keeps its guarantees.
  11. As a consumer maintainer, I want the gate to refuse a lock change unless apm.yml changed in the same PR, so that the bot cannot rewrite the lock on its own.
  12. As a consumer maintainer, I want the gate to refuse changes to the git: or path: lines, so that the bot cannot retarget a dependency.
  13. As a consumer maintainer, I want the apm the bot runs pinned to the same version as my dev tooling, so that lock regeneration is reproducible.
  14. As a consumer maintainer, I want the post-upgrade command allowlist anchored to exactly apm install, so that no other command can run.
  15. As a consumer maintainer, I want a local Renovate dry run to show the proposed updates before I merge any config change, so that I can verify without opening PRs.
  16. As a Holocron maintainer, I want the verified Renovate config published in the README only after a live proof, so that we never document an untested rule again.
  17. As a Holocron maintainer, I want ADR-0033 amended with the verified rule and the Renovate version it was proven on, so that the decision record stays true.
  18. As a Holocron maintainer, I want an upstream apm issue for generic-host subpath folding, so that the shorthand may work here one day.
  19. As a Holocron maintainer, I want an upstream Renovate Discussion for object-form extraction, so that the built-in manager may replace the regex manager.
  20. As a Holocron maintainer, I want one tracking ticket that links the consumer-side work and the live proof, so that #235 has a clear closing condition.
  21. As a Holocron maintainer, I want the shorthand behaviour on both apm 0.28.0 and a current release recorded on #236, so that the upstream report is backed by evidence.
  22. As a Kamino maintainer, I want Kamino's own tracking issue (#194) amended to the object form and the regex manager, so that it does not prescribe a form that cannot work.
  23. As a Kamino maintainer, I want the Kamino tickets to stand alone, so that they follow Kamino's rule against cross-repo references.

Implementation Decisions

  • Dependency form. Object form only, keys in the order git, path, ref, with ref: <plugin>-v<x.y.z>. The tag prefix equals the plugin directory name by construction, because the tagging script derives it from the directory.

  • Renovate manager. A customManagers entry of type regex, matched on apm.yml:

    • one match string, for the fixed key order;
    • packageName is the Holocron clone URL and depName is the plugin name from path:;
    • currentValue captures only the version digits after <plugin>-v, so the prefix stays in the file and no auto-replace template is needed;
    • datasource git-tags, versioning semver;
    • extract-version template ^{{{depName}}}-v(?<version>\d+\.\d+\.\d+)$. If templating does not work on the pinned Renovate, the fallback is one entry per plugin with a literal prefix;
    • automerge: false, set explicitly, because the consumer's global default is automerge on. This was already decided in Kamino #208.
  • Auth. The Holocron repo is public, so no token should be needed. Add a git-tags hostRule for the host only if the dry run shows a failed lookup. The platform's gitea hostRule may not apply to git-tags.

  • Lock regeneration. A postUpgradeTasks entry runs apm install. File filter: the lock only (it grows to include .claude/** once Kamino commits deployed files). Execution mode: once per branch. The self-hosted global allowedCommands is ["^apm install$"]. apm is made available in the Renovate job at the version Kamino's dev lock pins, never unpinned.

  • Bot-PR diff gate (Kamino). New allowances:

    • an apm.yml ref: line whose only change is the version digits within the same plugin prefix;
    • apm.lock.yaml churn, only when apm.yml changed in the same PR.

    Everything else stays refused. CODEOWNERS approval still applies to apm.yml and apm.lock.yaml.

  • Docs timing. The object-form pin and the withdrawal are already published (#258, #259). The Renovate snippet is published only after the live proof (H4).

  • Upstream etiquette. For Renovate, file a Discussion, not a PR, because maintainers discourage AI-generated PRs without agreement. For apm, file an issue first, per its contributing guide.

Ticket breakdown

# Repo Work Blocked by
H1 Holocron Upstream apm issue: generic-host subpath folding (cite #3715/#3767 as the already-fixed parse bug). Record shorthand behaviour on 0.28.0 and a current release on #236 —
H2 Holocron Upstream Renovate Discussion: object-form extraction for the apm manager; link it on #235 —
H3 Holocron Tracking: link K0–K5, record the live bot PR URL and the Renovate version K1–K5
H4 Holocron Second ADR-0033 amendment plus README snippet with the verified config; closes #235 K5
K0 Kamino Amend #194's body: shorthand becomes object form + ref:, regex manager replaces the built-in apm manager; split K1–K5 out —
K1 Kamino Human adoption PR: pin git, mattpocock and plan with ref:; regenerate the lock; resolved_commit equals each tag's commit K0
K2 Kamino customManagers entry (+ git-tags hostRule only if needed); local dry run at the pinned Renovate proposes only same-prefix tags K1
K3 Kamino Bot-PR diff gate allowances + tests —
K4 Kamino Human-authored workflow change: pinned apm in the Renovate job, allowedCommands, postUpgradeTasks K2
K5 Kamino Live bot PR: gate passes, CI green, code-owner approval, human merge K2, K3, K4

The Kamino tickets are filed in Kamino as standalone issues. They do not reference Holocron issues, ADRs or this spec; the public Holocron URL is fine. Commits carry an Assisted-by: trailer. The tickets are labelled Status/Ready for Human, because Kamino is not onboarded to the delivery team. H3 links them from the Holocron side.

Testing Decisions

  • A good test checks external behaviour: the gate's verdict on a given diff, the updates Renovate proposes for a given manifest, and the PR a real run produces. It does not check the regex internals.

  • Seam 1, Kamino bot-diff gate unit tests (existing suite). Cases:

    • allowed: a ref: digit bump plus lock churn in the same PR;
    • refused: lock-only churn;
    • refused: a ref: set to a branch name or another plugin's prefix;
    • refused: a changed git: or path: line.

    Prior art: the existing rev: and requirements-lock cases in the same suite.

  • Seam 2, Renovate local dry run at the pinned Renovate version (Kamino's documented procedure for any Renovate config change). With pins rolled back to older tags, it proposes the newest same-prefix tag for each of git, mattpocock and plan, and nothing across prefixes. The dry-run log is the evidence for K2.

  • Seam 3, live bot PR (K5). It is the end-to-end proof. Check:

    • the gate passes and CI is green;
    • the lock is regenerated, and resolved_commit equals git rev-parse <tag>^{commit} (a guard against #238);
    • the PR waits for code-owner approval.
  • Seam 4, Holocron docs. The pre-commit Vale hook passes, and a grep finds no withdrawn packageRule. There is no code seam on the Holocron side.

Out of Scope

  • Bumping apm in Holocron (pinned at 0.28.0). It is a separate concern, and it would not unblock the shorthand.
  • Fixing apm or Renovate upstream. We only report.
  • Committing .claude/ in Kamino (owned by Kamino #194). This spec only notes that the file filter and the gate must widen when that happens.
  • Onboarding Kamino to the delivery team.
  • Consumers other than Kamino.

Further Notes

Residual risks:

  • apm in the Renovate image: not verified. It needs a human workflow change, and apm must stay pinned.
  • Templated extract-version: not verified. The fallback is one entry per plugin.
  • .claude/ committed in Kamino: once that happens, fileFilters and the gate scope must grow.
  • apm's executables.allow: it may need an entry for apm install in the bot job.
  • #238 (apm locking a tag ref over dumb HTTP): this does not affect smart-HTTPS Gitea. It matters only if a dumb-HTTP mirror is ever added.

Related:

🤖 Generated with Claude Code

https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi

Spec for #235 and #236. Decisions are recorded in ADR-0033's 2026-11-29 amendment (#258, merged). Consumer docs are in the README's "For external consumers" section (#259, merged). ## Problem Statement A consumer that wants to pin a Holocron plugin to a release, and have those pins bumped automatically, can do neither reliably today: - On this Gitea, apm cannot install the **shorthand form** of a plugin dependency (`<host>/Mortis/Holocron/plugins/<name>#<ref>`). It folds `plugins/<name>` into the repository path and fails with "Not found". This happens on apm 0.28.0 and still on 0.39.1. `apm install --dry-run` does not catch it. A separate parse bug (`rstrip(".git")`) made `plugins/git` fail even earlier, but it is already fixed upstream (microsoft/apm#3715, PR #3767). - The **object form** (`git:` + `path:` + `ref:`) works, but Renovate's built-in `apm` manager extracts only shorthand strings and silently drops object-form entries. No `apm.yml` entry is both installable by apm and updatable by that manager. - ADR-0033 used to tell consumers to add an `overridePackageName` packageRule. That rule could never work, and it has been withdrawn. So consumers either track `main` (no pinning) or pin by hand and never hear about new releases. ## Solution Consumers pin with the object form, `ref: <plugin>-v<x.y.z>`, keys in the order `git`, `path`, `ref`. This is already documented. A Renovate **regex custom manager** reads the `ref:` line of each object-form entry and proposes a bump to the newest tag with the same plugin prefix. A post-upgrade task regenerates `apm.lock.yaml` in the same branch. Every bump is a reviewed PR, never automerged. The route is proven end to end on one real consumer (Kamino) with a live bot PR. Holocron then publishes the verified config as a copy-paste snippet. Two upstream reports are filed in parallel so the native routes can replace the workaround one day: - an apm issue for generic-host subpath folding; - a Renovate Discussion for object-form extraction. ## User Stories 1. As a consumer, I want to pin a Holocron plugin to an exact release tag, so that my installed skills change only when I choose. 2. As a consumer, I want one documented dependency form that works on this host, so that I do not lose time on the shorthand form, which fails. 3. As a consumer, I want to know that `apm install --dry-run` does not prove a shorthand works, so that I trust only a real install. 4. As a consumer, I want Renovate to open a PR when a newer `<plugin>-v<x.y.z>` tag exists, so that I learn about releases without polling. 5. As a consumer, I want Renovate to consider only tags with my plugin's own prefix, so that a `gitea-v*` tag is never proposed for my `git` pin. 6. As a consumer, I want the tag prefix kept in my `apm.yml` when Renovate bumps it, so that the result is still a valid ref. 7. As a consumer, I want `apm.lock.yaml` regenerated in the same Renovate PR, so that the manifest and the lock never disagree. 8. As a consumer, I want the regenerated lock to record the commit the tag points to, so that what is locked is what is installed. 9. As a consumer maintainer, I want plugin bumps to never automerge, so that every change to agent instructions gets my code-owner review. 10. As a consumer maintainer, I want my bot-PR diff gate to accept a `ref:` version bump and its lock churn, and nothing else, so that the gate keeps its guarantees. 11. As a consumer maintainer, I want the gate to refuse a lock change unless `apm.yml` changed in the same PR, so that the bot cannot rewrite the lock on its own. 12. As a consumer maintainer, I want the gate to refuse changes to the `git:` or `path:` lines, so that the bot cannot retarget a dependency. 13. As a consumer maintainer, I want the apm the bot runs pinned to the same version as my dev tooling, so that lock regeneration is reproducible. 14. As a consumer maintainer, I want the post-upgrade command allowlist anchored to exactly `apm install`, so that no other command can run. 15. As a consumer maintainer, I want a local Renovate dry run to show the proposed updates before I merge any config change, so that I can verify without opening PRs. 16. As a Holocron maintainer, I want the verified Renovate config published in the README only after a live proof, so that we never document an untested rule again. 17. As a Holocron maintainer, I want ADR-0033 amended with the verified rule and the Renovate version it was proven on, so that the decision record stays true. 18. As a Holocron maintainer, I want an upstream apm issue for generic-host subpath folding, so that the shorthand may work here one day. 19. As a Holocron maintainer, I want an upstream Renovate Discussion for object-form extraction, so that the built-in manager may replace the regex manager. 20. As a Holocron maintainer, I want one tracking ticket that links the consumer-side work and the live proof, so that #235 has a clear closing condition. 21. As a Holocron maintainer, I want the shorthand behaviour on both apm 0.28.0 and a current release recorded on #236, so that the upstream report is backed by evidence. 22. As a Kamino maintainer, I want Kamino's own tracking issue (#194) amended to the object form and the regex manager, so that it does not prescribe a form that cannot work. 23. As a Kamino maintainer, I want the Kamino tickets to stand alone, so that they follow Kamino's rule against cross-repo references. ## Implementation Decisions - **Dependency form.** Object form only, keys in the order `git`, `path`, `ref`, with `ref: <plugin>-v<x.y.z>`. The tag prefix equals the plugin directory name by construction, because the tagging script derives it from the directory. - **Renovate manager.** A `customManagers` entry of type regex, matched on `apm.yml`: - one match string, for the fixed key order; - `packageName` is the Holocron clone URL and `depName` is the plugin name from `path:`; - `currentValue` captures only the version digits after `<plugin>-v`, so the prefix stays in the file and no auto-replace template is needed; - datasource `git-tags`, versioning `semver`; - extract-version template `^{{{depName}}}-v(?<version>\d+\.\d+\.\d+)$`. If templating does not work on the pinned Renovate, the fallback is one entry per plugin with a literal prefix; - `automerge: false`, set explicitly, because the consumer's global default is automerge on. This was already decided in Kamino #208. - **Auth.** The Holocron repo is public, so no token should be needed. Add a `git-tags` hostRule for the host only if the dry run shows a failed lookup. The platform's `gitea` hostRule may not apply to `git-tags`. - **Lock regeneration.** A `postUpgradeTasks` entry runs `apm install`. File filter: the lock only (it grows to include `.claude/**` once Kamino commits deployed files). Execution mode: once per branch. The self-hosted global `allowedCommands` is `["^apm install$"]`. apm is made available in the Renovate job at the version Kamino's dev lock pins, never unpinned. - **Bot-PR diff gate (Kamino).** New allowances: - an `apm.yml` `ref:` line whose only change is the version digits within the same plugin prefix; - `apm.lock.yaml` churn, only when `apm.yml` changed in the same PR. Everything else stays refused. CODEOWNERS approval still applies to `apm.yml` and `apm.lock.yaml`. - **Docs timing.** The object-form pin and the withdrawal are already published (#258, #259). The Renovate snippet is published only after the live proof (H4). - **Upstream etiquette.** For Renovate, file a Discussion, not a PR, because maintainers discourage AI-generated PRs without agreement. For apm, file an issue first, per its contributing guide. ### Ticket breakdown | # | Repo | Work | Blocked by | |---|---|---|---| | H1 | Holocron | Upstream apm issue: generic-host subpath folding (cite #3715/#3767 as the already-fixed parse bug). Record shorthand behaviour on 0.28.0 and a current release on #236 | — | | H2 | Holocron | Upstream Renovate Discussion: object-form extraction for the apm manager; link it on #235 | — | | H3 | Holocron | Tracking: link K0–K5, record the live bot PR URL and the Renovate version | K1–K5 | | H4 | Holocron | Second ADR-0033 amendment plus README snippet with the verified config; closes #235 | K5 | | K0 | Kamino | Amend #194's body: shorthand becomes object form + `ref:`, regex manager replaces the built-in apm manager; split K1–K5 out | — | | K1 | Kamino | Human adoption PR: pin git, mattpocock and plan with `ref:`; regenerate the lock; `resolved_commit` equals each tag's commit | K0 | | K2 | Kamino | `customManagers` entry (+ `git-tags` hostRule only if needed); local dry run at the pinned Renovate proposes only same-prefix tags | K1 | | K3 | Kamino | Bot-PR diff gate allowances + tests | — | | K4 | Kamino | Human-authored workflow change: pinned apm in the Renovate job, `allowedCommands`, `postUpgradeTasks` | K2 | | K5 | Kamino | Live bot PR: gate passes, CI green, code-owner approval, human merge | K2, K3, K4 | The Kamino tickets are filed in Kamino as standalone issues. They do not reference Holocron issues, ADRs or this spec; the public Holocron URL is fine. Commits carry an `Assisted-by:` trailer. The tickets are labelled `Status/Ready for Human`, because Kamino is not onboarded to the delivery team. H3 links them from the Holocron side. ## Testing Decisions - A good test checks external behaviour: the gate's verdict on a given diff, the updates Renovate proposes for a given manifest, and the PR a real run produces. It does not check the regex internals. - **Seam 1, Kamino bot-diff gate unit tests** (existing suite). Cases: - allowed: a `ref:` digit bump plus lock churn in the same PR; - refused: lock-only churn; - refused: a `ref:` set to a branch name or another plugin's prefix; - refused: a changed `git:` or `path:` line. Prior art: the existing `rev:` and requirements-lock cases in the same suite. - **Seam 2, Renovate local dry run** at the pinned Renovate version (Kamino's documented procedure for any Renovate config change). With pins rolled back to older tags, it proposes the newest same-prefix tag for each of git, mattpocock and plan, and nothing across prefixes. The dry-run log is the evidence for K2. - **Seam 3, live bot PR** (K5). It is the end-to-end proof. Check: - the gate passes and CI is green; - the lock is regenerated, and `resolved_commit` equals `git rev-parse <tag>^{commit}` (a guard against #238); - the PR waits for code-owner approval. - **Seam 4, Holocron docs.** The pre-commit Vale hook passes, and a grep finds no withdrawn packageRule. There is no code seam on the Holocron side. ## Out of Scope - Bumping apm in Holocron (pinned at 0.28.0). It is a separate concern, and it would not unblock the shorthand. - Fixing apm or Renovate upstream. We only report. - Committing `.claude/` in Kamino (owned by Kamino #194). This spec only notes that the file filter and the gate must widen when that happens. - Onboarding Kamino to the delivery team. - Consumers other than Kamino. ## Further Notes Residual risks: - **apm in the Renovate image:** not verified. It needs a human workflow change, and apm must stay pinned. - **Templated extract-version:** not verified. The fallback is one entry per plugin. - **`.claude/` committed in Kamino:** once that happens, `fileFilters` and the gate scope must grow. - **apm's `executables.allow`:** it may need an entry for `apm install` in the bot job. - **#238 (apm locking a tag ref over dumb HTTP):** this does not affect smart-HTTPS Gitea. It matters only if a dumb-HTTP mirror is ever added. Related: - Holocron: #235, #236, #238; ADR-0033; docs PRs #258 and #259 (merged). - Kamino: #194, #208. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Claude added the Kind/Enhancement
Priority
Medium
3
labels 2026-12-01 20:12:01 +00:00
Author
Owner

Scope change, 2026-12-01: no upstream reports. The maintainer decided not to post anything upstream.

  • H1 (#261) is narrowed to recording apm shorthand evidence on #236.
  • H2 (#262) is closed as won't-do.
  • User stories 18–19 and the "Upstream etiquette" decision are void.
  • H4 (#264) also removes ADR-0033's sentence saying two upstream reports are to be filed.
Scope change, 2026-12-01: no upstream reports. The maintainer decided not to post anything upstream. - H1 (#261) is narrowed to recording apm shorthand evidence on #236. - H2 (#262) is closed as won't-do. - User stories 18–19 and the "Upstream etiquette" decision are void. - H4 (#264) also removes ADR-0033's sentence saying two upstream reports are to be filed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Holocron#260