Skip to content

chore(ai-integrations): add openspec for RHIDP-15200 KFMR client code removal#3718

Merged
gabemontero merged 4 commits into
redhat-developer:mainfrom
gabemontero:rhidp-15200-openspecs
Jul 10, 2026
Merged

chore(ai-integrations): add openspec for RHIDP-15200 KFMR client code removal#3718
gabemontero merged 4 commits into
redhat-developer:mainfrom
gabemontero:rhidp-15200-openspecs

Conversation

@gabemontero

Copy link
Copy Markdown
Contributor

Adds proposal, design, tasks, and post-removal verification spec for removing KubeFlow Model Registry client code from the kserve-kubeflow-connector-backend plugin per RHDHPLAN-404 Decision 4.

Key design insight: shared utilities (PropertyKeys, NormalizerFormat, helper functions) must be relocated from Kfmr.ts to types.ts before deletion since KServe.ts depends on them.

Hey, I just made a Pull Request!

✔️ Checklist

  • [n/a] A changeset describing the change and affected packages. (more info)
  • [/] Added or Updated documentation
  • [n/a] Tests for new functionality and regression tests for bug fixes
  • [/] Screenshots attached (for UI changes)

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 9, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:46 PM UTC · Completed 6:51 PM UTC
Commit: 56c40be · View workflow run →

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Add OpenSpec (proposal/design/tasks/spec) for removing KFMR client code

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Add an OpenSpec change package documenting removal of KFMR client code from the connector.
• Define target dependency graph and utility relocation plan to keep KServe path compiling.
• Provide task breakdown and post-removal verification scenarios (grep/build/test checks).
Diagram

graph TD
  A{{"K8s Informer"}} --> B["InformerService.ts"] --> C["KServe.ts"] --> D["types.ts"]
  E{{"KFMR APIs"}} --> F["Kfmr.ts (to delete)"] --> B
  F -. "relocate shared utils" .-> D
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Track removal work only in Jira (no OpenSpec)
  • ➕ Less repo churn; fewer files added now
  • ➖ Harder for reviewers/maintainers to understand intended code moves and verification steps
  • ➖ Loses in-repo, versioned decision record tied to the workspace
2. Use a lightweight ADR instead of a full OpenSpec change package
  • ➕ More concise; focuses on decision record
  • ➖ Doesn’t provide the same task checklist + post-removal verification scenarios
  • ➖ May not align with the workspace’s spec-driven process expectations

Recommendation: Keep the OpenSpec approach: it captures the dependency/relocation nuance (utilities moving out of Kfmr.ts) plus concrete tasks and verification criteria, which should reduce risk when the actual code-removal PR is implemented.

Files changed (5) +325 / -0

Documentation (4) +322 / -0
design.mdDesign doc for KFMR client code removal and dependency cleanup +122/-0

Design doc for KFMR client code removal and dependency cleanup

• Documents current vs target dependency graphs, goals/non-goals, and key decisions (utility relocation to types.ts, deleting processKFMR, simplifying ReconcilerConfig, and removing unused TLS/undici pieces). Includes risks and concrete verification steps for the eventual code change.

workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/design.md

proposal.mdProposal describing rationale/scope for removing KFMR integration path +61/-0

Proposal describing rationale/scope for removing KFMR integration path

• Explains why KFMR code is out of scope per RHDHPLAN-404 Decision 4, enumerates the affected files, and outlines what will be removed vs preserved (KServe + Model Catalog). Frames the change as a refactor with expected net line reduction.

workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/proposal.md

spec.mdPost-removal verification spec (requirements + scenarios) +83/-0

Post-removal verification spec (requirements + scenarios)

• Defines acceptance-style scenarios to prove KFMR code/types/imports/config are fully removed, while ensuring shared utilities remain available via types.ts and the KServe reconciliation path remains unchanged. Adds build/typecheck/test expectations.

workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/specs/post-removal-verification/spec.md

tasks.mdTask checklist for executing the KFMR removal safely +56/-0

Task checklist for executing the KFMR removal safely

• Provides a step-by-step plan covering: relocating shared utilities, removing KFMR types/config, deleting InformerService KFMR logic, deleting Kfmr.ts, dependency cleanup (e.g., undici), and final verification commands/greps.

workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/tasks.md

Other (1) +3 / -0
.openspec.yamlRegister a new spec-driven OpenSpec change (draft) +3/-0

Register a new spec-driven OpenSpec change (draft)

• Introduces the OpenSpec metadata file for the new change package, marking it as spec-driven, created on 2026-07-09, and currently in draft status.

workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/.openspec.yaml

@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Jul 9, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 14 rules

Grey Divider


Remediation recommended

1. Wrong verification paths ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new OpenSpec verification steps reference kserve-kubeflow-connector-backend/src/ (missing the
plugins/ prefix), but the actual plugin source directory is under
plugins/kserve-kubeflow-connector-backend/src/. This can cause the documented grep/import-scan
checks to fail or produce misleading “no results” outcomes when run from the workspace root.
Code

workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/tasks.md[R40-54]

+- [ ] 4.1 Delete `plugins/kserve-kubeflow-connector-backend/src/services/Kfmr.ts`
+- [ ] 4.2 Verify no remaining imports reference `./Kfmr` in any file under `kserve-kubeflow-connector-backend/src/`
+
+## 5. Clean Up Dependencies
+
+- [ ] 5.1 Check if `undici` is imported anywhere other than `Kfmr.ts` — if not, remove from `package.json` dependencies
+- [ ] 5.2 Check if `MODEL_REGISTRY_ROUTE_ENV_VAR` or `MODEL_REGISTRY_TOKEN_ENV_VAR` are referenced outside `Kfmr.ts` — if not, confirm they are gone with the file deletion
+- [ ] 5.3 Remove any KFMR-related environment variable documentation or comments in `plugin.ts`, `router.ts`, or config files
+
+## 6. Verification
+
+- [ ] 6.1 `yarn tsc` passes with no errors
+- [ ] 6.2 `yarn build:all` succeeds
+- [ ] 6.3 `yarn test:all` passes (existing workspace tests)
+- [ ] 6.4 `grep -rn 'Kfmr\|kfmr\|KFMR\|loopOverKFMR\|setupKFMR\|KFMRClient\|KFMRInferenceService\|processKFMR\|KubeflowNormalizer' --include='*.ts' kserve-kubeflow-connector-backend/src/` returns zero results
Relevance

⭐⭐⭐ High

