Skip to content

feat(RHIDP-18762): reconcile SDK exports and category vocabulary for 2.2 baseline - #5524

Open
fullsend-ai-coder[bot] wants to merge 2 commits into
mainfrom
agent/RHIDP-18762-reconcile-sdk-exports
Open

fullsend-ai-coder[bot] wants to merge 2 commits into
mainfrom
agent/RHIDP-18762-reconcile-sdk-exports

Conversation

@fullsend-ai-coder

@fullsend-ai-coder fullsend-ai-coder Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reconcile the AI Catalog entity-provider SDK exports, validation tests, and documentation to match the agreed 2.2 minimum baseline per RHIDP-18762.

Key changes:

  • Category vocabulary: Remove skill-bundle from the Zod schema (AIAssetCategorySchema), AIAssetCategory type union, AI_ASSET_CATEGORIES array, validation error messages, README category list, and report.api.md. The active vocabulary is now the five minimum categories (agent, skill, mcp-server, ai-model, model-server) plus retained rule compatibility.

  • Entity fixtures: Update test makeEntity() helpers and entity refs across all SDK test files to use kind: AiResource with spec.type: agent instead of the historical Component / Resource kinds. Replace component:default/... entity refs with airesource:default/....

  • Provider examples: Replace obsolete Kagenti references in JSDoc examples and test source annotations (kagenti/default → ogx/default) with current OGX provider examples.

  • Delta sync documentation: Clarify DeltaSyncManager and clearCursor() JSDoc to state that consuming providers own durable persistence, refresh orchestration, and cursor recovery. Cursor clearing only deletes stored state — it does not initiate automatic refresh.

  • New test coverage: Add AI_ASSET_CATEGORIES vocabulary tests confirming exactly 6 categories (no skill-bundle) and Zod schema rejection of skill-bundle.

  • Changeset: Major bump for removal of the published skill-bundle category. The changeset and SDK README include migration guidance for SDK 1.x consumers.

✔️ Checklist

  • A changeset describing the change and affected packages.
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes) — N/A, no UI changes

Related to https://redhat.atlassian.net/browse/RHIDP-18762

Post-script verification

  • Branch is not main/master (agent/RHIDP-18762-reconcile-sdk-exports)
  • Secret scan passed (gitleaks — c1b845103e77910aa00fd8dc8b96bfe4e6ad9c27..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

Review follow-up

  • Confirmed that published SDK 1.2.1 includes skill-bundle in its public declarations; removal is semver-major.
  • Reconciled stale vocabulary status in the companion specification and SDK OpenSpec, and aligned the agent deletion example with airesource refs.
  • Corrected CursorStore.delete JSDoc and the cursor-clearing test name. The regression now asserts that clearing submits no additional mutation or refresh. Existing delete-only runtime behavior is unchanged.
  • Separated schema rejection coverage into its own AIAssetCategorySchema test block.

Validation passed: SDK 51/51 tests, OGX 57/57 tests, workspace tsc:full, SDK lint, API-report CI validation, OpenSpec 15/15 items, formatting, journal, whitespace, and commit hooks. The OGX integration suite required permission for its local HTTP listener.

A disposable release-plan check against the actual changeset schedules SDK 2.0.0 and dependent OGX 1.2.2 only. No simulated package-version edits or publication are included.

Implementation handoff: the curated baseline is merged PR #5474, revision 0f6a21bf517278f5d3b177389f6c2bb21e86cb9f. Relevant references are workspaces/boost/openspec/changes/ai-catalog-entity-model/tasks.md tasks 1.1, 2.5–2.6, 2.13, 9.1, and 10.3. Historical task status does not establish provider activation or completion of deferred SDK design.

Follow-up commit 80db943018 is local, unsigned, and awaits the maintainer's signing and push.

…2.2 baseline

Remove skill-bundle from the Zod schema, AIAssetCategory type union,
AI_ASSET_CATEGORIES array, validation diagnostics, test fixtures,
README, and API report. The active category vocabulary is now the five
minimum categories (agent, skill, mcp-server, ai-model, model-server)
plus retained rule compatibility.

Replace obsolete Kagenti provider examples in JSDoc and test fixtures
with current OGX references. Update entity fixtures throughout the
SDK test suite to use kind: AiResource with spec.type: agent instead
of the historical Component / ai-agent mapping.

Clarify DeltaSyncManager JSDoc: consuming providers own durable
persistence, first/full refresh, and source-cursor recovery. Cursor
clearing only deletes stored state — it does not initiate automatic
refresh.

Add new test coverage confirming the exact category vocabulary
(6 categories, no skill-bundle) and Zod schema rejection of
skill-bundle.

PR #5474 merged revision: c1b8451 (RHIDP-18761 OpenSpec
reconciliation).

