Skip to content

chore(renovate): give Renovate credentials for npm.pkg.github.com + move preset to default.json - #45

Merged
yakimoto merged 1 commit into
mainfrom
chore/renovate-packages-auth
Sep 8, 2026
Merged

chore(renovate): give Renovate credentials for npm.pkg.github.com + move preset to default.json#45
yakimoto merged 1 commit into
mainfrom
chore/renovate-packages-auth

Conversation

@yakimoto

@yakimoto yakimoto commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

User description

Why

Renovate has never bumped a single @wave-av/* package in any repo. Two walls were stacked; this PR removes the second (and harder) one.

Wall 1 — no repo-level config. Fixed already: wave-search-edge, wave-voice-edge and wave-transcribe-edge now carry {"extends": ["local>wave-av/.github"]} and their dashboards appeared within a minute. Measured today: 6 of 170 active repos have a repo-level renovate.json.

Wall 2 — no credentials. The org preset sets "npmrc": "@wave-av:registry=https://npm.pkg.github.com" and supplies no token. GitHub Packages requires auth even for a read, so every lookup fails:

Failed to look up npm package @wave-av/spoke-chassis: no-result

wave-foundation — the assumed positive control — fails identically for @wave-av/messaging and @wave-av/observability. So no internal package has ever resolved anywhere, including the two "configured" repos. A dashboard proves the config was read, not that lookups work.

What changed

1. hostRules for GitHub Packages. The token is referenced, never committed:

{ "matchHost": "https://npm.pkg.github.com/", "hostType": "npm",
  "token": "{{ secrets.WAVE_PACKAGES_READ_TOKEN }}" }

The obvious alternative — a committed encrypted.token blob — is dead for this fleet. From renovatebot/renovate@main, docs/usage/mend-hosted/credentials.md:

"The Mend Renovate cloud apps no longer read encrypted secrets from Renovate config files in your repositories. You must migrate any secrets you currently keep in a Renovate config file, and upload them as secrets to org or repo settings pages on developer.mend.io."

{{ secrets.* }} templating is the supported replacement, and the docs confirm it resolves inside a preset, not just a repo config. Org-scoped secrets are "inherited by all repositories in your organization" — so one secret covers all 42+ spokes with no per-repo work.

2. The preset moved to default.json. Measured in lib/config/presets/util.ts: Renovate fetches default.json first and only falls back to renovate.json, logging exactly the warning the fleet has been seeing — "Fallback to renovate.json file as a preset is deprecated, please use a default.json file instead." Because default.json wins unconditionally, pointing renovate.json at local>wave-av/.github is safe and cannot self-extend.

3. matchPackagePatternsmatchPackageNames. The old key is gone from current Renovate options. This is future-proofing, not a bug fix — the validator was observed auto-migrating it to matchPackageNames: ["/^@wave-av//"] and passing, so the rule does still apply today.

Validation

renovate-config-validator on both files: INFO: Config validated successfully. Control run against current origin/main also passes (via auto-migration), confirming the validator was actually exercising these files.

The one operator step

This PR is inert until an org admin does exactly one thing:

At developer.mend.io → wave-av org → Settings → Credentials, add an Organization secret named WAVE_PACKAGES_READ_TOKEN whose value is a GitHub PAT with read:packages.

How this gets verified

Not by a dashboard existing — that is the mistake that made wave-foundation a broken control. The receipt is a dashboard whose lookup succeeds: after the secret is set, the no-result line for @wave-av/spoke-chassis must be gone from the dependency dashboard of a spoke that already has config (e.g. wave-search-edge), and a real bump PR for @wave-av/spoke-chassis must be raised. Only then does this roll to the remaining spokes.

Blast radius

Affects the 6 repos that currently extend this preset. Rollout to the other ~39 is deliberately not in this PR — scaling config before auth is fixed just produces dashboards that all fail the same lookup.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Medium Risk
Org-wide Renovate behavior and private registry auth change; misconfigured or missing org secret would still block @wave-av/* bumps, but no credentials are committed.

Overview
Renovate’s org-wide settings move from renovate.json into a new default.json preset, which is what Mend/Renovate resolves first and avoids the deprecated renovate.json-as-preset fallback. Repo renovate.json is reduced to only "extends": ["local>wave-av/.github"].

The preset now adds hostRules so npm lookups against https://npm.pkg.github.com/ use {{ secrets.WAVE_PACKAGES_READ_TOKEN }} (org secret in Mend, not committed), fixing no-result failures when resolving @wave-av/* packages. The internal-package rule switches from matchPackagePatterns to matchPackageNames: @wave-av/**, with the same chassis-automerge behavior, schedule, and timezone kept in the preset.

Operator dependency: nothing takes effect until WAVE_PACKAGES_READ_TOKEN is set on the wave-av org in developer.mend.io.

Reviewed by Cursor Bugbot for commit aee9df7. Bugbot is set up for automated code reviews on this repo. Configure here.

Review in cubic


CodeAnt-AI Description

Enable Renovate to discover and update private WAVE npm packages

What Changed

  • Renovate can authenticate when reading packages from GitHub Packages, allowing @wave-av/* dependency updates to resolve instead of returning no results
  • Shared Renovate settings now load from the standard organization preset file, while repositories keep a small reference to that preset
  • WAVE package updates continue to use the existing bump, scheduling, labeling, and automerge behavior

Impact

✅ Private package lookups succeed
✅ WAVE package updates can be detected
✅ Consistent Renovate settings across repositories

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Renovate has never resolved any @wave-av/* package in any repo. The org
preset sets an npmrc pointing @wave-av at npm.pkg.github.com but supplies
no credentials, and GitHub Packages requires auth even to READ - so every
lookup returns `no-result`, including in wave-foundation.

Two fixes, one file:

1. hostRules for https://npm.pkg.github.com/ with the token supplied as
   {{ secrets.WAVE_PACKAGES_READ_TOKEN }}. No secret is committed - the
   Mend-hosted app resolves that reference from an ORG-scoped secret set
   in Credentials at developer.mend.io. Mend no longer reads `encrypted`
   blobs from repo config, so this templating is the supported route.

2. The preset lives in default.json, not renovate.json. Renovate fetches
   default.json first and only falls back to renovate.json with the
   deprecation warning the fleet has been seeing. renovate.json is now
   just the .github repo own config extending the shared preset.

Also replaces the removed matchPackagePatterns key with matchPackageNames.
Renovate still auto-migrates the old key, so this is future-proofing, not
a bug fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codeant-ai

codeant-ai Bot commented Sep 8, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR aee9df7 Sep 08, 2026 · 00:18 00:19

@sourcery-ai

sourcery-ai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR enables Renovate to resolve internal @wave-av packages by adding a token-backed GitHub Packages host rule, moves the shared preset to default.json to avoid deprecated fallback behavior, updates package matching to the current option name, and leaves renovate.json as a lightweight preset reference.

File-Level Changes

Change Details Files
Adds authenticated access to GitHub Packages through an organization secret referenced by Renovate preset templating.
  • Adds an npm host rule for npm.pkg.github.com with the WAVE_PACKAGES_READ_TOKEN secret.
  • Uses an org-scoped secret so credentials are not committed and can cover all consuming repositories.
default.json
Moves the shared Renovate configuration into the preferred default preset file and updates package matching syntax.
  • Creates default.json as the preset entry point, avoiding deprecated renovate.json fallback behavior.
  • Preserves the internal npm registry configuration and Renovate rules in the moved preset.
  • Replaces deprecated matchPackagePatterns with matchPackageNames.
default.json
renovate.json
Simplifies renovate.json to reference the shared organization preset.
  • Retains the local>wave-av/.github extension while removing configuration previously embedded in the repository-level file.
renovate.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your workspace is out of credits. Ask your workspace admin to add credits to resume reviews. Manage billing

@codeant-ai

codeant-ai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@cursor

cursor Bot commented Sep 8, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_cda46ecd-fd12-4577-93ea-707c24ca1be0)

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Sep 8, 2026

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@macroscopeapp

macroscopeapp Bot commented Sep 8, 2026

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR changes the org-wide Renovate preset to use an organization-scoped credential for GitHub Packages, enabling private dependency updates that may flow into deploy-on-merge automation. The authentication scope and broad automation impact warrant human review.

Not approved because:

  • Credit balance exhausted. Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 1cd47c70-1cc7-45cf-8e28-61b33c27e18f

📥 Commits

Reviewing files that changed from the base of the PR and between f62953a and aee9df7.

📒 Files selected for processing (2)
  • default.json
  • renovate.json

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: semgrep-cloud-platform/scan
🧰 Additional context used
🔍 Remote MCP DeepWiki

Relevant review context

  • local>wave-av/.github resolves to default.json when no filename is specified; using renovate.json as the default preset is deprecated.
  • Renovate accepts matchHost: "https://npm.pkg.github.com/"; Mend secrets should be stored in the Mend UI and referenced as {{ secrets.WAVE_PACKAGES_READ_TOKEN }}. Organization-scoped secrets apply to repositories in that organization.
  • Renovate automatically creates GitHub Packages authentication rules, but a custom rule can override them when sufficiently specific.
  • Schedules control when Renovate may create branches/PRs, not when Renovate runs. Timezones must be valid IANA names, and package rules are merged in order, with later rules able to override earlier ones.
  • The target repository was not indexed by DeepWiki, so repository-specific conventions and validation could not be independently confirmed.
🔇 Additional comments (2)
default.json (1)

1-37: LGTM!

renovate.json (1)

4-5: LGTM!


📝 Summary

Summary by CodeRabbit

  • Chores
    • Standardized automated dependency update settings through a shared configuration.
    • Enabled GitHub Actions digest pinning and authentication for internal packages.
    • Configured automatic updates for internal packages with chassis-specific labeling.
    • Scheduled dependency maintenance during overnight hours in the Eastern Time zone.

Walkthrough

The shared Renovate preset now contains recommended settings, package authentication, internal package rules, labels, and scheduling. The repository configuration now extends only this shared preset.

Changes

Renovate configuration

Layer / File(s) Summary
Preset definition and repository wiring
default.json, renovate.json
default.json defines Renovate recommendations, GitHub Packages authentication, @wave-av/** update rules, labeling, and an overnight Eastern Time schedule. renovate.json extends only local>wave-av/.github.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to aee9d

This centralizes Renovate settings and enables authenticated private package lookups without exposing credentials. The configuration is validated and no merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two primary changes: adding Renovate credentials for GitHub Packages and moving the shared preset to default.json.
Description check ✅ Passed The description is detailed and directly addresses the PR objectives. It explains the authentication change, preset move, validation, operator requirement, and rollout scope. It does not use the exact…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/renovate-packages-auth
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/renovate-packages-auth

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

Note

Automatic reviews are paused because your team has used its included automatic processing for this billing period (headroom scales with your seat count). You can still comment "Gitar review" to run one anytime, and automatic reviews resume on their own by October 1. Add seats for more headroom.
Learn more

Code Review ✅ Approved

Moves Renovate org-wide settings to default.json (the standard preset file) and adds hostRules for GitHub Packages authentication using {{ secrets.WAVE_PACKAGES_READ_TOKEN }}, enabling @wave-av/* package lookups to succeed. The internal-package rule switches from matchPackagePatterns to matchPackageNames with existing bump and automerge behavior preserved. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 2 files

Confidence score: 4/5

  • In default.json, the duplicate @wave-av/** package rule overlaps the inherited rule in org-inherited-config.json, which can make matching package behavior— including the inherited automerge: true setting—unclear; remove the duplicate or reconcile the rules explicitly.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="default.json">

<violation number="1" location="default.json:21">
P2: The `@wave-av/**` packageRule in default.json duplicates the pre-existing @wave-av rule in org-inherited-config.json (same package scope, both `minimumReleaseAge: "0 days"`). The org rule sets `automerge: true` for minor/patch under `platformAutomerge: true`, while the preset relies only on the `chassis-automerge` label for the reaper. Both now govern the same packages with different automerge semantics. Consolidate the @wave-av handling into one place (e.g. only the org-inherited config or only the preset) so the ~45 spokes that inherit both don't get competing/order-dependent behavior, and keep the `minimumReleaseAge: "0 days"` in a single rule.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant Repo as Spoke Repo (e.g., wave-search-edge)
    participant Renovate as Renovate App (Mend-hosted)
    participant Preset as Org Preset (.github/default.json)
    participant SecretStore as Mend Org Credentials
    participant GHCR as GitHub Packages (npm.pkg.github.com)
    participant Dashboard as Dependency Dashboard

    Note over Repo,Dashboard: Renovate runtime flow for private @wave-av/* lookup

    Renovate->>Repo: Read repo renovate.json
    Repo-->>Renovate: {"extends": ["local>wave-av/.github"]}
    
    Renovate->>Preset: Resolve local>wave-av/.github preset
    alt Preset resolution
        Preset-->>Renovate: Load default.json (preferred)
    else default.json missing
        Preset-->>Renovate: Fallback to renovate.json (deprecated)
    end
    
    Note over Renovate: Preset config applied:<br/>npmrc registry mapping + hostRules
    
    Renovate->>SecretStore: Resolve {{ secrets.WAVE_PACKAGES_READ_TOKEN }}
    SecretStore-->>Renovate: Org-scoped PAT token (read:packages)
    
    Renovate->>GHCR: Lookup @wave-av/spoke-chassis (auth with token)
    alt Lookup succeeds
        GHCR-->>Renovate: Package metadata + versions
        Renovate->>Dashboard: Update dashboard (no-result line removed)
        opt Bump available
            Renovate->>Repo: Create bump PR (chore: spoke-chassis)
            Repo-->>Renovate: Labeled chassis-automerge
        end
    else 401/403 Unauthorized
        GHCR-->>Renovate: Auth error
        Renovate->>Dashboard: Log "no-result" failure
        Note over Renovate,Dashboard: Required operator action:<br/>Set WAVE_PACKAGES_READ_TOKEN in Mend org settings
    end
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread default.json
"packageRules": [
{
"description": "WAVE internal packages (the spoke-chassis): keep every spoke on the LATEST published version. Labeled chassis-automerge so the renovate-reaper (wave-foundation) auto-approves + squash-merges these after its diff/lockfile/deploy gates - which then triggers each spoke's deploy-on-merge.",
"matchPackageNames": [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: The @wave-av/** packageRule in default.json duplicates the pre-existing @wave-av rule in org-inherited-config.json (same package scope, both minimumReleaseAge: "0 days"). The org rule sets automerge: true for minor/patch under platformAutomerge: true, while the preset relies only on the chassis-automerge label for the reaper. Both now govern the same packages with different automerge semantics. Consolidate the @wave-av handling into one place (e.g. only the org-inherited config or only the preset) so the ~45 spokes that inherit both don't get competing/order-dependent behavior, and keep the minimumReleaseAge: "0 days" in a single rule.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At default.json, line 21:

<comment>The `@wave-av/**` packageRule in default.json duplicates the pre-existing @wave-av rule in org-inherited-config.json (same package scope, both `minimumReleaseAge: "0 days"`). The org rule sets `automerge: true` for minor/patch under `platformAutomerge: true`, while the preset relies only on the `chassis-automerge` label for the reaper. Both now govern the same packages with different automerge semantics. Consolidate the @wave-av handling into one place (e.g. only the org-inherited config or only the preset) so the ~45 spokes that inherit both don't get competing/order-dependent behavior, and keep the `minimumReleaseAge: "0 days"` in a single rule.</comment>

<file context>
@@ -0,0 +1,37 @@
+  "packageRules": [
+    {
+      "description": "WAVE internal packages (the spoke-chassis): keep every spoke on the LATEST published version. Labeled chassis-automerge so the renovate-reaper (wave-foundation) auto-approves + squash-merges these after its diff/lockfile/deploy gates - which then triggers each spoke's deploy-on-merge.",
+      "matchPackageNames": [
+        "@wave-av/**"
+      ],
</file context>

@yakimoto
yakimoto merged commit 9fbc375 into main Sep 8, 2026
19 checks passed
@yakimoto
yakimoto deleted the chore/renovate-packages-auth branch September 8, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant