pi-lens 4.4.6 → 4.4.8

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 (174) hide show
  1. package/CHANGELOG.md +232 -0
  2. package/README.md +17 -3
  3. package/config/markdownlint/run-no-fix.mjs +36 -0
  4. package/dist/{chunk-ZQ6NZZTB.js → chunk-2453RRJ2.js} +44 -6
  5. package/dist/{chunk-GZE7WOI4.js → chunk-2BKUFQKR.js} +696 -330
  6. package/dist/chunk-2TS4GLOJ.js +31 -0
  7. package/dist/{chunk-2DMLM3ZO.js → chunk-2ZE3AUJQ.js} +12 -14
  8. package/dist/{chunk-OJLTLYHB.js → chunk-35WKJWO5.js} +51 -33
  9. package/dist/chunk-3JAHQBSY.js +27 -0
  10. package/dist/{chunk-PO45POGF.js → chunk-3O5EII3W.js} +2 -2
  11. package/dist/chunk-447YZL4S.js +25 -0
  12. package/dist/{chunk-TIYGSODX.js → chunk-4B2YFN4U.js} +28 -22
  13. package/dist/{chunk-OSTKYB55.js → chunk-4BKU7PV3.js} +1 -1
  14. package/dist/{chunk-XQCSWV2G.js → chunk-4LL2VRNY.js} +27 -28
  15. package/dist/{chunk-MA77RSFN.js → chunk-4NBWFYWW.js} +9 -9
  16. package/dist/{chunk-75SY4F24.js → chunk-4QG55RRC.js} +12 -12
  17. package/dist/{chunk-K2YGBXOA.js → chunk-4W52ZKZX.js} +2 -2
  18. package/dist/{chunk-Z2XAOKHK.js → chunk-565VRUP4.js} +2 -2
  19. package/dist/{chunk-CFRQMBGP.js → chunk-57X2CDRX.js} +23 -23
  20. package/dist/{chunk-XAIT2YGS.js → chunk-5F3XF3SX.js} +7 -15
  21. package/dist/{chunk-UHGF5UT5.js → chunk-5RNB4HVK.js} +1 -1
  22. package/dist/{chunk-Q4EMRFNA.js → chunk-5T5A6YAJ.js} +35 -34
  23. package/dist/{chunk-W5LGKNET.js → chunk-6FIRFP6A.js} +12 -12
  24. package/dist/{chunk-KLQVC3XC.js → chunk-6GMGEKQN.js} +36 -9
  25. package/dist/{chunk-UN4TEBWN.js → chunk-6LJOJ6EO.js} +20 -15
  26. package/dist/{chunk-HK6JVFZC.js → chunk-6YUNI7B5.js} +3 -3
  27. package/dist/{chunk-PKES3ISE.js → chunk-7ANZ7XDD.js} +2 -2
  28. package/dist/{chunk-VQH24FIP.js → chunk-7CGIDRIK.js} +16 -15
  29. package/dist/{chunk-SCIUNBPF.js → chunk-7MAD5ZAY.js} +16 -17
  30. package/dist/{chunk-OOU2WZZE.js → chunk-7TNILKGY.js} +1 -1
  31. package/dist/{chunk-LEJOJDXL.js → chunk-A5GRLYPZ.js} +9 -9
  32. package/dist/{chunk-AE37FEGH.js → chunk-AGGUWKRK.js} +1 -1
  33. package/dist/{chunk-BWYQUPOS.js → chunk-BBET6HD6.js} +1 -1
  34. package/dist/{chunk-GAACZY6R.js → chunk-BHWW6FAX.js} +14 -13
  35. package/dist/{chunk-A3YNG5KP.js → chunk-BOPDQ7AZ.js} +23 -21
  36. package/dist/{chunk-MKVZQUEG.js → chunk-BQG2QFVO.js} +215 -134
  37. package/dist/{chunk-EVDGNG4F.js → chunk-BUZIQDFS.js} +3 -3
  38. package/dist/{chunk-2PHMIAKO.js → chunk-CM73PPGD.js} +4 -4
  39. package/dist/{chunk-63RIVFQI.js → chunk-CUDD35TW.js} +10 -9
  40. package/dist/{chunk-BM5GS6ZH.js → chunk-CZL44WFN.js} +2 -2
  41. package/dist/{chunk-QGSTQH4D.js → chunk-DIWK3LBC.js} +12 -15
  42. package/dist/{chunk-JL6CXUMW.js → chunk-DYRZGUMA.js} +2 -2
  43. package/dist/{chunk-NDMCVUYK.js → chunk-FHEV6T4L.js} +22 -18
  44. package/dist/{chunk-4PCQCU47.js → chunk-FRLAUP2B.js} +4 -4
  45. package/dist/{chunk-RZOXUSPC.js → chunk-G5GV2Q7K.js} +2 -2
  46. package/dist/{chunk-2RLWJO5K.js → chunk-G6JKM4O7.js} +7 -7
  47. package/dist/chunk-GGYOZWHW.js +27 -0
  48. package/dist/{chunk-DC4CFXM5.js → chunk-GIRBSBGL.js} +6 -5
  49. package/dist/{chunk-PQJFG24Z.js → chunk-GMROJJRN.js} +1292 -946
  50. package/dist/{chunk-ZUUI3ZSA.js → chunk-HHR7WGCI.js} +3 -3
  51. package/dist/{chunk-TIQJPRDD.js → chunk-HKIL6DCL.js} +3 -2
  52. package/dist/{chunk-VPBIMOAQ.js → chunk-HUAM7QG3.js} +15 -13
  53. package/dist/{chunk-ZYNI26MI.js → chunk-HXFUTMX2.js} +2 -2
  54. package/dist/{chunk-W5R5SABV.js → chunk-I22THIHI.js} +12 -12
  55. package/dist/chunk-IE5D3RA5.js +58 -0
  56. package/dist/{chunk-MT6BVNFW.js → chunk-IYVYZQRL.js} +10 -16
  57. package/dist/{chunk-ARD426WI.js → chunk-JBP7KESM.js} +1 -1
  58. package/dist/{chunk-MN7MHUXQ.js → chunk-JE6HKLC7.js} +2 -2
  59. package/dist/{chunk-3MYEA7QD.js → chunk-JPRDTY5S.js} +85 -3
  60. package/dist/{chunk-CJYKEW2L.js → chunk-JYLOYTZD.js} +17 -1
  61. package/dist/{chunk-5APMQ2IJ.js → chunk-JZRP4DGP.js} +2 -2
  62. package/dist/{chunk-AMXIUN2R.js → chunk-KZ4ALBCH.js} +2 -2
  63. package/dist/{chunk-W2V54OCL.js → chunk-L3CLUGDY.js} +3 -3
  64. package/dist/{chunk-DMSLNKF7.js → chunk-L4NEVZ4T.js} +28 -27
  65. package/dist/chunk-LPYTPNOJ.js +22 -0
  66. package/dist/{chunk-BI5LAQ3Y.js → chunk-LSFXZLPW.js} +2071 -1725
  67. package/dist/{chunk-2DDDCJDL.js → chunk-MC6VB2E5.js} +4 -4
  68. package/dist/{chunk-U2SDMG7C.js → chunk-NM2NWH55.js} +5 -5
  69. package/dist/{chunk-Q4FCYCRE.js → chunk-NSPVR3FN.js} +19 -18
  70. package/dist/{chunk-VG5JS5SW.js → chunk-O2ARHQKF.js} +2 -2
  71. package/dist/{chunk-KSR7RGQY.js → chunk-O4N5BQ3T.js} +10 -10
  72. package/dist/{chunk-5ZR3APIM.js → chunk-OC7VWJBZ.js} +39 -40
  73. package/dist/chunk-OFNMHPBT.js +89 -0
  74. package/dist/{chunk-YSBHPOY6.js → chunk-OWTG6UMO.js} +21 -21
  75. package/dist/{chunk-7RQXA5GG.js → chunk-OY7WZI7Q.js} +13 -12
  76. package/dist/{chunk-5CV5ITZF.js → chunk-OZWXLJMX.js} +2 -2
  77. package/dist/{chunk-F6X3YJWD.js → chunk-PIQQM32Y.js} +2 -2
  78. package/dist/chunk-PKLB2XJL.js +8 -0
  79. package/dist/{chunk-DQXSPYRI.js → chunk-PKSUMEPT.js} +17 -4
  80. package/dist/{chunk-YISME6ON.js → chunk-PPKECBPP.js} +1 -1
  81. package/dist/{chunk-4AVZ3TG7.js → chunk-R2QQC33W.js} +14 -14
  82. package/dist/{chunk-GMTFDAOK.js → chunk-R4QWJQ2H.js} +11 -11
  83. package/dist/{chunk-V63BC55Q.js → chunk-RGGH6M34.js} +1 -1
  84. package/dist/{chunk-SJJYRZB4.js → chunk-RZG472YW.js} +116 -26
  85. package/dist/{chunk-NIU2IPC5.js → chunk-SDFKOLSF.js} +6 -6
  86. package/dist/{chunk-H7HTEQUZ.js → chunk-SFLHSL5R.js} +9 -9
  87. package/dist/{chunk-FA5LDARD.js → chunk-SP4TFY5F.js} +14 -13
  88. package/dist/{chunk-J6JP25XU.js → chunk-SQC7K3SP.js} +4 -3
  89. package/dist/{chunk-T7FTXGS3.js → chunk-T2S3FNNJ.js} +44 -42
  90. package/dist/{chunk-S67UJDGQ.js → chunk-TV6RXRYH.js} +10 -10
  91. package/dist/{chunk-GNSIWBAT.js → chunk-U3AS2FR6.js} +3 -3
  92. package/dist/{chunk-WIZWZR4C.js → chunk-UHHLR2VY.js} +43 -41
  93. package/dist/chunk-UYXV5NIS.js +20 -0
  94. package/dist/{chunk-VSFLRN5Y.js → chunk-VLQ7UKZH.js} +1 -1
  95. package/dist/{chunk-FFL3A2VP.js → chunk-VN3L2JWZ.js} +46 -72
  96. package/dist/{chunk-Z7IGUAXL.js → chunk-VOP4PJKA.js} +12 -8
  97. package/dist/{chunk-F5Z6URKM.js → chunk-VOXTCULR.js} +2 -2
  98. package/dist/{chunk-NNKXDXXS.js → chunk-VPLBLWFO.js} +14 -8
  99. package/dist/chunk-W3BGKBBK.js +27 -0
  100. package/dist/{chunk-ZKXQKGWZ.js → chunk-WC6WRNQT.js} +4 -3
  101. package/dist/{chunk-Q3UZHW6N.js → chunk-WMDUT4KH.js} +1150 -1138
  102. package/dist/{chunk-KXF5R4UN.js → chunk-WQV6BI4Q.js} +1 -1
  103. package/dist/chunk-WXUDRAG6.js +24 -0
  104. package/dist/{chunk-OLAWH5UQ.js → chunk-X35S7HSB.js} +29 -10
  105. package/dist/{chunk-YBSONGSZ.js → chunk-X66YJ2SS.js} +40 -34
  106. package/dist/{chunk-U6OC3QEM.js → chunk-XOMGO63G.js} +22 -21
  107. package/dist/{chunk-WQOIR3QY.js → chunk-XWIME22V.js} +13 -13
  108. package/dist/{chunk-3WEPUD2V.js → chunk-XYLC35E4.js} +202 -103
  109. package/dist/{chunk-UCGQT677.js → chunk-YHGYAEFH.js} +18 -18
  110. package/dist/{chunk-V3APN3DY.js → chunk-ZFORSIED.js} +13 -13
  111. package/dist/{chunk-BHUWL2Y3.js → chunk-ZKLTNLAW.js} +64 -73
  112. package/dist/chunk-ZONZ6YY3.js +74 -0
  113. package/dist/chunk-ZSM35JF4.js +30 -0
  114. package/dist/{chunk-PPIBVH4R.js → chunk-ZZDIOAAJ.js} +15 -6
  115. package/dist/index.js +8817 -6239
  116. package/dist/mcp/analyze-cli.js +10 -10
  117. package/dist/mcp/cli.js +44 -42
  118. package/dist/mcp/server.js +2236 -861
  119. package/dist/mcp/worker.js +62 -61
  120. package/dist/probes/installer.js +20 -19
  121. package/docs/adr/0003-git-guard-latch-writer.md +11 -6
  122. package/docs/agent-tools.md +29 -11
  123. package/docs/alignment-families.md +29 -0
  124. package/docs/ast-grep_rules_catalog.md +6 -4
  125. package/docs/ci-bot-pr-checks.md +126 -0
  126. package/docs/configuration.md +99 -3
  127. package/docs/defect-shapes.md +68 -11
  128. package/docs/dependencies.md +1 -0
  129. package/docs/engineering-principles.md +27 -2
  130. package/docs/environment-variables.md +14 -0
  131. package/docs/features.md +13 -3
  132. package/docs/globalconfig.md +12 -1
  133. package/docs/invariants/git-guard-host.md +38 -0
  134. package/docs/invariants/language-config.md +15 -4
  135. package/docs/invariants/lsp-trust-exec.md +22 -2
  136. package/docs/invariants/paths-os.md +4 -2
  137. package/docs/invariants/session-telemetry.md +42 -2
  138. package/docs/lsp-capability-matrix.md +208 -84
  139. package/docs/lsp-idle-eviction.md +3 -5
  140. package/docs/merge-queue-rollout.md +1 -1
  141. package/docs/pi-lens-fixer.md +31 -17
  142. package/docs/pi-lens-merge-policy.md +27 -15
  143. package/docs/pi-lens-monitor.md +9 -0
  144. package/docs/pi-lens-orchestration.md +4 -1
  145. package/docs/pi-lens-reviewer.md +5 -5
  146. package/docs/pi-lens-subagent.md +13 -7
  147. package/docs/public-api-stability.md +18 -2
  148. package/docs/schema/pi-lens-config-v1.json +33 -0
  149. package/docs/servercapabilities.md +1 -1
  150. package/docs/settings.md +15 -6
  151. package/docs/usage.md +5 -0
  152. package/docs/word-index.md +17 -5
  153. package/package.json +5 -3
  154. package/rules/ast-grep-rules/rule-tests/no-accumulating-spread-js-test.yml +37 -0
  155. package/rules/ast-grep-rules/rule-tests/ts-redundant-filter-map-test.yml +12 -1
  156. package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-js-test.yml +12 -0
  157. package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-test.yml +25 -0
  158. package/rules/ast-grep-rules/rules/no-accumulating-spread-js.yml +49 -1
  159. package/rules/ast-grep-rules/rules/ts-redundant-filter-map.yml +9 -1
  160. package/rules/ast-grep-rules/rules-disabled/filter-then-map-js.yml +17 -0
  161. package/rules/ast-grep-rules/rules-disabled/filter-then-map.yml +36 -0
  162. package/rules/ast-grep-rules/self-scan-baseline.json +1 -1
  163. package/dist/chunk-2F47TQOA.js +0 -73
  164. package/dist/chunk-2X4VLOCC.js +0 -55
  165. package/dist/chunk-4WX4CTUE.js +0 -57
  166. package/dist/chunk-FJIVKLPH.js +0 -31
  167. package/dist/chunk-G2B7F6ZU.js +0 -88
  168. package/dist/chunk-GTAI2J6U.js +0 -27
  169. package/dist/chunk-IPDG45G5.js +0 -26
  170. package/dist/chunk-P4QNXS6I.js +0 -27
  171. package/dist/chunk-Q6D6VMI4.js +0 -22
  172. package/dist/chunk-SXGD4ANG.js +0 -25
  173. package/dist/chunk-XCUHKYCQ.js +0 -23
  174. package/dist/chunk-YRD4ISED.js +0 -30
@@ -2,83 +2,84 @@
2
2
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
3
3
  import {
4
4
  analyzeFile
5
- } from "../chunk-BI5LAQ3Y.js";
6
- import "../chunk-2DDDCJDL.js";
7
- import "../chunk-AE37FEGH.js";
8
- import "../chunk-SJJYRZB4.js";
9
- import "../chunk-2X4VLOCC.js";
10
- import "../chunk-DQXSPYRI.js";
11
- import "../chunk-PO45POGF.js";
12
- import "../chunk-BHUWL2Y3.js";
13
- import "../chunk-V63BC55Q.js";
14
- import "../chunk-AMXIUN2R.js";
15
- import "../chunk-3MYEA7QD.js";
16
- import "../chunk-K2YGBXOA.js";
17
- import "../chunk-EVDGNG4F.js";
18
- import "../chunk-QGSTQH4D.js";
19
- import "../chunk-V3APN3DY.js";
20
- import "../chunk-XAIT2YGS.js";
21
- import "../chunk-4PCQCU47.js";
22
- import "../chunk-HK6JVFZC.js";
23
- import "../chunk-OOU2WZZE.js";
24
- import "../chunk-TIYGSODX.js";
5
+ } from "../chunk-LSFXZLPW.js";
6
+ import "../chunk-MC6VB2E5.js";
7
+ import "../chunk-AGGUWKRK.js";
8
+ import "../chunk-PKSUMEPT.js";
9
+ import "../chunk-3O5EII3W.js";
10
+ import "../chunk-ZKLTNLAW.js";
11
+ import "../chunk-KZ4ALBCH.js";
12
+ import "../chunk-JPRDTY5S.js";
13
+ import "../chunk-RGGH6M34.js";
14
+ import "../chunk-RZG472YW.js";
15
+ import "../chunk-4W52ZKZX.js";
16
+ import "../chunk-BUZIQDFS.js";
17
+ import "../chunk-DIWK3LBC.js";
18
+ import "../chunk-ZFORSIED.js";
19
+ import "../chunk-5F3XF3SX.js";
20
+ import "../chunk-FRLAUP2B.js";
21
+ import "../chunk-6YUNI7B5.js";
22
+ import "../chunk-7TNILKGY.js";
23
+ import "../chunk-4B2YFN4U.js";
25
24
  import "../chunk-3MED75HT.js";
26
- import "../chunk-GZE7WOI4.js";
27
- import "../chunk-DC4CFXM5.js";
25
+ import "../chunk-PKLB2XJL.js";
26
+ import "../chunk-2BKUFQKR.js";
27
+ import "../chunk-GIRBSBGL.js";
28
28
  import "../chunk-XIMYZ3JA.js";
29
- import "../chunk-3WEPUD2V.js";
30
- import "../chunk-JL6CXUMW.js";
31
- import "../chunk-NDMCVUYK.js";
32
- import "../chunk-PPIBVH4R.js";
33
- import "../chunk-F5Z6URKM.js";
29
+ import "../chunk-XYLC35E4.js";
30
+ import "../chunk-DYRZGUMA.js";
31
+ import "../chunk-FHEV6T4L.js";
32
+ import "../chunk-ZZDIOAAJ.js";
33
+ import "../chunk-VOXTCULR.js";
34
34
  import "../chunk-5W3R6LFT.js";
35
- import "../chunk-OJLTLYHB.js";
36
- import "../chunk-63RIVFQI.js";
37
- import "../chunk-PKES3ISE.js";
38
- import "../chunk-ZKXQKGWZ.js";
39
- import "../chunk-GAACZY6R.js";
35
+ import "../chunk-35WKJWO5.js";
36
+ import "../chunk-CUDD35TW.js";
37
+ import "../chunk-7ANZ7XDD.js";
38
+ import "../chunk-WC6WRNQT.js";
39
+ import "../chunk-BHWW6FAX.js";
40
40
  import "../chunk-Z54ZSOBZ.js";
41
- import "../chunk-ZUUI3ZSA.js";
42
- import "../chunk-TIQJPRDD.js";
43
- import "../chunk-YISME6ON.js";
41
+ import "../chunk-HHR7WGCI.js";
42
+ import "../chunk-HKIL6DCL.js";
43
+ import "../chunk-PPKECBPP.js";
44
44
  import "../chunk-6HWVI6MI.js";
45
- import "../chunk-UHGF5UT5.js";
45
+ import "../chunk-5RNB4HVK.js";
46
46
  import "../chunk-CKEQFGLT.js";
47
- import "../chunk-CJYKEW2L.js";
48
- import "../chunk-VPBIMOAQ.js";
49
- import "../chunk-ZYNI26MI.js";
50
- import "../chunk-BM5GS6ZH.js";
51
- import "../chunk-NNKXDXXS.js";
47
+ import "../chunk-JYLOYTZD.js";
48
+ import "../chunk-HUAM7QG3.js";
49
+ import "../chunk-HXFUTMX2.js";
50
+ import "../chunk-CZL44WFN.js";
51
+ import "../chunk-VPLBLWFO.js";
52
52
  import "../chunk-2BEMIWEW.js";
53
53
  import "../chunk-IJYGIDF4.js";
54
- import "../chunk-MKVZQUEG.js";
55
- import "../chunk-MT6BVNFW.js";
56
- import "../chunk-Z7IGUAXL.js";
57
- import "../chunk-ARD426WI.js";
58
- import "../chunk-5APMQ2IJ.js";
59
- import "../chunk-NIU2IPC5.js";
60
- import "../chunk-BWYQUPOS.js";
61
- import "../chunk-2RLWJO5K.js";
62
- import "../chunk-VG5JS5SW.js";
63
- import "../chunk-Q3UZHW6N.js";
54
+ import "../chunk-BQG2QFVO.js";
55
+ import "../chunk-IYVYZQRL.js";
56
+ import "../chunk-VOP4PJKA.js";
57
+ import "../chunk-JBP7KESM.js";
58
+ import "../chunk-UYXV5NIS.js";
59
+ import "../chunk-JZRP4DGP.js";
60
+ import "../chunk-SDFKOLSF.js";
61
+ import "../chunk-BBET6HD6.js";
62
+ import "../chunk-G6JKM4O7.js";
63
+ import "../chunk-O2ARHQKF.js";
64
+ import "../chunk-WMDUT4KH.js";
64
65
  import "../chunk-AWQWXSW4.js";
65
66
  import "../chunk-QYF5S6P6.js";
66
- import "../chunk-RZOXUSPC.js";
67
- import "../chunk-OLAWH5UQ.js";
68
- import "../chunk-J6JP25XU.js";
67
+ import "../chunk-G5GV2Q7K.js";
68
+ import "../chunk-X35S7HSB.js";
69
+ import "../chunk-SQC7K3SP.js";
69
70
  import {
70
71
  setProjectTrustState
71
- } from "../chunk-MN7MHUXQ.js";
72
- import "../chunk-ZQ6NZZTB.js";
72
+ } from "../chunk-JE6HKLC7.js";
73
+ import "../chunk-2453RRJ2.js";
73
74
  import {
74
75
  logExtension
75
- } from "../chunk-KXF5R4UN.js";
76
+ } from "../chunk-WQV6BI4Q.js";
76
77
  import "../chunk-S26LC76R.js";
77
- import "../chunk-Z2XAOKHK.js";
78
- import "../chunk-VSFLRN5Y.js";
78
+ import "../chunk-565VRUP4.js";
79
+ import "../chunk-VLQ7UKZH.js";
79
80
  import "../chunk-LJDODBBZ.js";
80
- import "../chunk-OSTKYB55.js";
81
- import "../chunk-PQJFG24Z.js";
81
+ import "../chunk-4BKU7PV3.js";
82
+ import "../chunk-GMROJJRN.js";
82
83
  import "../chunk-NXL4FFQQ.js";
83
84
 
84
85
  // dist/mcp/worker.js
@@ -53,29 +53,30 @@ import {
53
53
  verifyNpmPackageEntry,
54
54
  verifyToolBinary,
55
55
  wasLastResolveTransient
56
- } from "../chunk-MKVZQUEG.js";
57
- import "../chunk-MT6BVNFW.js";
58
- import "../chunk-Z7IGUAXL.js";
59
- import "../chunk-ARD426WI.js";
60
- import "../chunk-5APMQ2IJ.js";
61
- import "../chunk-NIU2IPC5.js";
62
- import "../chunk-BWYQUPOS.js";
63
- import "../chunk-2RLWJO5K.js";
64
- import "../chunk-VG5JS5SW.js";
65
- import "../chunk-Q3UZHW6N.js";
56
+ } from "../chunk-BQG2QFVO.js";
57
+ import "../chunk-IYVYZQRL.js";
58
+ import "../chunk-VOP4PJKA.js";
59
+ import "../chunk-JBP7KESM.js";
60
+ import "../chunk-UYXV5NIS.js";
61
+ import "../chunk-JZRP4DGP.js";
62
+ import "../chunk-SDFKOLSF.js";
63
+ import "../chunk-BBET6HD6.js";
64
+ import "../chunk-G6JKM4O7.js";
65
+ import "../chunk-O2ARHQKF.js";
66
+ import "../chunk-WMDUT4KH.js";
66
67
  import "../chunk-AWQWXSW4.js";
67
68
  import "../chunk-QYF5S6P6.js";
68
- import "../chunk-RZOXUSPC.js";
69
- import "../chunk-OLAWH5UQ.js";
70
- import "../chunk-J6JP25XU.js";
71
- import "../chunk-MN7MHUXQ.js";
72
- import "../chunk-ZQ6NZZTB.js";
73
- import "../chunk-KXF5R4UN.js";
69
+ import "../chunk-G5GV2Q7K.js";
70
+ import "../chunk-X35S7HSB.js";
71
+ import "../chunk-SQC7K3SP.js";
72
+ import "../chunk-JE6HKLC7.js";
73
+ import "../chunk-2453RRJ2.js";
74
+ import "../chunk-WQV6BI4Q.js";
74
75
  import "../chunk-S26LC76R.js";
75
- import "../chunk-Z2XAOKHK.js";
76
- import "../chunk-VSFLRN5Y.js";
76
+ import "../chunk-565VRUP4.js";
77
+ import "../chunk-VLQ7UKZH.js";
77
78
  import "../chunk-LJDODBBZ.js";
78
- import "../chunk-PQJFG24Z.js";
79
+ import "../chunk-GMROJJRN.js";
79
80
  import "../chunk-NXL4FFQQ.js";
80
81
  export {
81
82
  GITHUB_TOOLS,
@@ -92,17 +92,16 @@ since the verdict · is the durable record present.
92
92
  | 5 | no (no-file turn end) | unchanged | cleared | allow | `still allows the commit after an unjudged turn end that changed nothing` |
93
93
  | 6 | no (no-file turn end) | changed outside dispatch | cleared | **unknown** | `keeps the gate closed when the suppressed file's bytes moved outside dispatch` |
94
94
  | 7 | no turn end at all after the change | changed outside dispatch | cleared | **unknown** | same case, and `does not allow the commit after an external change to a marked file` (pi host) |
95
- | 8 | yes, after an outside change | changed outside dispatch | re-rendered | block | the freshness sweep demotes the record before the policy loop, so it is never a survivor and the verdict is cleared |
95
+ | 8 | yes, after an outside change | changed outside dispatch | re-rendered | block | the freshness sweep demotes the record; since #4990 the demoted channel re-runs the policy, and the content check below is what keeps the stamp from opening the gate |
96
96
  | 9 | yes | unverifiable (no content baseline) | either | **unknown** | `keeps the gate closed for a suppressed record with no content baseline` |
97
97
 
98
98
  One clause, added to the rule above rather than replacing it: **a suppression
99
99
  verdict is a statement about BYTES, so it stands only while the file still
100
100
  matches the content baseline the record carries** (`recordedHash`, the #2982
101
- baseline the freshness sweep already compares against — and which the sweep
102
- guarantees matched at stamping time, since a self-drifted record is demoted
103
- before the policy loop can suppress it). The gate — the one reader that can let
104
- a verdict OPEN a commit — confirms that before allowing, and an unverifiable
105
- record (no baseline) fails closed. Rejected alternatives, from the table:
101
+ baseline the freshness sweep already compares against). The gate — the one
102
+ reader that can let a verdict OPEN a commit — confirms that before allowing, and
103
+ an unverifiable record (no baseline) fails closed. Rejected alternatives, from
104
+ the table:
106
105
 
107
106
  - a TURN generation on the stamp: reds cell 3, which is the defect #3248 is
108
107
  about (an unrelated edit must not re-block).
@@ -201,3 +200,9 @@ reason to `block: false`, as this slice committed them to do.
201
200
  - Issue: #3248.
202
201
  - PR: #3254, “The git-guard latch” remainder and writers-by-axis table.
203
202
  - Follow-up: #3282 (record provenance parse) — amendment 3.
203
+ - #4990 (amendment 4, 2026-10-29): the DEMOTED channel now runs the same
204
+ policy pass as the live channel, so a demoted record can carry
205
+ `policySuppressed`. Cell 8 stays a block because the content check below the
206
+ latch compares the record's `recordedHash` against the file's current bytes,
207
+ and a self-drifted record no longer matches. No second identity clause was
208
+ added.
@@ -56,12 +56,15 @@ object argument such as `callHierarchyItem`, `rule` or `flags` are not checked):
56
56
  - when an ignored key leaves the call without something it needed, the tool
57
57
  does not run and the result is an error whose first line is the same
58
58
  sentence, followed by `Not run: ...`. That is the case when a
