Skip to content

GitSync stops depending on the AI engine (#2276 step B2) - #2292

Merged
rbuergi merged 3 commits into
mainfrom
refactor/ai-exit-gitsync
Aug 25, 2026
Merged

rbuergi merged 3 commits into
mainfrom
refactor/ai-exit-gitsync

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Step B2 of #2276. Stacked on #2287 (A2) — base retargets to main automatically once that merges.

A module cannot be injected into a platform that compiles against it. MeshWeaver.GitSync referenced MeshWeaver.AI, and through it so did MeshWeaver.PluginCatalog — transitively, which is why no grep of direct ProjectReferences ever showed that edge. This inverts it.

What moves

AiContentDiskWriter, AiContentSyncArea, AiContentSyncMenuProvider, HubAiContentSyncExtensions and the agent-backed PR drafter → MeshWeaver.AI. 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 (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 + the PullRequestDraft record stay in GitSync; the agent implementation goes to AI.

registration result
GitSync TryAddSingleton<…, PlaceholderPullRequestDraftService> deterministic title + "edit this before submitting" body
AddAI() AddSingleton<…, PullRequestDraftService> the agent-drafted title/body

Order-independent — the module wins whichever configures first (the IEmailSender shape). Without AI you now get the placeholder rather than a DI resolution failure, which is what the call site's .Catch already produced when no model was configured.

Two consumers gain an explicit reference, and that is the point

  • MeshWeaver.PluginCatalog.Test installs Agent/Skill packages and asserts on the pickers — a real AI dependency that had been arriving through GitSync.
  • AiContentSyncBackTest gains .AddAI(). It failed without it (AiContentDiskWriter has not been registered), which is the proof the seam is real rather than nominal.

Verification

  • Full solution build under CI's flags (-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

`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>
@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

   10 files  ±0     10 suites  ±0   7m 8s ⏱️ +23s
1 301 tests ±0  1 300 ✅ ±0  1 💤 ±0  0 ❌ ±0 
1 302 runs  ±0  1 301 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 00266e2. ± Comparison against base commit ca0bbd9.

♻️ This comment has been updated with latest results.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

1 201 tests  ±0   1 201 ✅ ±0   11m 31s ⏱️ - 5m 42s
    9 suites ±0       0 💤 ±0 
    9 files   ±0       0 ❌ ±0 

Results for commit 00266e2. ± Comparison against base commit ca0bbd9.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

2 106 tests  ±0   1 806 ✅ ±0   6m 59s ⏱️ - 1m 2s
    9 suites ±0     300 💤 ±0 
    9 files   ±0       0 ❌ ±0 

Results for commit 00266e2. ± Comparison against base commit ca0bbd9.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

    9 files  ±0      9 suites  ±0   6m 40s ⏱️ +22s
1 823 tests ±0  1 819 ✅ ±0  4 💤 ±0  0 ❌ ±0 
2 353 runs  ±0  2 349 ✅ ±0  4 💤 ±0  0 ❌ ±0 

Results for commit 00266e2. ± Comparison against base commit ca0bbd9.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

3 306 tests  ±0   3 306 ✅ ±0   9m 39s ⏱️ -22s
    8 suites ±0       0 💤 ±0 
    8 files   ±0       0 ❌ ±0 

Results for commit 00266e2. ± Comparison against base commit ca0bbd9.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 880 tests  ±0   1 880 ✅ ±0   8m 2s ⏱️ +18s
   10 suites ±0       0 💤 ±0 
   10 files   ±0       0 ❌ ±0 

Results for commit 00266e2. ± Comparison against base commit ca0bbd9.

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    55 files      55 suites   50m 3s ⏱️
11 617 tests 11 312 ✅ 305 💤 0 ❌
12 148 runs  11 843 ✅ 305 💤 0 ❌

Results for commit 00266e2.

♻️ This comment has been updated with latest results.

@rbuergi

rbuergi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Same stale input as #2287, same evidence: this run checked out plugins main at 22:26:05Z, and Systemorph/MeshWeaver.Plugins#685 — which makes ThreadChatView resolve IProviderKeyProtector from either namespace — merged at 23:18:36Z. This PR is stacked on #2287, so it inherits the namespace move and therefore the same 52-minute-old input.

Re-run triggered, which is what changes the input (a fresh checkout of plugins main) rather than a retry hoping for a different outcome.

@rbuergi
rbuergi changed the base branch from refactor/ai-exit-phase-a2 to main August 25, 2026 23:48
@rbuergi
rbuergi merged commit bb42409 into main Aug 25, 2026
38 of 40 checks passed
@rbuergi
rbuergi deleted the refactor/ai-exit-gitsync branch August 28, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant