Commit 05244f2
fix(fusion-rpc): server-side invalidation parity (F1, F9, F7, F10)
Align FusionHub's compute-call handling with C# RpcInboundComputeCall /
RpcComputeSystemCallSender:
- F1: wire server->client invalidation via `computed.whenInvalidated()`
(ProcessStage2 parity) instead of the post-invoke onInvalidated
subscription, so a computed invalidated mid-computation still sends
$sys-c.Invalidate. The send is deferred past the dispatch loop's
$sys.Ok so the result precedes the invalidation, matching C#'s
ProcessStage1Plus-then-ProcessStage2 ordering (a client drops an
Invalidate that arrives before its result).
- F9: route the invalidation through a Fusion-extended system-call sender
(FusionSystemCallSender.invalidate) using the peer's current connection
and serialization format, instead of a hand-rolled JSON serializeMessage
on a captured connection. RpcHub gains a `_createSystemCallSender`
factory; `_send` is now protected.
- F7: thread the inbound message CallType through RpcDispatchContext;
a Regular call to a compute method returns its result and skips
invalidation tracking (IsRegularCall parity).
- F10: `_buildServiceDef` now delegates to `super._buildServiceDef` and
only patches callTypeId for compute methods, so decorator-declared
noWait / remoteExecutionMode metadata is preserved.
Tests: moves the F1 repro into e2e-rpc.test.ts and adds regression tests
for F9 (msgpack hub pair: invalidation arrives as a binary frame, no JSON
text frame), F7 (regular call sends no $sys-c.Invalidate; compute call
does), and F10 (noWait / remoteExecutionMode survive FusionHub
registration). Full ts suite: 668 passing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SDiBQM5rnhyBG1asuP1kDi1 parent ab121bb commit 05244f2
7 files changed
Lines changed: 301 additions & 38 deletions
File tree
- docs/plans
- ts/packages
- fusion-rpc
- src
- tests
- rpc/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
| 799 | + | |
| 800 | + | |
799 | 801 | | |
800 | 802 | | |
801 | 803 | | |
| |||
857 | 859 | | |
858 | 860 | | |
859 | 861 | | |
| 862 | + | |
| 863 | + | |
860 | 864 | | |
861 | 865 | | |
862 | 866 | | |
| |||
877 | 881 | | |
878 | 882 | | |
879 | 883 | | |
| 884 | + | |
| 885 | + | |
880 | 886 | | |
881 | 887 | | |
882 | 888 | | |
883 | 889 | | |
884 | 890 | | |
885 | 891 | | |
886 | 892 | | |
| 893 | + | |
| 894 | + | |
887 | 895 | | |
888 | 896 | | |
889 | 897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | 47 | | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
| |||
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
93 | 105 | | |
94 | 106 | | |
95 | 107 | | |
| |||
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
| 122 | + | |
| 123 | + | |
110 | 124 | | |
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
115 | 129 | | |
116 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
| |||
131 | 149 | | |
132 | 150 | | |
133 | 151 | | |
134 | | - | |
| 152 | + | |
| 153 | + | |
135 | 154 | | |
136 | 155 | | |
137 | 156 | | |
138 | 157 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 158 | + | |
143 | 159 | | |
144 | 160 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
161 | 171 | | |
162 | 172 | | |
163 | | - | |
| 173 | + | |
164 | 174 | | |
165 | 175 | | |
166 | 176 | | |
| |||
181 | 191 | | |
182 | 192 | | |
183 | 193 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
192 | 215 | | |
193 | 216 | | |
194 | 217 | | |
| |||
0 commit comments