instar 1.3.110 → 1.3.112

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 (32) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +20 -0
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/StopGateDb.d.ts +1 -1
  5. package/dist/core/StopGateDb.d.ts.map +1 -1
  6. package/dist/core/StopGateDb.js.map +1 -1
  7. package/dist/core/UnjustifiedStopGate.d.ts +23 -1
  8. package/dist/core/UnjustifiedStopGate.d.ts.map +1 -1
  9. package/dist/core/UnjustifiedStopGate.js +54 -3
  10. package/dist/core/UnjustifiedStopGate.js.map +1 -1
  11. package/dist/core/types.d.ts +7 -0
  12. package/dist/core/types.d.ts.map +1 -1
  13. package/dist/core/types.js.map +1 -1
  14. package/dist/monitoring/SessionWatchdog.d.ts +27 -4
  15. package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
  16. package/dist/monitoring/SessionWatchdog.js +52 -30
  17. package/dist/monitoring/SessionWatchdog.js.map +1 -1
  18. package/dist/monitoring/rateLimitDetection.d.ts +51 -3
  19. package/dist/monitoring/rateLimitDetection.d.ts.map +1 -1
  20. package/dist/monitoring/rateLimitDetection.js +61 -4
  21. package/dist/monitoring/rateLimitDetection.js.map +1 -1
  22. package/dist/server/routes.d.ts.map +1 -1
  23. package/dist/server/routes.js +24 -9
  24. package/dist/server/routes.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/data/builtin-manifest.json +46 -46
  27. package/upgrades/1.3.111.md +129 -0
  28. package/upgrades/1.3.112.md +54 -0
  29. package/upgrades/NEXT.eli16.md +69 -60
  30. package/upgrades/side-effects/real-world-state-fixture-framework.md +137 -0
  31. package/upgrades/side-effects/stopgate-cli-circuit-breaker.md +62 -0
  32. package/upgrades/side-effects/throttle-settled-detection.md +70 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.110",
3
+ "version": "1.3.112",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-05-30T05:50:52.437Z",
5
- "instarVersion": "1.3.110",
4
+ "generatedAt": "2026-05-30T09:27:07.902Z",
5
+ "instarVersion": "1.3.112",
6
6
  "entryCount": 193,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -409,7 +409,7 @@
409
409
  "type": "route-group",
410
410
  "domain": "monitoring",
411
411
  "sourcePath": "src/server/routes.ts",
412
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
412
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
413
413
  "since": "2025-01-01"
414
414
  },
415
415
  "route-group:agents": {
@@ -417,7 +417,7 @@
417
417
  "type": "route-group",
418
418
  "domain": "sessions",
419
419
  "sourcePath": "src/server/routes.ts",
420
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
420
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
421
421
  "since": "2025-01-01"
422
422
  },
423
423
  "route-group:backups": {
@@ -425,7 +425,7 @@
425
425
  "type": "route-group",
426
426
  "domain": "operations",
427
427
  "sourcePath": "src/server/routes.ts",
428
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
428
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
429
429
  "since": "2025-01-01"
430
430
  },
431
431
  "route-group:git": {
@@ -433,7 +433,7 @@
433
433
  "type": "route-group",
434
434
  "domain": "coordination",
435
435
  "sourcePath": "src/server/routes.ts",
436
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
436
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
437
437
  "since": "2025-01-01"
438
438
  },
439
439
  "route-group:memory": {
@@ -441,7 +441,7 @@
441
441
  "type": "route-group",
442
442
  "domain": "memory",
443
443
  "sourcePath": "src/server/routes.ts",
444
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
444
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
445
445
  "since": "2025-01-01"
446
446
  },
447
447
  "route-group:semantic": {
@@ -449,7 +449,7 @@
449
449
  "type": "route-group",
450
450
  "domain": "memory",
451
451
  "sourcePath": "src/server/routes.ts",
452
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
452
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
453
453
  "since": "2025-01-01"
454
454
  },
