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.
- package/CHANGELOG-USER.md +31 -0
- package/CHANGELOG.md +327 -0
- package/README.md +13 -2
- package/config/dependency-cruiser-eager-allowlist.json +1 -1
- package/config/markdownlint/run-no-fix.mjs +36 -0
- package/dist/{chunk-4LM3VAZH.js → chunk-2VZ3VN3N.js} +2 -2
- package/dist/{chunk-PUZ3E2J4.js → chunk-3HTZDY3C.js} +8 -6
- package/dist/{chunk-RORGS5II.js → chunk-3NPWO5UO.js} +7 -13
- package/dist/{chunk-MNJIXFX4.js → chunk-47UCC4MM.js} +1 -1
- package/dist/chunk-4ENEJHF4.js +198 -0
- package/dist/chunk-5GEYJJHG.js +22 -0
- package/dist/{chunk-U6VN4NVL.js → chunk-5YSEQHJN.js} +3 -3
- package/dist/{chunk-6IR3ZYIB.js → chunk-6GPB3JLL.js} +3 -3
- package/dist/{chunk-MB6PXBUA.js → chunk-7R5GZIA6.js} +7 -15
- package/dist/{chunk-DH5JPM3K.js → chunk-7UTSNTWM.js} +10 -9
- package/dist/{chunk-24BILSZW.js → chunk-7YTRG6YW.js} +2 -2
- package/dist/{chunk-KW5JQPO5.js → chunk-AACN5GNE.js} +2 -2
- package/dist/{chunk-PKES3ISE.js → chunk-ACRJ2GZ5.js} +2 -2
- package/dist/{chunk-4ZYJHQMB.js → chunk-C3YRO3EU.js} +10 -12
- package/dist/{chunk-PQJFG24Z.js → chunk-CB7PEVOJ.js} +1300 -946
- package/dist/{chunk-ABPKUVA4.js → chunk-CDFJF5YD.js} +1 -1
- package/dist/{chunk-T7A2HK2B.js → chunk-CJS6WE66.js} +17 -18
- package/dist/{chunk-3YY7IXIL.js → chunk-CM6BDY4E.js} +14 -60
- package/dist/{chunk-RZOXUSPC.js → chunk-CZCAZVTD.js} +16 -2
- package/dist/chunk-DGKFWQK4.js +23 -0
- package/dist/{chunk-NA7SEXHE.js → chunk-E65WJVI5.js} +7 -9
- package/dist/{chunk-2TF6RXWB.js → chunk-EKNYSXFB.js} +8 -10
- package/dist/{chunk-RRV3FNNM.js → chunk-EY6LY2HO.js} +27 -30
- package/dist/{chunk-LBLBAFG3.js → chunk-F6BEQWAK.js} +17 -5
- package/dist/{chunk-4L36HG27.js → chunk-FGNSESAC.js} +12 -14
- package/dist/{chunk-3FRLWYBG.js → chunk-FRUBVFXV.js} +39 -42
- package/dist/{chunk-FB5SCCPT.js → chunk-G22UNQID.js} +14 -15
- package/dist/{chunk-LV4UMYVH.js → chunk-GQTQUNCG.js} +26 -27
- package/dist/{chunk-E7HJ56Y7.js → chunk-H3BVMK47.js} +64 -73
- package/dist/chunk-H6FLQ5NW.js +28 -0
- package/dist/{chunk-QHSNL7B2.js → chunk-HEA3EM23.js} +15 -19
- package/dist/{chunk-AWDSEDER.js → chunk-HSOBIN22.js} +2 -2
- package/dist/{chunk-EAOK7MIZ.js → chunk-HYSKJMZK.js} +17 -4
- package/dist/{chunk-VUZWQ7UG.js → chunk-IICERRFF.js} +46 -72
- package/dist/{chunk-OXOI55RU.js → chunk-IILEH3ZC.js} +8 -10
- package/dist/{chunk-ZKXQKGWZ.js → chunk-J3Q2NYJR.js} +4 -3
- package/dist/{chunk-YHC2O2WO.js → chunk-JUZ67QZQ.js} +20 -9
- package/dist/chunk-KR5VGMVT.js +25 -0
- package/dist/{chunk-F7K5IBZG.js → chunk-KV6GQOGN.js} +41 -44
- package/dist/{chunk-SNDXCFRS.js → chunk-KXMJLOZF.js} +25 -23
- package/dist/{chunk-CB4WHS4H.js → chunk-L4Y3ROKQ.js} +3 -3
- package/dist/{chunk-3F6BMY53.js → chunk-L6WBJGQS.js} +1 -1
- package/dist/{chunk-MPKRJBPK.js → chunk-L7O774U7.js} +30 -32
- package/dist/{chunk-URCQWAQ4.js → chunk-LAHHGNAY.js} +21 -21
- package/dist/{chunk-V63BC55Q.js → chunk-LT62P654.js} +1 -1
- package/dist/{chunk-ZMAUPOMG.js → chunk-LWOM6LVS.js} +34 -34
- package/dist/{chunk-HO6LWE2E.js → chunk-MKPDIAZH.js} +21 -1
- package/dist/{chunk-2PHMIAKO.js → chunk-MN635QYA.js} +3 -4
- package/dist/{chunk-KDX35VXP.js → chunk-MQ4PPCJB.js} +166 -149
- package/dist/{chunk-QOE342SU.js → chunk-MRLH4MYU.js} +2 -2
- package/dist/{chunk-CE6VMBCB.js → chunk-N56BNAA6.js} +20 -21
- package/dist/{chunk-L3CMBQMH.js → chunk-N5CEGQPG.js} +14 -17
- package/dist/{chunk-7E2563GA.js → chunk-NCLO6E6N.js} +13 -33
- package/dist/{chunk-J6JP25XU.js → chunk-NL5LSKVD.js} +4 -3
- package/dist/{chunk-U7BD2QL7.js → chunk-NMUSOZ2D.js} +10 -12
- package/dist/{chunk-BZARLRJW.js → chunk-NOWH2VA2.js} +8 -33
- package/dist/{chunk-U2SDMG7C.js → chunk-NUSXS6YB.js} +6 -5
- package/dist/{chunk-ZJTT47IG.js → chunk-OSEKJEUU.js} +2 -2
- package/dist/{chunk-FZKFVUEC.js → chunk-OUYAUXAT.js} +647 -355
- package/dist/{chunk-ZE3KXHS7.js → chunk-PBZNYHMM.js} +84 -4
- package/dist/{chunk-U5HPROLA.js → chunk-PIIUNJIT.js} +2 -4
- package/dist/chunk-PKLB2XJL.js +8 -0
- package/dist/{chunk-RC2Z6K47.js → chunk-PRHYIA6X.js} +15 -6
- package/dist/{chunk-RQS4QQSD.js → chunk-PXQ45SGD.js} +2 -2
- package/dist/chunk-Q6JQKWPK.js +25 -0
- package/dist/{chunk-F6X3YJWD.js → chunk-QB7T2PHK.js} +2 -2
- package/dist/{chunk-TIQJPRDD.js → chunk-QGITU23N.js} +3 -2
- package/dist/chunk-QJJKOHLH.js +57 -0
- package/dist/{chunk-4LOE5R5P.js → chunk-QP33NKYC.js} +18 -15
- package/dist/{chunk-N5WSK2K7.js → chunk-QVBOXT3L.js} +12 -17
- package/dist/{chunk-DPGEAHZT.js → chunk-RNJFRXEN.js} +10 -18
- package/dist/{chunk-EKWX4WD3.js → chunk-RNXOWDM6.js} +10 -10
- package/dist/{chunk-O4BJFESU.js → chunk-RTFMDIKV.js} +1 -1
- package/dist/{chunk-LS3QJRUB.js → chunk-SIQHOB6P.js} +11 -13
- package/dist/{chunk-3K2F6UDZ.js → chunk-SLSMJPEF.js} +43 -42
- package/dist/chunk-T5QSLSMM.js +50 -0
- package/dist/chunk-TGQDAG4B.js +88 -0
- package/dist/{chunk-4YHYPW2G.js → chunk-THYHUIDR.js} +44 -13
- package/dist/{chunk-YVHBNSME.js → chunk-TMNUTMT5.js} +1099 -1100
- package/dist/{chunk-WDBICWH3.js → chunk-TOE2RRCS.js} +1 -1
- package/dist/chunk-TYHPVE5H.js +25 -0
- package/dist/chunk-UAKO2M6B.js +73 -0
- package/dist/chunk-UC5AXW5Z.js +20 -0
- package/dist/chunk-UTJP6WOS.js +28 -0
- package/dist/{chunk-DQZFQSR5.js → chunk-UXTQ3QPD.js} +4 -4
- package/dist/chunk-UYXV5NIS.js +20 -0
- package/dist/{chunk-KKCK636N.js → chunk-V2WDBOLZ.js} +10 -12
- package/dist/{chunk-PR6PO3ES.js → chunk-V67D6TMU.js} +22 -20
- package/dist/{chunk-VSFLRN5Y.js → chunk-VCRVNLE7.js} +135 -2
- package/dist/{chunk-CPSR3AVL.js → chunk-VO4JFPTV.js} +2 -2
- package/dist/{chunk-XT2HTCJ5.js → chunk-VWLSU3XV.js} +6 -5
- package/dist/{chunk-WME2OQST.js → chunk-W5E72HJA.js} +66 -24
- package/dist/{chunk-LLS45EWB.js → chunk-W7TY6HYX.js} +6 -8
- package/dist/{chunk-CCV2EU7T.js → chunk-WSSLVMDA.js} +12 -13
- package/dist/{chunk-YISME6ON.js → chunk-WTB4GKMH.js} +10 -1
- package/dist/{chunk-KPPJTH44.js → chunk-X5BJ3G2P.js} +64 -35
- package/dist/{chunk-JMEKXFOL.js → chunk-XKFO2SZV.js} +39 -34
- package/dist/{chunk-HR3OJ3TH.js → chunk-XLAI7UYY.js} +84 -31
- package/dist/{chunk-H7OR7DFZ.js → chunk-XO756WE5.js} +53 -37
- package/dist/{chunk-F5Z6URKM.js → chunk-XVB3Q2PG.js} +2 -4
- package/dist/{chunk-R5MOQM2H.js → chunk-YOXCCJDF.js} +607 -366
- package/dist/{chunk-ZGSJDWQU.js → chunk-ZCQBNPRH.js} +2 -2
- package/dist/chunk-ZD4KVFXI.js +234 -0
- package/dist/{chunk-WGRJOXED.js → chunk-ZDMFGACN.js} +1295 -966
- package/dist/{chunk-OSTKYB55.js → chunk-ZMMHHXSW.js} +1 -1
- package/dist/{chunk-75GAYVNO.js → chunk-ZPM7ZIFL.js} +6 -6
- package/dist/{chunk-LUBPZN36.js → chunk-ZVCDHYWZ.js} +9 -11
- package/dist/{chunk-Y7F7IEE3.js → chunk-ZZN74OGD.js} +102 -7
- package/dist/{chunk-L5JYIU47.js → chunk-ZZSJAR76.js} +39 -20
- package/dist/index.js +10933 -8644
- package/dist/mcp/analyze-cli.js +12 -17
- package/dist/mcp/cli.js +43 -42
- package/dist/mcp/server.js +3073 -1147
- package/dist/mcp/worker.js +61 -61
- package/dist/probes/installer.js +18 -19
- package/docs/adr/0003-git-guard-latch-writer.md +11 -6
- package/docs/agent-tools.md +58 -16
- package/docs/alignment-families.md +29 -0
- package/docs/analysisall.md +1 -1
- package/docs/ast-grep_rules_catalog.md +6 -4
- package/docs/ci-bot-pr-checks.md +128 -0
- package/docs/configuration.md +150 -12
- package/docs/defect-shapes.md +107 -15
- package/docs/engineering-principles.md +27 -2
- package/docs/environment-variables.md +18 -1
- package/docs/features.md +14 -7
- package/docs/globalconfig.md +11 -3
- package/docs/invariants/git-guard-host.md +7 -3
- package/docs/invariants/language-config.md +15 -4
- package/docs/invariants/lsp-trust-exec.md +25 -4
- package/docs/invariants/paths-os.md +4 -2
- package/docs/invariants/session-telemetry.md +2 -2
- package/docs/language-coverage.md +1 -0
- package/docs/lsp-capability-matrix.md +167 -65
- package/docs/lsp-idle-eviction.md +4 -1
- package/docs/merge-queue-rollout.md +10 -8
- package/docs/module-report-read-symbol.md +34 -23
- package/docs/pi-lens-fixer.md +34 -17
- package/docs/pi-lens-investigator.md +3 -0
- package/docs/pi-lens-merge-policy.md +34 -17
- package/docs/pi-lens-monitor.md +9 -0
- package/docs/pi-lens-orchestration.md +4 -1
- package/docs/pi-lens-reviewer.md +6 -6
- package/docs/pi-lens-subagent.md +19 -3
- package/docs/public-api-stability.md +57 -7
- package/docs/release-qa-baseline.md +7 -4
- package/docs/schema/pi-lens-config-v1.json +21 -2
- package/docs/servercapabilities.md +3 -1
- package/docs/settings.md +11 -7
- package/docs/word-index.md +20 -7
- package/package.json +11 -4
- package/rules/ast-grep-rules/rule-tests/no-accumulating-spread-js-test.yml +37 -0
- package/rules/ast-grep-rules/rule-tests/ts-redundant-filter-map-test.yml +12 -1
- package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-js-test.yml +12 -0
- package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-test.yml +25 -0
- package/rules/ast-grep-rules/rules/no-accumulating-spread-js.yml +49 -1
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
- package/rules/ast-grep-rules/rules/ts-redundant-filter-map.yml +9 -1
- package/rules/ast-grep-rules/rules-disabled/filter-then-map-js.yml +17 -0
- package/rules/ast-grep-rules/rules-disabled/filter-then-map.yml +36 -0
- package/rules/ast-grep-rules/self-scan-baseline.json +1 -1
- package/scripts/download-grammars.js +3 -2
- package/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
- package/dist/chunk-46TNM7XZ.js +0 -88
- package/dist/chunk-72OKUXSD.js +0 -31
- package/dist/chunk-7GLOLOSH.js +0 -57
- package/dist/chunk-AKUUMGD5.js +0 -26
- package/dist/chunk-ASUXV767.js +0 -22
- package/dist/chunk-CTADOKYM.js +0 -25
- package/dist/chunk-GNSIWBAT.js +0 -106
- package/dist/chunk-HWDAVBFU.js +0 -49
- package/dist/chunk-JJ2RRESP.js +0 -58
- package/dist/chunk-KXF5R4UN.js +0 -48
- package/dist/chunk-LSC3VADM.js +0 -23
- package/dist/chunk-OE5ZBP7F.js +0 -443
- package/dist/chunk-SHLDT3OI.js +0 -27
- package/dist/chunk-UF7RTZSO.js +0 -27
- package/dist/chunk-W4WP2ERB.js +0 -30
- package/dist/chunk-YES5CACN.js +0 -73
- package/dist/chunk-Z2XAOKHK.js +0 -136
package/dist/mcp/worker.js
CHANGED
|
@@ -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-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
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-
|
|
27
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-PKLB2XJL.js";
|
|
26
|
+
import "../chunk-OUYAUXAT.js";
|
|
27
|
+
import "../chunk-VWLSU3XV.js";
|
|
28
28
|
import "../chunk-XIMYZ3JA.js";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
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-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
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-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-5YSEQHJN.js";
|
|
43
|
+
import "../chunk-QGITU23N.js";
|
|
44
|
+
import "../chunk-WTB4GKMH.js";
|
|
44
45
|
import "../chunk-6HWVI6MI.js";
|
|
45
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-RTFMDIKV.js";
|
|
46
47
|
import "../chunk-CKEQFGLT.js";
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
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-
|
|
55
|
-
import "../chunk-
|
|
56
|
-
import "../chunk-
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
-
import "../chunk-
|
|
61
|
-
import "../chunk-
|
|
62
|
-
import "../chunk-
|
|
63
|
-
import "../chunk-
|
|
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-
|
|
67
|
-
import "../chunk-
|
|
68
|
-
import "../chunk-
|
|
68
|
+
import "../chunk-CZCAZVTD.js";
|
|
69
|
+
import "../chunk-X5BJ3G2P.js";
|
|
70
|
+
import "../chunk-NL5LSKVD.js";
|
|
69
71
|
import {
|
|
70
72
|
setProjectTrustState
|
|
71
|
-
} from "../chunk-
|
|
72
|
-
import "../chunk-WME2OQST.js";
|
|
73
|
+
} from "../chunk-PIIUNJIT.js";
|
|
73
74
|
import {
|
|
74
75
|
logExtension
|
|
75
|
-
} from "../chunk-
|
|
76
|
+
} from "../chunk-W5E72HJA.js";
|
|
76
77
|
import "../chunk-S26LC76R.js";
|
|
77
|
-
import "../chunk-
|
|
78
|
-
import "../chunk-VSFLRN5Y.js";
|
|
78
|
+
import "../chunk-VCRVNLE7.js";
|
|
79
79
|
import "../chunk-LJDODBBZ.js";
|
|
80
|
-
import "../chunk-
|
|
81
|
-
import "../chunk-
|
|
80
|
+
import "../chunk-ZMMHHXSW.js";
|
|
81
|
+
import "../chunk-CB7PEVOJ.js";
|
|
82
82
|
import "../chunk-NXL4FFQQ.js";
|
|
83
83
|
|
|
84
84
|
// dist/mcp/worker.js
|
package/dist/probes/installer.js
CHANGED
|
@@ -53,29 +53,28 @@ import {
|
|
|
53
53
|
verifyNpmPackageEntry,
|
|
54
54
|
verifyToolBinary,
|
|
55
55
|
wasLastResolveTransient
|
|
56
|
-
} from "../chunk-
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
-
import "../chunk-
|
|
61
|
-
import "../chunk-
|
|
62
|
-
import "../chunk-
|
|
63
|
-
import "../chunk-
|
|
64
|
-
import "../chunk-
|
|
65
|
-
import "../chunk-
|
|
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-
|
|
69
|
-
import "../chunk-
|
|
70
|
-
import "../chunk-
|
|
71
|
-
import "../chunk-
|
|
72
|
-
import "../chunk-
|
|
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-
|
|
76
|
-
import "../chunk-VSFLRN5Y.js";
|
|
75
|
+
import "../chunk-VCRVNLE7.js";
|
|
77
76
|
import "../chunk-LJDODBBZ.js";
|
|
78
|
-
import "../chunk-
|
|
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
|
|
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
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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.
|
package/docs/agent-tools.md
CHANGED
|
@@ -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) `
|
|
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
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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.
|
|
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
|
|
160
|
-
|
|
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.
|
|
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
|
|
182
|
-
|
|
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.
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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.
|
package/docs/analysisall.md
CHANGED
|
@@ -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`
|
|
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
|
|
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 |
|
|
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 (
|
|
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 (
|
|
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.
|