Skip to content

fix(ai-integrations): rename AIResource extensions package path - #4236

Merged
johnmcollier merged 1 commit into
redhat-developer:mainfrom
johnmcollier:fix-rename-ai-resource-extensions-package
Aug 10, 2026
Merged

fix(ai-integrations): rename AIResource extensions package path#4236
johnmcollier merged 1 commit into
redhat-developer:mainfrom
johnmcollier:fix-rename-ai-resource-extensions-package

Conversation

@johnmcollier

@johnmcollier johnmcollier commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Rename the accidentally doubled package/directory
    catalog-backend-module-catalog-backend-module-ai-resource-extensions
    to catalog-backend-module-ai-resource-extensions
  • Update package name to @red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-extensions
  • Update backend workspace dependency/import and yarn.lock
  • Add changeset for the rename

This was introduced by the original scaffold in #3606. The doubled name also produced an oversized GHCR image path during dynamic-plugin export.

Follow-up

redhat-developer/rhdh-plugin-export-overlays#3227 (draft) retargets overlays after this merges.

Test plan

  • yarn test plugins/catalog-backend-module-ai-resource-extensions (43 passed)
  • CI green for ai-integrations workspace

The catalog module was scaffolded with a doubled
`catalog-backend-module-` segment in both the directory and package
name. Rename to `catalog-backend-module-ai-resource-extensions` /
`@red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-extensions`.

Signed-off-by: John Collier <jcollier@redhat.com>
Assisted-by: Cursor Grok 4.5
Co-authored-by: Cursor <cursoragent@cursor.com>
@rhdh-gh-app

rhdh-gh-app Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
backend workspaces/ai-integrations/packages/backend none v0.0.0
@red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-extensions workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions minor v0.3.0

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 10, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:37 PM UTC · Completed 5:50 PM UTC

Commit: 396a07a · View workflow run →

@sonarqubecloud

Copy link
Copy Markdown

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Fix ai-integrations: rename AIResource extensions package to remove doubled path

🐞 Bug fix ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Rename AIResource extensions plugin package/path to remove duplicated scaffolded segment.
• Update backend workspace dependency and dynamic import to the new package name.
• Regenerate yarn.lock and add a changeset documenting the rename.
Diagram

graph TD
A["AI Integrations backend"] --> B["backend/src/index.ts"] --> C["AIResource extensions module"] --> D["module.ts"] --> E["Catalog extension point"]
D --> F["AIResourceExtensionsProcessor"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Publish a temporary shim package under the old name
  • ➕ Avoids immediate breakage for any external consumers/imports still using the old scoped package name
  • ➕ Provides a deprecation window with a clear migration path
  • ➖ Adds short-term maintenance overhead and release coordination (two packages for one module)
  • ➖ Does not fix the root cause unless consumers migrate
2. Keep the old package name and only rename the directory
  • ➕ Minimizes import changes across the repo
  • ➖ Does not address the original issue if downstream artifacts (e.g., image/export paths) derive from package metadata
  • ➖ Leaves a confusing mismatch between package name and directory
3. Use workspace/package aliasing internally (no publish rename)
  • ➕ Quick internal fix without changing published package identity
  • ➖ Only works for the monorepo workspace; external consumers still see the old name
  • ➖ Can obscure the real package identity and complicate tooling (changesets, API reports)

Recommendation: Proceed with the current rename since it fixes the scaffolded doubled segment and aligns directory + package identity (which also impacts dynamic-plugin export/image paths). If this package has already been consumed externally, consider adding a short-lived shim package under the old name (deprecated) that re-exports the new module to reduce downstream breakage.

Files changed (14) +17 / -10 · 6 not counted

Bug fix (1) +1 / -1
index.tsFix backend dynamic import to use renamed package name +1/-1

Fix backend dynamic import to use renamed package name

• Updates the dynamic import string to reference the corrected AIResource extensions module package. Keeps backend module registration intact after the rename.

workspaces/ai-integrations/packages/backend/src/index.ts

Refactor (6)
.eslintrc.jsCarry plugin lint config under the corrected plugin directory not counted

Carry plugin lint config under the corrected plugin directory

• Retains the plugin ESLint factory config in the renamed module directory. No behavioral lint-rule changes expected; primarily path normalization.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/.eslintrc.js

AIResourceExtensionsProcessor.test.tsRelocate processor tests under renamed module directory not counted

Relocate processor tests under renamed module directory

• Moves/retains the existing test suite under the corrected module path to follow the rename. No functional test logic changes indicated.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/src/AIResourceExtensionsProcessor.test.ts

AIResourceExtensionsProcessor.tsRelocate processor implementation under renamed module directory not counted

Relocate processor implementation under renamed module directory

• Keeps the AIResource extension validation processor under the corrected module path. No behavioral changes indicated by the diff; this aligns code location with package rename.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/src/AIResourceExtensionsProcessor.ts

collectOciErrors.tsRelocate OCI validation helper under renamed module directory not counted

Relocate OCI validation helper under renamed module directory

• Preserves the OCI source-location validation helper under the corrected module path. No functional changes indicated; part of the rename normalization.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/src/collectOciErrors.ts

index.tsRelocate module entrypoint under renamed module directory not counted

Relocate module entrypoint under renamed module directory

• Keeps the module entrypoint exports under the corrected module path so consumers import the renamed package consistently.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/src/index.ts

module.tsRelocate backend module registration under renamed module directory not counted

Relocate backend module registration under renamed module directory

• Retains the backend module wiring (createBackendModule + catalog processor registration) under the corrected module path to match the new package identity.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/src/module.ts

Documentation (4) +10 / -3
rename-ai-resource-extensions.mdAdd changeset documenting AIResource extensions package rename +7/-0

Add changeset documenting AIResource extensions package rename

• Introduces a changeset marking a minor release for the renamed package. Documents the migration from the accidentally doubled package/path name to the corrected name.

workspaces/ai-integrations/.changeset/rename-ai-resource-extensions.md

CHANGELOG.mdRename package header in changelog +1/-1

Rename package header in changelog

• Updates the changelog package header to the corrected scoped package name. Keeps existing version history intact.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/CHANGELOG.md

README.mdRename package header in README +1/-1

Rename package header in README

• Updates the README title to the corrected scoped package name. Functional documentation content remains the same.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/README.md

report.api.mdUpdate API report header for renamed package +1/-1

Update API report header for renamed package

• Updates the API Extractor report header to the corrected package name. No API surface changes implied beyond the package identity rename.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/report.api.md

Other (3) +6 / -6
package.jsonUpdate backend dependency to renamed AIResource extensions module +1/-1

Update backend dependency to renamed AIResource extensions module

• Replaces the workspace dependency on the old doubled package name with the corrected package name. Ensures the backend workspace resolves the renamed module.

workspaces/ai-integrations/packages/backend/package.json

package.jsonRename plugin package name and repository directory metadata +2/-2

Rename plugin package name and repository directory metadata

• Changes the published package name to remove the duplicated segment. Updates repository.directory to point at the corrected plugin path.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/package.json

yarn.lockRegenerate lockfile entries for renamed workspace package +3/-3

Regenerate lockfile entries for renamed workspace package

• Updates yarn.lock to replace the old workspace locator/resolution keys with the corrected package name and path. Ensures dependency graph consistency for the ai-integrations workspace.

workspaces/ai-integrations/yarn.lock

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.26%. Comparing base (af6eb5a) to head (396a07a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4236   +/-   ##
=======================================
  Coverage   55.26%   55.26%           
=======================================
  Files        2429     2429           
  Lines       96544    96544           
  Branches    26949    26947    -2     
=======================================
  Hits        53357    53357           
  Misses      41729    41729           
  Partials     1458     1458           
Flag Coverage Δ *Carryforward flag
adoption-insights 84.55% <ø> (ø) Carriedforward from af6eb5a
ai-integrations 69.76% <ø> (ø)
app-defaults 69.79% <ø> (ø) Carriedforward from af6eb5a
augment 46.67% <ø> (ø) Carriedforward from af6eb5a
boost 77.63% <ø> (ø) Carriedforward from af6eb5a
bulk-import 72.79% <ø> (ø) Carriedforward from af6eb5a
cost-management 13.55% <ø> (ø) Carriedforward from af6eb5a
dcm 67.21% <ø> (ø) Carriedforward from af6eb5a
extensions 56.59% <ø> (ø) Carriedforward from af6eb5a
global-floating-action-button 71.18% <ø> (ø) Carriedforward from af6eb5a
global-header 66.50% <ø> (ø) Carriedforward from af6eb5a
homepage 47.50% <ø> (ø) Carriedforward from af6eb5a
install-dynamic-plugins 59.95% <ø> (ø) Carriedforward from af6eb5a
intelligent-assistant 75.24% <ø> (ø) Carriedforward from af6eb5a
konflux 91.98% <ø> (ø) Carriedforward from af6eb5a
lightspeed 69.02% <ø> (ø) Carriedforward from af6eb5a
mcp-integrations 83.40% <ø> (ø) Carriedforward from af6eb5a
orchestrator 66.91% <ø> (ø) Carriedforward from af6eb5a
quickstart 63.74% <ø> (ø) Carriedforward from af6eb5a
sandbox 79.56% <ø> (ø) Carriedforward from af6eb5a
scorecard 86.23% <ø> (ø) Carriedforward from af6eb5a
theme 88.77% <ø> (ø) Carriedforward from af6eb5a
translations 5.12% <ø> (ø) Carriedforward from af6eb5a
x2a 12.40% <ø> (ø) Carriedforward from af6eb5a

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af6eb5a...396a07a. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Breaking rename without alias 🐞 Bug ☼ Reliability
Description
Renaming the published package means any downstream consumer still depending on the old doubled
package name will fail to install/build because that package name is no longer provided. If this
package has already been published/consumed, you should either ship a temporary compatibility
wrapper under the old name or clearly treat this as a breaking change with explicit migration
guidance/release messaging.
Code

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/package.json[2]

+  "name": "@red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-extensions",
Relevance

●●● Strong

Team usually requires explicit breaking-change messaging/major bumps for renames; compatibility
shims are often rejected.

PR-#3413
PR-#3417
PR-#3954

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The plugin package is now published under the new name, the backend imports the new name, and the
changeset documents the rename—so any consumer still using the old package name will no longer be
able to resolve it after this change.

workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/package.json[1-22]
workspaces/ai-integrations/packages/backend/src/index.ts[74-84]
workspaces/ai-integrations/.changeset/rename-ai-resource-extensions.md[1-7]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The package was renamed from the doubled name to `@red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-extensions`. Any external consumer still referencing the old package name will break unless you provide a transition path.

### Issue Context
- The backend workspace has already switched to importing the new package name.
- A changeset exists, but it does not provide compatibility for consumers that haven’t updated yet.

### Fix Focus Areas
- workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/package.json[1-22]
- workspaces/ai-integrations/packages/backend/src/index.ts[74-84]
- workspaces/ai-integrations/.changeset/rename-ai-resource-extensions.md[1-7]

### What to implement
Choose one (or both):
1) **Compatibility wrapper (recommended if there are known consumers):**
  - Add a new workspace package using the **old** package name (e.g., under `workspaces/ai-integrations/plugins/`), whose `src/index.ts` re-exports the new module’s default export and public types.
  - Make it depend on the new package via `dependencies`.
  - Keep it for at least one release cycle, then remove.

2) **Explicit breaking-change communication:**
  - Ensure the release notes/changelog generated from changesets clearly call out that the **package name changed** and that consumers must update their dependency/import strings.
  - If your repo’s policy treats renames as breaking, adjust the changeset bump type accordingly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context used
✅ Compliance rules (platform): 14 rules
✅ Cross-repo context
  Explored: repo: redhat-developer/rhdh (sha: 820e6260)
  Explored: repo: redhat-developer/rhdh-operator (sha: a425373c)
  Explored: repo: redhat-developer/rhdh-local (sha: a1776caa)
  Not relevant to this PR: redhat-developer/rhdh-chart

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation Bug fix labels Aug 10, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Low

  • [breaking-package-rename] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/package.json:2 — The npm package name is changing from the accidentally doubled catalog-backend-module-catalog-backend-module-ai-resource-extensions to the corrected catalog-backend-module-ai-resource-extensions. Investigation confirms the package has never been published to npm under the old name (nor has any sibling package in the ai-integrations workspace), so this rename carries no breaking-change risk for external consumers. The rename is complete and consistent across all internal references (backend dependency, import path, yarn.lock, directory name, CHANGELOG, README, and API report).

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Aug 10, 2026

@Jdubrick Jdubrick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@johnmcollier
johnmcollier merged commit 238650c into redhat-developer:main Aug 10, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug fix documentation Improvements or additions to documentation lgtm ready-for-merge All reviewers approved — ready to merge workspace/ai-integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants