feat(#4313): apply connector config defaults at resolve time - #4314
feat(#4313): apply connector config defaults at resolve time#4314fullsend-ai-coder[bot] wants to merge 2 commits into
Conversation
Add optional `defaultValue` field to `ConfigFieldMeta` and apply it as a third precedence layer in `RuntimeConfigResolver`: DB override → YAML baseline → field default → undefined. Default values per OpenSpec task 1.8: - schedule.intervalMs: 300000 (5 min) — jira, github, gitlab - batchSize: 100 — jira, github, gitlab - timeout.connectionMs: 30000 (30 s) — jira only Defaults are NOT added via Zod `.default()` to preserve "unset" semantics: `validateConfigValue(key, undefined)` still returns undefined, and resolver precedence is respected. Instead, the `defaultValue` property on `ConfigFieldMeta` is read by a new `getFieldDefault()` helper, which the resolver calls when neither DB nor YAML provides a value. Fields without defaults (`enabled`, `endpoint`, `schedule.cron`) continue to return `undefined` when absent. Bumps BOOST_CONFIG_SCHEMA_VERSION from 4 to 5. Closes #4313
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4314 +/- ##
==========================================
+ Coverage 61.23% 61.24% +0.01%
==========================================
Files 2507 2513 +6
Lines 100386 100513 +127
Branches 28131 28185 +54
==========================================
+ Hits 61468 61558 +90
- Misses 37104 37141 +37
Partials 1814 1814
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
/fs-fix changeset and all known issues so far (like CI) |
|
🤖 Finished Fix · ✅ Success · Started 6:51 AM UTC · Completed 7:10 AM UTC Commit: |
- Add changeset for connector config defaults feature (minor bump) - Remove stale changeset from previous release (already consumed on main) - Regenerate frontend report.api.md to match API Extractor output, fixing the CI "check api reports" step failure Addresses review feedback on #4314
🔧 Fix agent — iteration 1 (human-triggered)Addressed both issues from /fs-fix instruction: (1) added proper changeset for the connector config defaults feature and removed the stale changeset from a previous release, (2) fixed CI by regenerating the frontend API report to match API Extractor output. Fixed (2):
Tests: passed Updated by fullsend fix agent |
|
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 7:32 AM UTC · Completed 7:49 AM UTC Commit: |
ReviewFindingsMedium
Low
|
There was a problem hiding this comment.
See the review comment for full details.
Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:
workspaces/boost/plugins/boost-backend/src/config/RuntimeConfigResolver.ts(file-level): Line 53 · [low] edge-case
resolve() guards the field-default fallback with value !== undefined, while resolveAll() uses !effective.has(key). These differ if a key is present in the map with an explicit undefined value. Currently unreachable but the inconsistent idiom could become a subtle bug if a future code path stores undefined into the map.
Suggested fix: Use the same guard in both methods.



Add optional
defaultValuefield toConfigFieldMetaand apply it as a third precedence layer inRuntimeConfigResolver: DB override → YAML baseline → field default → undefined.Default values per OpenSpec task 1.8:
Defaults are NOT added via Zod
.default()to preserve "unset" semantics:validateConfigValue(key, undefined)still returns undefined, and resolver precedence is respected. Instead, thedefaultValueproperty onConfigFieldMetais read by a newgetFieldDefault()helper, which the resolver calls when neither DB nor YAML provides a value.Fields without defaults (
enabled,endpoint,schedule.cron) continue to returnundefinedwhen absent.Bumps BOOST_CONFIG_SCHEMA_VERSION from 4 to 5.
Closes #4313
Post-script verification
agent/4313-connector-config-defaults)e6c850f7dd03d646d614fb0c74f80e7e4b9d0026..HEAD)