Closes RHIDP-18762

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Nov 11, 2026
@fullsend-ai-coder
fullsend-ai-coder Bot requested review from a team and jordigilh as code owners November 11, 2026 18:31
@rhdh-gh-app

rhdh-gh-app Bot commented Nov 11, 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
@red-hat-developer-hub/backstage-plugin-ai-catalog-entity-provider-sdk workspaces/boost/plugins/ai-catalog-entity-provider-sdk minor v1.2.1

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Align AI Catalog provider SDK with the 2.2 category baseline

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Restrict SDK categories to the 2.2 baseline, retaining rule and rejecting skill-bundle.
• Align tests and examples with AiResource entities and OGX provider references.
• Clarify provider-owned cursor recovery and refresh responsibilities; record the public API change
 in a changeset.
Diagram

graph TD
  P["Consuming Provider"] --> E["AiResource Entity"] --> V["Entity Validator"] --> S["Category Schema"] --> C["Six Categories"]
  P --> D["Delta Sync Manager"] --> B["Backstage Catalog"]
  D --> K[("Cursor Store")]
Loading
High-Level Assessment

Use the existing category schema as the source for runtime validation and the exported category array, while keeping the public string union independent of Zod. Retaining skill-bundle for compatibility would conflict with the agreed baseline; no live provider adoption is changed here.

Files changed (11) +98 / -52

Enhancement (1) +0 / -2
annotations.tsRemove skill-bundle from SDK categories +0/-2

Remove skill-bundle from SDK categories

• Removes 'skill-bundle' from the Zod enum and public string union. The exported category array, derived from the schema, consequently contains six values.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/annotations.ts

Tests (5) +65 / -32
AIAssetValidator.test.tsAlign validator tests with active entities and categories +13/-11

Align validator tests with active entities and categories

• Uses AiResource fixtures and OGX source annotations. Removes 'skill-bundle' from accepted-category expectations and validation diagnostics.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/AIAssetValidator.test.ts

DeltaSyncManager.test.tsUse AiResource entities in delta-sync tests +12/-7

Use AiResource entities in delta-sync tests

• Changes entity fixtures to AiResource agents and updates removed-entity references and assertions accordingly.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/DeltaSyncManager.test.ts

annotations.test.tsGuard the six-category vocabulary +24/-0

Guard the six-category vocabulary

• Adds tests for the exact category count and membership, and confirms the schema rejects 'skill-bundle'.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/annotations.test.ts

normalizeAIAssetVersion.test.tsAlign version-warning entity references +2/-2

Align version-warning entity references

• Updates the warning-context fixture and expected message to use an AiResource entity reference.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/normalizeAIAssetVersion.test.ts

validateAIAssetEntity.test.tsAlign annotation validation tests with the baseline +14/-12

Align annotation validation tests with the baseline

• Uses AiResource agent fixtures and OGX annotations. Updates accepted categories and expected error messages to exclude 'skill-bundle'.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/validateAIAssetEntity.test.ts

Documentation (4) +28 / -18
README.mdDocument the 2.2 SDK baseline +16/-10

Document the 2.2 SDK baseline

• Lists the six active categories, identifies the AiResource agent contract, and clarifies provider-owned refresh and cursor responsibilities. Updates an entity-reference example.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/README.md

report.api.mdReflect the narrowed public category union +0/-1

Reflect the narrowed public category union

• Removes 'skill-bundle' from the documented 'AIAssetCategory' API.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/report.api.md

AIAssetEntityProvider.tsRefresh provider identity examples +2/-2

Refresh provider identity examples

• Replaces obsolete Kagenti names with OGX examples in interface documentation.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/AIAssetEntityProvider.ts

DeltaSyncManager.tsClarify delta-sync ownership and cursor clearing +10/-5

Clarify delta-sync ownership and cursor clearing

• Documents that consuming providers own durable persistence, refresh orchestration, and source-cursor recovery. Clarifies that 'clearCursor()' deletes stored state without initiating a refresh.

workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/DeltaSyncManager.ts

Other (1) +5 / -0
reconcile-sdk-exports.mdRecord the SDK vocabulary change +5/-0

Record the SDK vocabulary change

• Adds a minor changeset for the provider SDK and summarizes the category, fixture, example, and documentation reconciliation.

workspaces/boost/.changeset/reconcile-sdk-exports.md

@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Qodo Logo

@rhdh-qodo-merge

Copy link
Copy Markdown

Important

The /generate_labels command by Qodo was deprecated on the 1st of October 2026 and is no longer available. We recommend switching to the latest Qodo review capabilities. Learn more

@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.69%. Comparing base (c1b8451) to head (17e6987).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5524   +/-   ##
=======================================
  Coverage   65.69%   65.69%           
=======================================
  Files        2779     2779           
  Lines      111684   111684           
  Branches    31385    31385           
=======================================
  Hits        73366    73366           
  Misses      37769    37769           
  Partials      549      549           
Flag Coverage Δ *Carryforward flag
adoption-insights 87.31% <ø> (ø) Carriedforward from c1b8451
ai-integrations 90.79% <ø> (ø) Carriedforward from c1b8451
app-defaults 75.43% <ø> (ø) Carriedforward from c1b8451
augment 46.67% <ø> (ø) Carriedforward from c1b8451
boost 93.78% <ø> (ø)
bulk-import 73.13% <ø> (ø) Carriedforward from c1b8451
cost-management 13.56% <ø> (ø) Carriedforward from c1b8451
dcm 74.35% <ø> (ø) Carriedforward from c1b8451
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from c1b8451
e2e-extensions 62.87% <ø> (ø) Carriedforward from c1b8451
e2e-global-header 52.43% <ø> (ø) Carriedforward from c1b8451
e2e-homepage 61.25% <ø> (ø) Carriedforward from c1b8451
e2e-intelligent-assistant 46.04% <ø> (ø) Carriedforward from c1b8451
e2e-orchestrator 49.86% <ø> (ø) Carriedforward from c1b8451
e2e-orchestrator-plugin 49.85% <ø> (ø) Carriedforward from c1b8451
e2e-quickstart 54.83% <ø> (ø) Carriedforward from c1b8451
e2e-scorecard 49.88% <ø> (ø) Carriedforward from c1b8451
e2e-theme 16.43% <ø> (ø) Carriedforward from c1b8451
extensions 60.42% <ø> (ø) Carriedforward from c1b8451
global-floating-action-button 71.18% <ø> (ø) Carriedforward from c1b8451
global-header 69.15% <ø> (ø) Carriedforward from c1b8451
homepage 86.65% <ø> (ø) Carriedforward from c1b8451
install-dynamic-plugins 86.58% <ø> (ø) Carriedforward from c1b8451
intelligent-assistant 79.78% <ø> (ø) Carriedforward from c1b8451
konflux 91.98% <ø> (ø) Carriedforward from c1b8451
lightspeed 69.02% <ø> (ø) Carriedforward from c1b8451
mcp-integrations 84.46% <ø> (ø) Carriedforward from c1b8451
orchestrator 78.13% <ø> (ø) Carriedforward from c1b8451
quickstart 65.83% <ø> (ø) Carriedforward from c1b8451
sandbox 79.56% <ø> (ø) Carriedforward from c1b8451
scorecard 92.32% <ø> (ø) Carriedforward from c1b8451
theme 88.56% <ø> (ø) Carriedforward from c1b8451
translations 7.91% <ø> (ø) Carriedforward from c1b8451
x2a 79.43% <ø> (ø) Carriedforward from c1b8451

*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 c1b8451...17e6987. 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.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:33 PM UTC · Completed 6:53 PM UTC

Commit: 17e6987 · View workflow run →

Runtime: claude · Model: claude-opus-4-6 · Effort: high · Cost: $6.13

@fullsend-ai-review fullsend-ai-review Bot added the risk/low PR risk: low label Nov 11, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: low (1/5)

Details

Focused single-plugin SDK reconciliation across 11 files authored by a bot, with no security, CI, or dependency exposure, zero regression or revert history, and clean 90-day git churn — all risk dimensions score at or near minimum despite moderate change size.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

High

  • [Breaking type removal] workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/annotations.ts:67 — The string literal skill-bundle is removed from the @public exported AIAssetCategory type union. Any downstream TypeScript consumer that assigned skill-bundle to an AIAssetCategory-typed variable or passed it to validateAIAssetEntity() will receive a compile-time type error (or a runtime throw) after upgrading. The API report confirms AIAssetCategory was @public in the base branch with skill-bundle as a member. The base-branch package version is 1.2.1, so standard semver rules apply.
    Remediation: Change the changeset bump type from minor to major. If skill-bundle was never registered with a live provider and the README explicitly flagged the vocabulary as unstable, include a migration notice in the changeset body explaining that consumers must remove any skill-bundle usage before upgrading.

Medium

  • [intent-coherence] workspaces/boost/.changeset/reconcile-sdk-exports.md:2 — The changeset labels removal of skill-bundle from the public AIAssetCategory type union and AI_ASSET_CATEGORIES array as minor. Removing a member from a published exported string union is a semver-major breaking change. This classification is only correct if no npm-published version ever included skill-bundle — but the base branch contains skill-bundle in the source code at version 1.2.1. See also: [Breaking type removal] finding at annotations.ts:67.
    Remediation: Before merging, verify that no npm-published version of @red-hat-developer-hub/backstage-plugin-ai-catalog-entity-provider-sdk includes skill-bundle. If a release containing skill-bundle exists, change the changeset type from minor to major.

  • [stale-identifier-reference] workspaces/boost/specifications/annotation-specification.md:52 — The annotation specification states the SDK's "historical seven-value enum, README, and API report remain unchanged." This PR delivers the RHIDP-18762 reconciliation and reduces the enum to six values while updating both the README and API report. After merge, this statement is incorrect.
    Remediation: Update lines 51-53 to state that the SDK now exports the six-value AIAssetCategory enum and that the RHIDP-18762 reconciliation is complete.

  • [stale-identifier-reference] workspaces/boost/openspec/changes/ai-catalog-entity-model/specs/entity-provider-sdk/spec.md:18 — States "the current SDK still includes the historical skill-bundle value until that reconciliation." This PR delivers that reconciliation and removes skill-bundle. After merge, the statement is false.
    Remediation: Reword to reflect that the RHIDP-18762 reconciliation is now complete and skill-bundle is no longer in the SDK.

Low

  • [internal consistency] workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/DeltaSyncManager.ts:66 — The CursorStore.delete interface JSDoc says "forcing a full refresh on the next polling cycle," but the updated clearCursor() JSDoc (lines 240-243) explicitly states "it does not initiate a full refresh." These now contradict each other within the same file.

  • [test accuracy] workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/DeltaSyncManager.test.ts:153 — Test name "should clear cursor to trigger full refresh" contradicts the JSDoc clarification in this same PR, which states that clearing does not initiate a full refresh. The test body is correct; only the description is stale.

  • [code organization] workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/annotations.test.ts:39 — The describe block named AI_ASSET_CATEGORIES contains a test exercising AIAssetCategorySchema, breaking the file's convention of scoping describe blocks to the export under test.

  • [stale-example-value] workspaces/boost/openspec/changes/ai-catalog-entity-model/specs/delta-sync-framework/spec.md:37 — The scenario example uses component:default/agent-foo as the entity ref. This PR establishes airesource:default/ as the canonical format across tests and documentation.

  • [Contract clarification] workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/DeltaSyncManager.ts:237 — The clearCursor() JSDoc correction changes the documented contract from "forces a full refresh" to "does not initiate a full refresh." Consuming providers that relied on the original documentation may have missing fallback logic.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review 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.

Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/annotations.ts (file-level): Line 67 · [high] Breaking type removal

