Skip to content

ci: track the Bun catalog in Renovate and refresh lockfiles on Renovate branches - #442

Merged
omercnet merged 1 commit into
mainfrom
ci/renovate-lockfiles
Oct 31, 2026
Merged

omercnet merged 1 commit into
mainfrom
ci/renovate-lockfiles

Conversation

@omercnet

@omercnet omercnet commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Fixes #362

Problem

  1. Renovate does not see the root catalog in package.json. Neither the bun nor the npm manager reads Bun catalogs (bun catalog support is still an open Renovate PR, feat(bun): add catalog extraction and update support renovatebot/renovate#42909), so the Dependency Dashboard lists only release-please and bun for the root package.json. The @getpaseo/* group rule never matched anything.
  2. Renovate PRs leave bun.lock and the npm-shrinkwrap.json files stale. The npm manager fails on catalog: specs (EUNSUPPORTEDPROTOCOL), and nothing regenerates bun.lock. CI then fails at bun install --frozen-lockfile, as on fix(deps): update dependency agent-browser to v0.40.0 #441:
    error: lockfile had changes, but lockfile is frozen
    note: dependencies in package.json changed since bun.lock was saved: agent-browser changed from 0.39.4 to 0.40.0 in paseo-shared-browser
    
    and node ../scripts/shrinkwrap.mjs --check . reports agent-browser: package.json 0.40.0, npm-shrinkwrap.json 0.39.4.

Change

  • renovate.json: a regex custom manager for the root catalog block (npm datasource and versioning). React and React Native stay disabled there because the Paseo app supplies them and the catalog pins its versions. gitIgnoredAuthors lists github-actions[bot] so Renovate keeps rebasing branches that carry the lockfile commit.
  • New .github/workflows/renovate-lockfiles.yml: on each push to renovate/**, runs bun install --ignore-scripts and regenerates every drifted shrinkwrap with the existing scripts/shrinkwrap.mjs. If anything changed it commits chore(deps): refresh lockfiles and pushes with GITHUB_TOKEN. That push cannot retrigger the workflow (no loop) and does not start CI either, so the job dispatches CI on the branch with gh workflow run, which GitHub allows for GITHUB_TOKEN. The resulting CI sentinel check lands on the new head commit.
  • ci.yml: accepts workflow_dispatch. For dispatched runs, affected-plugin detection diffs against the merge base with origin/main, same as pull requests.

No new secrets or app permissions are needed. Renovate's hosted app does not allow postUpgradeTasks, so the shared omercnet/renovate-config preset needs no change.

Out of scope

  • Renovate will still post its "Artifact update problem" comment for the shrinkwrap plugins. The workflow commit makes the PR mergeable regardless.

Verification

Check Before After
bun install --frozen-lockfile on renovate/agent-browser-0.x fails: lockfile had changes passes after the workflow's regenerate step
node ../scripts/shrinkwrap.mjs --check . in paseo-shared-browser drift on agent-browser clean; diff limited to bun.lock and paseo-shared-browser/npm-shrinkwrap.json
npm run check, npm run typecheck in paseo-shared-browser on that branch n/a pass
renovate-config-validator (Renovate 44.198.3) Config validated successfully
renovate --platform=local --dry-run=lookup with the custom manager catalog not detected all 18 catalog entries extracted; react and react-native skipReason: disabled; e.g. zod 4.4.3 -> 4.6.7, pino 10.3.1 -> 10.4.0
actionlint, zizmor 1.30.1 no findings

The live path (Renovate push, lockfile commit, dispatched CI) can only run after this merges; #441 is the first case.

Astra review: see the PR comments.

Summary by CodeRabbit

  • Chores
    • CI workflows can now be started manually, and change detection uses a fallback when base revision information is unavailable.
    • Dependency update branches now automatically refresh lockfiles and rerun CI when those files change. Renovate configuration also adjusts which updates are considered and filters commits from a specified automation account. These changes affect development workflows; no direct changes to the product experience are described.

Copilot AI balanced review requested due to automatic review settings October 31, 2026 07:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5bff58ab-bd0e-4237-9b06-3cbb53d45802
Commits

Reviewing files that changed from the base of the PR and between ec3e271 and 388ffdf.

Files selected for processing: 3
  • .github/workflows/ci.yml
  • .github/workflows/renovate-lockfiles.yml
  • renovate.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Renovate now detects dependencies in the root Bun catalog. A workflow refreshes lockfiles on Renovate branches and dispatches CI when those lockfiles change. CI supports manual and workflow-triggered runs with updated change detection.

Changes: Renovate dependency updates

Layer / File(s) Summary
Catalog dependency detection
renovate.json
Renovate reads dependency names and versions from the root Bun catalog. It ignores the specified GitHub Actions bot author and disables updates for react and react-native from the regex manager.
Renovate branch lockfile refresh
.github/workflows/renovate-lockfiles.yml
On Renovate branch pushes, the workflow regenerates bun.lock and tracked npm-shrinkwrap.json files. If they change, it commits and pushes them, then dispatches CI. If they do not change, it exits without committing or dispatching.
CI dispatch and change detection
.github/workflows/ci.yml
CI supports manual dispatch. Its base SHA falls back to origin/main when pull-request and push base SHAs are unavailable. It uses direct diff mode only for push events.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant Renovate
  participant LockfileWorkflow as "renovate-lockfiles.yml"
  participant Repository
  participant CIWorkflow as "ci.yml"
  Renovate->>LockfileWorkflow: Push to renovate/** branch
  LockfileWorkflow->>LockfileWorkflow: Regenerate lockfiles
  alt Lockfiles changed
    LockfileWorkflow->>Repository: Commit and push lockfile changes
    LockfileWorkflow->>CIWorkflow: Dispatch CI for the branch
  else No lockfile changes
    LockfileWorkflow-->>LockfileWorkflow: Exit without commit or dispatch
  end
Loading

Possibly related issues

  • omercnet/paseo-plugins#1 — The changes add Renovate detection for root Bun catalog entries and automate lockfile refreshes.

Possibly related PRs

Merge Risk: Minimal · up to 388ff

Renovate dependency PRs retain a CI signal, including after automated lockfile updates. No identified issue prevents merging after normal checks.

Security architecture risk: Low · up to 388ff

The new automation has repository write access, but dependency installation scripts are disabled and CI remains read-only. A failure after publishing lockfiles can leave the updated branch without its intended CI run, and rerunning the original job is not a reliable recovery path. No validation bypass was established; actual merge protection could not be verified.

Retained concerns

  • Low · reliability · inferred: Lockfile publication and CI scheduling are separate, non-resumable operations. Cancellation or dispatch failure after a successful push can leave the new dependency head without its intended validation. Rerunning the original event does not reliably reconcile that head. Enforced required checks would block the update rather than permit an unvalidated merge; actual enforcement is unavailable.
Security review details

Security Blast Radius

  • inferred — The new authority reaches repository contents and Actions operations in the triggering repository. The renovate/** filter limits invocation, not token permissions to that branch. The workflow does not directly expose this write job through pull-request events.

Security Findings and Attack Paths

  • inferred — Registry-controlled dependency content reaches lockfile resolution, but both Bun installation and npm shrinkwrap generation suppress lifecycle scripts. The inspected generator imports Node built-ins rather than installed dependency modules. These controls counter a dependency-script-to-write-authority attack path in the refresh job; they do not establish safety of uninspected external actions or package-manager behavior.

Trust Boundaries and Controls

  • observed — The push token is explicitly supplied to the publishing step. Branch and repository values pass through environment variables and quoted shell arguments. Checkout credential persistence is disabled, and shrinkwrap generation uses a temporary manifest, script-disabled npm resolution, and finally-block cleanup.

Resilience and Maintainability Implications

  • inferred — Ordinary pull-request CI counters a blanket concern about clean refresh runs skipping validation. The distinct failure window is after a token-authored push and before dispatch. A same-event rerun normally checks out the original event SHA and can encounter a non-fast-forward push rather than repair dispatch. The sentinel documents fail-closed merge intent, but external enforcement was not available.

Hardening Proposals

  • proposed — Make the publication-to-validation handoff resumable: reconcile the current published commit and its CI state on recovery, including when regeneration produces no new diff, while preserving required validation for the exact branch head.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main changes: Renovate tracking for the Bun catalog and lockfile refreshes on Renovate branches.
Linked Issues check Passed Issue #362 is directly linked and has two coding objectives. renovate.json adds a recursive regex manager for the root package.json catalog, uses the npm datasource and versioning, and preserves…
Out of Scope Changes check Passed The reviewed changes stay within issue #362. The Renovate configuration implements catalog tracking. The lockfile workflow implements regeneration and CI dispatch. The ci.yml changes support correct…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

Issue #362 is directly linked and has two coding objectives. renovate.json adds a recursive regex manager for the root package.json catalog, uses the npm datasource and versioning, and preserves the required React and React Native exclusions. .github/workflows/renovate-lockfiles.yml runs on renovate/** pushes, runs bun install --ignore-scripts, regenerates every tracked npm-shrinkwrap.json that fails the existing check, commits and pushes changed lockfiles, and dispatches ci.yml. ci.yml accepts the dispatch and uses the merge base for affected-plugin detection. These changes cover catalog detection, lockfile regeneration, and the CI signal required by #362.

Full details: Out of Scope Changes check

Explanation

The reviewed changes stay within issue #362. The Renovate configuration implements catalog tracking. The lockfile workflow implements regeneration and CI dispatch. The ci.yml changes support correct dispatched-run change detection. No unrelated implementation is shown. The PR correctly leaves Renovate's Artifact update problem comments out of scope.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renovate: Bun catalog dependencies are not tracked, and its PRs leave bun.lock / npm-shrinkwrap.json stale

2 participants