deepdebug-local-agent 1.8.0 → 1.9.0

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.
Files changed (53) hide show
  1. package/.claude/context.md +2 -1
  2. package/CLAUDE.md +1 -1
  3. package/docs/la-protocol-v2.md +19 -2
  4. package/env.example +5 -0
  5. package/package.json +1 -1
  6. package/src/incident-detector/README.md +2 -1
  7. package/src/incident-detector/aggregator.js +8 -3
  8. package/src/incident-detector/detector.js +2 -1
  9. package/src/incident-detector/emitter.js +16 -6
  10. package/src/incident-detector/index.js +3 -3
  11. package/src/incident-detector/sources/webhook-source.js +109 -0
  12. package/src/la-protocol-v2/contract/CONTRACT_SOURCE.json +24 -16
  13. package/src/la-protocol-v2/contract/README.md +103 -3
  14. package/src/la-protocol-v2/contract/config.update.schema.json +85 -1
  15. package/src/la-protocol-v2/contract/hello.schema.json +26 -1
  16. package/src/la-protocol-v2/contract/incident.candidate.schema.json +11 -0
  17. package/src/la-protocol-v2/contract/index.json +9 -2
  18. package/src/la-protocol-v2/contract/ready.schema.json +8 -0
  19. package/src/la-protocol-v2/contract/register.schema.json +26 -1
  20. package/src/la-protocol-v2/contract/webhook.forward.schema.json +72 -3
  21. package/src/la-protocol-v2/contract.js +45 -7
  22. package/src/la-protocol-v2/llm-key/config.js +29 -0
  23. package/src/la-protocol-v2/llm-key/handler.js +33 -0
  24. package/src/la-protocol-v2/llm-key/install.js +21 -0
  25. package/src/la-protocol-v2/llm-key/store.js +173 -0
  26. package/src/la-protocol-v2/runtime.js +37 -3
  27. package/src/la-protocol-v2/session.js +47 -13
  28. package/src/la-protocol-v2/webhooks/assembler.js +85 -0
  29. package/src/la-protocol-v2/webhooks/config.js +51 -0
  30. package/src/la-protocol-v2/webhooks/handler.js +125 -0
  31. package/src/la-protocol-v2/webhooks/install.js +22 -0
  32. package/test/contract/la-protocol-v2/vectors/ack.vectors.json +91 -0
  33. package/test/contract/la-protocol-v2/vectors/config.update.vectors.json +1339 -0
  34. package/test/contract/la-protocol-v2/vectors/hello.vectors.json +261 -0
  35. package/test/contract/la-protocol-v2/vectors/incident.candidate.vectors.json +623 -0
  36. package/test/contract/la-protocol-v2/vectors/ready.vectors.json +599 -0
  37. package/test/contract/la-protocol-v2/vectors/register.vectors.json +275 -0
  38. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-after-last.json +186 -0
  39. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-body-hash-changes.json +186 -0
  40. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-last-flag-wrong.json +186 -0
  41. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-non-last-too-short.json +152 -0
  42. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-out-of-order.json +152 -0
  43. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-sha-mismatch.json +186 -0
  44. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-total-changes.json +186 -0
  45. package/test/contract/la-protocol-v2/vectors/traces/valid-webhook-chunks-in-order.json +218 -0
  46. package/test/contract/la-protocol-v2/vectors/webhook.forward.vectors.json +1263 -0
  47. package/test/incident-detector/size-model.test.js +127 -0
  48. package/test/la-protocol-v2/contract-v21.test.js +107 -0
  49. package/test/la-protocol-v2/contract.test.js +6 -4
  50. package/test/la-protocol-v2/helpers/reference-cp.js +8 -4
  51. package/test/la-protocol-v2/llm-key.test.js +509 -0
  52. package/test/la-protocol-v2/traces.test.js +3 -3
  53. package/test/la-protocol-v2/webhook-receiver.test.js +702 -0
@@ -181,6 +181,629 @@
181
181
  "logCategory": "exception"
182
182
  }
183
183
  }
184
+ },
185
+ {
186
+ "name": "candidate-stack-bytes-and-model",
187
+ "why": "optional size of the stack and the detector that saw it",
188
+ "expect": {
189
+ "valid": true
190
+ },
191
+ "message": {
192
+ "schemaVersion": 2,
193
+ "type": "incident.candidate",
194
+ "msgId": "00000000-0000-4000-8000-000000000001",
195
+ "seq": 1,
196
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
197
+ "workspaceId": "ws-1",
198
+ "ts": "2026-10-29T10:00:00Z",
199
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
200
+ "payload": {
201
+ "errorHash": "5a1f09c2d7e8b3a4",
202
+ "fingerprint": "c0ffee11deadbeef",
203
+ "severity": "high",
204
+ "service": "billing-api",
205
+ "environment": "prod",
206
+ "count": 37,
207
+ "firstSeen": "2026-10-29T09:50:00Z",
208
+ "lastSeen": "2026-10-29T09:59:30Z",
209
+ "logCategory": "exception",
210
+ "stackBytes": 4096,
211
+ "model": "stack-detector-1.8.0"
212
+ }
213
+ }
214
+ },
215
+ {
216
+ "name": "candidate-stack-bytes-only",
217
+ "expect": {
218
+ "valid": true
219
+ },
220
+ "message": {
221
+ "schemaVersion": 2,
222
+ "type": "incident.candidate",
223
+ "msgId": "00000000-0000-4000-8000-000000000001",
224
+ "seq": 1,
225
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
226
+ "workspaceId": "ws-1",
227
+ "ts": "2026-10-29T10:00:00Z",
228
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
229
+ "payload": {
230
+ "errorHash": "5a1f09c2d7e8b3a4",
231
+ "fingerprint": "c0ffee11deadbeef",
232
+ "severity": "high",
233
+ "service": "billing-api",
234
+ "environment": "prod",
235
+ "count": 37,
236
+ "firstSeen": "2026-10-29T09:50:00Z",
237
+ "lastSeen": "2026-10-29T09:59:30Z",
238
+ "logCategory": "exception",
239
+ "stackBytes": 18234
240
+ }
241
+ }
242
+ },
243
+ {
244
+ "name": "candidate-model-only",
245
+ "expect": {
246
+ "valid": true
247
+ },
248
+ "message": {
249
+ "schemaVersion": 2,
250
+ "type": "incident.candidate",
251
+ "msgId": "00000000-0000-4000-8000-000000000001",
252
+ "seq": 1,
253
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
254
+ "workspaceId": "ws-1",
255
+ "ts": "2026-10-29T10:00:00Z",
256
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
257
+ "payload": {
258
+ "errorHash": "5a1f09c2d7e8b3a4",
259
+ "fingerprint": "c0ffee11deadbeef",
260
+ "severity": "high",
261
+ "service": "billing-api",
262
+ "environment": "prod",
263
+ "count": 37,
264
+ "firstSeen": "2026-10-29T09:50:00Z",
265
+ "lastSeen": "2026-10-29T09:59:30Z",
266
+ "logCategory": "exception",
267
+ "model": "java-parser:2.3"
268
+ }
269
+ }
270
+ },
271
+ {
272
+ "name": "candidate-stack-bytes-zero",
273
+ "why": "no stack was found",
274
+ "expect": {
275
+ "valid": true
276
+ },
277
+ "message": {
278
+ "schemaVersion": 2,
279
+ "type": "incident.candidate",
280
+ "msgId": "00000000-0000-4000-8000-000000000001",
281
+ "seq": 1,
282
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
283
+ "workspaceId": "ws-1",
284
+ "ts": "2026-10-29T10:00:00Z",
285
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
286
+ "payload": {
287
+ "errorHash": "5a1f09c2d7e8b3a4",
288
+ "fingerprint": "c0ffee11deadbeef",
289
+ "severity": "high",
290
+ "service": "billing-api",
291
+ "environment": "prod",
292
+ "count": 37,
293
+ "firstSeen": "2026-10-29T09:50:00Z",
294
+ "lastSeen": "2026-10-29T09:59:30Z",
295
+ "logCategory": "exception",
296
+ "stackBytes": 0
297
+ }
298
+ }
299
+ },
300
+ {
301
+ "name": "candidate-stack-bytes-at-the-cap",
302
+ "why": "16777216 is the ceiling (the LA saturates there)",
303
+ "expect": {
304
+ "valid": true
305
+ },
306
+ "message": {
307
+ "schemaVersion": 2,
308
+ "type": "incident.candidate",
309
+ "msgId": "00000000-0000-4000-8000-000000000001",
310
+ "seq": 1,
311
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
312
+ "workspaceId": "ws-1",
313
+ "ts": "2026-10-29T10:00:00Z",
314
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
315
+ "payload": {
316
+ "errorHash": "5a1f09c2d7e8b3a4",
317
+ "fingerprint": "c0ffee11deadbeef",
318
+ "severity": "high",
319
+ "service": "billing-api",
320
+ "environment": "prod",
321
+ "count": 37,
322
+ "firstSeen": "2026-10-29T09:50:00Z",
323
+ "lastSeen": "2026-10-29T09:59:30Z",
324
+ "logCategory": "exception",
325
+ "stackBytes": 16777216
326
+ }
327
+ }
328
+ },
329
+ {
330
+ "name": "candidate-model-48-chars",
331
+ "expect": {
332
+ "valid": true
333
+ },
334
+ "message": {
335
+ "schemaVersion": 2,
336
+ "type": "incident.candidate",
337
+ "msgId": "00000000-0000-4000-8000-000000000001",
338
+ "seq": 1,
339
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
340
+ "workspaceId": "ws-1",
341
+ "ts": "2026-10-29T10:00:00Z",
342
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
343
+ "payload": {
344
+ "errorHash": "5a1f09c2d7e8b3a4",
345
+ "fingerprint": "c0ffee11deadbeef",
346
+ "severity": "high",
347
+ "service": "billing-api",
348
+ "environment": "prod",
349
+ "count": 37,
350
+ "firstSeen": "2026-10-29T09:50:00Z",
351
+ "lastSeen": "2026-10-29T09:59:30Z",
352
+ "logCategory": "exception",
353
+ "model": "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
354
+ }
355
+ }
356
+ },
357
+ {
358
+ "name": "candidate-model-with-plus-and-colon",
359
+ "expect": {
360
+ "valid": true
361
+ },
362
+ "message": {
363
+ "schemaVersion": 2,
364
+ "type": "incident.candidate",
365
+ "msgId": "00000000-0000-4000-8000-000000000001",
366
+ "seq": 1,
367
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
368
+ "workspaceId": "ws-1",
369
+ "ts": "2026-10-29T10:00:00Z",
370
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
371
+ "payload": {
372
+ "errorHash": "5a1f09c2d7e8b3a4",
373
+ "fingerprint": "c0ffee11deadbeef",
374
+ "severity": "high",
375
+ "service": "billing-api",
376
+ "environment": "prod",
377
+ "count": 37,
378
+ "firstSeen": "2026-10-29T09:50:00Z",
379
+ "lastSeen": "2026-10-29T09:59:30Z",
380
+ "logCategory": "exception",
381
+ "model": "detector+regex:v2.1.0-rc1"
382
+ }
383
+ }
384
+ },
385
+ {
386
+ "name": "candidate-stack-bytes-above-cap",
387
+ "expect": {
388
+ "valid": false,
389
+ "code": "schema_violation",
390
+ "keyword": "maximum"
391
+ },
392
+ "message": {
393
+ "schemaVersion": 2,
394
+ "type": "incident.candidate",
395
+ "msgId": "00000000-0000-4000-8000-000000000001",
396
+ "seq": 1,
397
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
398
+ "workspaceId": "ws-1",
399
+ "ts": "2026-10-29T10:00:00Z",
400
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
401
+ "payload": {
402
+ "errorHash": "5a1f09c2d7e8b3a4",
403
+ "fingerprint": "c0ffee11deadbeef",
404
+ "severity": "high",
405
+ "service": "billing-api",
406
+ "environment": "prod",
407
+ "count": 37,
408
+ "firstSeen": "2026-10-29T09:50:00Z",
409
+ "lastSeen": "2026-10-29T09:59:30Z",
410
+ "logCategory": "exception",
411
+ "stackBytes": 16777217
412
+ }
413
+ }
414
+ },
415
+ {
416
+ "name": "candidate-stack-bytes-negative",
417
+ "expect": {
418
+ "valid": false,
419
+ "code": "schema_violation",
420
+ "keyword": "minimum"
421
+ },
422
+ "message": {
423
+ "schemaVersion": 2,
424
+ "type": "incident.candidate",
425
+ "msgId": "00000000-0000-4000-8000-000000000001",
426
+ "seq": 1,
427
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
428
+ "workspaceId": "ws-1",
429
+ "ts": "2026-10-29T10:00:00Z",
430
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
431
+ "payload": {
432
+ "errorHash": "5a1f09c2d7e8b3a4",
433
+ "fingerprint": "c0ffee11deadbeef",
434
+ "severity": "high",
435
+ "service": "billing-api",
436
+ "environment": "prod",
437
+ "count": 37,
438
+ "firstSeen": "2026-10-29T09:50:00Z",
439
+ "lastSeen": "2026-10-29T09:59:30Z",
440
+ "logCategory": "exception",
441
+ "stackBytes": -1
442
+ }
443
+ }
444
+ },
445
+ {
446
+ "name": "candidate-stack-bytes-fraction",
447
+ "expect": {
448
+ "valid": false,
449
+ "code": "schema_violation",
450
+ "keyword": "type"
451
+ },
452
+ "message": {
453
+ "schemaVersion": 2,
454
+ "type": "incident.candidate",
455
+ "msgId": "00000000-0000-4000-8000-000000000001",
456
+ "seq": 1,
457
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
458
+ "workspaceId": "ws-1",
459
+ "ts": "2026-10-29T10:00:00Z",
460
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
461
+ "payload": {
462
+ "errorHash": "5a1f09c2d7e8b3a4",
463
+ "fingerprint": "c0ffee11deadbeef",
464
+ "severity": "high",
465
+ "service": "billing-api",
466
+ "environment": "prod",
467
+ "count": 37,
468
+ "firstSeen": "2026-10-29T09:50:00Z",
469
+ "lastSeen": "2026-10-29T09:59:30Z",
470
+ "logCategory": "exception",
471
+ "stackBytes": 1.5
472
+ }
473
+ }
474
+ },
475
+ {
476
+ "name": "candidate-stack-bytes-string",
477
+ "expect": {
478
+ "valid": false,
479
+ "code": "schema_violation",
480
+ "keyword": "type"
481
+ },
482
+ "message": {
483
+ "schemaVersion": 2,
484
+ "type": "incident.candidate",
485
+ "msgId": "00000000-0000-4000-8000-000000000001",
486
+ "seq": 1,
487
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
488
+ "workspaceId": "ws-1",
489
+ "ts": "2026-10-29T10:00:00Z",
490
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
491
+ "payload": {
492
+ "errorHash": "5a1f09c2d7e8b3a4",
493
+ "fingerprint": "c0ffee11deadbeef",
494
+ "severity": "high",
495
+ "service": "billing-api",
496
+ "environment": "prod",
497
+ "count": 37,
498
+ "firstSeen": "2026-10-29T09:50:00Z",
499
+ "lastSeen": "2026-10-29T09:59:30Z",
500
+ "logCategory": "exception",
501
+ "stackBytes": "4096"
502
+ }
503
+ }
504
+ },
505
+ {
506
+ "name": "candidate-model-with-space",
507
+ "why": "no free text: an error sentence cannot fit",
508
+ "expect": {
509
+ "valid": false,
510
+ "code": "schema_violation",
511
+ "keyword": "pattern"
512
+ },
513
+ "message": {
514
+ "schemaVersion": 2,
515
+ "type": "incident.candidate",
516
+ "msgId": "00000000-0000-4000-8000-000000000001",
517
+ "seq": 1,
518
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
519
+ "workspaceId": "ws-1",
520
+ "ts": "2026-10-29T10:00:00Z",
521
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
522
+ "payload": {
523
+ "errorHash": "5a1f09c2d7e8b3a4",
524
+ "fingerprint": "c0ffee11deadbeef",
525
+ "severity": "high",
526
+ "service": "billing-api",
527
+ "environment": "prod",
528
+ "count": 37,
529
+ "firstSeen": "2026-10-29T09:50:00Z",
530
+ "lastSeen": "2026-10-29T09:59:30Z",
531
+ "logCategory": "exception",
532
+ "model": "NullPointerException at Foo"
533
+ }
534
+ }
535
+ },
536
+ {
537
+ "name": "candidate-model-with-slash",
538
+ "why": "no path-like value",
539
+ "expect": {
540
+ "valid": false,
541
+ "code": "schema_violation",
542
+ "keyword": "pattern"
543
+ },
544
+ "message": {
545
+ "schemaVersion": 2,
546
+ "type": "incident.candidate",
547
+ "msgId": "00000000-0000-4000-8000-000000000001",
548
+ "seq": 1,
549
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
550
+ "workspaceId": "ws-1",
551
+ "ts": "2026-10-29T10:00:00Z",
552
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
553
+ "payload": {
554
+ "errorHash": "5a1f09c2d7e8b3a4",
555
+ "fingerprint": "c0ffee11deadbeef",
556
+ "severity": "high",
557
+ "service": "billing-api",
558
+ "environment": "prod",
559
+ "count": 37,
560
+ "firstSeen": "2026-10-29T09:50:00Z",
561
+ "lastSeen": "2026-10-29T09:59:30Z",
562
+ "logCategory": "exception",
563
+ "model": "/home/user/detector"
564
+ }
565
+ }
566
+ },
567
+ {
568
+ "name": "candidate-model-with-backslash",
569
+ "expect": {
570
+ "valid": false,
571
+ "code": "schema_violation",
572
+ "keyword": "pattern"
573
+ },
574
+ "message": {
575
+ "schemaVersion": 2,
576
+ "type": "incident.candidate",
577
+ "msgId": "00000000-0000-4000-8000-000000000001",
578
+ "seq": 1,
579
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
580
+ "workspaceId": "ws-1",
581
+ "ts": "2026-10-29T10:00:00Z",
582
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
583
+ "payload": {
584
+ "errorHash": "5a1f09c2d7e8b3a4",
585
+ "fingerprint": "c0ffee11deadbeef",
586
+ "severity": "high",
587
+ "service": "billing-api",
588
+ "environment": "prod",
589
+ "count": 37,
590
+ "firstSeen": "2026-10-29T09:50:00Z",
591
+ "lastSeen": "2026-10-29T09:59:30Z",
592
+ "logCategory": "exception",
593
+ "model": "c:\\work\\detector"
594
+ }
595
+ }
596
+ },
597
+ {
598
+ "name": "candidate-model-with-newline",
599
+ "expect": {
600
+ "valid": false,
601
+ "code": "schema_violation",
602
+ "keyword": "pattern"
603
+ },
604
+ "message": {
605
+ "schemaVersion": 2,
606
+ "type": "incident.candidate",
607
+ "msgId": "00000000-0000-4000-8000-000000000001",
608
+ "seq": 1,
609
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
610
+ "workspaceId": "ws-1",
611
+ "ts": "2026-10-29T10:00:00Z",
612
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
613
+ "payload": {
614
+ "errorHash": "5a1f09c2d7e8b3a4",
615
+ "fingerprint": "c0ffee11deadbeef",
616
+ "severity": "high",
617
+ "service": "billing-api",
618
+ "environment": "prod",
619
+ "count": 37,
620
+ "firstSeen": "2026-10-29T09:50:00Z",
621
+ "lastSeen": "2026-10-29T09:59:30Z",
622
+ "logCategory": "exception",
623
+ "model": "det\nector"
624
+ }
625
+ }
626
+ },
627
+ {
628
+ "name": "candidate-model-empty",
629
+ "expect": {
630
+ "valid": false,
631
+ "code": "schema_violation",
632
+ "keyword": "minLength"
633
+ },
634
+ "message": {
635
+ "schemaVersion": 2,
636
+ "type": "incident.candidate",
637
+ "msgId": "00000000-0000-4000-8000-000000000001",
638
+ "seq": 1,
639
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
640
+ "workspaceId": "ws-1",
641
+ "ts": "2026-10-29T10:00:00Z",
642
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
643
+ "payload": {
644
+ "errorHash": "5a1f09c2d7e8b3a4",
645
+ "fingerprint": "c0ffee11deadbeef",
646
+ "severity": "high",
647
+ "service": "billing-api",
648
+ "environment": "prod",
649
+ "count": 37,
650
+ "firstSeen": "2026-10-29T09:50:00Z",
651
+ "lastSeen": "2026-10-29T09:59:30Z",
652
+ "logCategory": "exception",
653
+ "model": ""
654
+ }
655
+ }
656
+ },
657
+ {
658
+ "name": "candidate-model-49-chars",
659
+ "expect": {
660
+ "valid": false,
661
+ "code": "schema_violation",
662
+ "keyword": "maxLength"
663
+ },
664
+ "message": {
665
+ "schemaVersion": 2,
666
+ "type": "incident.candidate",
667
+ "msgId": "00000000-0000-4000-8000-000000000001",
668
+ "seq": 1,
669
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
670
+ "workspaceId": "ws-1",
671
+ "ts": "2026-10-29T10:00:00Z",
672
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
673
+ "payload": {
674
+ "errorHash": "5a1f09c2d7e8b3a4",
675
+ "fingerprint": "c0ffee11deadbeef",
676
+ "severity": "high",
677
+ "service": "billing-api",
678
+ "environment": "prod",
679
+ "count": 37,
680
+ "firstSeen": "2026-10-29T09:50:00Z",
681
+ "lastSeen": "2026-10-29T09:59:30Z",
682
+ "logCategory": "exception",
683
+ "model": "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
684
+ }
685
+ }
686
+ },
687
+ {
688
+ "name": "candidate-model-starts-with-dash",
689
+ "expect": {
690
+ "valid": false,
691
+ "code": "schema_violation",
692
+ "keyword": "pattern"
693
+ },
694
+ "message": {
695
+ "schemaVersion": 2,
696
+ "type": "incident.candidate",
697
+ "msgId": "00000000-0000-4000-8000-000000000001",
698
+ "seq": 1,
699
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
700
+ "workspaceId": "ws-1",
701
+ "ts": "2026-10-29T10:00:00Z",
702
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
703
+ "payload": {
704
+ "errorHash": "5a1f09c2d7e8b3a4",
705
+ "fingerprint": "c0ffee11deadbeef",
706
+ "severity": "high",
707
+ "service": "billing-api",
708
+ "environment": "prod",
709
+ "count": 37,
710
+ "firstSeen": "2026-10-29T09:50:00Z",
711
+ "lastSeen": "2026-10-29T09:59:30Z",
712
+ "logCategory": "exception",
713
+ "model": "-detector"
714
+ }
715
+ }
716
+ },
717
+ {
718
+ "name": "candidate-model-not-a-string",
719
+ "expect": {
720
+ "valid": false,
721
+ "code": "schema_violation",
722
+ "keyword": "type"
723
+ },
724
+ "message": {
725
+ "schemaVersion": 2,
726
+ "type": "incident.candidate",
727
+ "msgId": "00000000-0000-4000-8000-000000000001",
728
+ "seq": 1,
729
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
730
+ "workspaceId": "ws-1",
731
+ "ts": "2026-10-29T10:00:00Z",
732
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
733
+ "payload": {
734
+ "errorHash": "5a1f09c2d7e8b3a4",
735
+ "fingerprint": "c0ffee11deadbeef",
736
+ "severity": "high",
737
+ "service": "billing-api",
738
+ "environment": "prod",
739
+ "count": 37,
740
+ "firstSeen": "2026-10-29T09:50:00Z",
741
+ "lastSeen": "2026-10-29T09:59:30Z",
742
+ "logCategory": "exception",
743
+ "model": 12
744
+ }
745
+ }
746
+ },
747
+ {
748
+ "name": "candidate-model-quotes",
749
+ "expect": {
750
+ "valid": false,
751
+ "code": "schema_violation",
752
+ "keyword": "pattern"
753
+ },
754
+ "message": {
755
+ "schemaVersion": 2,
756
+ "type": "incident.candidate",
757
+ "msgId": "00000000-0000-4000-8000-000000000001",
758
+ "seq": 1,
759
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
760
+ "workspaceId": "ws-1",
761
+ "ts": "2026-10-29T10:00:00Z",
762
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
763
+ "payload": {
764
+ "errorHash": "5a1f09c2d7e8b3a4",
765
+ "fingerprint": "c0ffee11deadbeef",
766
+ "severity": "high",
767
+ "service": "billing-api",
768
+ "environment": "prod",
769
+ "count": 37,
770
+ "firstSeen": "2026-10-29T09:50:00Z",
771
+ "lastSeen": "2026-10-29T09:59:30Z",
772
+ "logCategory": "exception",
773
+ "model": "det\"ector"
774
+ }
775
+ }
776
+ },
777
+ {
778
+ "name": "candidate-stack-size-wrong-name",
779
+ "why": "the field is stackBytes",
780
+ "expect": {
781
+ "valid": false,
782
+ "code": "schema_violation",
783
+ "keyword": "additionalProperties"
784
+ },
785
+ "message": {
786
+ "schemaVersion": 2,
787
+ "type": "incident.candidate",
788
+ "msgId": "00000000-0000-4000-8000-000000000001",
789
+ "seq": 1,
790
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
791
+ "workspaceId": "ws-1",
792
+ "ts": "2026-10-29T10:00:00Z",
793
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
794
+ "payload": {
795
+ "errorHash": "5a1f09c2d7e8b3a4",
796
+ "fingerprint": "c0ffee11deadbeef",
797
+ "severity": "high",
798
+ "service": "billing-api",
799
+ "environment": "prod",
800
+ "count": 37,
801
+ "firstSeen": "2026-10-29T09:50:00Z",
802
+ "lastSeen": "2026-10-29T09:59:30Z",
803
+ "logCategory": "exception",
804
+ "stackSize": 10
805
+ }
806
+ }
184
807
  }
185
808
  ]
186
809
  }