Skip to content

feat(#4285): wire ConnectorConfigReader runtimeEnabled to RuntimeConfigResolver - #4316

Open
fullsend-ai-coder[bot] wants to merge 3 commits into
mainfrom
agent/4285-wire-runtime-enabled
Open

feat(#4285): wire ConnectorConfigReader runtimeEnabled to RuntimeConfigResolver#4316
fullsend-ai-coder[bot] wants to merge 3 commits into
mainfrom
agent/4285-wire-runtime-enabled

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Inject RuntimeConfigResolver into ConnectorConfigReader so that the runtimeEnabled flag for each connector is resolved via the two-layer config model (YAML baseline + DB overrides) instead of YAML-only via ConfigApi. This enables admin panel toggles for connector runtime sync to take effect within the 30-second cache TTL.

Changes:

  • ConnectorConfigReader: add resolver option, make
    listCandidates() async, replace getRuntimeEnabled() with
    resolveRuntimeEnabled() that calls resolver.resolve() for
    registered BoostConfigKey fields with YAML-only fallback
  • HealthStatusService: await the now-async listCandidates()
  • plugin.ts: pass runtimeConfigResolver to ConnectorConfigReader
  • Tests: update mocks for async listCandidates, add test cases
    for YAML-only default, DB override, startup-disabled exclusion,
    and resolver key verification
  • API reports: regenerated for public API surface change

Closes #4285

Post-script verification

  • Branch is not main/master (agent/4285-wire-runtime-enabled)
  • Secret scan passed (gitleaks — e6c850f7dd03d646d614fb0c74f80e7e4b9d0026..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

…igResolver

Inject RuntimeConfigResolver into ConnectorConfigReader so that
the runtimeEnabled flag for each connector is resolved via the
two-layer config model (YAML baseline + DB overrides) instead
of YAML-only via ConfigApi. This enables admin panel toggles
for connector runtime sync to take effect within the 30-second
cache TTL.

Changes:
- ConnectorConfigReader: add resolver option, make
  listCandidates() async, replace getRuntimeEnabled() with
  resolveRuntimeEnabled() that calls resolver.resolve() for
  registered BoostConfigKey fields with YAML-only fallback
- HealthStatusService: await the now-async listCandidates()
- plugin.ts: pass runtimeConfigResolver to ConnectorConfigReader
- Tests: update mocks for async listCandidates, add test cases
  for YAML-only default, DB override, startup-disabled exclusion,
  and resolver key verification
- API reports: regenerated for public API surface change

Closes #4285
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Agent PR ready for human review label Aug 14, 2026
@rhdh-gh-app

rhdh-gh-app Bot commented Aug 14, 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-boost-backend workspaces/boost/plugins/boost-backend minor v0.4.0

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.24%. Comparing base (e6c850f) to head (147c2ba).
⚠️ Report is 21 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4316      +/-   ##
==========================================
+ Coverage   61.23%   61.24%   +0.01%     
==========================================
  Files        2507     2513       +6     
  Lines      100386   100513     +127     
  Branches    28131    28185      +54     
==========================================
+ Hits        61468    61556      +88     
- Misses      37104    37143      +39     
  Partials     1814     1814              
Flag Coverage Δ *Carryforward flag
adoption-insights 84.55% <ø> (ø) Carriedforward from 15b6e9c
ai-integrations 71.04% <ø> (ø) Carriedforward from 15b6e9c
app-defaults 69.79% <ø> (ø) Carriedforward from 15b6e9c
augment 46.67% <ø> (ø) Carriedforward from 15b6e9c
boost 78.32% <95.23%> (-0.32%) ⬇️
bulk-import 72.79% <ø> (ø) Carriedforward from 15b6e9c
cost-management 13.55% <ø> (ø) Carriedforward from 15b6e9c
dcm 67.21% <ø> (ø) Carriedforward from 15b6e9c
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from 15b6e9c
e2e-extensions 62.13% <ø> (ø) Carriedforward from 15b6e9c
e2e-global-header 49.45% <ø> (ø) Carriedforward from 15b6e9c
e2e-homepage 43.49% <ø> (ø) Carriedforward from 15b6e9c
e2e-intelligent-assistant 46.74% <ø> (ø) Carriedforward from 15b6e9c
e2e-orchestrator 50.42% <ø> (ø) Carriedforward from 15b6e9c
e2e-quickstart 55.21% <ø> (ø) Carriedforward from 15b6e9c
e2e-scorecard 50.21% <ø> (ø) Carriedforward from 15b6e9c
e2e-theme 17.11% <ø> (ø) Carriedforward from 15b6e9c
extensions 56.59% <ø> (ø) Carriedforward from 15b6e9c
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 15b6e9c
global-header 66.50% <ø> (ø) Carriedforward from 15b6e9c
homepage 47.50% <ø> (ø) Carriedforward from 15b6e9c
install-dynamic-plugins 59.95% <ø> (ø) Carriedforward from 15b6e9c
intelligent-assistant 75.42% <ø> (ø) Carriedforward from 15b6e9c
konflux 91.98% <ø> (ø) Carriedforward from 15b6e9c
lightspeed 69.02% <ø> (ø) Carriedforward from 15b6e9c
mcp-integrations 83.40% <ø> (ø) Carriedforward from 15b6e9c
orchestrator 70.87% <ø> (ø) Carriedforward from 15b6e9c
quickstart 63.74% <ø> (ø) Carriedforward from 15b6e9c
sandbox 79.56% <ø> (ø) Carriedforward from 15b6e9c
scorecard 87.09% <ø> (ø) Carriedforward from 15b6e9c
theme 88.14% <ø> (ø) Carriedforward from 15b6e9c
translations 5.12% <ø> (ø) Carriedforward from 15b6e9c
x2a 79.20% <ø> (ø) Carriedforward from 15b6e9c

*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 e6c850f...147c2ba. 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.

@mareklibra

Copy link
Copy Markdown
Member

/fs-fix changeset and all known issues so far (like CI)

@fullsend-ai-coder

fullsend-ai-coder Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 6:51 AM UTC · Completed 7:12 AM UTC

Commit: 5b43cb9 · View workflow run →

- Add changeset for boost-backend minor: ConnectorConfigReader now
  resolves runtimeEnabled via RuntimeConfigResolver (async
  listCandidates, required resolver option)
- Revert frontend boost/report.api.md to main's version since this
  PR does not change frontend code; the stale reorderings caused
  CI api-report check failures on the merge commit

Addresses review feedback on #4316
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (human-triggered)

Added missing changeset for boost-backend (minor) and fixed CI api-report failure by reverting the frontend report.api.md to main's version since this PR does not modify frontend code.

Fixed (2):

  1. missing changeset for boost-backend: Added changeset wire-runtime-config-resolver.md covering @red-hat-developer-hub/backstage-plugin-boost-backend as minor: ConnectorConfigReader now resolves runtimeEnabled via RuntimeConfigResolver, listCandidates() is async, and ConnectorConfigReaderOptions requires a resolver.
  2. CI api-report check failure on merge commit: Reverted frontend boost/report.api.md to origin/main version. This PR does not change frontend code, but the PR commit included stale reorderings from regenerating api-reports against the branch's codebase. When CI merges with main (which has feat: pivot boost plugins to new entity kinds (AiResource/agent, AiModelServerAPI) #4259 pivot changes), the generated frontend report didn't match the committed version, causing the 'check api reports and generate API reference' step to fail for both node 22 and node 24.

Tests: passed

Updated by fullsend fix agent

@mareklibra

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 17, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:33 AM UTC · Completed 8:06 AM UTC

Commit: 15b6e9c · View workflow run →

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review

Findings

Medium

  • [breaking-change-return-type] workspaces/boost/plugins/boost-backend/report.api.md:340ConnectorConfigReader.listCandidates() return type changed from ConnectorCandidate[] to Promise<ConnectorCandidate[]>. This is a breaking change to the @public API surface. Any downstream consumer calling listCandidates() synchronously will receive a Promise object instead of an array. The changeset explicitly documents this as BREAKING, and the only in-repo caller (HealthStatusService.getHealthStatuses) is already async and updated with await.
    Remediation: Verify that no other repositories import and call ConnectorConfigReader.listCandidates() synchronously. The changeset already documents the migration path.

  • [breaking-change-constructor-options] workspaces/boost/plugins/boost-backend/report.api.md:344ConnectorConfigReaderOptions now requires a new mandatory field resolver: RuntimeConfigResolver. Any code constructing a ConnectorConfigReader outside of plugin.ts must now supply a RuntimeConfigResolver instance. The changeset documents this as BREAKING.
    Remediation: Ensure the BREAKING label and migration instructions in the changeset are sufficient for any external consumers.

Low

  • [out-of-scope-boundary] workspaces/boost/plugins/boost-backend/src/ingestion/ConnectorConfigReader.ts:270 — The resolveRuntimeEnabled() method checks if (key in boostConfigFields) before using the resolver, falling back to YAML-only for unregistered keys. No test verifies this fallback path. However, the path is currently unreachable in practice because all three KNOWN_CONNECTOR_TYPES (github, gitlab, jira) have corresponding boostConfigFields entries.

  • [error-handling-idiom] workspaces/boost/plugins/boost-backend/src/ingestion/ConnectorConfigReader.ts:98 — The catch block logs ${error} via template literal, which may lose context for non-Error values or Error cause chains. This is consistent with the existing pattern in this file.


Labels: PR modifies boost workspace ingestion and config resolution code; changeset declares a feature-level change

Previous run

Review

Findings

Medium

  • [breaking-api-change-semver-mismatch] workspaces/boost/plugins/boost-backend/report.api.md:340ConnectorConfigReader.listCandidates() return type changes from ConnectorCandidate[] to Promise<ConnectorCandidate[]>, and ConnectorConfigReaderOptions gains a new required field resolver: RuntimeConfigResolver. Both are source-level breaking changes to the @public API surface. The practical risk is mitigated: no other package in the monorepo imports ConnectorConfigReader, and the package is at version 0.x where semver permits breaking changes in minor bumps. Consider noting the breaking change in the changeset description for better developer communication.

Low

  • [edge-case] workspaces/boost/plugins/boost-backend/src/ingestion/ConnectorConfigReader.ts:282resolveRuntimeEnabled treats any non-boolean resolved value (e.g., string "false" or number 0) the same as undefined, defaulting to true. While boostConfigFields uses z.ZodOptional<z.ZodBoolean>, RuntimeConfigResolver.resolve() returns unknown. A corrupted DB row could cause a connector to silently default to enabled. Consider logging a warning when value !== undefined && typeof value !== 'boolean'.

  • [unrelated-changes-in-pr] workspaces/boost/plugins/boost/report.api.md:485 — The frontend plugin's report.api.md adds four new translation keys (modelsAvailableTitle, instructionsTitle, handoffDescriptionTitle, ragEnabledLabel) that appear unrelated to the PR's stated scope of wiring ConnectorConfigReader to RuntimeConfigResolver.

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Aug 17, 2026
Warn on non-boolean RuntimeConfigResolver values, clarify unit tests,
cover resolver-failure YAML fallback, and mark the changeset as BREAKING.

Signed-off-by: Marek Libra <marek.libra@gmail.com>
@mareklibra

Copy link
Copy Markdown
Member

I have sent fixes based on my review.

@sonarqubecloud

Copy link
Copy Markdown

@mareklibra

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 17, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:56 AM UTC · Completed 10:11 AM UTC

Commit: 147c2ba · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot added workspace/boost Boost workspace (Backstage AI plugin) feature labels Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature ready-for-review Agent PR ready for human review requires-manual-review Review requires human judgment workspace/boost Boost workspace (Backstage AI plugin)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingestion Health — Wire ConnectorConfigReader runtimeEnabled to RuntimeConfigResolver

1 participant