455
455
  "route-group:status": {
@@ -457,7 +457,7 @@
457
457
  "type": "route-group",
458
458
  "domain": "monitoring",
459
459
  "sourcePath": "src/server/routes.ts",
460
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
460
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
461
461
  "since": "2025-01-01"
462
462
  },
463
463
  "route-group:capabilities": {
@@ -465,7 +465,7 @@
465
465
  "type": "route-group",
466
466
  "domain": "mapping",
467
467
  "sourcePath": "src/server/routes.ts",
468
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
468
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
469
469
  "since": "2025-01-01"
470
470
  },
471
471
  "route-group:project-map": {
@@ -473,7 +473,7 @@
473
473
  "type": "route-group",
474
474
  "domain": "mapping",
475
475
  "sourcePath": "src/server/routes.ts",
476
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
476
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
477
477
  "since": "2025-01-01"
478
478
  },
479
479
  "route-group:coherence": {
@@ -481,7 +481,7 @@
481
481
  "type": "route-group",
482
482
  "domain": "coherence",
483
483
  "sourcePath": "src/server/routes.ts",
484
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
484
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
485
485
  "since": "2025-01-01"
486
486
  },
487
487
  "route-group:topic-bindings": {
@@ -489,7 +489,7 @@
489
489
  "type": "route-group",
490
490
  "domain": "sessions",
491
491
  "sourcePath": "src/server/routes.ts",
492
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
492
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
493
493
  "since": "2025-01-01"
494
494
  },
495
495
  "route-group:context": {
@@ -497,7 +497,7 @@
497
497
  "type": "route-group",
498
498
  "domain": "context",
499
499
  "sourcePath": "src/server/routes.ts",
500
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
500
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
501
501
  "since": "2025-01-01"
502
502
  },
503
503
  "route-group:scope-coherence": {
@@ -505,7 +505,7 @@
505
505
  "type": "route-group",
506
506
  "domain": "coherence",
507
507
  "sourcePath": "src/server/routes.ts",
508
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
508
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
509
509
  "since": "2025-01-01"
510
510
  },
511
511
  "route-group:canonical-state": {
@@ -513,7 +513,7 @@
513
513
  "type": "route-group",
514
514
  "domain": "state",
515
515
  "sourcePath": "src/server/routes.ts",
516
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
516
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
517
517
  "since": "2025-01-01"
518
518
  },
519
519
  "route-group:ci": {
@@ -521,7 +521,7 @@
521
521
  "type": "route-group",
522
522
  "domain": "monitoring",
523
523
  "sourcePath": "src/server/routes.ts",
524
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
524
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
525
525
  "since": "2025-01-01"
526
526
  },
527
527
  "route-group:sessions": {
@@ -529,7 +529,7 @@
529
529
  "type": "route-group",
530
530
  "domain": "sessions",
531
531
  "sourcePath": "src/server/routes.ts",
532
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
532
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
533
533
  "since": "2025-01-01"
534
534
  },
535
535
  "route-group:jobs": {
@@ -537,7 +537,7 @@
537
537
  "type": "route-group",
538
538
  "domain": "scheduling",
539
539
  "sourcePath": "src/server/routes.ts",
540
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
540
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
541
541
  "since": "2025-01-01"
542
542
  },
543
543
  "route-group:skip-ledger": {
@@ -545,7 +545,7 @@
545
545
  "type": "route-group",
546
546
  "domain": "scheduling",
547
547
  "sourcePath": "src/server/routes.ts",
548
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
548
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
549
549
  "since": "2025-01-01"
550
550
  },
551
551
  "route-group:telegram": {
@@ -553,7 +553,7 @@
553
553
  "type": "route-group",
554
554
  "domain": "communication",
555
555
  "sourcePath": "src/server/routes.ts",
556
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
556
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
557
557
  "since": "2025-01-01"
558
558
  },
559
559
  "route-group:attention": {
@@ -561,7 +561,7 @@
561
561
  "type": "route-group",
562
562
  "domain": "communication",
563
563
  "sourcePath": "src/server/routes.ts",
564
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
564
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
565
565
  "since": "2025-01-01"
566
566
  },
567
567
  "route-group:relationships": {
@@ -569,7 +569,7 @@
569
569
  "type": "route-group",
570
570
  "domain": "relationships",
571
571
  "sourcePath": "src/server/routes.ts",
572
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
572
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
573
573
  "since": "2025-01-01"
574
574
  },
575
575
  "route-group:feedback": {
@@ -577,7 +577,7 @@
577
577
  "type": "route-group",
578
578
  "domain": "feedback",
579
579
  "sourcePath": "src/server/routes.ts",
580
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
580
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
581
581
  "since": "2025-01-01"
582
582
  },
583
583
  "route-group:updates": {
@@ -585,7 +585,7 @@
585
585
  "type": "route-group",
586
586
  "domain": "updates",
587
587
  "sourcePath": "src/server/routes.ts",
588
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
588
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
589
589
  "since": "2025-01-01"
590
590
  },
591
591
  "route-group:dispatches": {
@@ -593,7 +593,7 @@
593
593
  "type": "route-group",
594
594
  "domain": "dispatches",
595
595
  "sourcePath": "src/server/routes.ts",
596
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
596
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
597
597
  "since": "2025-01-01"
598
598
  },
599
599
  "route-group:quota": {
@@ -601,7 +601,7 @@
601
601
  "type": "route-group",
602
602
  "domain": "monitoring",
603
603
  "sourcePath": "src/server/routes.ts",
604
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
604
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
605
605
  "since": "2025-01-01"
606
606
  },
607
607
  "route-group:publishing": {
@@ -609,7 +609,7 @@
609
609
  "type": "route-group",
610
610
  "domain": "publishing",
611
611
  "sourcePath": "src/server/routes.ts",
612
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
612
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
613
613
  "since": "2025-01-01"
614
614
  },
615
615
  "route-group:private-views": {
@@ -617,7 +617,7 @@
617
617
  "type": "route-group",
618
618
  "domain": "publishing",
619
619
  "sourcePath": "src/server/routes.ts",
620
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
620
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
621
621
  "since": "2025-01-01"
622
622
  },
623
623
  "route-group:tunnel": {
@@ -625,7 +625,7 @@
625
625
  "type": "route-group",
626
626
  "domain": "networking",
627
627
  "sourcePath": "src/server/routes.ts",
628
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
628
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
629
629
  "since": "2025-01-01"
630
630
  },
631
631
  "route-group:events": {
@@ -633,7 +633,7 @@
633
633
  "type": "route-group",
634
634
  "domain": "networking",
635
635
  "sourcePath": "src/server/routes.ts",
636
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
636
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
637
637
  "since": "2025-01-01"
638
638
  },
639
639
  "route-group:evolution": {
@@ -641,7 +641,7 @@
641
641
  "type": "route-group",
642
642
  "domain": "evolution",
643
643
  "sourcePath": "src/server/routes.ts",
644
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
644
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
645
645
  "since": "2025-01-01"
646
646
  },
647
647
  "route-group:watchdog": {
@@ -649,7 +649,7 @@
649
649
  "type": "route-group",
650
650
  "domain": "monitoring",
651
651
  "sourcePath": "src/server/routes.ts",
652
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
652
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
653
653
  "since": "2025-01-01"
654
654
  },
655
655
  "route-group:topic-memory": {
@@ -657,7 +657,7 @@
657
657
  "type": "route-group",
658
658
  "domain": "memory",
659
659
  "sourcePath": "src/server/routes.ts",
660
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
660
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
661
661
  "since": "2025-01-01"
662
662
  },
663
663
  "route-group:state-sync": {
@@ -665,7 +665,7 @@
665
665
  "type": "route-group",
666
666
  "domain": "coordination",
667
667
  "sourcePath": "src/server/routes.ts",
668
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
668
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
669
669
  "since": "2025-01-01"
670
670
  },