59
- schema-`required` input is missing (``Not run: required argument(s) `file`
59
+ schema-`required` input is missing (``Not run: required argument(s) `lang`
60
60
  missing.``), or when the ignored key is a declared parameter the call did not
61
- send, written another way: a case or punctuation variant, a plural, or a key
62
- whose last word is the parameter (`filePath`, `file_path` and `Path` for the
63
- optional `path` of `pilens_diagnostics`: ``Not run: `filePath` looks like a
64
- mistyped `path`, which was not sent.``). The exact predicate is named in
61
+ send, written another way: a case or punctuation variant (`Path` for `path`),
62
+ a plural (`paths` for `path`), or a key whose last word is a declared
63
+ parameter (`file_path` for the declared `filePath`). The single-file
64
+ parameter is `path`, and the MCP tools declare `file` and `filePath` beside it
65
+ as accepted aliases since #5041, so those spellings run instead of being
66
+ reported (``Not run: `Path` looks like a mistyped `path`, which was not
67
+ sent.``). The exact predicate is named in
65
68
  [public-api-stability.md](public-api-stability.md). Anything looser (a typo,
66
69
  an abbreviation, `files` for `maxLspFiles`, or a count, flag or output key
67
70
  such as `maxFiles`, `includeFiles`, `outFile` or `cwdPath` where `cwd` is
@@ -156,8 +159,10 @@ and `[]` mean no arguments.
156
159
  - **`ast_grep_outline`** — Syntax-only code structure (symbols, imports, exports,
157
160
  members) for files or directories via `ast-grep outline`. Fast, local, no
158
161
  index/LSP/cross-file semantics. Supports `items`/`view`/`type`/`match`/
159
- `pubMembers`/`globs`; returns per-file `items[]` (nested `members[]`) with
160
- ready `read` args. Prefer `module_report` for pi-lens-aware navigation; reach
162
+ `pubMembers`/`globs`; returns a compact text tree, one
163
+ `start-end [import|export ]kind name[ — signature]` line per symbol (members
164
+ indented, files sorted by path, a visible line when files or items were cut);
165
+ read a range with `offset=start`, `limit=end-start+1`. Prefer `module_report` for pi-lens-aware navigation; reach
161
166
  for this when the syntax tree's own view is enough or pi-lens's extractor is
162
167
  weak for a language.
163
168
 
@@ -170,7 +175,12 @@ and `[]` mean no arguments.
170
175
  `module_report` explains one, `read_symbol` reads its body. Complements
171
176
  `grep` (raw substrings) and `lsp_navigation` (exact references). Returns
172
177
  `available: false` with a retry hint when the index isn't built yet — it
173
- self-builds in the background and never blocks the call. See
178
+ self-builds in the background and never blocks the call. The answer is one
179
+ ranked table: a row per file with its path, best-matching line, score, hit
180
+ count and any graph annotations, then a footer with index coverage and a
181
+ next-step line naming the top-ranked hit (`module_report <path>`) — read that
182
+ line with `offset=<line>, limit=1`. Both surfaces render it through
183
+ `renderCompactSymbolSearch`, so no JSON payload rides along. See
174
184
  [docs/word-index.md](word-index.md) for how the index is built and kept
175
185
  warm.
176
186
  - **`project_report`** — Project orientation from the cached review graph, the
@@ -204,8 +214,14 @@ and `[]` mean no arguments.
204
214
  tree-sitter's conventional `comment` node — JS/TS is the primary target;
205
215
  languages sharing that node shape (confirmed: Python, and any grammar whose
206
216
  comment nodes are plain preceding siblings) get it for free with no
207
- per-grammar query work. `exported` stays a boolean field only — it is NOT
208
- also repeated inside `flags` (#512); `flags` carries only non-derivable
217
+ per-grammar query work. A Python def or class also reads its docstring (a
218
+ plain, `r` or `u` string that is the first statement of the body); when
219
+ both a `#` comment above the def and a docstring exist, a docstring with text
220
+ wins; an empty docstring falls back to the comment.
221
+ When a file has syntax errors, tree-sitter recovers and drops the
222
+ declarations it cannot parse, so the report carries a `warnings` entry saying
223
+ the symbol list may be incomplete. `exported` stays a boolean field only — it
224
+ is NOT also repeated inside `flags` (#512); `flags` carries only non-derivable
209
225
  signals (`async`, `high fanout`, `high complexity`, `boundary wrapper`).
210
226
  Each entry carries a `decorators[]` array — the declaration's
211
227
  decorators/attributes/annotations (`@app.get("/x")`, `#[tokio::main]`,
@@ -230,7 +246,9 @@ and `[]` mean no arguments.
230
246
  for cross-file transitive dependents (read-only over the cached graph).
231
247
  - **`read_symbol`** — One symbol's verbatim source body, by name or by a
232
248
  `module_report` callback handle. Returned body is recorded as genuine
233
- read-guard coverage for that symbol/callback's line range.
249
+ read-guard coverage for that symbol/callback's line range. In a file with
250
+ syntax errors a miss carries the same incomplete-symbol-list warning, so a
251
+ miss is not proof the symbol is absent.
234
252
  - **`read_enclosing`** — Maps a `path` + `line` (from `ast_grep_search`,
235
253
  diagnostics, or LSP locations) to the verbatim body of the smallest enclosing
236
254
  symbol or callback. Tree-sitter only — no LSP or graph build. Optional `kinds`
@@ -0,0 +1,29 @@
1
+ # Alignment families
2
+
3
+ Seven user-facing ideas that pi-lens implements in more than one place. The same idea has drifted into different meanings before: PR #5011 found one ignore pattern read three ways. This file is the single list. The daily alignment routine reads it to pick a family, and `scripts/check-pr-body.mjs` reads it to validate the `Alignment:` line in `### Class sweep`.
4
+
5
+ ## Families
6
+
7
+ The family name is the text before the first colon in the Family column. Names contain no comma. A PR body names them exactly as written here.
8
+
9
+ | # | Family | Start from |
10
+ |---|---|---|
11
+ | 1 | Path globs and their anchors: `ignore`, `rules.<id>.ignorePaths`, rule-file `ignores` / `ignore_paths`, scanner directory exclusions, any include/exclude list | `clients/file-utils.ts` (project ignore matcher), `clients/dispatch/rule-policy.ts`, `clients/dispatch/runners/yaml-rule-parser.ts`, `clients/tree-sitter-query-loader.ts` |
12
+ | 2 | Turn-off and deny keys: `lsp.disabledServers`, `dispatch.disabledRunners`, `tools.<name>.enabled`, `rules.<id>.disable` / `select`, env kill switches | `clients/config-core/deny.ts`, `clients/config-schema.ts`, `clients/tool-config.ts` |
13
+ | 3 | Config tiers and nested owners: which readers resolve from the file's config owner and which from the workspace root; merge strategy per key | `clients/analysis-root.ts` (`resolveSessionConfigRoot`), `clients/config-core/resolve.ts`, `clients/config-core/merge.ts` |
14
+ | 4 | Verdict and coverage wording: clean, unconfirmed, unavailable, not checked, disabled; the same state worded differently on different surfaces | `clients/dispatch/dispatcher.ts` (`buildCoverageNotice`), `clients/dispatch/runners/lsp.ts`, the `lens_diagnostics` / `lsp_diagnostics` tool output |
15
+ | 5 | Tool parameter shapes across pi tools and MCP tools: names, defaults and accepted spellings of path / paths / scope / severity / wait parameters | `tools/`, `clients/mcp/` |
16
+ | 6 | Closed vocabularies: skip reasons (`RUNNER_SKIP_REASONS`), owner keys, degradation codes, `PILENS_CFG_*` diagnostic codes; one idea with two names, or one name with two meanings | `clients/config-diagnostic-codes.ts`, `clients/degradation-ledger.ts`, `tests/support/session-state-registry.ts` |
17
+ | 7 | Env tunables: `PI_LENS_*` variables, how each is parsed (int, bool, list), clamped and defaulted, and what an unparseable value does | `git grep -n "process.env.PI_LENS_" clients tools index.ts` |
18
+
19
+ ## What touches means
20
+
21
+ A change touches a family when it adds or edits a member of that family. Naming a family does not ask for a fix; it tells the reviewer and the alignment routine which meanings this change could move. Moving a member to the meaning its siblings already use still counts as touching it. A change that touches no member writes `none: <reason>`, with a reason of at least 12 characters.
22
+
23
+ 1. **Path globs and their anchors.** Touched when the change adds or edits one of these: `ignore`, `rules.<id>.ignorePaths`, rule-file `ignores` / `ignore_paths`, scanner directory exclusions, any include/exclude list.
24
+ 2. **Turn-off and deny keys.** Touched when the change adds or edits one of these: `lsp.disabledServers`, `dispatch.disabledRunners`, `tools.<name>.enabled`, `rules.<id>.disable` / `select`, env kill switches.
25
+ 3. **Config tiers and nested owners.** Touched when the change adds or edits one of these: which readers resolve from the file's config owner and which from the workspace root; merge strategy per key.
26
+ 4. **Verdict and coverage wording.** Touched when the change adds or edits one of these: clean, unconfirmed, unavailable, not checked, disabled; the same state worded differently on different surfaces.
27
+ 5. **Tool parameter shapes across pi tools and MCP tools.** Touched when the change adds or edits one of these: names, defaults and accepted spellings of path / paths / scope / severity / wait parameters.
28
+ 6. **Closed vocabularies.** Touched when the change adds or edits one of these: skip reasons (`RUNNER_SKIP_REASONS`), owner keys, degradation codes, `PILENS_CFG_*` diagnostic codes; one idea with two names, or one name with two meanings.
29
+ 7. **Env tunables.** Touched when the change adds or edits one of these: `PI_LENS_*` variables, how each is parsed (int, bool, list), clamped and defaulted, and what an unparseable value does.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- GENERATED by scripts/gen-rule-catalogs.mjs — do not edit by hand. Run `npm run docs:rule-catalogs` after changing rules. -->
4
4
 
5
- pi-lens bundles **485 enabled** ast-grep rules (301 pi-lens-authored + 184 vendored from CodeRabbit) across **17 languages**, plus 16 disabled.
5
+ pi-lens bundles **485 enabled** ast-grep rules (301 pi-lens-authored + 184 vendored from CodeRabbit) across **17 languages**, plus 18 disabled.
6
6
 
7
7
  See [`docs/custom-rules.md`](custom-rules.md) to add your own. Rule sources: `rules/ast-grep-rules/rules/` (pi-lens), `rules/ast-grep-rules/coderabbit/rules/` (vendored).
8
8
 
@@ -167,7 +167,7 @@ See [`docs/custom-rules.md`](custom-rules.md) to add your own. Rule sources: `ru
167
167
  | `jwt-simple-noverify-javascript` | warning | no | CodeRabbit | "Detected the decoding of a JWT token without a verify step. JWT tokens must be verified before use, otherwise the token's integrity is unk… |
168
168
  | `nested-ternary-js` | warning | no | pi-lens | Nested ternary expressions are hard to read — use if/else or switch |
169
169
  | `no-absolute-path-import-js` | warning | no | pi-lens | Absolute import path is not portable — use a relative or aliased path |
170
- | `no-accumulating-spread-js` | warning | no | pi-lens | Avoid accumulating array spread in loops/reduce (O(n^2)); use push/flatMap |
170
+ | `no-accumulating-spread-js` | warning | no | pi-lens | Copying the reduce accumulator each pass can be O(n^2) when it grows (spread, concat, slice, Array.from, Object.assign); build the result w… |
171
171
  | `no-alert-js` | warning | no | pi-lens | Avoid alert() — use a proper notification system |
172
172
  | `no-array-constructor-js` | warning | yes | pi-lens | Use array literal [] instead of new Array() |
173
173
  | `no-array-reverse-mutation-js` | warning | no | pi-lens | .reverse() mutates the array in place — use toReversed() or slice first |
@@ -589,11 +589,12 @@ Shipped but not dispatched (in `rules-disabled/`); enable by moving into `rules/
589
589
  | `gorm-unbounded-preload` | warning | no | pi-lens | Unbounded GORM Preload detected. Consider adding a limit using Preload with a scoping function. |
590
590
  | `shadow-err-variable` | warning | no | pi-lens | Error variable 'err' shadowed in inner scope; original error reference is lost |
591
591
 
592
- ### JavaScript (5)
592
+ ### JavaScript (6)
593
593
 
594
594
  | Rule | Severity | Fixable | Source | Description |
595
595
  |---|---|---|---|---|
596
596
  | `constructor-super-js` | error | no | pi-lens | super() must be called in derived class constructors. |
597
+ | `filter-then-map-js` | hint | no | pi-lens | use flatMap or one loop; keep callback order, indexes and filter semantics |
597
598
  | `no-hardcoded-secrets-js` | error | no | pi-lens | Hardcoded secret detected — use process.env instead |
598
599
  | `no-this-in-static-js` | error | no | pi-lens | Unexpected this in a static method — static methods have no instance context |
599
600
  | `prefer-string-raw-js` | hint | no | pi-lens | Use String.raw for string literals with many backslashes |
@@ -605,11 +606,12 @@ Shipped but not dispatched (in `rules-disabled/`); enable by moving into `rules/
605
606
  |---|---|---|---|---|
606
607
  | `no-method-field-name-collision` | warning | no | pi-lens | Methods and field names should not differ only by capitalization |
607
608
 
608
- ### TypeScript (8)
609
+ ### TypeScript (9)
609
610
 
610
611
  | Rule | Severity | Fixable | Source | Description |
611
612
  |---|---|---|---|---|
612
613
  | `constructor-super` | error | no | pi-lens | super() must be called in derived class constructors. |
614
+ | `filter-then-map` | hint | no | pi-lens | use flatMap or one loop; keep callback order, indexes and filter semantics |
613
615
  | `no-hardcoded-secrets` | error | no | pi-lens | Hardcoded secret detected — use process.env instead |
614
616
  | `no-param-reassign` | warning | no | pi-lens | Do not reassign function parameters — create a new variable instead |
615
617
  | `no-process-env` | warning | no | pi-lens | Avoid direct process.env access for secrets — use config service |
@@ -0,0 +1,126 @@
1
+ # Required checks on bot-opened PRs
2
+
3
+ A pull request that a workflow opens or updates with the repository
4
+ `GITHUB_TOKEN` starts no `pull_request` run: GitHub does not let a token-pushed
5
+ commit trigger other workflows. Every required check then stays absent and the
6
+ PR is BLOCKED until a maintainer closes and reopens it. PR #4945 sat that way
7
+ from 2026-10-28 (#5062; #4338 and #2801 before it).
8
+
9
+ ## The mechanism
10
+
11
+ `workflow_dispatch` and `repository_dispatch` are the two events a
12
+ `GITHUB_TOKEN` can start. The job that opens the PR dispatches every workflow
13
+ that produces a required check on the branch it just pushed:
14
+
15
+ ```
16
+ gh workflow run ci.yml --ref <bot branch>
17
+ gh workflow run hot-path-latency.yml --ref <bot branch>
18
+ gh workflow run lint.yml --ref <bot branch>
19
+ ```
20
+
21
+ The set is every workflow with a `merge_group` trigger, in file-name order. The
22
+ census derives it (`dispatchTargets` in `tests/config/bot-pr-ci-start.test.ts`),
23
+ and each of the three carries a `workflow_dispatch` trigger for this. The
24
+ `ci.yml` and `lint.yml` runs are push-shaped (`scripts/ci-changed-files.mjs`
25
+ runs the full suite for any event but `pull_request`), check out the branch
26
+ head, and post the required check names (`Lint & type-check`, `Unit tests`,
27
+ `Install test (...)`, `knip`, `oxfmt format check`, `TLA+ models`,
28
+ `Unit tests Windows`) on that commit. The `hot-path-latency.yml` run posts
29
+ `Hot-path latency (advisory)` (#4363) and always reports on the head. A manual
30
+ run reads as `hotpath=true`, so it times the head against `HEAD^1`, the
31
+ previous commit on the bot branch.
32
+ Branch protection matches a required check by name and app, not by event, and
33
+ `scripts/ci-verdict.mjs` gates a branch-protection name whatever event its run
34
+ came from (#4090), so those rows count.
35
+
36
+ On a bot-opened PR the dispatch runs are the PR's whole CI, so `ci-verdict`
37
+ also gates every non-`(advisory)` check from a `workflow_dispatch` run on its
38
+ head, such as `Dependency boundaries` and `Production install build`, exactly
39
+ as it gates a `pull_request` run. It reads the PR author (the `gh` `is_bot`
40
+ flag, an `app/` or `[bot]` login; the REST user type `Bot`). #4090's advisory
41
+ rule stays for dispatch runs on a human PR, for a bare-SHA target (no author to
42
+ read), and for `schedule`, `workflow_run` and `repository_dispatch` runs on any
43
+ PR.
44
+
45
+ The dispatch step runs when the PR was `created` or `updated` (an unchanged
46
+ branch keeps the checks of its last head). It is not `continue-on-error`: a PR
47
+ that opened without checks reds the job. When the GitHub App token (#4512)
48
+ opened the PR, CI already started and the dispatch is skipped. The census
49
+ admits that skip only for an opener whose `token` is the App token (the
50
+ docs-refresh opener); any other opener dispatches.
51
+
52
+ ## Which workflows open PRs
53
+
54
+ | Workflow | Job | Branch | Opened with |
55
+ | --- | --- | --- | --- |
56
+ | `tool-smoke.yml` | `tool-smoke-prs` | `bot/lsp-docs-refresh` | App token when configured, else `GITHUB_TOKEN` |
57
+ | `tool-smoke.yml` | `tool-smoke-prs` | `bot/lsp-idle-evict-promote` (draft) | `GITHUB_TOKEN` |
58
+
59
+ `tests/config/bot-pr-ci-start.test.ts` fails closed on this table: any job that
60
+ holds `pull-requests: write`, calls `create-pull-request` or
61
+ `create-github-app-token`, or names a PR-creating command must dispatch every
62
+ workflow with a `merge_group` trigger on each of its literal branches, or be
63
+ registered in that test as a non-opener with its reason.
64
+
65
+ ## Trust boundary
66
+
67
+ - **Token.** `GITHUB_TOKEN` of the `tool-smoke-prs` job, with `actions: write`
68
+ added beside its existing `contents: write` and `pull-requests: write`. No
69
+ secret, App or personal access token is added; the dispatch step reads
70
+ `secrets.GITHUB_TOKEN` only.
71
+ - **Who can run it.** The job runs only on `schedule` or on `master`
72
+ (`tests/config/workflow-writers-governance.test.ts`), so a branch dispatch of
73
+ `tool-smoke.yml` never reaches it.
74
+ - **What runs, on which ref.** The dispatched workflow files are those on the
75
+ bot branch. The branch is `master` plus the files the PR step's `add-paths`
76
+ commits (the three LSP docs; for the promotion PR the idle-eviction table,
77
+ its tests and one changelog fragment). `.github/` is never in `add-paths`, so
78
+ the dispatched workflow files equal master's. The promotion PR changes
79
+ `clients/lsp/server.ts` and tests, which CI then runs: the same code a
80
+ same-repository `pull_request` run of that PR would run, with the permissions
81
+ `ci.yml` and `lint.yml` declare per job (read scopes; `ci.yml` uses no
82
+ secret beyond `GITHUB_TOKEN`).
83
+ - **Dispatch from any ref.** `ci.yml`, `lint.yml` and `hot-path-latency.yml`
84
+ are now dispatchable by anyone with write access on any branch. Their jobs
85
+ hold read scopes only (`hot-path-latency.yml` holds `contents: read` and
86
+ `pull-requests: read` and reads no secret), except the PR-only CodeQL job (`security-events: write`), whose job-level
87
+ `if` requires a `pull_request` event and so never starts on a dispatch
88
+ (`scripts/dispatch-safety.mjs` reads that conjunct as a guard).
89
+ - **Step order.** Both dispatch steps close the `tool-smoke-prs` job, so a
90
+ failed `gh workflow run` never skips the auto-merge disarm failsafe or the
91
+ promotion PR (every other step there runs under an implicit `success()`).
92
+ Each dispatch's status check follows from what its PR's failsafe needs. The
93
+ docs-refresh dispatch keeps the implicit `success()`: a failed disarm
94
+ withholds CI, so an auto-merge armed on an earlier night cannot merge a
95
+ refresh with flips. The promotion dispatch runs under `!cancelled()`: only
96
+ the docs-refresh dispatch sits between its PR step and it, and a failure
97
+ there must not skip it. `tests/config/bot-pr-ci-start.test.ts` derives the
98
+ form per PR step: any non-dispatch step after the PR step means the
99
+ implicit `success()`, and only dispatch steps mean `!cancelled()`. It
100
+ refuses every other form, a step after the first dispatch, a dispatch
101
+ before its PR step, and a dispatch step whose run is anything but
102
+ `set -euo pipefail` and one `gh workflow run` per target. The census
103
+ evaluates none of these keys: `shell` on the dispatch step,
104
+ `defaults.run.shell` on its job or the workflow, `GH_HOST`, `BASH_ENV`,
105
+ workflow-level `env`, YAML merge keys, `working-directory`,
106
+ `timeout-minutes: 0`, a job-level `if:`, and a dispatch step's `env` beyond
107
+ `GH_TOKEN`. They are admitted unread. No workflow sets one today (live
108
+ population 0), so a change that does is not caught until the census reads
109
+ that key.
110
+ - **Not covered.** A dispatched run is not a `pull_request` run: it tests the
111
+ branch head, not the merge with master, and the PR-only advisory jobs (the
112
+ changelog fast-fail, targeted tests, CodeQL, the PR body lint) do not run.
113
+ The hot-path run compares the head with its first parent (`HEAD^1`), not with
114
+ the merge ref a `pull_request` run times.
115
+ `ci-infra-kill-rerun.yml` reacts to `pull_request` and `push` runs only, so a
116
+ runner kill on a dispatched run is re-run by hand.
117
+
118
+ ## Why not an App token only
119
+
120
+ #4512 already mints an App installation token for the docs-refresh PR when
121
+ `LSP_REFRESH_APP_ID` is set, and the promotion PR deliberately keeps
122
+ `GITHUB_TOKEN`. The App route needs a repository variable and secret that are
123
+ not configured, and widening the promotion PR to it would add a credential.
124
+ The dispatch needs neither and covers both PRs; the App token still wins for
125
+ the docs-refresh PR when present, because a native `pull_request` run also
126
+ tests the merge with master.
@@ -21,9 +21,14 @@ The editor-facing JSON Schema is published at
21
21
  [`docs/schema/pi-lens-config-v1.json`](schema/pi-lens-config-v1.json). LSP
22
22
  server entries also accept canonical argv arrays, optional `name` (defaulting
23
23
  to the map id), `enabled`, `role` (`language` or `auxiliary`), `args`, and
24
- `rootMarkers`. These new fields are experimental; reserved role, root-policy,
25
- and timing semantics are inert until their planned catalog slices land, so this
26
- schema slice does not change server launch behavior.
24
+ `rootMarkers`. A `command` is either a bare string (launched with `args`,
25
+ default `["--stdio"]`) or an argv array whose first element is the program;
26
+ the array's remaining elements come before `args`, and no `--stdio` is added to
27
+ it. A `command` that is neither, or an empty or non-string array, fails at
28
+ launch with a message naming the field. These new fields are experimental;
29
+ reserved role, root-policy, and timing semantics are inert until their planned
30
+ catalog slices land, so this schema slice does not change server launch
31
+ behavior.
27
32
 
28
33
  ```jsonc
29
34
  {
@@ -252,6 +257,97 @@ Two rules make the rest of the table unambiguous:
252
257
  same thing as the canonical one, the canonical one is used — otherwise the
253
258
  migration below could never be completed.
254
259
 
260
+ ### `dispatch.disabledRunners` — turning a dispatch runner off
261
+
262
+ `lsp.disabledServers` switches off a language server. A dispatch **runner**
263
+ (a linter, type-checker, or build such as `dotnet-build`, `javac`, or
264
+ `rust-clippy`) has its own denial list, with the same semantics:
265
+
266
+ ```jsonc
267
+ // ~/.pi-lens/config.json (or a project .pi-lens.json)
268
+ { "dispatch": { "disabledRunners": ["dotnet-build"] } }
269
+ ```
270
+
271
+ - **Union across tiers.** Like `lsp.disabledServers`, the list is the union of
272
+ `~/.pi-lens/config.json`, the project `.pi-lens.json`, and any nested
273
+ `.pi-lens.json`. A project can add a runner and can never re-enable one a
274
+ farther tier denied.
275
+ - **The tool never spawns.** The dispatcher skips a disabled runner before its
276
+ precondition and before it runs, so no availability probe, no `dotnet build`,
277
+ nothing. The skip is recorded with the reason `disabled-by-config`
278
+ (`latency.log`, `skipReason`). It is an operator decision, not a failure: it
279
+ raises no blocker and no "tool failed" notice, and a `fallback` group (such as
280
+ C#'s `lsp`, then `dotnet-build`) simply moves on to its next member. The other
281
+ runners of the group, the language server included, run as before.
282
+ - **Unknown ids are dropped, not ignored silently.** An entry that names no
283
+ registered runner is dropped with a `PILENS_CFG_0005` warning that quotes the
284
+ entry, so a typo does not read as a runner that was turned off.
285
+ - **Edits apply on the next dispatch.** The list is resolved for each dispatch,
286
+ so a change to the file needs no restart.
287
+ - **The nearest config owns the file.** A nested `.pi-lens.json` governs the
288
+ files under it, so a denial there applies to those files only. `rules` reads
289
+ the same per-file resolution (see below).
290
+ - **Disabling the only checker leaves the file unconfirmed.** Turning off a
291
+ runner that was the sole check for a file kind produces a notice that names
292
+ `dispatch.disabledRunners` (once per session, then the status line alone)
293
+ rather than a clean result. When another runner of the file is missing,
294
+ timed out, or failed as well, the notice says so and names the denial beside
295
+ it.
296
+
297
+ `pilens_effective_config file=Program.cs` reports the runner as denied, with the
298
+ tier and file that denied it, while the language server stays selected:
299
+
300
+ ```console
301
+ $ pilens_effective_config file=src/Program.cs
302
+ tools:
303
+ lsp selected
304
+ dotnet-build ✗ disabled-by-config (global ~/.pi-lens/config.json → /dispatch/disabledRunners/0)
305
+ ```
306
+
307
+ `dispatch.runnerTimeoutFloorMs`, the other `dispatch` key, stays global-only.
308
+ Putting it in a project `.pi-lens.json` logs the usual one-time "global-only"
309
+ notice.
310
+
311
+ ### `rules.<id>` — read from each file's own config
312
+
313
+ `rules.<id>.disable`, `select`, and `ignorePaths` are resolved for each file
314
+ from the nearest directory at or above it that holds a `.pi-lens.json`, up to
315
+ the workspace root. That resolution layers the global file, the workspace
316
+ root's file, and every nested file between, by the field-wise order above. So a
317
+ nested `.pi-lens.json` governs the files under it and no others, and the
318
+ workspace root's policy still reaches them. Every surface that filters by rule
319
+ policy reads it this way: the per-edit dispatch, `lens_diagnostics`,
320
+ `lsp_diagnostics`, and the turn-end advisories.
321
+
322
+ `ignorePaths` entries follow the same gitignore rules as the `ignore` field. Each entry is
323
+ relative to the directory of the file that declares it: a global entry, and an entry in the
324
+ workspace root's own file, match against the workspace root, and an entry in `pkg/.pi-lens.json`
325
+ matches under `pkg/`:
326
+
327
+ ```jsonc
328
+ // pkg/.pi-lens.json — carves out pkg/legacy/** except pkg/legacy/keep.ts; nothing at the root
329
+ { "rules": { "no-eval": { "ignorePaths": ["legacy/**", "!legacy/keep.ts"] } } }
330
+ ```
331
+
332
+ - The last matching entry wins, so `!` re-includes a file an earlier entry carved out, and an
333
+ entry placed after a `!` ignores it again.
334
+ - A leading `/` roots the entry at the declaring file's directory: `/legacy/**` is `legacy/**`
335
+ there and nowhere deeper.
336
+ - A trailing `/` names a directory: `legacy/` carves out every directory named `legacy` at any
337
+ depth below the file, and everything in it.
338
+ - An entry with no slash matches at any depth below the file: `*.gen.ts` carves out
339
+ `pkg/a.gen.ts` and `pkg/src/b.gen.ts`. To carve out a whole directory, end the entry with `/` or
340
+ `/**`: a bare `legacy` names a file called `legacy`, not the files inside a directory of that name.
341
+ - An entry that climbs out of the declaring directory, such as `../other/**`, matches nothing.
342
+ A file outside the workspace root is never carved out.
343
+ - A line starting with `#` is a comment, as in `.gitignore`, and is dropped.
344
+
345
+ The files are a union: a path is carved out when any file's entries carve it out. A nearer file
346
+ adds carve-outs and never lifts one, so a `!` entry re-includes only against the entries of its
347
+ own file, and a project `!` cannot clear a carve-out the global config declared. Unlike the
348
+ `ignore` field, `ignorePaths` has no cross-file lift: a nearer file's `!` can lift a path that a
349
+ parent file's `ignore` line hid, but never a path that a parent file's `ignorePaths` entry carves out.
350
+
255
351
  ## Legacy locations (still read; being removed)
256
352
 
257
353
  These are read for their deprecation window and then **removed**. Each one you