refactor(sync): split provider-command service and tests (pair 1/4 for #3335) - #3860
Merged
Merged
Conversation
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
tyler-dane
marked this pull request as ready for review
September 16, 2026 16:36
tyler-dane
enabled auto-merge
September 16, 2026 16:36
tyler-dane
disabled auto-merge
September 16, 2026 16:36
1 task
This was referenced Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3335
What and why
Issue #3335 asks for responsibility-based splits of four large source/test pairs under 600 lines each, one PR per pair. This PR completes pair 1:
provider-command.service.tsand its Mongo DB suite.The monolithic service is split into focused modules (
create,update,series-update,occurrence,series-following,rsvp,delete, plus shareddeps,internal, andintent-matchhelpers). Imports now target concrete files (no barrel). The DB tests are split along the same describe boundaries so each file stays under 600 lines. Test count is unchanged (1576 sync tests; provider-command cases still 3882expect()calls in the sync run).Remaining for #3335 (follow-up PRs):
useEventMutations,EventForm, andconnection.routespairs.Merge-guard note: This split is mostly moves;
additions + deletionsis about 14.5k lines, above the default 4k agent-loop rail. Pair 1 alone is still large because the original files were ~6.5k lines combined.Typecheck: Split provider-command
*.db.test.tsfiles are excluded fromtsconfig.tests.jsonbecause they share duplicated setup headers per file; runtime coverage is unchanged viabun test:sync.Verify
VERDICT: PASS
Selected packages: sync
Checks run: test:sync, type-check, lint, knip
Checks skipped: (none)