671
671
  "route-group:intent": {
@@ -673,7 +673,7 @@
673
673
  "type": "route-group",
674
674
  "domain": "intent",
675
675
  "sourcePath": "src/server/routes.ts",
676
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
676
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
677
677
  "since": "2025-01-01"
678
678
  },
679
679
  "route-group:triage": {
@@ -681,7 +681,7 @@
681
681
  "type": "route-group",
682
682
  "domain": "safety",
683
683
  "sourcePath": "src/server/routes.ts",
684
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
684
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
685
685
  "since": "2025-01-01"
686
686
  },
687
687
  "route-group:operations": {
@@ -689,7 +689,7 @@
689
689
  "type": "route-group",
690
690
  "domain": "safety",
691
691
  "sourcePath": "src/server/routes.ts",
692
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
692
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
693
693
  "since": "2025-01-01"
694
694
  },
695
695
  "route-group:sentinel": {
@@ -697,7 +697,7 @@
697
697
  "type": "route-group",
698
698
  "domain": "safety",
699
699
  "sourcePath": "src/server/routes.ts",
700
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
700
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
701
701
  "since": "2025-01-01"
702
702
  },
703
703
  "route-group:trust": {
@@ -705,7 +705,7 @@
705
705
  "type": "route-group",
706
706
  "domain": "safety",
707
707
  "sourcePath": "src/server/routes.ts",
708
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
708
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
709
709
  "since": "2025-01-01"
710
710
  },
711
711
  "route-group:monitoring": {
@@ -713,7 +713,7 @@
713
713
  "type": "route-group",
714
714
  "domain": "monitoring",
715
715
  "sourcePath": "src/server/routes.ts",
716
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
716
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
717
717
  "since": "2025-01-01"
718
718
  },
719
719
  "route-group:commitments": {
@@ -721,7 +721,7 @@
721
721
  "type": "route-group",
722
722
  "domain": "commitments",
723
723
  "sourcePath": "src/server/routes.ts",
724
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
724
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
725
725
  "since": "2025-01-01"
726
726
  },
727
727
  "route-group:episodes": {
@@ -729,7 +729,7 @@
729
729
  "type": "route-group",
730
730
  "domain": "memory",
731
731
  "sourcePath": "src/server/routes.ts",
732
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
732
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
733
733
  "since": "2025-01-01"
734
734
  },
735
735
  "route-group:messages": {
@@ -737,7 +737,7 @@
737
737
  "type": "route-group",
738
738
  "domain": "coordination",
739
739
  "sourcePath": "src/server/routes.ts",
740
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
740
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
741
741
  "since": "2025-01-01"
742
742
  },
743
743
  "route-group:system-reviews": {
@@ -745,7 +745,7 @@
745
745
  "type": "route-group",
746
746
  "domain": "monitoring",
747
747
  "sourcePath": "src/server/routes.ts",
748
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
748
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
749
749
  "since": "2025-01-01"
750
750
  },
751
751
  "route-group:machine-mesh": {
@@ -761,7 +761,7 @@
761
761
  "type": "route-group",
762
762
  "domain": "security",
763
763
  "sourcePath": "src/server/routes.ts",
764
- "contentHash": "80b68f39cb6113a879db06c1e704cbc1f999b95c8a5021cbf1b0bbac1f0dbb8d",
764
+ "contentHash": "85676f4062c0ea35989c300891883e3d6db36080e4674bca111020a9d64d1081",
765
765
  "since": "2025-01-01"
766
766
  },
