Skip to content

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

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

feat(#4285): wire ConnectorConfigReader runtimeEnabled to RuntimeConfigResolver#4316
fullsend-ai-coder[bot] wants to merge 5 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

@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

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@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 →

@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

fullsend-ai-coder Bot added a commit that referenced this pull request Aug 17, 2026
- 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
@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

Looks good to me

Previous run

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 (2)

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
@mareklibra

Copy link
Copy Markdown
Member

I have sent fixes based on my review.

@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
fullsend-ai-coder Bot and others added 3 commits August 17, 2026 13:58
…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
- 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
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
mareklibra force-pushed the agent/4285-wire-runtime-enabled branch from 147c2ba to 5725b69 Compare August 17, 2026 11:59
Document RuntimeConfigResolver on ConnectorCandidate, fall back to YAML
on unexpected resolver types, and clarify the BREAKING changeset migration.

Signed-off-by: Marek Libra <marek.libra@gmail.com>
@mareklibra
mareklibra force-pushed the agent/4285-wire-runtime-enabled branch from 5725b69 to 91b11d6 Compare August 17, 2026 12:01
@mareklibra

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 17, 2026

Copy link
Copy Markdown

🤖 Review · ❌ Terminated · Started 12:02 PM UTC · Ended 12:13 PM UTC

Commit: 91b11d6 · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge and removed requires-manual-review Review requires human judgment labels Aug 17, 2026
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:02 PM UTC · Completed 12:13 PM UTC

Commit: 91b11d6 · View workflow run →

@mareklibra
mareklibra enabled auto-merge (squash) August 17, 2026 13:36
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

feature ready-for-merge All reviewers approved — ready to merge ready-for-review Agent PR ready for human review 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