Path: redb-route/tests/redb.Route.Tests/Eip/RouteSugarReviewTests.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/tests/redb.Route.Tests/Eip/RouteSugarReviewTests.cs ---- using redb.Route.Core; using redb.Route.TestKit; namespace redb.Route.Tests.Eip; /// Code review 2026-09-01: a wildcard property mask must not touch the framework's own DI-scope bookkeeping. public class RouteSugarReviewTests { [Fact] public async Task RemoveProperties_Wildcard_KeepsTheServiceScopeProperties() { bool? scopeKept = null; bool? userGone = null; await using var ctx = new RouteContext().AddRoutes(b => b .From("direct://rp-all") .SetProperty("tmp", 1) .SetProperty("__redb_scope:test", "scope-marker") .RemoveProperties("*") .Process(e => { scopeKept = e.Properties.ContainsKey("__redb_scope:test"); userGone = !e.Properties.ContainsKey("tmp"); })); await ctx.Start(); await ctx.SendBody("direct://rp-all", "x"); userGone.Should().BeTrue(); scopeKept.Should().BeTrue("scope bookkeeping is not user data; losing it leaks the DI scopes ReleaseScopes would dispose"); } }