feat(lint): let bot PRs bump apm ref: lines and regenerate the apm lock #494

Open
opened 2026-12-01 20:16:13 +00:00 by Claude · 0 comments
Owner

Part of #194

Problem

The bot-PR diff gate refuses every file not on its allowlist, and neither apm.yml nor apm.lock.yaml is on it. Once the skills-source dependencies are pinned with ref: <plugin>-v<x.y.z> and a Renovate regex manager bumps them, every such bot PR fails Lint.

Out of scope: the Renovate config and lock regeneration (separate issues), and .claude/ paths. Those come later, once deployed files are committed (#194).

Proposal

Add two allowances to the gate. Everything else stays refused, and CODEOWNERS approval still applies to both files.

  • apm.yml: a changed line may only be a ref: line of the form ref: <plugin>-v<x.y.z> whose only change is the version digits. The plugin prefix must stay the same, and the old and new lines must have the same shape.
  • apm.lock.yaml: allowed only when apm.yml also changed in the same PR. Its changed lines are limited to the kinds a ref bump produces: resolved ref, resolved commit (40-hex), version, content and file hashes (sha256), generated_at, apm_version, and deployed-file hash entries.

Acceptance criteria

Check: python3 -m unittest discover -s tests/scripts, with a new case for each line below.

  • Allowed: an apm.yml ref: digit bump together with matching lock churn.
  • Refused: lock churn with no apm.yml change in the same PR.
  • Refused: a ref: changed to a branch name, an arbitrary ref, or another plugin's prefix (for example git-v… to gitea-v…).
  • Refused: any change to a git: or path: line, or to any other line in apm.yml.
  • The gate's docstring and the renovate.json description name the new allowances. Check: read both.
Part of #194 ## Problem The bot-PR diff gate refuses every file not on its allowlist, and neither `apm.yml` nor `apm.lock.yaml` is on it. Once the skills-source dependencies are pinned with `ref: <plugin>-v<x.y.z>` and a Renovate regex manager bumps them, every such bot PR fails Lint. Out of scope: the Renovate config and lock regeneration (separate issues), and `.claude/` paths. Those come later, once deployed files are committed (#194). ## Proposal Add two allowances to the gate. Everything else stays refused, and CODEOWNERS approval still applies to both files. - **`apm.yml`:** a changed line may only be a `ref:` line of the form `ref: <plugin>-v<x.y.z>` whose only change is the version digits. The plugin prefix must stay the same, and the old and new lines must have the same shape. - **`apm.lock.yaml`:** allowed only when `apm.yml` also changed in the same PR. Its changed lines are limited to the kinds a ref bump produces: resolved ref, resolved commit (40-hex), version, content and file hashes (sha256), `generated_at`, `apm_version`, and deployed-file hash entries. ## Acceptance criteria Check: `python3 -m unittest discover -s tests/scripts`, with a new case for each line below. - [ ] Allowed: an `apm.yml` `ref:` digit bump together with matching lock churn. - [ ] Refused: lock churn with no `apm.yml` change in the same PR. - [ ] Refused: a `ref:` changed to a branch name, an arbitrary ref, or another plugin's prefix (for example `git-v…` to `gitea-v…`). - [ ] Refused: any change to a `git:` or `path:` line, or to any other line in `apm.yml`. - [ ] The gate's docstring and the `renovate.json` description name the new allowances. Check: read both.
Claude added the Kind/Enhancement
Priority
Medium
3
Status
Ready for Human
labels 2026-12-01 20:16:13 +00:00
Claude added a new dependency 2026-12-01 20:17:01 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#494