pi-lens 4.4.7 → 4.4.9

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 (186) hide show
  1. package/CHANGELOG-USER.md +31 -0
  2. package/CHANGELOG.md +327 -0
  3. package/README.md +13 -2
  4. package/config/dependency-cruiser-eager-allowlist.json +1 -1
  5. package/config/markdownlint/run-no-fix.mjs +36 -0
  6. package/dist/{chunk-4LM3VAZH.js → chunk-2VZ3VN3N.js} +2 -2
  7. package/dist/{chunk-PUZ3E2J4.js → chunk-3HTZDY3C.js} +8 -6
  8. package/dist/{chunk-RORGS5II.js → chunk-3NPWO5UO.js} +7 -13
  9. package/dist/{chunk-MNJIXFX4.js → chunk-47UCC4MM.js} +1 -1
  10. package/dist/chunk-4ENEJHF4.js +198 -0
  11. package/dist/chunk-5GEYJJHG.js +22 -0
  12. package/dist/{chunk-U6VN4NVL.js → chunk-5YSEQHJN.js} +3 -3
  13. package/dist/{chunk-6IR3ZYIB.js → chunk-6GPB3JLL.js} +3 -3
  14. package/dist/{chunk-MB6PXBUA.js → chunk-7R5GZIA6.js} +7 -15
  15. package/dist/{chunk-DH5JPM3K.js → chunk-7UTSNTWM.js} +10 -9
  16. package/dist/{chunk-24BILSZW.js → chunk-7YTRG6YW.js} +2 -2
  17. package/dist/{chunk-KW5JQPO5.js → chunk-AACN5GNE.js} +2 -2
  18. package/dist/{chunk-PKES3ISE.js → chunk-ACRJ2GZ5.js} +2 -2
  19. package/dist/{chunk-4ZYJHQMB.js → chunk-C3YRO3EU.js} +10 -12
  20. package/dist/{chunk-PQJFG24Z.js → chunk-CB7PEVOJ.js} +1300 -946
  21. package/dist/{chunk-ABPKUVA4.js → chunk-CDFJF5YD.js} +1 -1
  22. package/dist/{chunk-T7A2HK2B.js → chunk-CJS6WE66.js} +17 -18
  23. package/dist/{chunk-3YY7IXIL.js → chunk-CM6BDY4E.js} +14 -60
  24. package/dist/{chunk-RZOXUSPC.js → chunk-CZCAZVTD.js} +16 -2
  25. package/dist/chunk-DGKFWQK4.js +23 -0
  26. package/dist/{chunk-NA7SEXHE.js → chunk-E65WJVI5.js} +7 -9
  27. package/dist/{chunk-2TF6RXWB.js → chunk-EKNYSXFB.js} +8 -10
  28. package/dist/{chunk-RRV3FNNM.js → chunk-EY6LY2HO.js} +27 -30
  29. package/dist/{chunk-LBLBAFG3.js → chunk-F6BEQWAK.js} +17 -5
  30. package/dist/{chunk-4L36HG27.js → chunk-FGNSESAC.js} +12 -14
  31. package/dist/{chunk-3FRLWYBG.js → chunk-FRUBVFXV.js} +39 -42
  32. package/dist/{chunk-FB5SCCPT.js → chunk-G22UNQID.js} +14 -15
  33. package/dist/{chunk-LV4UMYVH.js → chunk-GQTQUNCG.js} +26 -27
  34. package/dist/{chunk-E7HJ56Y7.js → chunk-H3BVMK47.js} +64 -73
  35. package/dist/chunk-H6FLQ5NW.js +28 -0
  36. package/dist/{chunk-QHSNL7B2.js → chunk-HEA3EM23.js} +15 -19
  37. package/dist/{chunk-AWDSEDER.js → chunk-HSOBIN22.js} +2 -2
  38. package/dist/{chunk-EAOK7MIZ.js → chunk-HYSKJMZK.js} +17 -4
  39. package/dist/{chunk-VUZWQ7UG.js → chunk-IICERRFF.js} +46 -72
  40. package/dist/{chunk-OXOI55RU.js → chunk-IILEH3ZC.js} +8 -10
  41. package/dist/{chunk-ZKXQKGWZ.js → chunk-J3Q2NYJR.js} +4 -3
  42. package/dist/{chunk-YHC2O2WO.js → chunk-JUZ67QZQ.js} +20 -9
  43. package/dist/chunk-KR5VGMVT.js +25 -0
  44. package/dist/{chunk-F7K5IBZG.js → chunk-KV6GQOGN.js} +41 -44
  45. package/dist/{chunk-SNDXCFRS.js → chunk-KXMJLOZF.js} +25 -23
  46. package/dist/{chunk-CB4WHS4H.js → chunk-L4Y3ROKQ.js} +3 -3
  47. package/dist/{chunk-3F6BMY53.js → chunk-L6WBJGQS.js} +1 -1
  48. package/dist/{chunk-MPKRJBPK.js → chunk-L7O774U7.js} +30 -32
  49. package/dist/{chunk-URCQWAQ4.js → chunk-LAHHGNAY.js} +21 -21
  50. package/dist/{chunk-V63BC55Q.js → chunk-LT62P654.js} +1 -1
  51. package/dist/{chunk-ZMAUPOMG.js → chunk-LWOM6LVS.js} +34 -34
  52. package/dist/{chunk-HO6LWE2E.js → chunk-MKPDIAZH.js} +21 -1
  53. package/dist/{chunk-2PHMIAKO.js → chunk-MN635QYA.js} +3 -4
  54. package/dist/{chunk-KDX35VXP.js → chunk-MQ4PPCJB.js} +166 -149
  55. package/dist/{chunk-QOE342SU.js → chunk-MRLH4MYU.js} +2 -2
  56. package/dist/{chunk-CE6VMBCB.js → chunk-N56BNAA6.js} +20 -21
  57. package/dist/{chunk-L3CMBQMH.js → chunk-N5CEGQPG.js} +14 -17
  58. package/dist/{chunk-7E2563GA.js → chunk-NCLO6E6N.js} +13 -33
  59. package/dist/{chunk-J6JP25XU.js → chunk-NL5LSKVD.js} +4 -3
  60. package/dist/{chunk-U7BD2QL7.js → chunk-NMUSOZ2D.js} +10 -12
  61. package/dist/{chunk-BZARLRJW.js → chunk-NOWH2VA2.js} +8 -33
  62. package/dist/{chunk-U2SDMG7C.js → chunk-NUSXS6YB.js} +6 -5
  63. package/dist/{chunk-ZJTT47IG.js → chunk-OSEKJEUU.js} +2 -2
  64. package/dist/{chunk-FZKFVUEC.js → chunk-OUYAUXAT.js} +647 -355
  65. package/dist/{chunk-ZE3KXHS7.js → chunk-PBZNYHMM.js} +84 -4
  66. package/dist/{chunk-U5HPROLA.js → chunk-PIIUNJIT.js} +2 -4
  67. package/dist/chunk-PKLB2XJL.js +8 -0
  68. package/dist/{chunk-RC2Z6K47.js → chunk-PRHYIA6X.js} +15 -6
  69. package/dist/{chunk-RQS4QQSD.js → chunk-PXQ45SGD.js} +2 -2
  70. package/dist/chunk-Q6JQKWPK.js +25 -0
  71. package/dist/{chunk-F6X3YJWD.js → chunk-QB7T2PHK.js} +2 -2
  72. package/dist/{chunk-TIQJPRDD.js → chunk-QGITU23N.js} +3 -2
  73. package/dist/chunk-QJJKOHLH.js +57 -0
  74. package/dist/{chunk-4LOE5R5P.js → chunk-QP33NKYC.js} +18 -15
  75. package/dist/{chunk-N5WSK2K7.js → chunk-QVBOXT3L.js} +12 -17
  76. package/dist/{chunk-DPGEAHZT.js → chunk-RNJFRXEN.js} +10 -18
  77. package/dist/{chunk-EKWX4WD3.js → chunk-RNXOWDM6.js} +10 -10
  78. package/dist/{chunk-O4BJFESU.js → chunk-RTFMDIKV.js} +1 -1
  79. package/dist/{chunk-LS3QJRUB.js → chunk-SIQHOB6P.js} +11 -13
  80. package/dist/{chunk-3K2F6UDZ.js → chunk-SLSMJPEF.js} +43 -42
  81. package/dist/chunk-T5QSLSMM.js +50 -0
  82. package/dist/chunk-TGQDAG4B.js +88 -0
  83. package/dist/{chunk-4YHYPW2G.js → chunk-THYHUIDR.js} +44 -13
  84. package/dist/{chunk-YVHBNSME.js → chunk-TMNUTMT5.js} +1099 -1100
  85. package/dist/{chunk-WDBICWH3.js → chunk-TOE2RRCS.js} +1 -1
  86. package/dist/chunk-TYHPVE5H.js +25 -0
  87. package/dist/chunk-UAKO2M6B.js +73 -0
  88. package/dist/chunk-UC5AXW5Z.js +20 -0
  89. package/dist/chunk-UTJP6WOS.js +28 -0
  90. package/dist/{chunk-DQZFQSR5.js → chunk-UXTQ3QPD.js} +4 -4
  91. package/dist/chunk-UYXV5NIS.js +20 -0
  92. package/dist/{chunk-KKCK636N.js → chunk-V2WDBOLZ.js} +10 -12
  93. package/dist/{chunk-PR6PO3ES.js → chunk-V67D6TMU.js} +22 -20
  94. package/dist/{chunk-VSFLRN5Y.js → chunk-VCRVNLE7.js} +135 -2
  95. package/dist/{chunk-CPSR3AVL.js → chunk-VO4JFPTV.js} +2 -2
  96. package/dist/{chunk-XT2HTCJ5.js → chunk-VWLSU3XV.js} +6 -5
  97. package/dist/{chunk-WME2OQST.js → chunk-W5E72HJA.js} +66 -24
  98. package/dist/{chunk-LLS45EWB.js → chunk-W7TY6HYX.js} +6 -8
  99. package/dist/{chunk-CCV2EU7T.js → chunk-WSSLVMDA.js} +12 -13
  100. package/dist/{chunk-YISME6ON.js → chunk-WTB4GKMH.js} +10 -1
  101. package/dist/{chunk-KPPJTH44.js → chunk-X5BJ3G2P.js} +64 -35
  102. package/dist/{chunk-JMEKXFOL.js → chunk-XKFO2SZV.js} +39 -34
  103. package/dist/{chunk-HR3OJ3TH.js → chunk-XLAI7UYY.js} +84 -31
  104. package/dist/{chunk-H7OR7DFZ.js → chunk-XO756WE5.js} +53 -37
  105. package/dist/{chunk-F5Z6URKM.js → chunk-XVB3Q2PG.js} +2 -4
  106. package/dist/{chunk-R5MOQM2H.js → chunk-YOXCCJDF.js} +607 -366
  107. package/dist/{chunk-ZGSJDWQU.js → chunk-ZCQBNPRH.js} +2 -2
  108. package/dist/chunk-ZD4KVFXI.js +234 -0
  109. package/dist/{chunk-WGRJOXED.js → chunk-ZDMFGACN.js} +1295 -966
  110. package/dist/{chunk-OSTKYB55.js → chunk-ZMMHHXSW.js} +1 -1
  111. package/dist/{chunk-75GAYVNO.js → chunk-ZPM7ZIFL.js} +6 -6
  112. package/dist/{chunk-LUBPZN36.js → chunk-ZVCDHYWZ.js} +9 -11
  113. package/dist/{chunk-Y7F7IEE3.js → chunk-ZZN74OGD.js} +102 -7
  114. package/dist/{chunk-L5JYIU47.js → chunk-ZZSJAR76.js} +39 -20
  115. package/dist/index.js +10933 -8644
  116. package/dist/mcp/analyze-cli.js +12 -17
  117. package/dist/mcp/cli.js +43 -42
  118. package/dist/mcp/server.js +3073 -1147
  119. package/dist/mcp/worker.js +61 -61
  120. package/dist/probes/installer.js +18 -19
  121. package/docs/adr/0003-git-guard-latch-writer.md +11 -6
  122. package/docs/agent-tools.md +58 -16
  123. package/docs/alignment-families.md +29 -0
  124. package/docs/analysisall.md +1 -1
  125. package/docs/ast-grep_rules_catalog.md +6 -4
  126. package/docs/ci-bot-pr-checks.md +128 -0
  127. package/docs/configuration.md +150 -12
  128. package/docs/defect-shapes.md +107 -15
  129. package/docs/engineering-principles.md +27 -2
  130. package/docs/environment-variables.md +18 -1
  131. package/docs/features.md +14 -7
  132. package/docs/globalconfig.md +11 -3
  133. package/docs/invariants/git-guard-host.md +7 -3
  134. package/docs/invariants/language-config.md +15 -4
  135. package/docs/invariants/lsp-trust-exec.md +25 -4
  136. package/docs/invariants/paths-os.md +4 -2
  137. package/docs/invariants/session-telemetry.md +2 -2
  138. package/docs/language-coverage.md +1 -0
  139. package/docs/lsp-capability-matrix.md +167 -65
  140. package/docs/lsp-idle-eviction.md +4 -1
  141. package/docs/merge-queue-rollout.md +10 -8
  142. package/docs/module-report-read-symbol.md +34 -23
  143. package/docs/pi-lens-fixer.md +34 -17
  144. package/docs/pi-lens-investigator.md +3 -0
  145. package/docs/pi-lens-merge-policy.md +34 -17
  146. package/docs/pi-lens-monitor.md +9 -0
  147. package/docs/pi-lens-orchestration.md +4 -1
  148. package/docs/pi-lens-reviewer.md +6 -6
  149. package/docs/pi-lens-subagent.md +19 -3
  150. package/docs/public-api-stability.md +57 -7
  151. package/docs/release-qa-baseline.md +7 -4
  152. package/docs/schema/pi-lens-config-v1.json +21 -2
  153. package/docs/servercapabilities.md +3 -1
  154. package/docs/settings.md +11 -7
  155. package/docs/word-index.md +20 -7
  156. package/package.json +11 -4
  157. package/rules/ast-grep-rules/rule-tests/no-accumulating-spread-js-test.yml +37 -0
  158. package/rules/ast-grep-rules/rule-tests/ts-redundant-filter-map-test.yml +12 -1
  159. package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-js-test.yml +12 -0
  160. package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-test.yml +25 -0
  161. package/rules/ast-grep-rules/rules/no-accumulating-spread-js.yml +49 -1
  162. package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
  163. package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
  164. package/rules/ast-grep-rules/rules/ts-redundant-filter-map.yml +9 -1
  165. package/rules/ast-grep-rules/rules-disabled/filter-then-map-js.yml +17 -0
  166. package/rules/ast-grep-rules/rules-disabled/filter-then-map.yml +36 -0
  167. package/rules/ast-grep-rules/self-scan-baseline.json +1 -1
  168. package/scripts/download-grammars.js +3 -2
  169. package/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
  170. package/dist/chunk-46TNM7XZ.js +0 -88
  171. package/dist/chunk-72OKUXSD.js +0 -31
  172. package/dist/chunk-7GLOLOSH.js +0 -57
  173. package/dist/chunk-AKUUMGD5.js +0 -26
  174. package/dist/chunk-ASUXV767.js +0 -22
  175. package/dist/chunk-CTADOKYM.js +0 -25
  176. package/dist/chunk-GNSIWBAT.js +0 -106
  177. package/dist/chunk-HWDAVBFU.js +0 -49
  178. package/dist/chunk-JJ2RRESP.js +0 -58
  179. package/dist/chunk-KXF5R4UN.js +0 -48
  180. package/dist/chunk-LSC3VADM.js +0 -23
  181. package/dist/chunk-OE5ZBP7F.js +0 -443
  182. package/dist/chunk-SHLDT3OI.js +0 -27
  183. package/dist/chunk-UF7RTZSO.js +0 -27
  184. package/dist/chunk-W4WP2ERB.js +0 -30
  185. package/dist/chunk-YES5CACN.js +0 -73
  186. package/dist/chunk-Z2XAOKHK.js +0 -136
