Repository navigation
GitSync stops depending on the AI engine (#2276 step B2) - #2292
Merged
Merged
Conversation
`MeshWeaver.GitSync` referenced `MeshWeaver.AI`, and through it so did `MeshWeaver.PluginCatalog` (transitively — which is why no grep of direct ProjectReferences ever showed it). A module cannot be injected into a platform that compiles against it, so this edge had to point the other way. Step B2 of #2276. Five files move into `MeshWeaver.AI`: `AiContentDiskWriter`, `AiContentSyncArea`, `AiContentSyncMenuProvider`, `HubAiContentSyncExtensions` and the drafter. None of them imported a GitSync namespace — they were AI features filed under the wrong project. `MeshWeaver.AI` now references `MeshWeaver.GitSync` for the repo client, which is the allowed direction. **The PR drafter splits at an interface, and gains a platform default.** `IPullRequestDraftService` and the `PullRequestDraft` record stay in GitSync; the agent-backed implementation goes to `MeshWeaver.AI`. GitSync registers `PlaceholderPullRequestDraftService` with `TryAddSingleton` and `AddAI()` registers the real one with a plain `AddSingleton` — order-independent, module always wins (the `IEmailSender` shape). So PR creation no longer DEPENDS on AI: without it you get a deterministic title and a body that asks you to edit it, which is what the call site's `.Catch` already produced when no model was configured. The registrations move with the code: the disk writer, the "Sync to repo" node-menu provider and its area now ride `AddAI()`. `MeshWeaver.PluginCatalog.Test` gains an EXPLICIT reference to `MeshWeaver.AI` — it installs Agent/Skill packages and asserts on the pickers, a real AI dependency that had been arriving through GitSync. `AiContentSyncBackTest` gains `.AddAI()` for the same reason, and its failure without it is the proof the seam is real. Verified with the full solution build under CI's flags and the GitSync suite: 182 tests, 0 failed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Test Results 55 files 55 suites 50m 3s ⏱️ Results for commit 00266e2. ♻️ This comment has been updated with latest results. |
Contributor
Author
|
Same stale input as #2287, same evidence: this run checked out plugins Re-run triggered, which is what changes the input (a fresh checkout of plugins |
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.
Step B2 of #2276. Stacked on #2287 (A2) — base retargets to
mainautomatically once that merges.A module cannot be injected into a platform that compiles against it.
MeshWeaver.GitSyncreferencedMeshWeaver.AI, and through it so didMeshWeaver.PluginCatalog— transitively, which is why no grep of directProjectReferences ever showed that edge. This inverts it.What moves
AiContentDiskWriter,AiContentSyncArea,AiContentSyncMenuProvider,HubAiContentSyncExtensionsand the agent-backed PR drafter →MeshWeaver.AI. None of them imported a GitSync namespace: they were AI features filed under the wrong project.MeshWeaver.AInow referencesMeshWeaver.GitSyncfor the repo client, which is the allowed direction (a module may reference the platform, never the reverse).Their registrations move with them — the disk writer, the "Sync to repo" node-menu provider and its area now ride
AddAI().The drafter splits at an interface, and PR creation stops depending on AI
IPullRequestDraftService+ thePullRequestDraftrecord stay in GitSync; the agent implementation goes to AI.TryAddSingleton<…, PlaceholderPullRequestDraftService>AddAI()AddSingleton<…, PullRequestDraftService>Order-independent — the module wins whichever configures first (the
IEmailSendershape). Without AI you now get the placeholder rather than a DI resolution failure, which is what the call site's.Catchalready produced when no model was configured.Two consumers gain an explicit reference, and that is the point
MeshWeaver.PluginCatalog.Testinstalls Agent/Skill packages and asserts on the pickers — a real AI dependency that had been arriving through GitSync.AiContentSyncBackTestgains.AddAI(). It failed without it (AiContentDiskWriter has not been registered), which is the proof the seam is real rather than nominal.Verification
-c Release -p:CIRun=true -warnaserror) →0 Error(s).MeshWeaver.GitSync.Test: 182 tests, 0 failed.After this and #2287,
MeshWeaver.GitSync's dependency on the AI engine is zero.No What's New entry: internal refactor. The one behaviour change — a PR drafted without AI gets a placeholder instead of failing — is strictly an improvement to a path that previously required a configured model.
Refs #2276
🤖 Generated with Claude Code