767
767
  "cli:init": {
@@ -0,0 +1,129 @@
1
+ ---
2
+ review-convergence: complete
3
+ approved: true
4
+ approved-by: justin (verbal, topic 2169: "Yes, I agree. Please proceed." for the real-world-state fixture framework; AND topic 16566, 2026-05-30: directed the settled-throttle detection fix — "make sure a session can't hang forever due to these API errors ... maybe we should consider sending a message to the user in the meantime")
5
+ ---
6
+
7
+ # Upgrade Guide — vNEXT
8
+
9
+ <!-- bump: patch -->
10
+
11
+ ## What Changed
12
+
13
+ **1. Pipeline post-mortem lever B: a new test category for real-world-state
14
+ scenarios.** Closes the broader pattern #1 from the 2026-05-29 post-mortem
15
+ — "Tested on fresh state, not real-world state" — which was the largest
16
+ of the five named bug classes (PRs #534, #512, #509, #501, #503, #542
17
+ all instances).
18
+
19
+ `tests/real-world-state/` joins `unit/`, `integration/`, and `e2e/` as a
20
+ peer test category. Scenarios in it exercise instar against state that
21
+ LOOKS LIKE a real production agent (externalized secrets, multi-100MB
22
+ DBs, wrong-ABI binaries, concurrent state, etc.) rather than the small
23
+ fresh-fixture state the existing suites use.
24
+
25
+ A two-tier system controls CI cost:
26
+
27
+ - **'pr' tier** runs every CI shard. Small fixtures, < 30s setup.
28
+ - **'nightly' tier** is gated on `INSTAR_REAL_WORLD_BIG=1` env. Default
29
+ OFF. For multi-100MB DBs, wrong-ABI binary swaps, concurrency-at-scale
30
+ scenarios. The skip is loud (`describe.skip` with a clear message) so
31
+ the coverage gap is visible, not silently absent.
32
+
33
+ The first scenario — `externalized-config-boot` — targets the #542
34
+ incident class. It asserts that `loadConfig()` (the canonical
35
+ production read path) merges the real `authToken` string back from the
36
+ secret store when the on-disk config holds `{ "secret": true }`, plus
37
+ the same for telegram token/chatId, dashboard PIN, and tunnel token.
38
+ 5 tests; verified positive AND destructive-negative (disabling the
39
+ merge call trips 4 of the 5 with the failure modes the bug produced).
40
+
41
+ This is the LAST recommended post-mortem lever. PR #542 (silent-403)
42
+ through #552 (bare-catch ban) closed individual incident classes; THIS
43
+ one closes the broader pattern that produced them.
44
+
45
+ **2. Throttled sessions can no longer hang forever on a 429 — the RateLimitSentinel
46
+ now actually fires.** The sentinel that's supposed to ride out Anthropic's
47
+ server-side capacity throttle ("Server is temporarily limiting requests · not
48
+ your usage limit") was built, wired, and enabled — but in the field it had fired
49
+ **zero** times. Sessions would sit dead for 5–10 minutes after a throttle until
50
+ the 15-minute silence fallback limped in with a generic nudge.
51
+
52
+ Root cause was the detection preconditions, not the recovery machinery. The
53
+ watchdog's throttle check demanded a session be "cleanly idle, zero active child
54
+ processes, at a prompt, throttle string within the last 20 lines." A busy dev
55
+ session almost never satisfies that: it usually has a background shell or MCP
56
+ process alive, and Claude Code's input box + footer + task list render 15–25 rows
57
+ *below* the "API Error:" line, pushing the throttle string out of the 20-line
58
+ window. So the preconditions essentially never held, and the fast recovery never
59
+ engaged.
60
+
61
+ The fix replaces those brittle gates with a **settled-output signal**: the
62
+ throttle string is matched in a **widened 45-line window** (covers the input box),
63
+ and the pane must be **byte-identical across two consecutive watchdog polls**. An
64
+ actively-working Claude session animates its spinner and elapsed-timer every tick,
65
+ so byte-identical output across polls is a rock-solid "this turn ended and the
66
+ session is stuck" signal — with no process-tree inspection (the gate that made
67
+ busy sessions invisible) and no at-prompt heuristic (the input box used to hide
68
+ the error). Once detected, the existing lifecycle takes over: immediate user
69
+ notice → escalating backoff → neutral re-engage → JSONL-growth verification →
70
+ periodic check-ins → escalation. After a recovery cycle gives up (~30s) a
71
+ still-stuck pane re-emits, so recovery retries **unboundedly until the throttle
72
+ clears** — that is the "a session can never hang forever" guarantee. Every
73
+ sentinel lifecycle transition (detected → resuming → recovered/escalated) is now
74
+ written to `logs/sentinel-events.jsonl`. Tuned by
75
+ `monitoring.watchdog.rateLimitSettleMs` (default 20000ms).
76
+
77
+ ## What to Tell Your User
78
+
79
+ First, nothing visible in normal operation from the test-framework change. There's
80
+ an opt-in heavier set of local tests for big real-world fixtures; CI runs the fast
81
+ set by default, so day to day nothing changes for you.
82
+
83
+ Second, mostly invisible and strictly an improvement: if one of your sessions hits
84
+ Anthropic's temporary server throttle (a "Server is temporarily limiting requests"
85
+ error — their side, not your usage limit), it will now recover on its own instead
86
+ of silently sitting dead. You'll get a brief heads-up — "hit a temporary throttle,
87
+ I'm backing off, you haven't been dropped" — plus check-ins while it waits and a
88
+ "back online" when it clears. It keeps retrying until the throttle lifts, however
89
+ long that takes. Nothing for you to do, no configuration needed.
90
+
91
+ ## Summary of New Capabilities
92
+
93
+ | Capability | How to Use |
94
+ |-----------|-----------|
95
+ | `tests/real-world-state/` test category | Add a new scenario file there. Use `describeAtTier('pr', …)` or `describeAtTier('nightly', …)`. |
96
+ | Tier-gated execution | 'pr' runs every shard; 'nightly' skips unless `INSTAR_REAL_WORLD_BIG=1`. |
97
+ | `makeAgentFixture()` helper | Per-test scratch dir simulating an agent home (projectDir + .instar/). Returns a cleanup callback. |
98
+ | Externalized-config-boot regression check | `loadConfig()` against the externalized shape is asserted on every PR. #542's class can never regress silently. |
99
+ | Settled-throttle detection | Automatic — the SessionWatchdog recovers a 429-stuck session via a byte-identical-pane signal over a widened scan window, so busy dev sessions are no longer invisible to the RateLimitSentinel. |
100
+ | Unbounded throttle retry | Automatic — recovery re-engages after each escalation cycle, guaranteeing a throttled session cannot hang forever. |
101
+ | `monitoring.watchdog.rateLimitSettleMs` | Optional tuning for how long a throttled pane must be settled before recovery engages (default 20s). |
102
+
103
+ ## Evidence
104
+
105
+ **Real-world-state fixture framework (#555):**
106
+ - 5 new tests in `tests/real-world-state/externalized-config-boot.test.ts`,
107
+ all green. Tier system verified both directions (sentinel test).
108
+ - Destructive-negative verified: disabling `mergeConfigWithSecrets()` in
109
+ `Config.ts` trips 4 of the 5 tests with the exact failure modes
110
+ (`{ secret: true }` returned as authToken, telegram token leaks, etc.).
111
+ - Existing `secret-migrator.test.ts`, `config-secret-merge.test.ts`,
112
+ `secret-store.test.ts` remain green. `tsc --noEmit` clean.
113
+ - Side-effects: `upgrades/side-effects/real-world-state-fixture-framework.md`.
114
+
115
+ **Settled-throttle detection:**
116
+ - **Reproduction (unit):** `tests/unit/rate-limit-detection.test.ts` builds the
117
+ exact stuck-pane shape — the `API Error:` line followed by Claude's input box +
118
+ footer + ~14 trailing blank rows. `detectRateLimited(paneWithInputBox())` is
119
+ **false** with the default 20-line window (the bug) and **true** at 45.
120
+ - **Observed before (production, this box, 2026-05-30):** zero RateLimitSentinel
121
+ fires across every server instance overnight (no `rateLimitedAtIdle`, no
122
+ `[RateLimitSentinel] detected`, no `[Watchdog] rate-limited` in `logs/server*.log`)
123
+ while three live sessions sat frozen on `Churned for 7m 43s` / `Sautéed for
124
+ 9m 28s` / `Baked for 5m 58s`; only the 15-min `ActiveWorkSilenceSentinel` engaged.
125
+ - **After:** settled detection emits → existing backoff/verify lifecycle runs +
126
+ writes `throttle-detected`/`throttle-resuming`/`throttle-recovered`. Live
127
+ end-to-end verification on the deploy box before closing the incident.
128
+ - Side-effects: `upgrades/side-effects/throttle-settled-detection.md`. Spec:
129
+ `docs/specs/rate-limit-sentinel.md`.
@@ -0,0 +1,54 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- bump: patch -->
4
+
5
+ ## What Changed
6
+
7
+ **The UnjustifiedStopGate now has a self-circuit-breaker, fixing a chronic
8
+ `/health` degraded-flood + subprocess churn on subscription agents.**
9
+
10
+ The stop gate rules on Stop events via a Haiku judgment call. On subscription
11
+ agents (no API key) that call goes through `ClaudeCliIntelligenceProvider`, which
12
+ spawns a `claude -p` subprocess — irreducibly ~5-6s — but the gate's client budget
13
+ is `clientTimeoutMs = 2000`. So on every subscription agent the gate times out on
14
+ EVERY stop: it fail-opens (never ruling), wastefully spawns+kills a `claude`
15
+ subprocess, and emits one `DegradationReport` per stop — flooding `/health` with
16
+ identical `degraded` entries (observed 22+) that look alarming but mean nothing.
17
+
18
+ After `breakerThreshold` (default 3) consecutive provider failures the gate opens
19
+ its breaker: `evaluate()` fails open IMMEDIATELY without spawning, for
20
+ `breakerCooldownMs` (default 5 min), then retries once (half-open); a reachable
21
+ provider resets it. The fail-open decision is unchanged — `breakerOpen` allows the
22
+ stop exactly like `timeout` — so the breaker only makes the unavoidable fail-open
23
+ fast (no doomed subprocess) and quiet (no per-event degradation, no rollup skew).
24
+ `breakerThreshold: 0` disables it.
25
+
26
+ ## What to Tell Your User
27
+
28
+ Mostly invisible. This fixes a false alarm: on agents running without an API key, a
29
+ safety check was timing out on every stop, which made my health page show
30
+ "degraded" with lots of identical entries even though nothing was actually wrong —
31
+ and it was wastefully launching and killing a helper process each time. I added a
32
+ self-healing circuit breaker so it stops the wasted work and the false alarms and
33
+ recovers on its own. My actual behavior when stopping is unchanged.
34
+
35
+ ## Summary of New Capabilities
36
+
37
+ | Capability | How to Use |
38
+ |-----------|-----------|
39
+ | Stop-gate circuit breaker (self-healing) | Automatic; tune via the gate's `breakerThreshold` / `breakerCooldownMs` |
40
+ | Disable the breaker | `breakerThreshold: 0` |
41
+ | Breaker telemetry | `UnjustifiedStopGate.breakerState()` |
42
+
43
+ ## Evidence
44
+
45
+ - **Live reproduction:** with all other agents paused (no load), Echo's `/health`
46
+ read `degraded` with 22+ identical `unjustifiedStopGate.timeout` entries; a
47
+ `claude -p` haiku call in the agent cwd returned in ~5-9s, far over the 2000ms
48
+ budget — confirming the timeout-on-every-stop + spawn-then-kill churn.
49
+ - **Tests:** `tests/unit/UnjustifiedStopGate-breaker.test.ts` (5) — opens after K
50
+ failures and stops calling the provider; half-open retry after cooldown;
51
+ reachable-provider reset; `breakerThreshold=0` disables; a real timeout counts.
52
+ Existing gate/route/db suites (42) green. `tsc` + lint clean.
53
+ - Spec: `docs/specs/STOPGATE-CLI-CIRCUIT-BREAKER-SPEC.md`. Side-effects:
54
+ `upgrades/side-effects/stopgate-cli-circuit-breaker.md`.