Team previously accepted fixing incorrect/nonexistent doc paths in OpenSpec artifacts (PR #3692).

PR-#3692

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The OpenSpec documents instruct checking under kserve-kubeflow-connector-backend/src/, but the
repository’s actual plugin source tree is located under
workspaces/ai-integrations/plugins/kserve-kubeflow-connector-backend/src/, so the documented
commands/path-based checks don’t match the real layout.

workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/tasks.md[38-55]
workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/specs/post-removal-verification/spec.md[7-15]
workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/design.md[113-122]
workspaces/ai-integrations/plugins/kserve-kubeflow-connector-backend/src/index.ts[1-16]

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

## Issue description
OpenSpec docs for KFMR removal use an incorrect workspace-relative path (`kserve-kubeflow-connector-backend/src/`) in verification steps. In this workspace, the plugin actually lives under `plugins/kserve-kubeflow-connector-backend/src/`, so the documented checks can fail or be misleading.

## Issue Context
From `workspaces/ai-integrations/` workspace root, the correct plugin path is `plugins/kserve-kubeflow-connector-backend/src/...`.

## Fix Focus Areas
- workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/tasks.md[40-55]
- workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/design.md[117-121]
- workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/specs/post-removal-verification/spec.md[9-15]

## Suggested change
- Replace occurrences of `kserve-kubeflow-connector-backend/src/` with `plugins/kserve-kubeflow-connector-backend/src/` (or explicitly state the intended working directory if you want to keep the shorter path).

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


Grey Divider

Qodo Logo

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.59%. Comparing base (56c40be) to head (3186811).
⚠️ Report is 8 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3718   +/-   ##
=======================================
  Coverage   54.59%   54.59%           
=======================================
  Files        2361     2361           
  Lines       90132    90132           
  Branches    25209    25209           
=======================================
  Hits        49204    49204           
+ Misses      39410    39400   -10     
- Partials     1518     1528   +10     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.70% <ø> (ø) Carriedforward from ebad617
ai-integrations 67.53% <ø> (ø)
app-defaults 69.79% <ø> (ø) Carriedforward from ebad617
augment 46.39% <ø> (ø) Carriedforward from ebad617
boost 73.07% <ø> (ø) Carriedforward from ebad617
bulk-import 72.46% <ø> (ø) Carriedforward from ebad617
cost-management 14.10% <ø> (ø) Carriedforward from ebad617
dcm 61.81% <ø> (ø) Carriedforward from ebad617
extensions 61.53% <ø> (ø) Carriedforward from ebad617
global-floating-action-button 71.18% <ø> (ø) Carriedforward from ebad617
global-header 59.71% <ø> (ø) Carriedforward from ebad617
homepage 50.23% <ø> (ø) Carriedforward from ebad617
install-dynamic-plugins 56.77% <ø> (ø) Carriedforward from ebad617
konflux 91.49% <ø> (ø) Carriedforward from ebad617
lightspeed 69.05% <ø> (ø) Carriedforward from ebad617
mcp-integrations 85.46% <ø> (ø) Carriedforward from ebad617
orchestrator 42.97% <ø> (ø) Carriedforward from ebad617
quickstart 65.63% <ø> (ø) Carriedforward from ebad617
sandbox 79.56% <ø> (ø) Carriedforward from ebad617
scorecard 82.67% <ø> (ø) Carriedforward from ebad617
theme 61.26% <ø> (ø) Carriedforward from ebad617
translations 7.25% <ø> (ø) Carriedforward from ebad617
x2a 78.68% <ø> (ø) Carriedforward from ebad617

*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 56c40be...3186811. 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 rhdh-qodo-merge Bot added the documentation Improvements or additions to documentation label Jul 9, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Review — approve

Summary

Documentation-only PR adding an openspec for the planned KFMR client code removal (RHIDP-15200). Five new files are added under workspaces/ai-integrations/openspec/changes/remove-kfmr-client-code/:

File Purpose
.openspec.yaml Openspec metadata (schema, date, status)
proposal.md Motivation, starting point, scope, and impact
design.md Detailed design decisions (D1–D5), dependency graphs, risks
tasks.md Implementation task breakdown with 6 sections
specs/post-removal-verification/spec.md BDD-style verification scenarios

Verification of factual claims

All claims in the spec documents were verified against the current source tree:

  • Line countsKfmr.ts (837), types.ts (425), InformerService.ts (1406), KServe.ts (311) all match exactly
  • Import graphKServe.ts imports PropertyKeys from ./Kfmr (line 19); InformerService.ts imports callBackstagePrinters, getKubeFlowInferenceServicesForModelVersion, loopOverKFMR, sanitizeName, setupKFMR from ./Kfmr (lines 33–38) — matches the documented dependency graph
  • KFMR types in types.tsKFMRClient, KFMRInferenceService, InferenceServiceList, LoopOverKFMRResult, and the kfmrClients/kfmrRoutes/kfmrCatalogRoute fields on ReconcilerConfig all exist as documented
  • KFMR label constantsINF_SVC_RM_ID_LABEL and INF_SVC_MV_ID_LABEL exist in InformerService.ts (lines 79–80)
  • processKFMR function — exists with extensive logging (~lines 286–623)
  • Shared utilitiesPropertyKeys, NormalizerFormat, getTagsFromCustomProps, getStringPropVal, sanitizeName, sanitizeModelVersion all found in Kfmr.ts as claimed
  • Parent openspectransition-oai-connector-to-kserve-plugin/design.md Decision 4 explicitly calls for KFMR removal, consistent with this child spec

Structure conformance

The file layout (.openspec.yaml + proposal.md + design.md + tasks.md + specs/*/spec.md) matches the established openspec convention used across both ai-integrations and boost workspaces (e.g., ai-resource-catalog-entity-kind, platform-operations-deployment).

Assessment

No findings. This is a well-structured planning document that accurately describes the current codebase state and the intended changes. The design decisions are sound, the task breakdown is thorough, and the verification spec covers the key invariants (no KFMR remnants, shared utilities preserved, build/test pass).


Labels: Documentation-only PR adding planning/specification documents

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Jul 9, 2026
Adds proposal, design, tasks, and post-removal verification spec
for removing KubeFlow Model Registry client code from the
kserve-kubeflow-connector-backend plugin per RHDHPLAN-404 Decision 4.

Key design insight: shared utilities (PropertyKeys, NormalizerFormat,
helper functions) must be relocated from Kfmr.ts to types.ts before
deletion since KServe.ts depends on them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@rajin-kichannagari rajin-kichannagari 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.

The line range for processKFMR in tasks.md (task 3.6) says ~lines 285-465 but fullsend's own verification shows it actually goes from 286 to 623. So the function is ~337 lines, not ~180 like proposal.md says. if someone follows the task literally they'd only delete half the function

… openspec

The openspec documents for RHIDP-15200 were conflating removal of
KubeFlow Model Registry code with removal of KubeFlow Model Catalog
code. Only Model Registry should be removed; Model Catalog integration
must be preserved.

Key changes across all four documents:
- Catalog route discovery, getModelCard(), CatalogModel type, and
  catalog-related PropertyKeys are now explicitly marked as preserved
  and relocated (not deleted)
- kfmrCatalogRoute renamed to catalogRoute on ReconcilerConfig
- processKFMR model card fetching logic (catalog API call) preserved
- New task group (2.x) for relocating catalog code from Kfmr.ts
- New design decision D6 for catalog code preservation
- New PRESERVED capability section in spec for Model Catalog integration
- Future Work section added describing planned Model Catalog enhancements:
  inference-service-driven catalog lookup and full catalog polling

Signed-off-by: gabemontero <gmontero@redhat.com>
Assisted-by: Claude Opus 4.6
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gabemontero gabemontero force-pushed the rhidp-15200-openspecs branch from b382bb7 to f6f2968 Compare July 10, 2026 14:21
Qodo review correctly identified that verification steps referenced
kserve-kubeflow-connector-backend/src/ without the plugins/ prefix.
The actual path from the workspace root is
plugins/kserve-kubeflow-connector-backend/src/.

Fixed 5 instances across tasks.md, spec.md, and design.md.

Signed-off-by: gabemontero <gmontero@redhat.com>
Assisted-by: Claude Opus 4.6
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gabemontero

Copy link
Copy Markdown
Contributor Author

Valid finding from Qodo — the verification paths in the openspec docs were missing the plugins/ prefix. Fixed in commit ebad617: all 5 instances of kserve-kubeflow-connector-backend/src/ in tasks.md, spec.md, and design.md now correctly reference plugins/kserve-kubeflow-connector-backend/src/.

Rajin correctly identified that processKFMR spans lines 287-625
(~340 lines), not ~180 as originally stated. Fixed the remaining
instance in proposal.md Starting Point section.

Signed-off-by: gabemontero <gmontero@redhat.com>
Assisted-by: Claude Opus 4.6
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@gabemontero gabemontero left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch @rajin-kichannagari — both issues are now fixed:

  1. The "~180 lines" in proposal.md is corrected to "~340 lines, lines 287-625" in commit 3186811.
  2. The old task 3.6 with the wrong "~lines 285-465" range was already rewritten (now task 4.6 without a truncated line range) in commit a5447b710c, as part of a larger rework to properly distinguish Model Registry code (remove) from Model Catalog code (preserve).

@sonarqubecloud

Copy link
Copy Markdown

@gabemontero

Copy link
Copy Markdown
Contributor Author

also @rajin-kichannagari - if possible, try to use the in-line review comments feature of github reviews ... makes it easier not only to interpret your comment, but verify if subsequent pushes altered the lines you are referring to

thanks

@gabemontero

Copy link
Copy Markdown
Contributor Author

also @rajin-kichannagari @johnmcollier right before the update to the comments from qodo and Rajin, I noticed that the openspec's did not properly capture that we wanted to keep the model CATALOG client

updates for that have been pushed as well

@gabemontero gabemontero merged commit d111548 into redhat-developer:main Jul 10, 2026
46 of 48 checks passed
@gabemontero gabemontero deleted the rhidp-15200-openspecs branch July 10, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation 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