rcdebug 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1202 @@
1
+ [
2
+ {
3
+ "id": "LDP-001",
4
+ "source": "Kampfkarren/selene",
5
+ "category": "Lint",
6
+ "severity": "WARN",
7
+ "name": "almost_swapped",
8
+ "pattern": "(\\w+)\\s*=\\s*(\\w+)\\s*\\n\\s*\\2\\s*=\\s*\\1",
9
+ "root_cause": "Adjacent assignments overwrite a variable before swapping.",
10
+ "fix": "Use Luau tuple swap: a, b = b, a."
11
+ },
12
+ {
13
+ "id": "LDP-002",
14
+ "source": "Kampfkarren/selene",
15
+ "category": "Lint",
16
+ "severity": "CRITICAL",
17
+ "name": "divide_by_zero",
18
+ "pattern": "/\\s*0(?:\\.0+)?\\b",
19
+ "root_cause": "Literal division by zero produces inf or nan in Luau.",
20
+ "fix": "Guard divisor with `if divisor == 0 then return end`."
21
+ },
22
+ {
23
+ "id": "LDP-003",
24
+ "source": "Kampfkarren/selene",
25
+ "category": "Lint",
26
+ "severity": "WARN",
27
+ "name": "duplicate_keys",
28
+ "pattern": "\\{\\s*(\\w+)\\s*=.*?\\b\\1\\s*=",
29
+ "root_cause": "Duplicate key in table literal silently overwrites the earlier value.",
30
+ "fix": "Remove or rename the duplicate table key."
31
+ },
32
+ {
33
+ "id": "LDP-004",
34
+ "source": "Kampfkarren/selene",
35
+ "category": "Lint",
36
+ "severity": "WARN",
37
+ "name": "global_usage",
38
+ "pattern": "^(?!\\s*local\\b)(?!\\s*function\\s+\\w+\\.)[A-Za-z_]\\w*\\s*=",
39
+ "root_cause": "Implicit global assignment pollutes _G and bypasses Luau fast-local VM registers.",
40
+ "fix": "Declare variables with `local`."
41
+ },
42
+ {
43
+ "id": "LDP-005",
44
+ "source": "Kampfkarren/selene",
45
+ "category": "Lint",
46
+ "severity": "WARN",
47
+ "name": "shadowing",
48
+ "pattern": "local\\s+(\\w+)\\b.*\\n(?:.*\\n){0,5}?\\s*local\\s+\\1\\b",
49
+ "root_cause": "Inner `local` shadows an outer variable of the same name.",
50
+ "fix": "Rename the inner variable to avoid masking state."
51
+ },
52
+ {
53
+ "id": "LDP-006",
54
+ "source": "Kampfkarren/selene",
55
+ "category": "Lint",
56
+ "severity": "INFO",
57
+ "name": "deprecated_wait",
58
+ "pattern": "\\bwait\\s*\\(",
59
+ "root_cause": "Legacy `wait()` throttles on the 30Hz pipeline and can stall indefinitely.",
60
+ "fix": "Replace `wait()` with `task.wait()`."
61
+ },
62
+ {
63
+ "id": "LDP-007",
64
+ "source": "Kampfkarren/selene",
65
+ "category": "Lint",
66
+ "severity": "INFO",
67
+ "name": "deprecated_spawn",
68
+ "pattern": "\\bspawn\\s*\\(",
69
+ "root_cause": "Legacy `spawn()` introduces a frame delay and hides stack context.",
70
+ "fix": "Replace `spawn()` with `task.spawn()`."
71
+ },
72
+ {
73
+ "id": "LDP-008",
74
+ "source": "Kampfkarren/selene",
75
+ "category": "Lint",
76
+ "severity": "INFO",
77
+ "name": "deprecated_delay",
78
+ "pattern": "\\bdelay\\s*\\(",
79
+ "root_cause": "Legacy `delay()` uses the older 30Hz task scheduler.",
80
+ "fix": "Replace `delay()` with `task.delay()`."
81
+ },
82
+ {
83
+ "id": "LDP-009",
84
+ "source": "Kampfkarren/selene",
85
+ "category": "Lint",
86
+ "severity": "WARN",
87
+ "name": "empty_if",
88
+ "pattern": "\\bif\\b.+?\\bthen\\s*\\n\\s*(?:else|end)\\b",
89
+ "root_cause": "Empty `if` branch indicates dead logic or an unfinished guard.",
90
+ "fix": "Implement the branch or remove the conditional."
91
+ },
92
+ {
93
+ "id": "LDP-010",
94
+ "source": "Kampfkarren/selene",
95
+ "category": "Lint",
96
+ "severity": "WARN",
97
+ "name": "if_same_then_else",
98
+ "pattern": "if\\s+.+?\\bthen\\s+(\\w+)\\s+else\\s+\\1\\b",
99
+ "root_cause": "Both branches of an `if` expression return the identical value.",
100
+ "fix": "Simplify the redundant conditional."
101
+ },
102
+ {
103
+ "id": "LDP-011",
104
+ "source": "Kampfkarren/selene",
105
+ "category": "Lint",
106
+ "severity": "WARN",
107
+ "name": "mismatched_arg_count",
108
+ "pattern": "string\\.format\\s*\\(\\s*[\\\"'][^\\\"']*[\\\"']\\s*\\)",
109
+ "root_cause": "string.format called without format arguments.",
110
+ "fix": "Pass matching arguments or use plain string concatenation."
111
+ },
112
+ {
113
+ "id": "LDP-012",
114
+ "source": "Kampfkarren/selene",
115
+ "category": "Lint",
116
+ "severity": "WARN",
117
+ "name": "mixed_table",
118
+ "pattern": "\\{\\s*[^=]+,\\s*\\w+\\s*=",
119
+ "root_cause": "Mixing array and dictionary keys in one table breaks ipairs and JSON serialization.",
120
+ "fix": "Separate array and map data into distinct tables."
121
+ },
122
+ {
123
+ "id": "LDP-013",
124
+ "source": "Kampfkarren/selene",
125
+ "category": "Lint",
126
+ "severity": "WARN",
127
+ "name": "parenthese_conditions",
128
+ "pattern": "\\bif\\s*\\([^)]+\\)\\s*then",
129
+ "root_cause": "C-style parenthesized `if (...) then` condition is redundant in Luau.",
130
+ "fix": "Remove outer parentheses around conditions."
131
+ },
132
+ {
133
+ "id": "LDP-014",
134
+ "source": "Kampfkarren/selene",
135
+ "category": "Lint",
136
+ "severity": "WARN",
137
+ "name": "roblox_incorrect_color3_new_bounds",
138
+ "pattern": "Color3\\.new\\s*\\(\\s*(?:[2-9]\\d*|1\\d+)",
139
+ "root_cause": "Color3.new expects 0..1 floats; passing >1 clamps to white.",
140
+ "fix": "Use Color3.fromRGB(r, g, b) for 0..255 values."
141
+ },
142
+ {
143
+ "id": "LDP-015",
144
+ "source": "Kampfkarren/selene",
145
+ "category": "Lint",
146
+ "severity": "INFO",
147
+ "name": "roblox_manual_fromscale_or_fromoffset",
148
+ "pattern": "UDim2\\.new\\s*\\(\\s*0\\s*,\\s*\\d+\\s*,\\s*0\\s*,\\s*\\d+\\s*\\)",
149
+ "root_cause": "UDim2.new(0, x, 0, y) can be written more clearly with fromOffset.",
150
+ "fix": "Use UDim2.fromOffset(x, y) or UDim2.fromScale(x, y)."
151
+ },
152
+ {
153
+ "id": "LDP-016",
154
+ "source": "Kampfkarren/selene",
155
+ "category": "Lint",
156
+ "severity": "WARN",
157
+ "name": "unbalanced_assignments",
158
+ "pattern": "local\\s+\\w+\\s*,\\s*\\w+\\s*=\\s*[^,\\n]+$",
159
+ "root_cause": "Multiple locals declared with fewer right-hand expressions leaves trailing nil.",
160
+ "fix": "Assign explicit values to each declared local."
161
+ },
162
+ {
163
+ "id": "LDP-017",
164
+ "source": "Kampfkarren/selene",
165
+ "category": "Lint",
166
+ "severity": "WARN",
167
+ "name": "undefined_variable",
168
+ "pattern": "\\bprint\\s*\\(\\s*undefined\\b",
169
+ "root_cause": "Reference to undeclared identifier evaluates to nil at runtime.",
170
+ "fix": "Declare the variable or import the required module."
171
+ },
172
+ {
173
+ "id": "LDP-018",
174
+ "source": "Kampfkarren/selene",
175
+ "category": "Lint",
176
+ "severity": "WARN",
177
+ "name": "unused_variable",
178
+ "pattern": "local\\s+_[a-zA-Z]\\w*\\s*=",
179
+ "root_cause": "Unused local allocation adds noise and dead register pressure.",
180
+ "fix": "Remove unused locals or prefix intentionally ignored ones with `_`."
181
+ },
182
+ {
183
+ "id": "LDP-019",
184
+ "source": "Kampfkarren/selene",
185
+ "category": "Lint",
186
+ "severity": "WARN",
187
+ "name": "compare_nan",
188
+ "pattern": "==\\s*nan\\b|~=\\s*nan\\b",
189
+ "root_cause": "Comparing against a literal `nan` fails IEEE-754 semantics.",
190
+ "fix": "Check NaN with `x ~= x`."
191
+ },
192
+ {
193
+ "id": "LDP-020",
194
+ "source": "Kampfkarren/selene",
195
+ "category": "Lint",
196
+ "severity": "WARN",
197
+ "name": "type_checking_comparison",
198
+ "pattern": "typeof\\s*\\([^)]+\\)\\s*==\\s*[\\\"']nil[\\\"']",
199
+ "root_cause": "Comparing typeof(x) == 'nil' is slower than `x == nil`.",
200
+ "fix": "Use direct `x == nil` comparison."
201
+ },
202
+ {
203
+ "id": "LDP-021",
204
+ "source": "JohnnyMorganz/luau-lsp",
205
+ "category": "TypeCheck",
206
+ "severity": "INFO",
207
+ "name": "missing_strict_mode",
208
+ "pattern": "^(?!.*--!strict)",
209
+ "root_cause": "Script lacks `--!strict` directive, hiding type mismatches until runtime.",
210
+ "fix": "Add `--!strict` at line 1 of critical modules."
211
+ },
212
+ {
213
+ "id": "LDP-022",
214
+ "source": "JohnnyMorganz/luau-lsp",
215
+ "category": "TypeCheck",
216
+ "severity": "WARN",
217
+ "name": "any_type_escape",
218
+ "pattern": ":\\s*any\\b",
219
+ "root_cause": "Explicit `any` annotation disables Luau static type verification.",
220
+ "fix": "Replace `any` with concrete table/union types or `unknown`."
221
+ },
222
+ {
223
+ "id": "LDP-023",
224
+ "source": "JohnnyMorganz/luau-lsp",
225
+ "category": "TypeCheck",
226
+ "severity": "WARN",
227
+ "name": "cast_to_any",
228
+ "pattern": "::\\s*any\\b",
229
+ "root_cause": "Type cast `:: any` suppresses compiler diagnostics on unsafe boundaries.",
230
+ "fix": "Validate the runtime shape with `typeof()` and narrow the type."
231
+ },
232
+ {
233
+ "id": "LDP-024",
234
+ "source": "JohnnyMorganz/luau-lsp",
235
+ "category": "TypeCheck",
236
+ "severity": "WARN",
237
+ "name": "untyped_remote_callback",
238
+ "pattern": "OnServerEvent\\s*:\\s*Connect\\s*\\(\\s*function\\s*\\(\\s*\\w+\\s*,",
239
+ "root_cause": "Remote callback parameters lack Luau type annotations.",
240
+ "fix": "Annotate `(player: Player, ...: unknown)` and validate each argument."
241
+ },
242
+ {
243
+ "id": "LDP-025",
244
+ "source": "JohnnyMorganz/luau-lsp",
245
+ "category": "TypeCheck",
246
+ "severity": "WARN",
247
+ "name": "optional_index_unchecked",
248
+ "pattern": "FindFirstChild\\w*\\([^)]+\\)\\.",
249
+ "root_cause": "Direct property access on FindFirstChild result crashes if nil.",
250
+ "fix": "Assign to a local and guard `if child then ... end`."
251
+ },
252
+ {
253
+ "id": "LDP-026",
254
+ "source": "JohnnyMorganz/luau-lsp",
255
+ "category": "TypeCheck",
256
+ "severity": "WARN",
257
+ "name": "character_unchecked",
258
+ "pattern": "\\.Character\\.[A-Z]",
259
+ "root_cause": "Direct indexing on `player.Character` fails during respawn before CharacterAdded.",
260
+ "fix": "Use `local char = player.Character; if not char then return end`."
261
+ },
262
+ {
263
+ "id": "LDP-027",
264
+ "source": "JohnnyMorganz/luau-lsp",
265
+ "category": "TypeCheck",
266
+ "severity": "WARN",
267
+ "name": "primary_part_unchecked",
268
+ "pattern": "\\.PrimaryPart\\.[A-Z]",
269
+ "root_cause": "Accessing `model.PrimaryPart` without a nil guard throws when StreamingEnabled unloads parts.",
270
+ "fix": "Guard `local root = model.PrimaryPart; if not root then return end`."
271
+ },
272
+ {
273
+ "id": "LDP-028",
274
+ "source": "JohnnyMorganz/luau-lsp",
275
+ "category": "TypeCheck",
276
+ "severity": "INFO",
277
+ "name": "deprecated_ipairs_for_gen",
278
+ "pattern": "\\bfor\\s+\\w+\\s*,\\s*\\w+\\s+in\\s+ipairs\\s*\\(",
279
+ "root_cause": "Explicit `ipairs()` is slower than Luau generalized iteration.",
280
+ "fix": "Use generalized iteration: `for i, v in list do`."
281
+ },
282
+ {
283
+ "id": "LDP-029",
284
+ "source": "JohnnyMorganz/luau-lsp",
285
+ "category": "TypeCheck",
286
+ "severity": "INFO",
287
+ "name": "deprecated_pairs_for_gen",
288
+ "pattern": "\\bfor\\s+\\w+\\s*,\\s*\\w+\\s+in\\s+pairs\\s*\\(",
289
+ "root_cause": "Explicit `pairs()` is unnecessary with Luau generalized iteration.",
290
+ "fix": "Use generalized iteration: `for k, v in dict do`."
291
+ },
292
+ {
293
+ "id": "LDP-030",
294
+ "source": "JohnnyMorganz/luau-lsp",
295
+ "category": "TypeCheck",
296
+ "severity": "WARN",
297
+ "name": "string_byte_oob",
298
+ "pattern": "string\\.sub\\s*\\([^,]+,\\s*0\\s*,",
299
+ "root_cause": "Luau strings are 1-indexed; passing 0 in string.sub is off-by-one.",
300
+ "fix": "Use 1-based start indices in string.sub."
301
+ },
302
+ {
303
+ "id": "LDP-031",
304
+ "source": "JohnnyMorganz/luau-lsp",
305
+ "category": "TypeCheck",
306
+ "severity": "WARN",
307
+ "name": "table_insert_in_hotloop",
308
+ "pattern": "table\\.insert\\s*\\(\\s*\\w+\\s*,\\s*1\\s*,",
309
+ "root_cause": "Inserting at index 1 shifts the entire array in O(n) per call.",
310
+ "fix": "Append to the end or use a ring buffer."
311
+ },
312
+ {
313
+ "id": "LDP-032",
314
+ "source": "JohnnyMorganz/luau-lsp",
315
+ "category": "TypeCheck",
316
+ "severity": "WARN",
317
+ "name": "table_remove_shift",
318
+ "pattern": "table\\.remove\\s*\\(\\s*\\w+\\s*,\\s*1\\s*\\)",
319
+ "root_cause": "Removing index 1 shifts all elements in O(n).",
320
+ "fix": "Use swap-remove or a head-index queue."
321
+ },
322
+ {
323
+ "id": "LDP-033",
324
+ "source": "JohnnyMorganz/luau-lsp",
325
+ "category": "TypeCheck",
326
+ "severity": "WARN",
327
+ "name": "coroutine_resume_unwrapped",
328
+ "pattern": "coroutine\\.resume\\s*\\(",
329
+ "root_cause": "coroutine.resume swallows errors unless the first boolean return is checked.",
330
+ "fix": "Check `local ok, err = coroutine.resume(co)` or use `task.spawn`."
331
+ },
332
+ {
333
+ "id": "LDP-034",
334
+ "source": "JohnnyMorganz/luau-lsp",
335
+ "category": "TypeCheck",
336
+ "severity": "WARN",
337
+ "name": "pcall_ignored_status",
338
+ "pattern": "^\\s*pcall\\s*\\(",
339
+ "root_cause": "Calling `pcall()` without capturing `ok, err` hides runtime failures.",
340
+ "fix": "Capture `local ok, err = pcall(...)` and log/handle failures."
341
+ },
342
+ {
343
+ "id": "LDP-035",
344
+ "source": "JohnnyMorganz/luau-lsp",
345
+ "category": "TypeCheck",
346
+ "severity": "WARN",
347
+ "name": "xpcall_missing_handler",
348
+ "pattern": "xpcall\\s*\\([^,)]+\\)",
349
+ "root_cause": "xpcall requires a second error-handler function argument.",
350
+ "fix": "Pass `debug.traceback` as the error handler."
351
+ },
352
+ {
353
+ "id": "LDP-036",
354
+ "source": "JohnnyMorganz/luau-lsp",
355
+ "category": "TypeCheck",
356
+ "severity": "INFO",
357
+ "name": "require_dynamic_expr",
358
+ "pattern": "require\\s*\\(\\s*[^\\\"'\\w]",
359
+ "root_cause": "Dynamic require expressions prevent static type resolution in luau-lsp.",
360
+ "fix": "Use static script path references for require()."
361
+ },
362
+ {
363
+ "id": "LDP-037",
364
+ "source": "JohnnyMorganz/luau-lsp",
365
+ "category": "TypeCheck",
366
+ "severity": "WARN",
367
+ "name": "getfenv_deopt",
368
+ "pattern": "\\bgetfenv\\s*\\(",
369
+ "root_cause": "getfenv() disables Luau VM fastcall and native codegen optimizations.",
370
+ "fix": "Remove getfenv() and pass dependencies explicitly."
371
+ },
372
+ {
373
+ "id": "LDP-038",
374
+ "source": "JohnnyMorganz/luau-lsp",
375
+ "category": "TypeCheck",
376
+ "severity": "WARN",
377
+ "name": "setfenv_deopt",
378
+ "pattern": "\\bsetfenv\\s*\\(",
379
+ "root_cause": "setfenv() breaks Luau compiler optimizations and type inference.",
380
+ "fix": "Avoid setfenv() in modern Luau modules."
381
+ },
382
+ {
383
+ "id": "LDP-039",
384
+ "source": "JohnnyMorganz/luau-lsp",
385
+ "category": "TypeCheck",
386
+ "severity": "INFO",
387
+ "name": "loadstring_client_invalid",
388
+ "pattern": "\\bloadstring\\s*\\(",
389
+ "root_cause": "loadstring() is blocked on clients and is an RCE risk on servers.",
390
+ "fix": "Replace loadstring() with static dispatch tables."
391
+ },
392
+ {
393
+ "id": "LDP-040",
394
+ "source": "JohnnyMorganz/luau-lsp",
395
+ "category": "TypeCheck",
396
+ "severity": "WARN",
397
+ "name": "untyped_export_module",
398
+ "pattern": "return\\s+\\{\\s*\\}",
399
+ "root_cause": "Module returns an empty untyped table.",
400
+ "fix": "Export explicit Luau types via `export type`."
401
+ },
402
+ {
403
+ "id": "LDP-041",
404
+ "source": "luau-lang/luau",
405
+ "category": "Profiler",
406
+ "severity": "INFO",
407
+ "name": "native_codegen_candidate",
408
+ "pattern": "--!native",
409
+ "root_cause": "Module uses `--!native`; verify hot math loops avoid polymorphic tables.",
410
+ "fix": "Profile `<native>` frames in Roblox Script Profiler."
411
+ },
412
+ {
413
+ "id": "LDP-042",
414
+ "source": "luau-lang/luau",
415
+ "category": "Profiler",
416
+ "severity": "WARN",
417
+ "name": "debug_profilebegin_unclosed",
418
+ "pattern": "debug\\.profilebegin\\s*\\(",
419
+ "root_cause": "Unpaired debug.profilebegin() without debug.profileend() corrupts MicroProfiler scopes.",
420
+ "fix": "Pair every debug.profilebegin() with debug.profileend()."
421
+ },
422
+ {
423
+ "id": "LDP-043",
424
+ "source": "luau-lang/luau",
425
+ "category": "Profiler",
426
+ "severity": "WARN",
427
+ "name": "table_clear_vs_realloc",
428
+ "pattern": "=\\s*\\{\\s*\\}\\s*--\\s*reset",
429
+ "root_cause": "Reallocating `{}` inside a frame loop increases GC pressure.",
430
+ "fix": "Use `table.clear(buf)` to reuse pre-allocated buffers."
431
+ },
432
+ {
433
+ "id": "LDP-044",
434
+ "source": "luau-lang/luau",
435
+ "category": "Profiler",
436
+ "severity": "WARN",
437
+ "name": "table_create_missing",
438
+ "pattern": "for\\s+\\w+\\s*=\\s*1\\s*,\\s*(?:[1-9]\\d{2,})",
439
+ "root_cause": "Large numeric loop building an array without `table.create(n)` causes repeated resizes.",
440
+ "fix": "Pre-size arrays with `table.create(n)`."
441
+ },
442
+ {
443
+ "id": "LDP-045",
444
+ "source": "luau-lang/luau",
445
+ "category": "Profiler",
446
+ "severity": "WARN",
447
+ "name": "string_concat_in_loop",
448
+ "pattern": "\\.\\.\\s*\\w+\\s*\\n",
449
+ "root_cause": "Repeated `..` string concatenation in loops allocates O(n^2) intermediate strings.",
450
+ "fix": "Accumulate parts in an array and call `table.concat(parts)`."
451
+ },
452
+ {
453
+ "id": "LDP-046",
454
+ "source": "luau-lang/luau",
455
+ "category": "Profiler",
456
+ "severity": "WARN",
457
+ "name": "math_pow_vs_mul",
458
+ "pattern": "\\^\\s*2\\b",
459
+ "root_cause": "Exponentiation `x ^ 2` invokes pow() instead of single-instruction multiply.",
460
+ "fix": "Use `x * x` in tight vector/physics loops."
461
+ },
462
+ {
463
+ "id": "LDP-047",
464
+ "source": "luau-lang/luau",
465
+ "category": "Profiler",
466
+ "severity": "WARN",
467
+ "name": "vector3_magnitude_vs_dot",
468
+ "pattern": "\\.Magnitude\\s*[<>]",
469
+ "root_cause": "Comparing `.Magnitude` computes a square root unnecessarily.",
470
+ "fix": "Compare squared lengths via `v:Dot(v) < r * r` when appropriate."
471
+ },
472
+ {
473
+ "id": "LDP-048",
474
+ "source": "luau-lang/luau",
475
+ "category": "Profiler",
476
+ "severity": "INFO",
477
+ "name": "buffer_library_opportunity",
478
+ "pattern": "string\\.pack\\s*\\(",
479
+ "root_cause": "Packed binary serialization can use the zero-copy Luau `buffer` library.",
480
+ "fix": "Consider `buffer.create` / `buffer.writeu32` for binary packets."
481
+ },
482
+ {
483
+ "id": "LDP-049",
484
+ "source": "luau-lang/luau",
485
+ "category": "Profiler",
486
+ "severity": "WARN",
487
+ "name": "task_wait_zero_spin",
488
+ "pattern": "while\\s+true\\s+do\\s*\\n\\s*task\\.wait\\s*\\(\\s*\\)",
489
+ "root_cause": "Busy `while true do task.wait() end` polling wastes frame budget.",
490
+ "fix": "Drive state transitions via Signals or RBXScriptSignals."
491
+ },
492
+ {
493
+ "id": "LDP-050",
494
+ "source": "luau-lang/luau",
495
+ "category": "Profiler",
496
+ "severity": "WARN",
497
+ "name": "renderstepped_heavy_work",
498
+ "pattern": "RenderStepped\\s*:\\s*Connect",
499
+ "root_cause": "Heavy logic in RenderStepped blocks frame rendering on low-end clients.",
500
+ "fix": "Move non-camera logic to Heartbeat or fixed-step accumulators."
501
+ },
502
+ {
503
+ "id": "LDP-051",
504
+ "source": "luau-lang/luau",
505
+ "category": "Profiler",
506
+ "severity": "WARN",
507
+ "name": "heartbeat_unbounded_loop",
508
+ "pattern": "Heartbeat\\s*:\\s*Connect\\s*\\(",
509
+ "root_cause": "Ensure Heartbeat callbacks stay bounded (<1ms) and disconnect on cleanup.",
510
+ "fix": "Profile Heartbeat callback duration with debug.profilebegin()."
511
+ },
512
+ {
513
+ "id": "LDP-052",
514
+ "source": "luau-lang/luau",
515
+ "category": "Profiler",
516
+ "severity": "WARN",
517
+ "name": "json_encode_hotpath",
518
+ "pattern": "HttpService\\s*:\\s*JSONEncode",
519
+ "root_cause": "Calling JSONEncode per frame on large tables spikes CPU and heap.",
520
+ "fix": "Throttle or batch telemetry JSON serialization."
521
+ },
522
+ {
523
+ "id": "LDP-053",
524
+ "source": "luau-lang/luau",
525
+ "category": "Profiler",
526
+ "severity": "WARN",
527
+ "name": "getdescendants_hotpath",
528
+ "pattern": ":\\s*GetDescendants\\s*\\(",
529
+ "root_cause": "Calling GetDescendants() inside Heartbeat/Touched scans the full subtree repeatedly.",
530
+ "fix": "Cache tracked instances via DescendantAdded/Removing or CollectionService."
531
+ },
532
+ {
533
+ "id": "LDP-054",
534
+ "source": "luau-lang/luau",
535
+ "category": "Profiler",
536
+ "severity": "WARN",
537
+ "name": "findfirstchild_recursive",
538
+ "pattern": ":\\s*FindFirstChild\\s*\\([^,]+,\\s*true\\s*\\)",
539
+ "root_cause": "Recursive FindFirstChild(..., true) performs a full DFS traversal.",
540
+ "fix": "Use CollectionService tags or direct references."
541
+ },
542
+ {
543
+ "id": "LDP-055",
544
+ "source": "luau-lang/luau",
545
+ "category": "Profiler",
546
+ "severity": "WARN",
547
+ "name": "clone_without_pool",
548
+ "pattern": ":\\s*Clone\\s*\\(\\s*\\)",
549
+ "root_cause": "Frequent :Clone() calls on projectiles/VFX fragment instance memory.",
550
+ "fix": "Use an object pool or Debris:AddItem() with bounded lifetimes."
551
+ },
552
+ {
553
+ "id": "LDP-056",
554
+ "source": "luau-lang/luau",
555
+ "category": "Profiler",
556
+ "severity": "INFO",
557
+ "name": "parallel_luau_desync",
558
+ "pattern": "task\\.desynchronize\\s*\\(",
559
+ "root_cause": "Parallel Luau actor code must call `task.synchronize()` before mutating Instances.",
560
+ "fix": "Verify `task.synchronize()` precedes any DataModel writes."
561
+ },
562
+ {
563
+ "id": "LDP-057",
564
+ "source": "luau-lang/luau",
565
+ "category": "Profiler",
566
+ "severity": "WARN",
567
+ "name": "debug_traceback_hot",
568
+ "pattern": "debug\\.traceback\\s*\\(",
569
+ "root_cause": "Capturing debug.traceback() on every event call creates heavy string allocations.",
570
+ "fix": "Only invoke debug.traceback() inside error handlers."
571
+ },
572
+ {
573
+ "id": "LDP-058",
574
+ "source": "luau-lang/luau",
575
+ "category": "Profiler",
576
+ "severity": "WARN",
577
+ "name": "os_clock_precision",
578
+ "pattern": "\\btick\\s*\\(",
579
+ "root_cause": "Legacy `tick()` is timezone-dependent and deprecated in favor of os.clock/workspace.",
580
+ "fix": "Use `os.clock()` for deltas or `workspace:GetServerTimeNow()` for sync."
581
+ },
582
+ {
583
+ "id": "LDP-059",
584
+ "source": "luau-lang/luau",
585
+ "category": "Profiler",
586
+ "severity": "WARN",
587
+ "name": "collectionservice_uncleaned",
588
+ "pattern": "GetInstanceAddedSignal",
589
+ "root_cause": "CollectionService added listeners without corresponding removal cleanup leak state.",
590
+ "fix": "Pair GetInstanceAddedSignal with GetInstanceRemovedSignal."
591
+ },
592
+ {
593
+ "id": "LDP-060",
594
+ "source": "luau-lang/luau",
595
+ "category": "Profiler",
596
+ "severity": "INFO",
597
+ "name": "gcinfo_spike_watch",
598
+ "pattern": "gcinfo\\s*\\(\\s*\\)",
599
+ "root_cause": "Manual gcinfo() checks should be paired with Stats:GetTotalMemoryUsageMb().",
600
+ "fix": "Track memory trend deltas over 10s windows."
601
+ },
602
+ {
603
+ "id": "LDP-061",
604
+ "source": "Sleitnick/RbxUtil (Trove)",
605
+ "category": "Memory",
606
+ "severity": "CRITICAL",
607
+ "name": "untracked_connect",
608
+ "pattern": ":\\s*Connect\\s*\\(",
609
+ "root_cause": "RBXScriptConnection created without storing or registering with Trove/Janitor.",
610
+ "fix": "Store the connection or attach via `trove:Connect(signal, fn)`."
611
+ },
612
+ {
613
+ "id": "LDP-062",
614
+ "source": "howmanysmall/Janitor",
615
+ "category": "Memory",
616
+ "severity": "WARN",
617
+ "name": "player_removing_missing",
618
+ "pattern": "Players\\.PlayerAdded\\s*:\\s*Connect",
619
+ "root_cause": "PlayerAdded listener without PlayerRemoving cleanup leaks per-player tables.",
620
+ "fix": "Clean up player state in `Players.PlayerRemoving:Connect(...)`."
621
+ },
622
+ {
623
+ "id": "LDP-063",
624
+ "source": "Sleitnick/RbxUtil (Trove)",
625
+ "category": "Memory",
626
+ "severity": "WARN",
627
+ "name": "character_added_leak",
628
+ "pattern": "\\.CharacterAdded\\s*:\\s*Connect",
629
+ "root_cause": "CharacterAdded connections created inside loops leak on respawn.",
630
+ "fix": "Attach character connections to a per-character Trove/Janitor."
631
+ },
632
+ {
633
+ "id": "LDP-064",
634
+ "source": "howmanysmall/Janitor",
635
+ "category": "Memory",
636
+ "severity": "WARN",
637
+ "name": "destroying_not_bound",
638
+ "pattern": "\\.Destroying\\s*:\\s*Connect",
639
+ "root_cause": "Bind cleanup to `instance.Destroying` or `janitor:LinkToInstance(inst)`.",
640
+ "fix": "Use LinkToInstance or Trove:AttachToInstance()."
641
+ },
642
+ {
643
+ "id": "LDP-065",
644
+ "source": "Sleitnick/RbxUtil (Trove)",
645
+ "category": "Memory",
646
+ "severity": "WARN",
647
+ "name": "instance_new_parent_first",
648
+ "pattern": "Instance\\.new\\s*\\([^)]+,\\s*[^)]+\\)",
649
+ "root_cause": "Passing parent as 2nd argument to Instance.new() triggers extra property replication.",
650
+ "fix": "Set properties first, then assign `.Parent` last."
651
+ },
652
+ {
653
+ "id": "LDP-066",
654
+ "source": "howmanysmall/Janitor",
655
+ "category": "Memory",
656
+ "severity": "WARN",
657
+ "name": "tween_uncleaned",
658
+ "pattern": "TweenService\\s*:\\s*Create\\s*\\(",
659
+ "root_cause": "Created Tweens hold strong references to targets until completed or destroyed.",
660
+ "fix": "Call `tween:Destroy()` or register with Trove/Janitor."
661
+ },
662
+ {
663
+ "id": "LDP-067",
664
+ "source": "Sleitnick/RbxUtil (Trove)",
665
+ "category": "Memory",
666
+ "severity": "WARN",
667
+ "name": "task_spawn_untracked",
668
+ "pattern": "task\\.spawn\\s*\\(",
669
+ "root_cause": "Long-lived `task.spawn` threads can continue running after entity destruction.",
670
+ "fix": "Cancel spawned threads with `task.cancel(thread)` via Trove/Janitor."
671
+ },
672
+ {
673
+ "id": "LDP-068",
674
+ "source": "howmanysmall/Janitor",
675
+ "category": "Memory",
676
+ "severity": "WARN",
677
+ "name": "bind_to_renderstep_leak",
678
+ "pattern": "BindToRenderStep\\s*\\(",
679
+ "root_cause": "RunService:BindToRenderStep without UnbindFromRenderStep leaks callbacks.",
680
+ "fix": "Pair with `RunService:UnbindFromRenderStep(name)` on cleanup."
681
+ },
682
+ {
683
+ "id": "LDP-069",
684
+ "source": "Sleitnick/RbxUtil (Trove)",
685
+ "category": "Memory",
686
+ "severity": "WARN",
687
+ "name": "contextaction_unbound",
688
+ "pattern": "BindAction\\s*\\(",
689
+ "root_cause": "ContextActionService:BindAction without UnbindAction leaves stale input bindings.",
690
+ "fix": "Unbind actions when tools unequip or UI closes."
691
+ },
692
+ {
693
+ "id": "LDP-070",
694
+ "source": "howmanysmall/Janitor",
695
+ "category": "Memory",
696
+ "severity": "WARN",
697
+ "name": "userinput_leak",
698
+ "pattern": "UserInputService\\.\\w+\\s*:\\s*Connect",
699
+ "root_cause": "Global UserInputService connections inside temporary UIs leak across opens.",
700
+ "fix": "Disconnect input listeners when UI unmounts."
701
+ },
702
+ {
703
+ "id": "LDP-071",
704
+ "source": "Sleitnick/RbxUtil (Trove)",
705
+ "category": "Memory",
706
+ "severity": "WARN",
707
+ "name": "attribute_changed_leak",
708
+ "pattern": "GetAttributeChangedSignal\\s*\\(",
709
+ "root_cause": "Attribute changed signals must be disconnected when the observed instance is removed.",
710
+ "fix": "Track the connection in Trove/Janitor."
711
+ },
712
+ {
713
+ "id": "LDP-072",
714
+ "source": "howmanysmall/Janitor",
715
+ "category": "Memory",
716
+ "severity": "WARN",
717
+ "name": "property_changed_leak",
718
+ "pattern": "GetPropertyChangedSignal\\s*\\(",
719
+ "root_cause": "Property changed signals retain closures until disconnected.",
720
+ "fix": "Clean up via Trove/Janitor."
721
+ },
722
+ {
723
+ "id": "LDP-073",
724
+ "source": "Sleitnick/RbxUtil (Trove)",
725
+ "category": "Memory",
726
+ "severity": "WARN",
727
+ "name": "strong_player_key_table",
728
+ "pattern": "\\[\\s*player\\s*\\]\\s*=",
729
+ "root_cause": "Using Player instances as table keys leaks Player memory if not cleared on leave.",
730
+ "fix": "Clear `tbl[player] = nil` on PlayerRemoving or key by `player.UserId`."
731
+ },
732
+ {
733
+ "id": "LDP-074",
734
+ "source": "howmanysmall/Janitor",
735
+ "category": "Memory",
736
+ "severity": "WARN",
737
+ "name": "sound_ended_uncleaned",
738
+ "pattern": "Sound\\.Ended",
739
+ "root_cause": "Dynamically cloned Sounds must be destroyed after Ended fires.",
740
+ "fix": "Use `Debris:AddItem(sound, sound.TimeLength + 0.5)` or `trove:Add(sound)`."
741
+ },
742
+ {
743
+ "id": "LDP-075",
744
+ "source": "Sleitnick/RbxUtil (Trove)",
745
+ "category": "Memory",
746
+ "severity": "WARN",
747
+ "name": "debris_zero_or_missing",
748
+ "pattern": "Debris\\s*:\\s*AddItem",
749
+ "root_cause": "Verify Debris:AddItem lifetime is positive and finite.",
750
+ "fix": "Pass a bounded positive duration (e.g. 2-5 seconds)."
751
+ },
752
+ {
753
+ "id": "LDP-076",
754
+ "source": "howmanysmall/Janitor",
755
+ "category": "Memory",
756
+ "severity": "WARN",
757
+ "name": "raycast_params_realloc",
758
+ "pattern": "RaycastParams\\.new\\s*\\(\\s*\\)",
759
+ "root_cause": "Allocating RaycastParams.new() every frame adds unnecessary GC churn.",
760
+ "fix": "Reuse a cached RaycastParams object and update FilterDescendantsInstances."
761
+ },
762
+ {
763
+ "id": "LDP-077",
764
+ "source": "Sleitnick/RbxUtil (Trove)",
765
+ "category": "Memory",
766
+ "severity": "WARN",
767
+ "name": "overlap_params_realloc",
768
+ "pattern": "OverlapParams\\.new\\s*\\(\\s*\\)",
769
+ "root_cause": "Re-creating OverlapParams inside spatial query loops wastes allocations.",
770
+ "fix": "Hoist OverlapParams outside the loop."
771
+ },
772
+ {
773
+ "id": "LDP-078",
774
+ "source": "howmanysmall/Janitor",
775
+ "category": "Memory",
776
+ "severity": "INFO",
777
+ "name": "weak_table_hint",
778
+ "pattern": "setmetatable\\s*\\([^,]+,\\s*\\{\\s*__mode",
779
+ "root_cause": "Weak tables still require explicit cleanup for Instance keys in some cycles.",
780
+ "fix": "Prefer explicit Trove/Janitor destruction."
781
+ },
782
+ {
783
+ "id": "LDP-079",
784
+ "source": "Sleitnick/RbxUtil (Trove)",
785
+ "category": "Memory",
786
+ "severity": "WARN",
787
+ "name": "child_added_unbounded",
788
+ "pattern": "\\.ChildAdded\\s*:\\s*Connect",
789
+ "root_cause": "ChildAdded callbacks that allocate state per child need ChildRemoved cleanup.",
790
+ "fix": "Pair ChildAdded with ChildRemoved or Destroying."
791
+ },
792
+ {
793
+ "id": "LDP-080",
794
+ "source": "howmanysmall/Janitor",
795
+ "category": "Memory",
796
+ "severity": "WARN",
797
+ "name": "descendant_added_heavy",
798
+ "pattern": "\\.DescendantAdded\\s*:\\s*Connect",
799
+ "root_cause": "DescendantAdded on Workspace fires for every part/particle spawned.",
800
+ "fix": "Filter fast with `if not inst:IsA(...) then return end`."
801
+ },
802
+ {
803
+ "id": "LDP-081",
804
+ "source": "SirMallard/Iris",
805
+ "category": "DebugUI",
806
+ "severity": "INFO",
807
+ "name": "iris_loop_guard",
808
+ "pattern": "Iris\\.Begin\\s*\\(",
809
+ "root_cause": "Iris UI calls must be wrapped inside Iris:Connect() or guarded against nil state.",
810
+ "fix": "Ensure Iris.Init() is called once on the client."
811
+ },
812
+ {
813
+ "id": "LDP-082",
814
+ "source": "Evaera/Cmdr",
815
+ "category": "Admin",
816
+ "severity": "CRITICAL",
817
+ "name": "cmdr_hook_missing",
818
+ "pattern": "Cmdr\\s*:\\s*RegisterDefaultCommands",
819
+ "root_cause": "Cmdr commands without a BeforeRun hook expose admin commands to all players.",
820
+ "fix": "Register a server BeforeRun hook checking `context.Executor` rank."
821
+ },
822
+ {
823
+ "id": "LDP-083",
824
+ "source": "Roblox/testez",
825
+ "category": "Testing",
826
+ "severity": "INFO",
827
+ "name": "testez_describe_missing_expect",
828
+ "pattern": "it\\s*\\(\\s*[\\\"']",
829
+ "root_cause": "TestEZ spec should assert concrete post-conditions via `expect(...).to`.",
830
+ "fix": "Verify both happy-path and exploit/invalid-input cases."
831
+ },
832
+ {
833
+ "id": "LDP-084",
834
+ "source": "Sleitnick/RbxUtil (Signal)",
835
+ "category": "Events",
836
+ "severity": "WARN",
837
+ "name": "signal_reentrancy",
838
+ "pattern": ":\\s*Fire\\s*\\(",
839
+ "root_cause": "Custom Signal:Fire() handlers can trigger re-entrant mutations if state updates after Fire.",
840
+ "fix": "Update authoritative state before firing signals."
841
+ },
842
+ {
843
+ "id": "LDP-085",
844
+ "source": "Roblox/signals",
845
+ "category": "Events",
846
+ "severity": "INFO",
847
+ "name": "reactive_effect_cleanup",
848
+ "pattern": "createEffect\\s*\\(",
849
+ "root_cause": "Reactive effects must return or register a cleanup disposer.",
850
+ "fix": "Dispose effects when UI components unmount."
851
+ },
852
+ {
853
+ "id": "LDP-086",
854
+ "source": "Evaera/Cmdr",
855
+ "category": "Admin",
856
+ "severity": "CRITICAL",
857
+ "name": "admin_command_client_check",
858
+ "pattern": "IsAdmin|AdminList",
859
+ "root_cause": "Never rely solely on client-side admin checks for command visibility/execution.",
860
+ "fix": "Enforce admin UserId/GroupRank checks on the server."
861
+ },
862
+ {
863
+ "id": "LDP-087",
864
+ "source": "SirMallard/Iris",
865
+ "category": "DebugUI",
866
+ "severity": "INFO",
867
+ "name": "debug_gui_prod_leak",
868
+ "pattern": "DebugGui|DevOverlay",
869
+ "root_cause": "Ensure debug overlays are gated to Studio or authorized developers.",
870
+ "fix": "Check `RunService:IsStudio()` or server-verified developer UserIds."
871
+ },
872
+ {
873
+ "id": "LDP-088",
874
+ "source": "Roblox/testez",
875
+ "category": "Testing",
876
+ "severity": "INFO",
877
+ "name": "mock_remote_boundary",
878
+ "pattern": "OnServerInvoke",
879
+ "root_cause": "RemoteFunction.OnServerInvoke yields the caller and can hang if a handler errors.",
880
+ "fix": "Wrap OnServerInvoke logic in pcall and validate all return values."
881
+ },
882
+ {
883
+ "id": "LDP-089",
884
+ "source": "Sleitnick/RbxUtil (Signal)",
885
+ "category": "Events",
886
+ "severity": "WARN",
887
+ "name": "bindable_event_yield",
888
+ "pattern": "BindableEvent",
889
+ "root_cause": "BindableEvent:Fire() deep-copies table arguments (stripping metatables).",
890
+ "fix": "Pass plain serializable tables or use pure-Luau Signal modules."
891
+ },
892
+ {
893
+ "id": "LDP-090",
894
+ "source": "Roblox/creator-docs",
895
+ "category": "Replication",
896
+ "severity": "CRITICAL",
897
+ "name": "streaming_waitforchild_timeout",
898
+ "pattern": ":\\s*WaitForChild\\s*\\(\\s*[\\\"'][^\\\"']+[\\\"']\\s*\\)",
899
+ "root_cause": "WaitForChild without a timeout yields forever if the instance never replicates.",
900
+ "fix": "Pass a numeric timeout: `WaitForChild(name, 5)`."
901
+ },
902
+ {
903
+ "id": "LDP-091",
904
+ "source": "Roblox/creator-docs",
905
+ "category": "Replication",
906
+ "severity": "WARN",
907
+ "name": "content_provider_unbounded",
908
+ "pattern": "PreloadAsync\\s*\\(",
909
+ "root_cause": "Preloading huge descendant lists blocks client loading screens.",
910
+ "fix": "Preload only critical assets in small batches."
911
+ },
912
+ {
913
+ "id": "LDP-092",
914
+ "source": "Roblox/creator-docs",
915
+ "category": "Physics",
916
+ "severity": "CRITICAL",
917
+ "name": "humanoid_state_client_owned",
918
+ "pattern": "Humanoid\\.WalkSpeed",
919
+ "root_cause": "Client owns Humanoid physics; setting WalkSpeed client-side is trivially bypassed.",
920
+ "fix": "Validate movement velocity/displacement on the server."
921
+ },
922
+ {
923
+ "id": "LDP-093",
924
+ "source": "Roblox/creator-docs",
925
+ "category": "Physics",
926
+ "severity": "WARN",
927
+ "name": "network_ownership_auto",
928
+ "pattern": "SetNetworkOwner",
929
+ "root_cause": "Calling SetNetworkOwner on anchored parts throws an error.",
930
+ "fix": "Verify `not part.Anchored` and `part:IsDescendantOf(workspace)` first."
931
+ },
932
+ {
933
+ "id": "LDP-094",
934
+ "source": "Roblox/creator-docs",
935
+ "category": "Security",
936
+ "severity": "CRITICAL",
937
+ "name": "datastore_getasync_unwrapped",
938
+ "pattern": ":\\s*GetAsync\\s*\\(",
939
+ "root_cause": "DataStore GetAsync() can throw on Roblox API outages or throttling.",
940
+ "fix": "Wrap DataStore calls in pcall() with bounded exponential backoff."
941
+ },
942
+ {
943
+ "id": "LDP-095",
944
+ "source": "Roblox/creator-docs",
945
+ "category": "Security",
946
+ "severity": "CRITICAL",
947
+ "name": "datastore_budget_exhaust",
948
+ "pattern": "DataStoreService",
949
+ "root_cause": "Unthrottled DataStore writes on RemoteEvents exhaust the per-minute request budget.",
950
+ "fix": "Cache player data in memory and save periodically + on PlayerRemoving/BindToClose."
951
+ },
952
+ {
953
+ "id": "LDP-096",
954
+ "source": "Roblox/creator-docs",
955
+ "category": "Security",
956
+ "severity": "CRITICAL",
957
+ "name": "bind_to_close_missing",
958
+ "pattern": "PlayerRemoving",
959
+ "root_cause": "Server shutdowns can drop final DataStore saves without game:BindToClose().",
960
+ "fix": "Save all active player profiles inside `game:BindToClose()`."
961
+ },
962
+ {
963
+ "id": "LDP-097",
964
+ "source": "Roblox/creator-docs",
965
+ "category": "Security",
966
+ "severity": "WARN",
967
+ "name": "marketplace_gamepass_cache",
968
+ "pattern": "UserOwnsGamePassAsync",
969
+ "root_cause": "UserOwnsGamePassAsync caches results and can fail without pcall.",
970
+ "fix": "Wrap in pcall() and handle PromptGamePassPurchaseFinished."
971
+ },
972
+ {
973
+ "id": "LDP-098",
974
+ "source": "Roblox/creator-docs",
975
+ "category": "Security",
976
+ "severity": "WARN",
977
+ "name": "group_rank_cache",
978
+ "pattern": "GetRankInGroup|GetRoleInGroup",
979
+ "root_cause": "GetRankInGroup makes a web call and can fail if not wrapped in pcall.",
980
+ "fix": "Cache group rank on PlayerAdded inside pcall()."
981
+ },
982
+ {
983
+ "id": "LDP-099",
984
+ "source": "Roblox/creator-docs",
985
+ "category": "Security",
986
+ "severity": "CRITICAL",
987
+ "name": "remote_nan_check",
988
+ "pattern": "typeof\\s*\\(\\s*\\w+\\s*\\)\\s*==\\s*[\\\"']number[\\\"']",
989
+ "root_cause": "Validating `typeof(x) == 'number'` alone still lets `0/0` (NaN) pass comparisons.",
990
+ "fix": "Always pair with `x == x` and `math.abs(x) < math.huge`."
991
+ },
992
+ {
993
+ "id": "LDP-100",
994
+ "source": "Roblox/creator-docs",
995
+ "category": "Security",
996
+ "severity": "CRITICAL",
997
+ "name": "remote_table_depth",
998
+ "pattern": "typeof\\s*\\(\\s*\\w+\\s*\\)\\s*==\\s*[\\\"']table[\\\"']",
999
+ "root_cause": "Accepting arbitrary client tables without key/depth limits risks stack overflow.",
1000
+ "fix": "Validate table key count, types, and maximum nesting depth."
1001
+ },
1002
+ {
1003
+ "id": "LDP-101",
1004
+ "source": "luau-debugger (DAP)",
1005
+ "category": "Debugger",
1006
+ "severity": "INFO",
1007
+ "name": "breakpoint_print_leftover",
1008
+ "pattern": "\\bprint\\s*\\(\\s*[\\\"'](?:debug|test|here|aaa|123)",
1009
+ "root_cause": "Leftover debug `print()` statements clutter production Developer Console.",
1010
+ "fix": "Remove temporary debug prints or gate behind a debug flag."
1011
+ },
1012
+ {
1013
+ "id": "LDP-102",
1014
+ "source": "luau-debugger (DAP)",
1015
+ "category": "Debugger",
1016
+ "severity": "WARN",
1017
+ "name": "warn_without_context",
1018
+ "pattern": "\\bwarn\\s*\\(\\s*[\\\"']error[\\\"']",
1019
+ "root_cause": "Generic warning message lacks instance path or player context.",
1020
+ "fix": "Include script name, player UserId, and failing parameter."
1021
+ },
1022
+ {
1023
+ "id": "LDP-103",
1024
+ "source": "boatbomber/Benchmarker",
1025
+ "category": "Profiler",
1026
+ "severity": "INFO",
1027
+ "name": "os_clock_delta",
1028
+ "pattern": "os\\.clock\\s*\\(\\s*\\)",
1029
+ "root_cause": "Measure hot-path execution deltas with os.clock() outside tight inner loops.",
1030
+ "fix": "Aggregate timings over batches to avoid timer overhead."
1031
+ },
1032
+ {
1033
+ "id": "LDP-104",
1034
+ "source": "ffrostfall/BridgeNet2",
1035
+ "category": "Networking",
1036
+ "severity": "WARN",
1037
+ "name": "remote_fire_in_loop",
1038
+ "pattern": "for\\s+.+?\\bdo\\s*\\n(?:.*\\n){0,4}?\\s*\\w+\\s*:\\s*Fire(?:Client|AllClients|Server)\\s*\\(",
1039
+ "root_cause": "Firing a RemoteEvent inside a loop multiplies packet headers and overhead.",
1040
+ "fix": "Batch items into a single array payload and fire once."
1041
+ },
1042
+ {
1043
+ "id": "LDP-105",
1044
+ "source": "ByteNet / Packet",
1045
+ "category": "Networking",
1046
+ "severity": "INFO",
1047
+ "name": "unreliable_remote_candidate",
1048
+ "pattern": "FireAllClients\\s*\\(",
1049
+ "root_cause": "High-frequency visual/position broadcasts over reliable RemoteEvents cause head-of-line blocking.",
1050
+ "fix": "Use UnreliableRemoteEvent for transient VFX/position updates."
1051
+ },
1052
+ {
1053
+ "id": "LDP-106",
1054
+ "source": "Roblox/creator-docs",
1055
+ "category": "Security",
1056
+ "severity": "CRITICAL",
1057
+ "name": "valuebase_trust_server",
1058
+ "pattern": "\\.leaderstats\\.",
1059
+ "root_cause": "Never read client-modifiable ValueBase instances inside Character for server authority.",
1060
+ "fix": "Keep authoritative leaderstats updates strictly server-driven."
1061
+ },
1062
+ {
1063
+ "id": "LDP-107",
1064
+ "source": "Roblox/creator-docs",
1065
+ "category": "Security",
1066
+ "severity": "WARN",
1067
+ "name": "workspace_remote_placement",
1068
+ "pattern": "Instance\\.new\\s*\\(\\s*[\\\"']RemoteEvent[\\\"']",
1069
+ "root_cause": "Dynamically creating RemoteEvents inside Workspace fragments network boundaries.",
1070
+ "fix": "Place static RemoteEvents inside ReplicatedStorage."
1071
+ },
1072
+ {
1073
+ "id": "LDP-108",
1074
+ "source": "Roblox/creator-docs",
1075
+ "category": "Security",
1076
+ "severity": "CRITICAL",
1077
+ "name": "tool_activated_server_check",
1078
+ "pattern": "\\.Activated\\s*:\\s*Connect",
1079
+ "root_cause": "Tool.Activated on server/client must verify tool ownership and cooldown.",
1080
+ "fix": "Check `tool.Parent == player.Character` and enforce cooldown."
1081
+ },
1082
+ {
1083
+ "id": "LDP-109",
1084
+ "source": "Roblox/creator-docs",
1085
+ "category": "Security",
1086
+ "severity": "WARN",
1087
+ "name": "seat_occupant_check",
1088
+ "pattern": "Seat:GetPropertyChangedSignal\\s*\\(\\s*[\\\"']Occupant[\\\"']",
1089
+ "root_cause": "Verify occupant is a valid living Player character before granting vehicle control.",
1090
+ "fix": "Check `Players:GetPlayerFromCharacter(occupant.Parent)`."
1091
+ },
1092
+ {
1093
+ "id": "LDP-110",
1094
+ "source": "Roblox/creator-docs",
1095
+ "category": "Security",
1096
+ "severity": "CRITICAL",
1097
+ "name": "raycast_origin_trust",
1098
+ "pattern": "Workspace\\s*:\\s*Raycast\\s*\\(",
1099
+ "root_cause": "Server raycasts for weapons must originate from server character head/muzzle, not client origin.",
1100
+ "fix": "Compute raycast origin on the server and validate direction length."
1101
+ },
1102
+ {
1103
+ "id": "LDP-111",
1104
+ "source": "Roblox/creator-docs",
1105
+ "category": "Security",
1106
+ "severity": "WARN",
1107
+ "name": "explosion_hit_validation",
1108
+ "pattern": "Explosion\\.Hit",
1109
+ "root_cause": "Explosion.Hit fires for every part in radius; validate character/team before applying damage.",
1110
+ "fix": "Deduplicate per character and respect forcefield/team checks."
1111
+ },
1112
+ {
1113
+ "id": "LDP-112",
1114
+ "source": "Roblox/creator-docs",
1115
+ "category": "Security",
1116
+ "severity": "WARN",
1117
+ "name": "sound_respect_filtering",
1118
+ "pattern": "SoundService\\.RespectFilteringEnabled",
1119
+ "root_cause": "With RespectFilteringEnabled = false, client-played sounds replicate globally.",
1120
+ "fix": "Keep SoundService.RespectFilteringEnabled = true."
1121
+ },
1122
+ {
1123
+ "id": "LDP-113",
1124
+ "source": "Roblox/creator-docs",
1125
+ "category": "Security",
1126
+ "severity": "CRITICAL",
1127
+ "name": "chat_filter_async",
1128
+ "pattern": "FilterStringAsync",
1129
+ "root_cause": "FilterStringAsync must be wrapped in pcall and use GetNonChatStringForBroadcastAsync.",
1130
+ "fix": "Always wrap TextService filtering in pcall with fallback."
1131
+ },
1132
+ {
1133
+ "id": "LDP-114",
1134
+ "source": "Roblox/creator-docs",
1135
+ "category": "Security",
1136
+ "severity": "WARN",
1137
+ "name": "textchat_onincoming",
1138
+ "pattern": "OnIncomingMessage",
1139
+ "root_cause": "TextChatService.OnIncomingMessage runs locally; never trust it for server moderation.",
1140
+ "fix": "Enforce chat cooldowns and commands on the server."
1141
+ },
1142
+ {
1143
+ "id": "LDP-115",
1144
+ "source": "Roblox/creator-docs",
1145
+ "category": "Security",
1146
+ "severity": "WARN",
1147
+ "name": "physics_collision_group",
1148
+ "pattern": "CollisionGroup",
1149
+ "root_cause": "Ensure projectiles/NPCs use PhysicsService CollisionGroups instead of per-part CanCollide hacks.",
1150
+ "fix": "Register collision groups at server startup."
1151
+ },
1152
+ {
1153
+ "id": "LDP-116",
1154
+ "source": "Roblox/creator-docs",
1155
+ "category": "Performance",
1156
+ "severity": "WARN",
1157
+ "name": "shadow_cast_vfx",
1158
+ "pattern": "CastShadow",
1159
+ "root_cause": "Particle/VFX/debris parts with CastShadow = true waste GPU shadow-map budget.",
1160
+ "fix": "Set `CastShadow = false` on VFX and small detail parts."
1161
+ },
1162
+ {
1163
+ "id": "LDP-117",
1164
+ "source": "Roblox/creator-docs",
1165
+ "category": "Performance",
1166
+ "severity": "WARN",
1167
+ "name": "canquery_cantouch_vfx",
1168
+ "pattern": "CanTouch",
1169
+ "root_cause": "Non-interactive decorative parts with CanTouch/CanQuery = true bloat spatial queries.",
1170
+ "fix": "Set `CanTouch = false` and `CanQuery = false` on decorative parts."
1171
+ },
1172
+ {
1173
+ "id": "LDP-118",
1174
+ "source": "Roblox/creator-docs",
1175
+ "category": "Performance",
1176
+ "severity": "INFO",
1177
+ "name": "task_defer_order",
1178
+ "pattern": "task\\.defer\\s*\\(",
1179
+ "root_cause": "Deferred execution runs at the next resumption point; avoid relying on immediate side effects.",
1180
+ "fix": "Design signal handlers to be order-independent."
1181
+ },
1182
+ {
1183
+ "id": "LDP-119",
1184
+ "source": "Roblox/creator-docs",
1185
+ "category": "Debugger",
1186
+ "severity": "INFO",
1187
+ "name": "logservice_messageout",
1188
+ "pattern": "LogService\\.MessageOut",
1189
+ "root_cause": "LogService.MessageOut handlers must not call print()/warn() unconditionally or they recurse.",
1190
+ "fix": "Guard against recursive logging inside MessageOut."
1191
+ },
1192
+ {
1193
+ "id": "LDP-120",
1194
+ "source": "Roblox/creator-docs",
1195
+ "category": "Debugger",
1196
+ "severity": "INFO",
1197
+ "name": "scriptcontext_error",
1198
+ "pattern": "ScriptContext\\.Error",
1199
+ "root_cause": "ScriptContext.Error captures unhandled runtime stack traces for telemetry.",
1200
+ "fix": "Forward stack traces without leaking secrets to clients."
1201
+ }
1202
+ ]