@@ -2,83 +2,83 @@
2
2
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
3
3
  import {
4
4
  analyzeFile
5
- } from "../chunk-WGRJOXED.js";
6
- import "../chunk-LBLBAFG3.js";
7
- import "../chunk-MNJIXFX4.js";
8
- import "../chunk-Y7F7IEE3.js";
9
- import "../chunk-JJ2RRESP.js";
10
- import "../chunk-EAOK7MIZ.js";
11
- import "../chunk-4LM3VAZH.js";
12
- import "../chunk-E7HJ56Y7.js";
13
- import "../chunk-V63BC55Q.js";
14
- import "../chunk-CPSR3AVL.js";
15
- import "../chunk-ZE3KXHS7.js";
16
- import "../chunk-RQS4QQSD.js";
17
- import "../chunk-CB4WHS4H.js";
18
- import "../chunk-N5WSK2K7.js";
19
- import "../chunk-7E2563GA.js";
20
- import "../chunk-MB6PXBUA.js";
21
- import "../chunk-DQZFQSR5.js";
22
- import "../chunk-3YY7IXIL.js";
23
- import "../chunk-WDBICWH3.js";
24
- import "../chunk-H7OR7DFZ.js";
5
+ } from "../chunk-ZDMFGACN.js";
6
+ import "../chunk-F6BEQWAK.js";
7
+ import "../chunk-47UCC4MM.js";
8
+ import "../chunk-HYSKJMZK.js";
9
+ import "../chunk-2VZ3VN3N.js";
10
+ import "../chunk-H3BVMK47.js";
11
+ import "../chunk-VO4JFPTV.js";
12
+ import "../chunk-PBZNYHMM.js";
13
+ import "../chunk-ZZN74OGD.js";
14
+ import "../chunk-PXQ45SGD.js";
15
+ import "../chunk-L4Y3ROKQ.js";
16
+ import "../chunk-QVBOXT3L.js";
17
+ import "../chunk-NCLO6E6N.js";
18
+ import "../chunk-7R5GZIA6.js";
19
+ import "../chunk-UXTQ3QPD.js";
20
+ import "../chunk-CM6BDY4E.js";
21
+ import "../chunk-ZD4KVFXI.js";
22
+ import "../chunk-TOE2RRCS.js";
23
+ import "../chunk-XO756WE5.js";
25
24
  import "../chunk-3MED75HT.js";
26
- import "../chunk-FZKFVUEC.js";
27
- import "../chunk-XT2HTCJ5.js";
25
+ import "../chunk-PKLB2XJL.js";
26
+ import "../chunk-OUYAUXAT.js";
27
+ import "../chunk-VWLSU3XV.js";
28
28
  import "../chunk-XIMYZ3JA.js";
29
- import "../chunk-R5MOQM2H.js";
30
- import "../chunk-24BILSZW.js";
31
- import "../chunk-PR6PO3ES.js";
32
- import "../chunk-RC2Z6K47.js";
33
- import "../chunk-F5Z6URKM.js";
29
+ import "../chunk-YOXCCJDF.js";
30
+ import "../chunk-7YTRG6YW.js";
31
+ import "../chunk-V67D6TMU.js";
32
+ import "../chunk-LT62P654.js";
33
+ import "../chunk-PRHYIA6X.js";
34
+ import "../chunk-XVB3Q2PG.js";
34
35
  import "../chunk-5W3R6LFT.js";
35
- import "../chunk-MPKRJBPK.js";
36
- import "../chunk-DH5JPM3K.js";
37
- import "../chunk-PKES3ISE.js";
38
- import "../chunk-ZKXQKGWZ.js";
39
- import "../chunk-L5JYIU47.js";
36
+ import "../chunk-L7O774U7.js";
37
+ import "../chunk-7UTSNTWM.js";
38
+ import "../chunk-ACRJ2GZ5.js";
39
+ import "../chunk-J3Q2NYJR.js";
40
+ import "../chunk-ZZSJAR76.js";
40
41
  import "../chunk-Z54ZSOBZ.js";
41
- import "../chunk-U6VN4NVL.js";
42
- import "../chunk-TIQJPRDD.js";
43
- import "../chunk-YISME6ON.js";
42
+ import "../chunk-5YSEQHJN.js";
43
+ import "../chunk-QGITU23N.js";
44
+ import "../chunk-WTB4GKMH.js";
44
45
  import "../chunk-6HWVI6MI.js";
45
- import "../chunk-O4BJFESU.js";
46
+ import "../chunk-RTFMDIKV.js";
46
47
  import "../chunk-CKEQFGLT.js";
47
- import "../chunk-HO6LWE2E.js";
48
- import "../chunk-SNDXCFRS.js";
49
- import "../chunk-QOE342SU.js";
50
- import "../chunk-AWDSEDER.js";
51
- import "../chunk-LLS45EWB.js";
48
+ import "../chunk-KXMJLOZF.js";
49
+ import "../chunk-MRLH4MYU.js";
50
+ import "../chunk-HSOBIN22.js";
51
+ import "../chunk-W7TY6HYX.js";
52
+ import "../chunk-MKPDIAZH.js";
52
53
  import "../chunk-2BEMIWEW.js";
53
54
  import "../chunk-IJYGIDF4.js";
54
- import "../chunk-KDX35VXP.js";
55
- import "../chunk-DPGEAHZT.js";
56
- import "../chunk-NA7SEXHE.js";
57
- import "../chunk-3F6BMY53.js";
58
- import "../chunk-KW5JQPO5.js";
59
- import "../chunk-PUZ3E2J4.js";
60
- import "../chunk-ABPKUVA4.js";
61
- import "../chunk-EKWX4WD3.js";
62
- import "../chunk-ZGSJDWQU.js";
63
- import "../chunk-YVHBNSME.js";
55
+ import "../chunk-MQ4PPCJB.js";
56
+ import "../chunk-RNJFRXEN.js";
57
+ import "../chunk-E65WJVI5.js";
58
+ import "../chunk-L6WBJGQS.js";
59
+ import "../chunk-UYXV5NIS.js";
60
+ import "../chunk-AACN5GNE.js";
61
+ import "../chunk-3HTZDY3C.js";
62
+ import "../chunk-CDFJF5YD.js";
63
+ import "../chunk-RNXOWDM6.js";
64
+ import "../chunk-ZCQBNPRH.js";
65
+ import "../chunk-TMNUTMT5.js";
64
66
  import "../chunk-AWQWXSW4.js";
