Commit 4f4bd8d
committed
feat(server): add CRUD-aware interceptor system for Rust server (#116)
Enrich the server interceptor pipeline with CRUD context so
interceptors can distinguish entity insert from relation delete from
raw query — enabling rate limiting, tenant filtering, and CRUD-aware
audit logging at the HTTP layer.
- CrudInfo struct with operation/type_name/type_kind/attribute_names/iid
- CrudInterceptor convenience trait + CrudInterceptorAdapter bridge
- RequestContext and QueryInput carry crud_info through the pipeline
- All 8 CRUD handlers populate CrudInfo; non-CRUD uses Default
- PipelineBuilder::with_skip_validation() for tests needing schema without validation
- 100% MC/DC coverage on all changed files (regions/functions/lines)
- crud_interceptor.rs branches at 87.5% (1 missed: generic monomorphization artifact)
- 295 tests total (25 new)1 parent 8c59268 commit 4f4bd8d
5 files changed
Lines changed: 420 additions & 5 deletions
File tree
- type-bridge-core/crates/server/src
- interceptor
- transport
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
Lines changed: 58 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
271 | 303 | | |
272 | 304 | | |
273 | 305 | | |
| |||
279 | 311 | | |
280 | 312 | | |
281 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
282 | 326 | | |
283 | 327 | | |
284 | 328 | | |
| |||
290 | 334 | | |
291 | 335 | | |
292 | 336 | | |
| 337 | + | |
293 | 338 | | |
294 | 339 | | |
295 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
296 | 346 | | |
297 | 347 | | |
298 | 348 | | |
| |||
312 | 362 | | |
313 | 363 | | |
314 | 364 | | |
| 365 | + | |
| 366 | + | |
315 | 367 | | |
316 | 368 | | |
317 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
318 | 375 | | |
319 | 376 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| |||
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
248 | 252 | | |
249 | 253 | | |
250 | 254 | | |
| 255 | + | |
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
| |||
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
272 | 286 | | |
273 | 287 | | |
274 | 288 | | |
| |||
282 | 296 | | |
283 | 297 | | |
284 | 298 | | |
| 299 | + | |
285 | 300 | | |
286 | 301 | | |
287 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
0 commit comments