From 635d54d79c05ac58a123166982973433f3b71412 Mon Sep 17 00:00:00 2001 From: mintaka Date: Fri, 4 Sep 2026 13:01:29 -0400 Subject: [PATCH 1/3] feat(renovate): track the RigelBuild/devenv fork in both devenv locks (RIG-2815) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compass carries two independent devenv scopes — the root dev shell (`devenv.lock`) and the agent base image (`agent-image/devenv.lock`) — and both resolve the shared canonical fork `github:RigelBuild/devenv` at its default branch. Nothing tracked either pin, so both drifted months behind the fork's `main` until someone relocked by hand. This wires Renovate to keep both current on a daily schedule (RIG-2546 T7). ### Mechanism A `custom.regex` manager surfaces each lock's fork rev as a `git-refs` digest, and a coupled packageRule opens a solo branch that runs a `postUpgradeTask` to relock the file with `devenv update devenv`. One manager + one rule + one branch per lock (RD-1 unifies the source but does not reconcile the two locks, so they stay on independent cadences). ### Why not `lockFileMaintenance` The obvious mechanism is unimplementable here, source-verified against the pinned `renovate@44.46.2`: - `lockFileMaintenance` is manager-scoped (`flatten.ts` gates on `manager.supportsLockFileMaintenance`); `custom.regex` exports neither that flag nor `updateArtifacts` (`modules/manager/custom/regex/index.ts`), so it is silently ignored — no branch, no error, no PR. - The native `nix` manager supports maintenance but only over `lockFileNames = ['flake.lock']` (`modules/manager/nix/index.ts`), never `devenv.lock`. - `postUpgradeTasks` are filtered off `lockFileMaintenance` branches entirely (`workers/repository/update/branch/execute-post-upgrade-commands.ts:387-400`), so even a maintenance-capable manager could not carry the relock. A normal digest upgrade *does* carry `postUpgradeTasks`, which is exactly what the regex-digest + task pairing buys — the same mechanism the devenv-nixpkgs channel lockstep (`refresh-devenv-nixpkgs.ts`) already relies on. The manager and rule comments carry this argument in full, prefixed DO NOT SIMPLIFY. ### Verification - `moon run renovate:typecheck renovate:test` green — 148 pass / 0 fail (+26 new tests across the guard core, its orchestration harness, and the config coupling). - Live `renovate@44.46.2 --dry-run=extract` against the working tree: both managers fire — `RigelBuild/devenv` extracts the root lock's rev, `RigelBuild/devenv-agent-image` the agent-image lock's, both as `git-refs` digests. The agent-image lock is behind the fork HEAD, so a relock PR would open now; the root lock is coincidentally current. - The relock script's wrong-directory guard was red-checked (`.cwd(cwd)` → `.cwd(".")` turns the agent-image orchestration test red). Spec-impact: none. Refs RIG-2815. Co-authored-by: Matt Wilkinson --- tools/renovate/bot-config.json5 | 12 +- tools/renovate/config.json5 | 166 +++++++++++ tools/renovate/config.test.ts | 202 +++++++++++++- tools/renovate/moon.yml | 3 + .../renovate/refresh-devenv-lock.core.test.ts | 130 +++++++++ tools/renovate/refresh-devenv-lock.core.ts | 120 ++++++++ tools/renovate/refresh-devenv-lock.test.ts | 261 ++++++++++++++++++ tools/renovate/refresh-devenv-lock.ts | 162 +++++++++++ 8 files changed, 1044 insertions(+), 12 deletions(-) create mode 100644 tools/renovate/refresh-devenv-lock.core.test.ts create mode 100644 tools/renovate/refresh-devenv-lock.core.ts create mode 100644 tools/renovate/refresh-devenv-lock.test.ts create mode 100644 tools/renovate/refresh-devenv-lock.ts diff --git a/tools/renovate/bot-config.json5 b/tools/renovate/bot-config.json5 index 4e951f74..2b6005f0 100644 --- a/tools/renovate/bot-config.json5 +++ b/tools/renovate/bot-config.json5 @@ -56,7 +56,7 @@ // addon, so the workflow sets RENOVATE_X_IGNORE_RE2=true to take the RegExp path // quietly.) // - // Five entries, all load-bearing: + // Six entries, all load-bearing: // 1. the toolchain-hash refresh, which re-prefetches the vendored-binary // sha256 pins a tools/toolchain/versions/*.nix bump invalidates; // 2. the catalog lockfile regeneration. Renovate's custom.regex manager exports @@ -85,7 +85,14 @@ // releases at or before its pinned rev, so without this a bump to a newer // go than the overlay provides evals a missing attr and reds CI // (RIG-3100). - // (1), (3), (4), and (5) are `bun