The string literal 'skill-bundle' is removed from the @public exported AIAssetCategory type union. Any downstream TypeScript consumer that assigned 'skill-bundle' to an AIAssetCategory-typed variable or passed it to validateAIAssetEntity() will receive a compile-time type error (or a runtime throw) after upgrading. The API report confirms AIAssetCategory was @public in the base branch with 'skill-bundle' as a member. The base-branch package version is 1.2.1, so standard semver rules apply.

Suggested fix: Change the changeset bump type from 'minor' to 'major'. If 'skill-bundle' was never registered with a live provider and the README explicitly flagged the vocabulary as unstable, include a migration notice in the changeset body explaining that consumers must remove any 'skill-bundle' usage before upgrading.

  • workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/DeltaSyncManager.ts (file-level): Line 66 · [low] internal consistency

The CursorStore.delete interface JSDoc says 'forcing a full refresh on the next polling cycle,' but the updated clearCursor() JSDoc (lines 240-243) explicitly states 'it does not initiate a full refresh.' These now contradict each other within the same file.

  • workspaces/boost/plugins/ai-catalog-entity-provider-sdk/src/DeltaSyncManager.test.ts (file-level): Line 153 · [low] test accuracy

Test name 'should clear cursor to trigger full refresh' contradicts the JSDoc clarification in this same PR, which states that clearing does not initiate a full refresh. The test body is correct; only the description is stale.

@fullsend-ai-review fullsend-ai-review 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.

See the review comment for full details.

@gabemontero

Copy link
Copy Markdown
Contributor

I agree with the release-versioning finding and the small consistency corrections. I verified the published SDK 1.2.1 tarball against its registry integrity metadata: its public AIAssetCategory union includes skill-bundle. Removing that value requires a major changeset and a consumer migration notice. The high and medium versioning entries describe the same issue; no further publication-history investigation is needed.

I will:

  • Change the SDK changeset from minor to major and document removal of skill-bundle for upgrading consumers.
  • Update the annotation specification and SDK OpenSpec's stale statements about the historical seven-value vocabulary.
  • Align CursorStore.delete JSDoc and the cursor-clearing test name with the existing delete-only behavior.
  • Use airesource:default/agent-foo in the delta scenario and give the category tests a name covering both the list and schema.
  • Run targeted SDK and OGX regressions, workspace type/lint/API checks, OpenSpec/formatting checks, and a disposable release-plan check for the major SDK update.

The clearCursor() clarification is correct and matches RHIDP-18762's explicit scope. Both the published implementation and this PR only delete stored cursor state. This is a documentation correction, not a new runtime behavior. Consuming providers own missing-cursor recovery and full-refresh orchestration. Automatic fallback and provider adoption remain deferred.

The independent package grouping remains intact. The release-plan check will verify the necessary dependency-driven OGX release without manually coupling unrelated packages. I will commit locally after verification; signing and pushing remain with the maintainer.

@gabemontero

Copy link
Copy Markdown
Contributor

The review follow-up is committed locally as 80db943018, unsigned and unpushed. It includes the major changeset and migration notice, vocabulary-status corrections, delete-only cursor documentation/regression assertions, schema-test grouping, and canonical agent deletion example.

Verification passed: SDK 51/51 tests, OGX 57/57 tests, workspace type check, SDK lint, API-report CI validation, OpenSpec 15/15, formatting, journal, whitespace, and commit hooks. The disposable release plan schedules SDK 2.0.0 and dependent OGX 1.2.2 only. No package versions were changed in the real workspace and no package was published.

The PR description now reflects the major bump, verification evidence, and specification/task handoff. All three inline review threads have responses and are resolved. Signing, pushing, and the next Fullsend review remain with the maintainer.

Assisted-by: GPT-6
Signed-off-by: gabemontero <gmontero@redhat.com>
@gabemontero

Copy link
Copy Markdown
Contributor

/fs-review

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

ready-for-review Triggers review agent dispatch risk/low PR risk: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant