Skip to content

feat(modules): the real MeshWeaver.AI update swaps live — added background services, keyed services, registry eviction (slice 7) - #6142

Merged
rbuergi merged 1 commit into
feat/module-live-endpoints-viewsfrom
feat/module-live-keyed-and-ai
Oct 5, 2026
Merged

rbuergi merged 1 commit into
feat/module-live-endpoints-viewsfrom
feat/module-live-keyed-and-ai

Conversation

@rbuergi

@rbuergi rbuergi commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Stacked on #6128. Policy module-live-update-default; doc: Doc/Architecture/LiveModuleUpdate → "What is shipped (slice 7)".

What changed

  • A generation may add or drop a background service and still swap live: hosted services are not part of the root-service shape; one ModuleHostedServicesHost starts the CURRENT generation's set and a swap stops/starts whole sets.
  • Keyed root services are forwarded under the module's own key.
  • MeshContentTypeRegistry evicts types of a collectible context on Unloading (it was the only strong root of a swapped-out AI generation in a heap dump).

Measured on the real incident pair (local run, not a CI test — CI cannot build two AI generations): MeshWeaver.AI from Plugins b7a083d98~1 as N and current as N+1, monolith test mesh. NodeType using ThreadPreparation.Group: CS0117 on N; swap → Live (5 hubs recycled); Ok on N+1; N collected. Before this PR the same swap answered RestartRequired ("root services changed shape", +1 hosted service), and after the shape fix N was retained by the registry.

Tests: ModuleRootServicesSwapTest.AnUpdateThatAddsAHostedService_SwapsLive_AndStartsIt; ContentTypeRegistryReleasesAnUnloadedGenerationTest (mutation-checked: fails with the eviction removed; control: a non-unloading context keeps its claim). Local Release: Compiler.Pipeline 1218/0 failed, Memex.Portal.Shared 2299/0, Graph 2508/0, Layout 616/0, Messaging.Hub 567/0, Hosting 1099/1 (known #6050 flake AGatedSweepHearsItsOwnCompileTest).

Not established: a thread running end to end (model round) on N+1; Blazor component static caches.

Pairs-with: none — no public type or member removed.
Implementers: none — no interface member added.
Mirror-sync: none — no i18n catalog change.

🤖 Generated with Claude Code

…round services, keyed services, registry eviction (slice 7)

- Hosted services are no longer part of a generation's root-service shape: one
  ModuleHostedServicesHost starts each module's CURRENT generation's hosted
  registrations; a swap stops the old set and starts the new one, whatever its size
  (the real AI N->N+1 differed by exactly one added hosted service).
- Keyed root services are forwarded under the module's key (a module-owned key stays a blocker).
- MeshContentTypeRegistry evicts a collectible context's types on Unloading — the heap
  dump's only strong root of the swapped-out AI generation.

Measured locally on the incident pair (AI from Plugins b7a083d98~1 -> current): NodeType using
ThreadPreparation.Group fails CS0117 on N, swap answers Live, compiles Ok on N+1, N collected.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@meshweaver-cloud

Copy link
Copy Markdown
Contributor

Auto-merge was not armed. This pull request targets feat/module-live-endpoints-views, not the default branch main — a non-default base has no branch protection and therefore no required contexts, so arming it would merge it immediately, before its own CI runs. Merge it by hand when you are ready, or retarget it at main to have it armed normally.

@rbuergi
rbuergi merged commit e88d1c3 into feat/module-live-endpoints-views Oct 5, 2026
19 of 21 checks passed
@rbuergi
rbuergi deleted the feat/module-live-keyed-and-ai branch October 10, 2026 13:10
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