65
67
  import "../chunk-QYF5S6P6.js";
66
- import "../chunk-RZOXUSPC.js";
67
- import "../chunk-KPPJTH44.js";
68
- import "../chunk-J6JP25XU.js";
68
+ import "../chunk-CZCAZVTD.js";
69
+ import "../chunk-X5BJ3G2P.js";
70
+ import "../chunk-NL5LSKVD.js";
69
71
  import {
70
72
  setProjectTrustState
71
- } from "../chunk-U5HPROLA.js";
72
- import "../chunk-WME2OQST.js";
73
+ } from "../chunk-PIIUNJIT.js";
73
74
  import {
74
75
  logExtension
75
- } from "../chunk-KXF5R4UN.js";
76
+ } from "../chunk-W5E72HJA.js";
76
77
  import "../chunk-S26LC76R.js";
77
- import "../chunk-Z2XAOKHK.js";
78
- import "../chunk-VSFLRN5Y.js";
78
+ import "../chunk-VCRVNLE7.js";
79
79
  import "../chunk-LJDODBBZ.js";
80
- import "../chunk-OSTKYB55.js";
81
- import "../chunk-PQJFG24Z.js";
80
+ import "../chunk-ZMMHHXSW.js";
81
+ import "../chunk-CB7PEVOJ.js";
82
82
  import "../chunk-NXL4FFQQ.js";
83
83
 
84
84
  // dist/mcp/worker.js
