You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,7 @@ If no new rule is detected -> do not update the file.
109
109
- run broader suites only when you have something real to verify (avoid re-running the same command without changes)
110
110
- run coverage once per change (it is heavier than tests)
111
111
- Run tests in layers: new/changed -> related suite -> broader regressions
112
+
- Final verification for code changes requires the full `dotnet test -c Debug` suite to pass; targeted test runs are only for iteration, not for closing the task
112
113
- After tests pass: run format
113
114
- After format: run build (final check)
114
115
- Summarize changes and test results before marking complete
@@ -185,6 +186,7 @@ If no new rule is detected -> do not update the file.
185
186
- Avoid `this.` qualification; prefer predefined types (`int` over `Int32`)
186
187
- Never use `ConfigureAwait(false)`
187
188
- No magic literals - extract to constants, enums, config
189
+
- In concurrency-sensitive paths like `OrleansHubLifetimeManager`, prefer the smallest behavior-preserving fix; avoid widening the async/concurrency shape unless tests prove it is necessary, because this code is easy to make unsafe
varserviceProvider=(hub.Context.GetHttpContext()?.RequestServices)??thrownewInvalidOperationException("Unable to resolve SignalR services for the current hub connection.");
Copy file name to clipboardExpand all lines: docs/Features/Group-Partitioning.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,9 @@ Group operations are routed through a coordinator grain that assigns group names
23
23
-[x] Add package-level batch group APIs for hub and host-service callers.
24
24
-[x] Batch coordinator and partition updates so one request does not force sequential writes per group.
25
25
-[x] Cover batch add/remove with integration tests and direct coordinator verification.
26
+
-[x] Restore disconnect-safe subscription tracking for partitioned batch adds.
27
+
-[x] Restore the hashed cleanup fallback when batch removals see missing coordinator assignments.
28
+
-[x] Add regression tests for disconnect cleanup and degraded coordinator state.
26
29
27
30
## Main flow
28
31
@@ -44,6 +47,8 @@ flowchart TD
44
47
- Partition grains hold `group -> connection -> observer` mappings and emit fan-out to observers.
45
48
- Empty groups trigger cleanup so partitions can shed state.
46
49
- Batch membership operations collapse repeated coordinator writes into one persistence step per request and one partition write per touched partition.
50
+
- Partitioned batch adds pre-register touched partitions in the connection subscription before the coordinator write finishes so disconnect cleanup still reaches every touched partition.
51
+
- Batch removals fall back to the hashed partition when coordinator assignment metadata is missing, which preserves cleanup in degraded-state recovery scenarios.
Copy file name to clipboardExpand all lines: docs/Features/Hub-Lifetime-Manager-Integration.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ The ASP.NET Core host swaps the default SignalR hub lifetime manager with `Orlea
19
19
-[x] Restore fire-and-forget fan-out for multi-group and multi-user sends.
20
20
-[x] Ensure per-target send failures are logged without blocking hub execution.
21
21
-[x] Route package-specific batch group membership calls through the Orleans lifetime manager.
22
+
-[x] Keep batch group helper calls usable when the host is running plain `AddSignalR()`.
23
+
-[x] Add regression coverage for the batch helper path without Orleans registration.
22
24
23
25
## Main flow
24
26
@@ -38,6 +40,7 @@ flowchart TD
38
40
-`AddOrleans()` registers `OrleansHubLifetimeManager<THub>` as the `HubLifetimeManager` implementation.
39
41
- The lifetime manager creates a per-connection `Subscription` and registers observers with connection/group/user grains.
40
42
- Package-specific batch group operations (`AddToGroupsAsync` / `RemoveFromGroupsAsync`) also route through the lifetime manager instead of looping over sequential single-group writes.
43
+
- Hub batch helpers fall back to the registered `HubLifetimeManager<THub>` when `IOrleansGroupManager<THub>` is not explicitly registered, so the API still works on plain `AddSignalR()` hosts.
41
44
- Detailed batching behavior and partition persistence rules live in `docs/Features/Group-Partitioning.md`.
0 commit comments