feat(#4286): add connector __schemaVersion leaf and migration - #4315
Conversation
|
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 #4315 +/- ##
==========================================
- Coverage 61.46% 61.38% -0.09%
==========================================
Files 2520 2520
Lines 100896 101019 +123
Branches 28276 28314 +38
==========================================
- Hits 62017 62006 -11
- Misses 38337 38462 +125
- Partials 542 551 +9
*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:07 AM UTC Commit: |
Add changeset for connector schema versioning feature. Export CONNECTOR_SCHEMA_VERSION, CONNECTOR_IDS, ConnectorId, ConnectorMigrationFn, and ConnectorMigrationRegistry from the package entry point to fix ae-forgotten-export API report warnings. Regenerate API reports for boost-backend and boost packages. Addresses review feedback on #4315
🔧 Fix agent — iteration 1 (human-triggered)Addressed all 3 known issues: added missing changeset, exported new types from package entry point, and regenerated API reports. All 455 tests pass, prettier check passes, and API reports pass CI validation. Fixed (3):
Tests: passed Updated by fullsend fix agent |
|
/fs-fix rebase and make sure the CI passes |
|
🤖 Finished Fix · ❌ Failure · Started 7:33 AM UTC · Completed 7:47 AM UTC Commit: |
Register per-connector `boost.connectors.<id>.__schemaVersion` metadata leaves for jira, github, and gitlab with configScope `db-only` so they survive the `validateStoredValues()` startup sweep without being stripped. Add `CONNECTOR_SCHEMA_VERSION` constant (v1), `CONNECTOR_IDS` array, and `ConnectorId` type to schemas.ts. Export these along with `ConnectorMigrationFn` and `ConnectorMigrationRegistry` types from the config barrel. Implement `RuntimeConfigResolver.migrateConnectorSchemas()` which iterates known connectors on startup, stamps missing versions as v1, and applies sequentially-keyed migration functions when the stored version is behind `CONNECTOR_SCHEMA_VERSION`. No actual data migrations exist yet (v1 is the initial version); the hook infrastructure is ready for future v1→v2 field changes. Add TypeScript declarations in config.d.ts for the new field. Tests cover: leaf registration and db-only scope, Zod validation (positive int, rejects zero/negative/non-integer), survival through validateStoredValues(), migration stamping for missing versions, skip when current, per-connector independence, and cache invalidation after migration. Closes #4286
Add changeset for connector schema versioning feature. Export CONNECTOR_SCHEMA_VERSION, CONNECTOR_IDS, ConnectorId, ConnectorMigrationFn, and ConnectorMigrationRegistry from the package entry point to fix ae-forgotten-export API report warnings. Regenerate API reports for boost-backend and boost packages. Addresses review feedback on #4315
cf26102 to
84f0837
Compare
|
Rebased manually |
bee573b to
91fd159
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 9:29 AM UTC · Completed 9:49 AM UTC Commit: |
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Next steps:
|
…sion as v1 Call migrateConnectorSchemas() from plugin init so versions are actually stamped. Missing __schemaVersion is written as v1 before later steps run, each successful step is stamped, and the v1→v2 loop is covered in tests. Signed-off-by: Marek Libra <marek.libra@gmail.com>
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 12:01 PM UTC · Completed 12:16 PM UTC Commit: |
Superseded by updated review
Qualify OpenSpec/AGENTS prose so __schemaVersion is documented as db-only metadata, and do not let invalidate() replace firstError. Signed-off-by: Marek Libra <marek.libra@gmail.com>
|
/fs-review |
|
mareklibra
left a comment
There was a problem hiding this comment.
fullsends-ai-review's findings were addressed (among others). Nothing important left, lgtm.
|
🤖 Finished Retro · ✅ Success · Started 6:50 AM UTC · Completed 7:02 AM UTC Commit: |
Retro: PR #4315 — connector
|
) Add a "Migration patterns" subsection under "Code conventions" documenting four robustness requirements for connector schema migrations: per-step version stamping for resumability, per-entity error isolation so one connector failure does not block others, original error preservation when cleanup also fails, and treating missing __schemaVersion as v1. These patterns codify the human fixes from PR #4315 (commits 19c5c9b and 5bc131d) so future migration work follows the established robustness conventions without manual correction. Closes #4368 Co-authored-by: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com>



Register per-connector
boost.connectors.<id>.__schemaVersionmetadata leaves for jira, github, and gitlab with configScopedb-onlyso they survive thevalidateStoredValues()startup sweep without being stripped.Add
CONNECTOR_SCHEMA_VERSIONconstant (v1),CONNECTOR_IDSarray, andConnectorIdtype to schemas.ts. Export these along withConnectorMigrationFnandConnectorMigrationRegistrytypes from the config barrel.Implement
RuntimeConfigResolver.migrateConnectorSchemas()which iterates known connectors on startup, stamps missing versions as v1, and applies sequentially-keyed migration functions when the stored version is behindCONNECTOR_SCHEMA_VERSION. No actual data migrations exist yet (v1 is the initial version); the hook infrastructure is ready for future v1→v2 field changes.Add TypeScript declarations in config.d.ts for the new field.
Tests cover: leaf registration and db-only scope, Zod validation (positive int, rejects zero/negative/non-integer), survival through validateStoredValues(), migration stamping for missing versions, skip when current, per-connector independence, and cache invalidation after migration.
Closes #4286
Post-script verification
agent/4286-connector-schema-versioning)e6c850f7dd03d646d614fb0c74f80e7e4b9d0026..HEAD)