@@ -53,29 +53,28 @@ import {
53
53
  verifyNpmPackageEntry,
54
54
  verifyToolBinary,
55
55
  wasLastResolveTransient
56
- } from "../chunk-KDX35VXP.js";
57
- import "../chunk-DPGEAHZT.js";
58
- import "../chunk-NA7SEXHE.js";
59
- import "../chunk-3F6BMY53.js";
60
- import "../chunk-KW5JQPO5.js";
61
- import "../chunk-PUZ3E2J4.js";
62
- import "../chunk-ABPKUVA4.js";
63
- import "../chunk-EKWX4WD3.js";
64
- import "../chunk-ZGSJDWQU.js";
65
- import "../chunk-YVHBNSME.js";
56
+ } from "../chunk-MQ4PPCJB.js";
57
+ import "../chunk-RNJFRXEN.js";
58
+ import "../chunk-E65WJVI5.js";
59
+ import "../chunk-L6WBJGQS.js";
60
+ import "../chunk-UYXV5NIS.js";
61
+ import "../chunk-AACN5GNE.js";
62
+ import "../chunk-3HTZDY3C.js";
63
+ import "../chunk-CDFJF5YD.js";
64
+ import "../chunk-RNXOWDM6.js";
65
+ import "../chunk-ZCQBNPRH.js";
66
+ import "../chunk-TMNUTMT5.js";
66
67
  import "../chunk-AWQWXSW4.js";
67
68
  import "../chunk-QYF5S6P6.js";
68
- import "../chunk-RZOXUSPC.js";
69
- import "../chunk-KPPJTH44.js";
70
- import "../chunk-J6JP25XU.js";
71
- import "../chunk-U5HPROLA.js";
72
- import "../chunk-WME2OQST.js";
73
- import "../chunk-KXF5R4UN.js";
69
+ import "../chunk-CZCAZVTD.js";
70
+ import "../chunk-X5BJ3G2P.js";
71
+ import "../chunk-NL5LSKVD.js";
72
+ import "../chunk-PIIUNJIT.js";
73
+ import "../chunk-W5E72HJA.js";
74
74
  import "../chunk-S26LC76R.js";
75
- import "../chunk-Z2XAOKHK.js";
76
- import "../chunk-VSFLRN5Y.js";
75
+ import "../chunk-VCRVNLE7.js";
77
76
  import "../chunk-LJDODBBZ.js";
78
- import "../chunk-PQJFG24Z.js";
77
+ import "../chunk-CB7PEVOJ.js";
79
78
  import "../chunk-NXL4FFQQ.js";
80
79
  export {
81
80
  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
@@ -122,8 +125,18 @@ and `[]` mean no arguments.
122
125
  (`tools/lsp-navigation.ts` operation description). Position-based operations
123
126
  accept a `path`/`line`/`character` triple. `documentSymbol` accepts a `kinds`
124
127
  filter (e.g. `function`, `class`) and a `maxResults` cap (default 20, max 100)
125
- to keep large files bounded. Full per-operation parameter reference:
128
+ to keep large files bounded. A request that outlasts its deadline (10 s by
129
+ default for navigation requests) is reported as a timeout, never as a silent
130
+ empty answer, so a slow server is not read as "no references". Depending on
131
+ the operation the timeout arrives as an error result, a note beside the
132
+ answer it does have (a `definition` that the `documentSymbol` fallback
133
+ answered, or a partial `workspaceDiagnostics` pull), or `executed: false`
134
+ with a reason (`executeCommand`). Full per-operation parameter reference:
126
135
  [skills/pi-lens-lsp-navigation/SKILL.md](../skills/pi-lens-lsp-navigation/SKILL.md).
136
+ Output is Neovim-style text by default (a `path:line:col` location list,
137
+ `hover` markdown, an indented `start-end kind name` symbol tree,
138
+ `path:line:col: severity: message` diagnostics, the rename summary); pass
139
+ `view: "json"` for the structured envelope (refs #1449).
127
140
  - **`ast_grep_search`** — AST-aware structural search across ~40 languages via
128
141
  the `sg` CLI. Supports metavariables (`$VAR`, `$$$ARGS`), `strictness`
129
142
  modes (`smart`, `relaxed`, `ast`, `cst`, `signature`, `template`), structural
@@ -156,8 +169,10 @@ and `[]` mean no arguments.
156
169
  - **`ast_grep_outline`** — Syntax-only code structure (symbols, imports, exports,
157
170
  members) for files or directories via `ast-grep outline`. Fast, local, no
158
171
  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
172
+ `pubMembers`/`globs`; returns a compact text tree, one
173
+ `start-end [import|export ]kind name[ — signature]` line per symbol (members
174
+ indented, files sorted by path, a visible line when files or items were cut);
175
+ read a range with `offset=start`, `limit=end-start+1`. Prefer `module_report` for pi-lens-aware navigation; reach
161
176
  for this when the syntax tree's own view is enough or pi-lens's extractor is
162
177
  weak for a language.
163
178
 
@@ -170,7 +185,12 @@ and `[]` mean no arguments.
170
185
  `module_report` explains one, `read_symbol` reads its body. Complements
171
186
  `grep` (raw substrings) and `lsp_navigation` (exact references). Returns
172
187
  `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
188
+ self-builds in the background and never blocks the call. The answer is one
189
+ ranked table: a row per file with its path, best-matching line, score, hit
190
+ count and any graph annotations, then a footer with index coverage and a
191
+ next-step line naming the top-ranked hit (`module_report <path>`) — read that
192
+ line with `offset=<line>, limit=1`. Both surfaces render it through
193
+ `renderCompactSymbolSearch`, so no JSON payload rides along. See
174
194
  [docs/word-index.md](word-index.md) for how the index is built and kept
175
195
  warm.
176
196
  - **`project_report`** — Project orientation from the cached review graph, the
@@ -178,8 +198,9 @@ and `[]` mean no arguments.
178
198
  `read_symbol`). Returns ranked hubs (top fan-in files), entry points,
179
199
  subsystem cycles and layering violations, risk hotspots, and low-confidence
180
200
  dead weight. `limit` scales every section's cap (default 10), `focus` re-ranks
181
- toward a task hint without widening scope, and `view: "compact"` returns a
182
- line-oriented text rendering instead of JSON. Read-only: a cold cache returns
201
+ toward a task hint without widening scope. Returns a line-oriented TEXT
202
+ report by default; pass `view: "json"` for the full JSON payload. Read-only:
203
+ a cold cache returns
183
204
  `available: false` with a retry hint and starts a non-blocking background
184
205
  build. On a project over `maxProjectFiles` that first build records a
185
206
  size-skip verdict; later calls name the cap and start no build, so raise it
@@ -227,11 +248,17 @@ and `[]` mean no arguments.
227
248
  spawn/move-closure, Swift weak/strong-self capture, C++ by-reference-
228
249
  capture, Kotlin coroutine-builder, Java thread/executor/listener, and C#
229
250
  Task.Run/event-`+=` slices); named symbols span all tree-sitter
230
- `SYMBOL_QUERIES` languages. Pass `view: "summary"` for a smaller orientation
231
- payload (top-level entries + recommendations, heavy callback/usedBy/
232
- blast-radius payloads omitted); pass `view: "compact"` for a line-oriented
233
- TEXT rendering of the full report (cheapest option — roughly a quarter of
234
- the JSON cost, same underlying data). Reports section-level `provenance`
251
+ `SYMBOL_QUERIES` languages. `view` selects an output preset, projection ×
252
+ format: `"summary-text"` (default) = metrics off (no `usedBy`, `fanout`,
253
+ `complexity`), text; `"summary-json"` = same fields, JSON; `"full-text"`
254
+ = every field, text; `"full-json"` = every field, JSON. The text cell is
255
+ lossless against its JSON payload (metrics as a `cx:`/`fan:` suffix, each
256
+ flag in its own bracket, `used-by:` continuation lines, plus
257
+ `IMPORTS:`/`CALL GRAPH:`/`BLAST RADIUS:` blocks and a `PROVENANCE:` footer),
258
+ so the default text preset leaves out `usedBy`, `fanout` and `complexity`
259
+ and runs at roughly half the byte
260
+ size of JSON. A `maxRefsPerSymbol` argument promotes the projection to
261
+ `full` and keeps the format. Reports section-level `provenance`
235
262
  for syntax, cached-graph, and heuristic sections. Pass `blastRadius: true`
236
263
  for cross-file transitive dependents (read-only over the cached graph).
237
264
  - **`read_symbol`** — One symbol's verbatim source body, by name or by a
@@ -257,3 +284,18 @@ and `[]` mean no arguments.
257
284
  - **`lens_diagnostics mode=full`** — full project-wide review: LSP + the cached
258
285
  heavyweight analyzers (jscpd, madge, gitleaks, govulncheck, trivy, dead-code)
259
286
  folded in via `refreshRunners`.
287
+
288
+ ## Codemode
289
+
290
+ - When lazy tool loading is active (`tools.lazy: true`, the default, or
291
+ `"auto"` on a model that supports mid-conversation system messages), the situational pi-lens tools are not callable from a
292
+ codemode script until `pi_lens_activate_tools` has run. They become
293
+ callable from the next turn.
294
+ - pi's error for such a tool lists the available tools but not
295
+ `pi_lens_activate_tools`.
296
+ - `--no-lazy-tools` (`tools.lazy: false`) makes every enabled pi-lens tool
297
+ callable from the first script. A tool disabled with
298
+ `tools.<name>.enabled: false` or `--no-tool` stays unavailable.
299
+ - Scripts receive each tool's text, including pi-lens notes such as a blocker
300
+ note, never `details`.
301
+ - Nested writes are recorded like top-level ones.
@@ -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.
@@ -142,7 +142,7 @@ The common extraction contract is nodes with `id`, `label`, `source_file`, `sour
142
142
  | Upstream idea | Existing pi-lens equivalent | Real gap/overlap | Fit and likely seam |
143
143
  | --- | --- | --- | --- |
144
144
  | Provenance per relationship | Review-graph edge `resolution`, report section provenance, capped-coverage fields | More edge-level evidence/locations could be surfaced consistently | **Adapt** in `clients/review-graph/types.ts`, `module-report.ts`, `project-report.ts`; no new graph |
145
- | Digest of top architecture | `project_report` compact view, word-index ranking, `recommendedReads` | No single persisted digest/tour artifact | **Adapt** as a bounded report/context mode, not a second cache; `clients/project-report.ts` |
145
+ | Digest of top architecture | `project_report` default text view, word-index ranking, `recommendedReads` | No single persisted digest/tour artifact | **Adapt** as a bounded report/context mode, not a second cache; `clients/project-report.ts` |
146
146
  | Guided tours/read order | Entry points, hubs, recommended reads, blast radius | No explicit multi-step tour contract | **Adapt** deterministically first; later optional agent-authored notes in reports/docs, not graph truth |
147
147
  | Query-first agent workflow | Pi tools plus MCP mirrored engine; read guard tracks coverage | Could nudge toward `project_report`/`symbol_search` before broad reads | **Adapt** in a skill/docs surface; do not block native reads like Graphify strict mode |
148
148
  | FTS/BM25 plus graph centrality | Persisted word index already uses BM25, reverse-dep centrality, graph annotations | Strong overlap; validate ranking quality rather than add embeddings | **Keep/adapt** in `clients/word-index.ts` and `lens-engine.ts` |
@@ -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,128 @@
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 `actionlint & markdownlint` 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). A job whose `if` requires a
87
+ `pull_request` event never starts on a dispatch, and
88
+ `scripts/dispatch-safety.mjs` reads that conjunct as a guard (ci.yml's PR-time
89
+ CodeQL job was one until #5275 removed it; CodeQL now runs from `codeql.yml`
90
+ on a schedule).
91
+ - **Step order.** Both dispatch steps close the `tool-smoke-prs` job, so a
92
+ failed `gh workflow run` never skips the auto-merge disarm failsafe or the
93
+ promotion PR (every other step there runs under an implicit `success()`).
94
+ Each dispatch's status check follows from what its PR's failsafe needs. The
95
+ docs-refresh dispatch keeps the implicit `success()`: a failed disarm
96
+ withholds CI, so an auto-merge armed on an earlier night cannot merge a
97
+ refresh with flips. The promotion dispatch runs under `!cancelled()`: only
98
+ the docs-refresh dispatch sits between its PR step and it, and a failure
99
+ there must not skip it. `tests/config/bot-pr-ci-start.test.ts` derives the
100
+ form per PR step: any non-dispatch step after the PR step means the
101
+ implicit `success()`, and only dispatch steps mean `!cancelled()`. It
102
+ refuses every other form, a step after the first dispatch, a dispatch
103
+ before its PR step, and a dispatch step whose run is anything but
104
+ `set -euo pipefail` and one `gh workflow run` per target. The census
105
+ evaluates none of these keys: `shell` on the dispatch step,
106
+ `defaults.run.shell` on its job or the workflow, `GH_HOST`, `BASH_ENV`,
107
+ workflow-level `env`, YAML merge keys, `working-directory`,
108
+ `timeout-minutes: 0`, a job-level `if:`, and a dispatch step's `env` beyond
109
+ `GH_TOKEN`. They are admitted unread. No workflow sets one today (live
110
+ population 0), so a change that does is not caught until the census reads
111
+ that key.
112
+ - **Not covered.** A dispatched run is not a `pull_request` run: it tests the
113
+ branch head, not the merge with master, and the PR-only advisory jobs (the
114
+ changelog fast-fail, targeted tests, the PR body lint) do not run.
115
+ The hot-path run compares the head with its first parent (`HEAD^1`), not with
116
+ the merge ref a `pull_request` run times.
117
+ `ci-infra-kill-rerun.yml` reacts to `pull_request` and `push` runs only, so a
118
+ runner kill on a dispatched run is re-run by hand.
119
+
120
+ ## Why not an App token only
121
+
122
+ #4512 already mints an App installation token for the docs-refresh PR when
123
+ `LSP_REFRESH_APP_ID` is set, and the promotion PR deliberately keeps
124
+ `GITHUB_TOKEN`. The App route needs a repository variable and secret that are
125
+ not configured, and widening the promotion PR to it would add a credential.
126
+ The dispatch needs neither and covers both PRs; the App token still wins for
127
+ the docs-refresh PR when present, because a native `pull_request` run also
128
+ tests the merge with master.