pi-lens 4.4.8 → 4.4.10
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 +258 -0
- package/README.md +4 -1
- package/config/dependency-cruiser-eager-allowlist.json +1 -1
- package/dist/{chunk-6YUNI7B5.js → chunk-2ADRLTM2.js} +14 -60
- package/dist/{chunk-4B2YFN4U.js → chunk-2LVJQU3I.js} +46 -33
- package/dist/{chunk-2453RRJ2.js → chunk-3FRI5H4T.js} +72 -23
- package/dist/{chunk-7MAD5ZAY.js → chunk-3HM4BUHR.js} +14 -16
- package/dist/chunk-3QWVOBZJ.js +73 -0
- package/dist/{chunk-PIQQM32Y.js → chunk-46TQJSUE.js} +4 -2
- package/dist/{chunk-RZG472YW.js → chunk-4ITEFRDH.js} +84 -46
- package/dist/{chunk-6FIRFP6A.js → chunk-4NCDHTFI.js} +10 -12
- package/dist/{chunk-7CGIDRIK.js → chunk-6I44EDNQ.js} +14 -16
- package/dist/{chunk-2BKUFQKR.js → chunk-6MDM5MQT.js} +554 -217
- package/dist/{chunk-BBET6HD6.js → chunk-7JX3RNG4.js} +1 -1
- package/dist/{chunk-JE6HKLC7.js → chunk-7WJ55KBN.js} +2 -4
- package/dist/{chunk-4BKU7PV3.js → chunk-A5TEJZGJ.js} +2 -1
- package/dist/{chunk-7ANZ7XDD.js → chunk-ACRJ2GZ5.js} +2 -2
- package/dist/{chunk-2ZE3AUJQ.js → chunk-ALIZWXHZ.js} +13 -15
- package/dist/{chunk-BQG2QFVO.js → chunk-AON2QIJF.js} +43 -55
- package/dist/chunk-B2YUE6YD.js +23 -0
- package/dist/{chunk-L4NEVZ4T.js → chunk-B6HXETWY.js} +25 -27
- package/dist/chunk-BDR5MEZY.js +25 -0
- package/dist/{chunk-HXFUTMX2.js → chunk-BGLS5SDN.js} +2 -2
- package/dist/{chunk-ZZDIOAAJ.js → chunk-BRESRQBE.js} +6 -6
- package/dist/{chunk-WXUDRAG6.js → chunk-C6AODRNU.js} +10 -12
- package/dist/{chunk-GMROJJRN.js → chunk-CB7PEVOJ.js} +9 -1
- package/dist/{chunk-BHWW6FAX.js → chunk-CTB5BAJI.js} +53 -22
- package/dist/{chunk-VN3L2JWZ.js → chunk-CYUJB552.js} +5 -5
- package/dist/{chunk-6GMGEKQN.js → chunk-CZAWWXP6.js} +39 -12
- package/dist/{chunk-G5GV2Q7K.js → chunk-CZCAZVTD.js} +16 -2
- package/dist/chunk-DBS736MA.js +57 -0
- package/dist/{chunk-OWTG6UMO.js → chunk-DOUAWKLO.js} +75 -22
- package/dist/{chunk-BOPDQ7AZ.js → chunk-DVRJBQOJ.js} +19 -21
- package/dist/{chunk-UHHLR2VY.js → chunk-E4VXKTBR.js} +38 -41
- package/dist/{chunk-X66YJ2SS.js → chunk-F6FT6BVQ.js} +33 -34
- package/dist/{chunk-GIRBSBGL.js → chunk-FCQSZQAT.js} +3 -3
- package/dist/{chunk-X35S7HSB.js → chunk-FOEPIX76.js} +41 -30
- package/dist/{chunk-MC6VB2E5.js → chunk-GMC4ZGYR.js} +17 -5
- package/dist/{chunk-7TNILKGY.js → chunk-GTTMQ6XB.js} +1 -1
- package/dist/{chunk-HHR7WGCI.js → chunk-GUGKKGG7.js} +3 -3
- package/dist/{chunk-OZWXLJMX.js → chunk-GVWIU7M7.js} +2 -2
- package/dist/{chunk-WMDUT4KH.js → chunk-H65TYP6V.js} +94 -90
- package/dist/{chunk-5F3XF3SX.js → chunk-HILZE4BQ.js} +9 -8
- package/dist/{chunk-PKSUMEPT.js → chunk-HSYFLOZY.js} +3 -3
- package/dist/{chunk-4QG55RRC.js → chunk-I32RSMH6.js} +10 -12
- package/dist/chunk-I74RQGKA.js +88 -0
- package/dist/{chunk-G6JKM4O7.js → chunk-IDCTDKIA.js} +10 -10
- package/dist/chunk-IK4YS3KC.js +25 -0
- package/dist/{chunk-O2ARHQKF.js → chunk-IL6PIV33.js} +2 -2
- package/dist/{chunk-L3CLUGDY.js → chunk-J6BR5XN2.js} +3 -3
- package/dist/chunk-JKOZ2Z4U.js +20 -0
- package/dist/{chunk-SP4TFY5F.js → chunk-JZQGRARR.js} +11 -13
- package/dist/{chunk-CUDD35TW.js → chunk-K6WIBVMK.js} +6 -5
- package/dist/{chunk-DIWK3LBC.js → chunk-KDCIG23C.js} +8 -10
- package/dist/{chunk-4NBWFYWW.js → chunk-KFRDFAOE.js} +8 -33
- package/dist/{chunk-I22THIHI.js → chunk-KJ3AHOCK.js} +10 -12
- package/dist/{chunk-VOP4PJKA.js → chunk-KSTQ4VXT.js} +7 -9
- package/dist/{chunk-RGGH6M34.js → chunk-LT62P654.js} +1 -1
- package/dist/chunk-MAD4QJTP.js +198 -0
- package/dist/{chunk-CM73PPGD.js → chunk-MN635QYA.js} +3 -4
- package/dist/{chunk-HUAM7QG3.js → chunk-NBM7PNBP.js} +25 -23
- package/dist/{chunk-DYRZGUMA.js → chunk-NE4EFHJX.js} +2 -2
- package/dist/{chunk-SQC7K3SP.js → chunk-NL5LSKVD.js} +2 -2
- package/dist/{chunk-JZRP4DGP.js → chunk-NPNFGYLV.js} +4 -2
- package/dist/{chunk-NM2NWH55.js → chunk-NUSXS6YB.js} +6 -5
- package/dist/{chunk-ZKLTNLAW.js → chunk-OPFNQBS5.js} +6 -6
- package/dist/{chunk-PPKECBPP.js → chunk-OTSTS7L2.js} +19 -1
- package/dist/{chunk-SFLHSL5R.js → chunk-PTSA6QKL.js} +18 -7
- package/dist/{chunk-OY7WZI7Q.js → chunk-Q2VCKC3X.js} +6 -6
- package/dist/{chunk-HKIL6DCL.js → chunk-QGITU23N.js} +1 -1
- package/dist/{chunk-3O5EII3W.js → chunk-QHOTTC4A.js} +2 -2
- package/dist/{chunk-35WKJWO5.js → chunk-QL37SGTS.js} +112 -20
- package/dist/{chunk-OC7VWJBZ.js → chunk-QMV2APEH.js} +35 -37
- package/dist/{chunk-BUZIQDFS.js → chunk-QSCZAP24.js} +3 -3
- package/dist/{chunk-O4N5BQ3T.js → chunk-QUPYLQA4.js} +8 -10
- package/dist/{chunk-A5GRLYPZ.js → chunk-QUQY3IME.js} +7 -13
- package/dist/{chunk-R2QQC33W.js → chunk-QWTHFFU6.js} +12 -14
- package/dist/{chunk-TV6RXRYH.js → chunk-RQRKIRFY.js} +8 -10
- package/dist/{chunk-ZFORSIED.js → chunk-S3WFVG5P.js} +15 -42
- package/dist/{chunk-5RNB4HVK.js → chunk-SG2JQ2YP.js} +1 -1
- package/dist/{chunk-KZ4ALBCH.js → chunk-SJQUWQR6.js} +2 -2
- package/dist/{chunk-T2S3FNNJ.js → chunk-SKVNHCT5.js} +41 -42
- package/dist/{chunk-SDFKOLSF.js → chunk-TJQSYX3J.js} +8 -6
- package/dist/{chunk-IYVYZQRL.js → chunk-TLWFZ66Y.js} +5 -7
- package/dist/{chunk-5T5A6YAJ.js → chunk-TN5CWX5D.js} +33 -34
- package/dist/chunk-TQHOKMVZ.js +28 -0
- package/dist/{chunk-XOMGO63G.js → chunk-TYHOEX4V.js} +19 -21
- package/dist/{chunk-6LJOJ6EO.js → chunk-UNBRHPHJ.js} +14 -16
- package/dist/{chunk-4LL2VRNY.js → chunk-UOO4D2TK.js} +16 -18
- package/dist/{chunk-AGGUWKRK.js → chunk-UY745U35.js} +1 -1
- package/dist/{chunk-LSFXZLPW.js → chunk-V7F7JHS5.js} +218 -253
- package/dist/{chunk-VLQ7UKZH.js → chunk-VCRVNLE7.js} +135 -2
- package/dist/{chunk-JPRDTY5S.js → chunk-VGTBLTPN.js} +8 -10
- package/dist/{chunk-JBP7KESM.js → chunk-VPFRU5IG.js} +1 -1
- package/dist/chunk-VS2L7QDI.js +25 -0
- package/dist/{chunk-4W52ZKZX.js → chunk-W4CUK5G6.js} +2 -2
- package/dist/{chunk-VPLBLWFO.js → chunk-W7TY6HYX.js} +1 -1
- package/dist/{chunk-JYLOYTZD.js → chunk-WAA63ZJV.js} +5 -1
- package/dist/{chunk-WC6WRNQT.js → chunk-WS3UFJOU.js} +2 -2
- package/dist/chunk-XAFZJEXY.js +50 -0
- package/dist/{chunk-XYLC35E4.js → chunk-XPGH5O74.js} +555 -336
- package/dist/{chunk-VOXTCULR.js → chunk-XVB3Q2PG.js} +2 -4
- package/dist/{chunk-FRLAUP2B.js → chunk-Y3EHLUPL.js} +4 -4
- package/dist/{chunk-CZL44WFN.js → chunk-YF4G5NN5.js} +2 -2
- package/dist/{chunk-XWIME22V.js → chunk-YQA34KAF.js} +11 -13
- package/dist/{chunk-FHEV6T4L.js → chunk-YT2VR4SL.js} +8 -10
- package/dist/chunk-ZD4KVFXI.js +234 -0
- package/dist/{chunk-NSPVR3FN.js → chunk-ZOPXB2KK.js} +17 -19
- package/dist/chunk-ZPFLHB3R.js +28 -0
- package/dist/{chunk-R4QWJQ2H.js → chunk-ZZDVGCGG.js} +9 -11
- package/dist/index.js +5398 -4438
- package/dist/mcp/analyze-cli.js +12 -17
- package/dist/mcp/cli.js +41 -42
- package/dist/mcp/server.js +1466 -663
- package/dist/mcp/worker.js +59 -60
- package/dist/probes/installer.js +17 -19
- package/docs/agent-guide.md +2 -1
- package/docs/agent-tools.md +53 -10
- package/docs/analysisall.md +1 -1
- package/docs/ci-bot-pr-checks.md +7 -5
- package/docs/configuration.md +60 -13
- package/docs/defect-shapes.md +67 -4
- package/docs/environment-variables.md +18 -1
- package/docs/features.md +23 -6
- package/docs/globalconfig.md +24 -3
- package/docs/invariants/language-config.md +9 -1
- package/docs/invariants/lsp-trust-exec.md +9 -2
- package/docs/invariants/session-telemetry.md +2 -2
- package/docs/language-coverage.md +67 -0
- package/docs/lsp-capability-matrix.md +121 -53
- package/docs/lsp-idle-eviction.md +20 -13
- package/docs/merge-queue-rollout.md +10 -8
- package/docs/module-report-read-symbol.md +34 -23
- package/docs/pi-lens-fixer.md +19 -7
- package/docs/pi-lens-investigator.md +3 -0
- package/docs/pi-lens-merge-policy.md +20 -8
- package/docs/pi-lens-release.md +3 -2
- package/docs/pi-lens-reviewer.md +53 -12
- package/docs/pi-lens-subagent.md +13 -0
- package/docs/public-api-stability.md +39 -5
- package/docs/release-qa-baseline.md +7 -4
- package/docs/schema/pi-lens-config-v1.json +11 -2
- package/docs/servercapabilities.md +3 -1
- package/docs/settings.md +9 -6
- package/docs/usage.md +1 -0
- package/docs/word-index.md +3 -2
- package/package.json +9 -4
- 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/scripts/download-grammars.js +13 -2
- package/scripts/grammars.lock.json +7 -0
- package/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
- package/vendor/grammars/tree-sitter-groovy.wasm +0 -0
- package/dist/chunk-2TS4GLOJ.js +0 -31
- package/dist/chunk-3JAHQBSY.js +0 -27
- package/dist/chunk-447YZL4S.js +0 -25
- package/dist/chunk-565VRUP4.js +0 -136
- package/dist/chunk-57X2CDRX.js +0 -49
- package/dist/chunk-GGYOZWHW.js +0 -27
- package/dist/chunk-IE5D3RA5.js +0 -58
- package/dist/chunk-LPYTPNOJ.js +0 -22
- package/dist/chunk-OFNMHPBT.js +0 -89
- package/dist/chunk-U3AS2FR6.js +0 -106
- package/dist/chunk-W3BGKBBK.js +0 -27
- package/dist/chunk-WQV6BI4Q.js +0 -48
- package/dist/chunk-YHGYAEFH.js +0 -443
- package/dist/chunk-ZONZ6YY3.js +0 -74
- package/dist/chunk-ZSM35JF4.js +0 -30
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Per-server cost and safety of releasing an idle language-server client, measured
|
|
4
4
|
by the nightly so each server's `idleEviction` declaration in
|
|
5
5
|
`clients/lsp/server.ts` can be made from evidence (#3645). Generated by
|
|
6
|
-
`node scripts/measure-lsp-idle-eviction.mjs
|
|
6
|
+
`node scripts/measure-lsp-idle-eviction.mjs` (requires
|
|
7
7
|
`npm run build:dist`); it changes no server's policy.
|
|
8
8
|
|
|
9
9
|
For each registry server the probe spawns the server on its smoke fixture,
|
|
@@ -15,7 +15,7 @@ respawned server reports every finding it reported before eviction; the
|
|
|
15
15
|
content-bound coverage check the auxiliary freeze depends on. A server that
|
|
16
16
|
cannot demonstrate it is never proposed for eviction on perf grounds alone.
|
|
17
17
|
|
|
18
|
-
_Last generated: 2026-
|
|
18
|
+
_Last generated: 2026-11-06 on linux; 51 registry servers: 38 eligible, 0 vetoed, 3 inconclusive, 10 unavailable (0 not reached: budget)._
|
|
19
19
|
|
|
20
20
|
## Per-server rows
|
|
21
21
|
|
|
@@ -40,29 +40,31 @@ step log only, because it flaps.
|
|
|
40
40
|
| clojure | primary | transparent | eligible | · | ok | preserved |
|
|
41
41
|
| cmake | primary | unmeasured | inconclusive | no-baseline | n/a | unproven |
|
|
42
42
|
| cpp | primary | transparent | eligible | · | ok | preserved |
|
|
43
|
-
| csharp | primary | unmeasured |
|
|
43
|
+
| csharp | primary | unmeasured | eligible | · | ok | preserved |
|
|
44
44
|
| css | primary | transparent | eligible | · | ok | preserved |
|
|
45
45
|
| cue | primary | unmeasured | eligible | · | ok | preserved |
|
|
46
|
-
| dart | primary | unmeasured |
|
|
46
|
+
| dart | primary | unmeasured | eligible | · | ok | preserved |
|
|
47
47
|
| deno | primary | transparent | eligible | · | ok | preserved |
|
|
48
48
|
| docker | primary | transparent | eligible | · | ok | preserved |
|
|
49
49
|
| docker-official | primary | transparent | eligible | · | ok | preserved |
|
|
50
|
-
| elixir | primary | unmeasured | unavailable |
|
|
50
|
+
| elixir | primary | unmeasured | unavailable | server-not-started | n/a | n/a |
|
|
51
51
|
| expert | primary | unmeasured | eligible | · | ok | preserved |
|
|
52
|
+
| fallow | auxiliary | unmeasured | eligible | · | ok | preserved |
|
|
52
53
|
| fish | primary | transparent | eligible | · | ok | preserved |
|
|
53
|
-
| fsharp | primary | unmeasured |
|
|
54
|
+
| fsharp | primary | unmeasured | inconclusive | no-baseline | n/a | unproven |
|
|
54
55
|
| gleam | primary | unmeasured | eligible | · | ok | preserved |
|
|
55
|
-
| go | primary | unmeasured |
|
|
56
|
-
|
|
|
56
|
+
| go | primary | unmeasured | eligible | · | ok | preserved |
|
|
57
|
+
| groovy | primary | unmeasured | unavailable | no-fixture | n/a | n/a |
|
|
58
|
+
| haskell | primary | unmeasured | unavailable | server-not-started | n/a | n/a |
|
|
57
59
|
| html | primary | transparent | eligible | · | ok | preserved |
|
|
58
|
-
| java | primary | unmeasured | unavailable |
|
|
60
|
+
| java | primary | unmeasured | unavailable | server-not-started | n/a | n/a |
|
|
59
61
|
| json | primary | transparent | eligible | · | ok | preserved |
|
|
60
62
|
| kotlin | primary | unmeasured | eligible | · | ok | preserved |
|
|
61
63
|
| lean | primary | unmeasured | unavailable | server-not-started | n/a | n/a |
|
|
62
64
|
| lua | primary | unmeasured | eligible | · | ok | preserved |
|
|
63
65
|
| marksman | primary | transparent | eligible | · | ok | preserved |
|
|
64
|
-
| nix | primary | unmeasured | unavailable |
|
|
65
|
-
| ocaml | primary | unmeasured | unavailable |
|
|
66
|
+
| nix | primary | unmeasured | unavailable | server-not-started | n/a | n/a |
|
|
67
|
+
| ocaml | primary | unmeasured | unavailable | server-not-started | n/a | n/a |
|
|
66
68
|
| omnisharp | primary | unmeasured | unavailable | no-fixture | n/a | n/a |
|
|
67
69
|
| opengrep | auxiliary | transparent | eligible | · | ok | preserved |
|
|
68
70
|
| php | primary | transparent | eligible | · | ok | preserved |
|
|
@@ -70,11 +72,11 @@ step log only, because it flaps.
|
|
|
70
72
|
| prisma | primary | transparent | eligible | · | ok | preserved |
|
|
71
73
|
| python | primary | transparent | eligible | · | ok | preserved |
|
|
72
74
|
| python-jedi | primary | transparent | eligible | · | ok | preserved |
|
|
73
|
-
| ruby | primary | unmeasured |
|
|
75
|
+
| ruby | primary | unmeasured | eligible | · | ok | preserved |
|
|
74
76
|
| rust | primary | unmeasured | eligible | · | ok | preserved |
|
|
75
77
|
| shuck | primary | unmeasured | unavailable | server-not-started | n/a | n/a |
|
|
76
78
|
| svelte | primary | unmeasured | eligible | · | ok | preserved |
|
|
77
|
-
| swift | primary | unmeasured | unavailable |
|
|
79
|
+
| swift | primary | unmeasured | unavailable | server-not-started | n/a | n/a |
|
|
78
80
|
| terraform | primary | unmeasured | eligible | · | ok | preserved |
|
|
79
81
|
| tinymist | primary | unmeasured | eligible | · | ok | preserved |
|
|
80
82
|
| toml | primary | unmeasured | eligible | · | ok | preserved |
|
|
@@ -92,12 +94,17 @@ or `info` line is for a maintainer to act on in a follow-up; this run changed
|
|
|
92
94
|
nothing.
|
|
93
95
|
|
|
94
96
|
- **ast-grep** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
97
|
+
- **csharp** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
95
98
|
- **cue** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
99
|
+
- **dart** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
96
100
|
- **expert** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
101
|
+
- **fallow** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
97
102
|
- **gleam** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
103
|
+
- **go** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
98
104
|
- **kotlin** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
99
105
|
- **lua** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
100
106
|
- **powershell** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
107
|
+
- **ruby** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
101
108
|
- **rust** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
102
109
|
- **svelte** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
103
110
|
- **terraform** [proposal] declared unmeasured but eviction and respawn preserved its findings
|
|
@@ -12,11 +12,13 @@ neither is needed. Sharded Unit tests (#3753) keep one queue run short.
|
|
|
12
12
|
|
|
13
13
|
## Repository side (already in this change)
|
|
14
14
|
|
|
15
|
-
- `ci.yml` and `
|
|
16
|
-
Together they produce every required check:
|
|
17
|
-
`
|
|
15
|
+
- `ci.yml`, `lint.yml`, and `hot-path-latency.yml` run on `merge_group`
|
|
16
|
+
(`types: [checks_requested]`). Together they produce every required check:
|
|
17
|
+
`Lint & type-check`, `Unit tests`, `Unit tests Windows`,
|
|
18
|
+
`Hot-path latency (advisory)`, `Install test (ubuntu-latest)`,
|
|
19
|
+
`Install test (windows-latest)`,
|
|
18
20
|
`Install test (macos-latest)`, `knip`, `oxfmt format check`, `TLA+ models`.
|
|
19
|
-
- PR-only jobs (PR
|
|
21
|
+
- PR-only jobs (PR metadata, PR body, changelog fast-fail, changed tests shuffled) are
|
|
20
22
|
guarded by `github.event_name == 'pull_request'` and are skipped on
|
|
21
23
|
`merge_group`; none of them is required.
|
|
22
24
|
- `tests/config/merge-queue-workflows.test.ts` pins the trigger, the required
|
|
@@ -32,7 +34,7 @@ neither is needed. Sharded Unit tests (#3753) keep one queue run short.
|
|
|
32
34
|
| Ruleset name | `master merge queue` | |
|
|
33
35
|
| Enforcement status | Active | |
|
|
34
36
|
| Target branches | Include default branch (`master`) | |
|
|
35
|
-
| Require status checks to pass | the
|
|
37
|
+
| Require status checks to pass | the ten names above, source GitHub Actions | unchanged from branch protection today |
|
|
36
38
|
| Require branches to be up to date | off | the queue replaces it |
|
|
37
39
|
| Require merge queue | on | |
|
|
38
40
|
| Merge method | Merge commit | repo convention (`gh pr merge --merge`) |
|
|
@@ -56,9 +58,9 @@ detection.
|
|
|
56
58
|
1. Merge #3753 (sharded Unit tests) first, then this change.
|
|
57
59
|
2. Create the ruleset above.
|
|
58
60
|
3. Enqueue one low-risk PR: `gh pr merge <N> --merge`.
|
|
59
|
-
4. Confirm in `gh run list --event merge_group` that `CI
|
|
60
|
-
`gh-readonly-queue/master/pr-<N>-<sha>` ref and
|
|
61
|
-
checks reported there. A required check that never reports stalls the queue
|
|
61
|
+
4. Confirm in `gh run list --event merge_group` that `CI`, `Lint`, and
|
|
62
|
+
`Hot-path latency` ran on the `gh-readonly-queue/master/pr-<N>-<sha>` ref and
|
|
63
|
+
that all ten required checks reported there. A required check that never reports stalls the queue
|
|
62
64
|
until the 30-minute timeout.
|
|
63
65
|
5. Stop using `gh pr update-branch` and "re-arm" pushes; both are moot and a
|
|
64
66
|
push to a queued PR ejects it.
|
|
@@ -24,7 +24,7 @@ work.
|
|
|
24
24
|
|
|
25
25
|
### `module_report(filePath, maxRefsPerSymbol?)`
|
|
26
26
|
|
|
27
|
-
Returns a structured outline of one module
|
|
27
|
+
Returns a structured outline of one module (default `summary-text`; see the `view` preset below for the projection × format matrix). The `full-json` shape:
|
|
28
28
|
|
|
29
29
|
```json
|
|
30
30
|
{
|
|
@@ -81,21 +81,32 @@ top three by `(usedBy × 2) + complexity + (exported ? 2 : 0)
|
|
|
81
81
|
outline to decide where to look next; each entry carries `{reason, symbol,
|
|
82
82
|
startLine, endLine}` (no path — always the same file as the report).
|
|
83
83
|
|
|
84
|
-
`view
|
|
85
|
-
|
|
84
|
+
The `view` output preset is projection × format: `"summary-text"` (default) =
|
|
85
|
+
metric fields off (no `usedBy`/`fanout`/`complexity` fields), text; `"summary-json"` =
|
|
86
|
+
same fields, JSON; `"full-text"` = every field, text; `"full-json"` = every
|
|
87
|
+
field, JSON. Every field appears in the text cell: `kind` prints raw, so it can
|
|
88
|
+
be reused as `read_symbol`'s `kind` filter, and an unavailable module still
|
|
89
|
+
renders its callbacks and recommended reads. Metrics
|
|
90
|
+
who-uses-this as a `used-by:` continuation line:
|
|
86
91
|
|
|
87
92
|
```text
|
|
88
|
-
clients/agent-nudge.ts jsts 266L — 8 symbols, 5 exported
|
|
93
|
+
clients/agent-nudge.ts jsts 266L [fresh] — 8 symbols, 5 exported, 2 imports (callbackSupport: generic)
|
|
89
94
|
API:
|
|
90
|
-
77-81
|
|
95
|
+
77-81 function _resetAgentNudgeForTests() [async] — Test-only: clear accumulator state.
|
|
91
96
|
INTERNAL:
|
|
92
|
-
95-104
|
|
97
|
+
95-104 function isValidPayload(data: unknown) cx:2 fan:1
|
|
93
98
|
CALLBACKS:
|
|
94
|
-
164-172 event_handler
|
|
99
|
+
164-172 event_handler events.on@164 raw:function_expression [lifecycle] (in wireAgentNudgeSubscriber)
|
|
100
|
+
IMPORTS:
|
|
101
|
+
external: bus-publish, latency-logger
|
|
102
|
+
PROVENANCE: symbols=syntax imports=cached-review-graph usedBy=cached-review-graph callbacks=heuristic-tree-sitter semantic.source=review-graph semantic.references=true semantic.implementations=false graphBuiltAt=unknown
|
|
95
103
|
```
|
|
96
104
|
|
|
97
|
-
Default
|
|
98
|
-
|
|
105
|
+
Default preset is `summary-text`; a `maxRefsPerSymbol` argument promotes the
|
|
106
|
+
projection to `full` and keeps the format. `RECOMMENDED` reasons are ranked
|
|
107
|
+
from unprojected entries, so they may still cite counts in prose (e.g.
|
|
108
|
+
"used by 3") even under `summary-*` — the promise is field-token absence,
|
|
109
|
+
not prose silence.
|
|
99
110
|
### `read_symbol(filePath, symbol, kind?)`
|
|
100
111
|
|
|
101
112
|
Returns the verbatim body of one named symbol plus a one-line header
|
|
@@ -222,10 +233,12 @@ a wash — use `read` with a line range instead.
|
|
|
222
233
|
symbols), the default JSON view dropped from measuring ~1,900 tokens
|
|
223
234
|
(per-symbol `read` blocks + `flags: ["exported", ...]` duplicating the
|
|
224
235
|
`exported` boolean + `recommendedReads` repeating `{path, offset, limit}`)
|
|
225
|
-
to a schema with no repeated `read`/path noise
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
236
|
+
to a schema with no repeated `read`/path noise. **#5137 presets
|
|
237
|
+
(2026-11-01):** `view` now names projection × format (`summary-text` /
|
|
238
|
+
`summary-json` / `full-text` / `full-json`, default `summary-text`); the text
|
|
239
|
+
cell mirrors its JSON payload field by field, with one declared exception (a
|
|
240
|
+
member's own `exported` rides on its container's section), and lands at about
|
|
241
|
+
60% of the JSON byte size on the measured file set.
|
|
229
242
|
## When *not* to use these
|
|
230
243
|
|
|
231
244
|
- **Looking for a textual pattern across files** — use `grep` (tool in pi). `module_report` is per-file shape, not cross-file content.
|
|
@@ -240,16 +253,14 @@ Both tools are also exposed via the pi-lens MCP server:
|
|
|
240
253
|
- `pilens_module_report({file, cwd?, maxRefsPerSymbol?, focus?, view?, blastRadius?, blastRadiusDepth?})`
|
|
241
254
|
- `pilens_read_symbol({file, symbol, kind?, cwd?})`
|
|
242
255
|
|
|
243
|
-
The MCP wrappers return the same JSON
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
new) is folded into it.
|
|
252
|
-
|
|
256
|
+
The MCP wrappers return the same text or JSON payload the pi tools emit for
|
|
257
|
+
the same preset — `pilens_module_report` default text equals `module_report`
|
|
258
|
+
default text except for the graph-age line MCP appends when the graph is over
|
|
259
|
+
ten minutes old — so an agent in Claude Code (or any MCP client)
|
|
260
|
+
gets the same navigable flow without needing to install the pi extension.
|
|
261
|
+
`pilens_read_symbol`'s response no longer restates its own header line in a
|
|
262
|
+
trailing JSON block — the header line already carries name/kind/path/range,
|
|
263
|
+
so only `signature` (genuinely new) is folded into it.
|
|
253
264
|
## See also
|
|
254
265
|
|
|
255
266
|
- `clients/module-report.ts` — implementation, single-mode rationale, per-tier degradation
|
package/docs/pi-lens-fixer.md
CHANGED
|
@@ -247,11 +247,21 @@ remains: prefer deleting over simplifying, simplifying over optimizing, and
|
|
|
247
247
|
optimizing over automating. If the diff survives, leave it alone; churn is not
|
|
248
248
|
rigor (#2599).
|
|
249
249
|
|
|
250
|
+
The hand-back summary lists scope growth first, then a `Decisions:` line: each
|
|
251
|
+
default you chose and each brief line you read a particular way, with its
|
|
252
|
+
reason. Each check the body or the hand-back cites as proof names what it does
|
|
253
|
+
not prove in one clause (`does not prove: Windows`, `does not prove: a real
|
|
254
|
+
server`), so routing reads the gap, not only the green. A reinterpretation the
|
|
255
|
+
orchestrator has to discover in the diff is a finding (#5242 kept a version the
|
|
256
|
+
brief misnamed; #5254 read "turn" as a prompt).
|
|
257
|
+
|
|
250
258
|
## Handoff
|
|
251
259
|
|
|
252
260
|
- The PR body follows `.github/PULL_REQUEST_TEMPLATE.md`, which a reader must
|
|
253
261
|
be able to scan (#5003): `## Summary` (at most three sentences, with the
|
|
254
|
-
closing keyword, which GitHub ignores in a title
|
|
262
|
+
closing keyword, which GitHub ignores in a title, and with counted sentences
|
|
263
|
+
in its `Refs #NNN`, `Remaining #NNN:` and `Closes #NNN` lines counted too),
|
|
264
|
+
`## Notes for the reviewer`
|
|
255
265
|
(at most five bullets, no tables or fences), `## Change outline`, and
|
|
256
266
|
`## Proof and checks` with `### Tests`, `### Class sweep` (ending in one
|
|
257
267
|
`Alignment:` line that names the families of `docs/alignment-families.md` the
|
|
@@ -288,15 +298,17 @@ rigor (#2599).
|
|
|
288
298
|
included. A red `PR body (advisory)` check is a fix-before-review item.
|
|
289
299
|
A changelog fragment is `---` /
|
|
290
300
|
`section: <Added|Changed|Deprecated|Removed|Fixed|Security>` /
|
|
291
|
-
`audience: <user|internal>` / `---` / blank / one
|
|
292
|
-
|
|
293
|
-
characters, excluding issue references; internal fragments are exempt.
|
|
294
|
-
`audience` is
|
|
301
|
+
`audience: <user|internal>` / `area: <id>` (user only) / `---` / blank / one
|
|
302
|
+
`- ` bullet. `audience` is
|
|
295
303
|
required: `user` is anything a pi-lens user or agent can observe (tools,
|
|
296
304
|
diagnostics, messages, config, install, performance, a fixed bug they could
|
|
297
305
|
hit); `internal` is CI, tests, `formal/`, contributor docs, orchestration, and
|
|
298
|
-
refactors with no observable change. `
|
|
299
|
-
|
|
306
|
+
refactors with no observable change. A `user` fragment names an `area` from
|
|
307
|
+
the closed list in `.changelog/README.md` and has the one shape
|
|
308
|
+
`- **Headline sentence.** One short paragraph. (refs #N)`; `.changelog/README.md`
|
|
309
|
+
lists the limits, and `node scripts/check-changelog-fragments.mjs` refuses any
|
|
310
|
+
other form (#5351). Internal fragments are exempt from `area` and the shape.
|
|
311
|
+
`npm run changelog:check` runs the same shape check over the fragments (#2456).
|
|
300
312
|
- A bug fix's detection lesson names the defect SHAPE and its tree-wide
|
|
301
313
|
enforcer, not only a test for the instance: the `Shape:` line names the
|
|
302
314
|
`AGENTS.md` "Recurring defect shapes" number (or `new: <name>`), and the
|
|
@@ -9,6 +9,9 @@ issue and the requested evidence surface.
|
|
|
9
9
|
- Keep the worktree and Git state read-only.
|
|
10
10
|
- Define the symptom as an answerable question with time window, sessions, and
|
|
11
11
|
build in scope.
|
|
12
|
+
- Search closed issues and merged PRs for the target before the first probe;
|
|
13
|
+
a closed duplicate is the answer (a second #5123 investigation ran on
|
|
14
|
+
2026-11-02).
|
|
12
15
|
- Reproduce through the reporter's production entry point before naming a seam.
|
|
13
16
|
- Deliver a proven diagnosis and one concrete next step; a plausible story is
|
|
14
17
|
not a diagnosis. Implement only a contained fix the brief asks for, under
|
|
@@ -19,7 +19,8 @@ acceptance surface quoted from that run's log. Any self-bound inside the lane
|
|
|
19
19
|
must sit below the job cap by a stated margin so the loud-failure path is
|
|
20
20
|
reachable.
|
|
21
21
|
|
|
22
|
-
Every PR body has `## Summary` (at most three sentences
|
|
22
|
+
Every PR body has `## Summary` (at most three sentences, counted sentences in
|
|
23
|
+
its `Refs #NNN`, `Remaining #NNN:` and `Closes #NNN` lines included),
|
|
23
24
|
`## Notes for the reviewer` (at most five bullets), `## Change outline`, and
|
|
24
25
|
`## Proof and checks`, which holds `### Tests`, `### Class sweep`,
|
|
25
26
|
`### Observability`, and `### Fold check`, plus the conditional sections the
|
|
@@ -33,8 +34,9 @@ fence at 20 lines (#5003).
|
|
|
33
34
|
1. **Review.** Spawn `pi-lens-reviewer` (worktree isolation) with the PR
|
|
34
35
|
number, a one-paragraph summary of the claim, and any PR-specific attack
|
|
35
36
|
angles. Self-authored and small PRs get reviewed too — the depth follows
|
|
36
|
-
the review tier below, never the priority label. Bots review
|
|
37
|
-
|
|
37
|
+
the review tier below, never the priority label. Bots review a PR when the
|
|
38
|
+
orchestrator requests it (`@coderabbitai review`, `@greptileai`,
|
|
39
|
+
`/agentic_review`), never on their own: every bot thread (Greptile and others) gets a disposition reply, `fixed in
|
|
38
40
|
<sha>`, `accepted and disclosed`, or `rejected because <reason>`.
|
|
39
41
|
2. **Fix rounds.** Send findings back to the PR's original author agent when
|
|
40
42
|
its worktree survives (SendMessage — cheapest context); otherwise spawn
|
|
@@ -320,7 +322,7 @@ operator's private notes, so a different orchestrator can run the same train.
|
|
|
320
322
|
| a new fixture under `tests/fixtures/` | the fixture-contract sweeps for that directory (style-preserving, population guards) — #2782 r2 |
|
|
321
323
|
| a change that touches identifier uses of a glossary-retired synonym | run `tests/config/glossary-synonym-sweep.test.ts` on the head AND on the merge with `origin/master`, then re-pin in the PR from the sweep's own `UNPINNED`/`STALE` output — #3279, #3283, #3284, #3288 |
|
|
322
324
|
| a new `vi.mock` in a test file | run `tests/config/vi-mock-export-sweep.test.ts`; whole-module mocks of a production module must spread `importOriginal` — PR #3268's CI red, fixed by trailing commit `621d61c5c` |
|
|
323
|
-
| a changelog fragment | front matter `section: <Section>` plus `audience: user` or `audience: internal` and exactly one top-level entry;
|
|
325
|
+
| a changelog fragment | front matter `section: <Section>` plus `audience: user` or `audience: internal` and exactly one top-level entry; a `user` entry also has `area: <id>` and the one shape `- **Headline sentence.** Body. (refs #N)` (limits in `.changelog/README.md`), never `CHANGELOG.md`, validated by `node scripts/check-changelog-fragments.mjs` — PR #3268 r1 shipped `category:` and a paragraph |
|
|
324
326
|
| a PR body | the header gate: `## Summary`, `## Notes for the reviewer`, `## Change outline`, plus Tests / Class sweep / Fold check / Observability, inside the caps; run `node scripts/check-pr-body.mjs --lint-local` before pushing — three PRs this week needed orchestrator body edits |
|
|
325
327
|
| a whole-tree docs restructure of `AGENTS.md` | every governance test that reads `AGENTS.md`, with markers on their own lines — PR #3265 r1 |
|
|
326
328
|
| a raw poll in a test | the flake-shape ratchet; the fix is the governed wait, never a header admission — #2781 r1 |
|
|
@@ -375,8 +377,9 @@ operator's private notes, so a different orchestrator can run the same train.
|
|
|
375
377
|
applies to human PRs; a bump title can never carry a ref. Merge order: one
|
|
376
378
|
at a time (each merge dirties the rest; dependabot rebases them itself);
|
|
377
379
|
gate on Lint, Unit tests and every non-advisory check on the exact head;
|
|
378
|
-
pr-metadata.yml itself skips "PR
|
|
379
|
-
|
|
380
|
+
pr-metadata.yml itself skips "PR metadata" (the title and close-keyword
|
|
381
|
+
checks, one job since #5002) and "PR body (advisory)" for dependabot
|
|
382
|
+
(2026-09-09, refs #2714), so nothing
|
|
380
383
|
needs hand-ignoring; hold anything red on a real check
|
|
381
384
|
with a comment naming the check (2026-09-07: tsls 6 needs a Node-floor bump, biome
|
|
382
385
|
fails the install test, vitest 5 fails four gates; a bump whose install
|
|
@@ -427,7 +430,7 @@ operator's private notes, so a different orchestrator can run the same train.
|
|
|
427
430
|
also fine). The merge loop is
|
|
428
431
|
`node scripts/ci-verdict.mjs <pr> --wait <seconds>` — read its final line:
|
|
429
432
|
0 merge, 3 still pending (re-arm the wait), anything else read the table. Never
|
|
430
|
-
text-match the table for `failure`: advisory rows (PR body,
|
|
433
|
+
text-match the table for `failure`: advisory rows (PR body, Lint (advisory))
|
|
431
434
|
print `failure` while the verdict is green, and on 2026-09-07 that stopped
|
|
432
435
|
the #2692 loop on a green PR.
|
|
433
436
|
- **Maintainer trailing commits** are for intent-free deltas only (a literal
|
|
@@ -526,7 +529,7 @@ operator's private notes, so a different orchestrator can run the same train.
|
|
|
526
529
|
the verdict table for `failure`, because advisory rows print `failure` on a
|
|
527
530
|
green PR. But "does not gate" is not "carries no information", and filtering
|
|
528
531
|
advisory rows out of your attention is a different mistake from filtering
|
|
529
|
-
them out of the gate.
|
|
532
|
+
them out of the gate. The typos step of `Lint (advisory)` found a real defect in #2955's
|
|
530
533
|
round-12 diff — a comment in which "reading" was misspelt — which the
|
|
531
534
|
gating checks had no opinion about and which would otherwise have reached
|
|
532
535
|
master. (The misspelling is described rather than reproduced here: quoting
|
|
@@ -864,3 +867,12 @@ Each row cost a lane at least once; the prose above carries the record.
|
|
|
864
867
|
| Linting a PR body in the main checkout | The main checkout sits on another branch, so citations resolved against the wrong tree; three edits needed a hand-built head tree (2026-10-25). `pr-body.sh edit` without `--tree` now builds a temp tree at the PR head |
|
|
865
868
|
| Guessing issue labels (`area:ci`, `area:formal`, `chore`) | Three filings were refused, and the refusal listed only priority labels (2026-10-25). `file-issue.sh` now lists the known type, area and priority labels |
|
|
866
869
|
| Reaping a lane whose issue is closed while its ledger row is live | Two maintainer-ordered lanes on closed issues (#4714, #4691) were flagged for TaskStop (2026-10-25). `agent-reap.sh` now skips a closed issue with a live ledger row |
|
|
870
|
+
| Dispatching four heavy plegma workers while a local model server runs | The host ran out of memory, hung, and took the daemon and two reviews with it (2026-11-02). The cap is two heavy workers while `ds4-server` or `llama-server` runs, and the orchestrator dispatch guard now lowers the daemon's live heavy cap to two while either process runs |
|
|
871
|
+
| Regenerating `package-lock.json` with the npm on PATH | npm 9.2 dropped every `libc` field twice in one day (#5200, the #5201 bump), and npm 11.18.0 had to redo it. Regenerate only with `npx npm@11.18.0 install --package-lock-only --ignore-scripts`. The default `check:lockfile` reads `libc` only on the root entry, so it does not refuse the drop yet; #5207 (open) adds that refusal |
|
|
872
|
+
| Applying a reviewer's reuse prescription without its ratchets | Verify r3 on #5202 asked to import `REAL_NODE_MODULES` from lane-check-kit; that module imports `child_process`, and the flake-shape real-process-spawn ratchet then flagged the test (2026-11-02). Run the governance suite on a prescription before pushing it; the round reverted to the local path |
|
|
873
|
+
| Bisecting a worktree-only red by hand | Three unrelated files red in one plegma tree and green on master; an hour of bisecting ended at a stale shared `node_modules/.vitest-cache` (2026-11-02). Rerun once with `--fsModuleCache=false` before bisecting; #5212 moved Vitest's module cache (`fsModuleCachePath`) into each worktree's `.vitest-cache`, so new runs stop writing the shared copy. The old copy in the main install stays until someone deletes it, and the runtime `vitest.config.mjs` from `tests/support/lane-check-kit.ts` still writes there (accepted residual) |
|
|
874
|
+
| Dispatching a user-facing design before the maintainer has seen the output | #5202 round 4 was interrupted twice as the maintainer moved from full prose to headlines to a straight copy of the release bodies (2026-11-02). Show the rendered sample and agree the design before the round |
|
|
875
|
+
| Running the bot-thread gate only once, after CI | A CodeRabbit thread on #5298 and a real Greptile finding on #5286 arrived during the advisory wait, after the gate had passed; #5298 merged over it and #5286 was stopped by hand (2026-11-05). Mechanical, orchestrator tooling outside this repo: the merge step now re-runs the gate right before the merge call, pinned by its own red test |
|
|
876
|
+
| Writing an issue's premise from a constant without tracing the loop that runs | #5307's body named `BATCH=3000` as the test's cost; that constant was dead and the executing loop was 4296 iterations, so the fixer re-scoped the lane (2026-11-05). Premise first binds the orchestrator's issue bodies too: trace the constant to the code path that executes before filing |
|
|
877
|
+
| Verifying a store-parity fix against the claims, not the row states | #5302 verify r2 passed the two cases the PR claimed and missed a third row state the reference reader honours (past-EOF). `docs/pi-lens-reviewer.md` "Store-reader parity" |
|
|
878
|
+
| Passing on a reviewer's prescribed remedy after checking only that its test went green | The PR-Synopsis F7 remedy kept a refresh through a failed run start. Its test counted comment edits and passed, while the refresh published the failed start's reset state, so every bot read no-review (PR-Synopsis #19 verify, 2026-11-05). A prescription is a hypothesis: the verify round probes the output it changes (the published record, the delivered finding), never a call count |
|
package/docs/pi-lens-release.md
CHANGED
|
@@ -14,7 +14,8 @@ peer/dev dependency and must be imported type-only. Lockfiles use the pinned
|
|
|
14
14
|
npm version. Release notes use one `.changelog/<slug>.md` fragment per PR
|
|
15
15
|
(`audience: user` or `internal`; the release body lists only `user`); never
|
|
16
16
|
edit `CHANGELOG.md` for ordinary PR notes.
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
A `user` fragment carries an `area` and the one shape
|
|
18
|
+
`- **Headline sentence.** Body. (refs #N)`; `.changelog/README.md` lists the
|
|
19
|
+
rules, and internal fragments are exempt.
|
|
19
20
|
|
|
20
21
|
</important>
|
package/docs/pi-lens-reviewer.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Read first: the engineering principles (`docs/engineering-principles.md`), then
|
|
4
4
|
`AGENTS.md`, then `docs/pi-lens-subagent.md`, then this contract. Then read the
|
|
5
5
|
issue's acceptance criteria, the full merge-base diff
|
|
6
|
-
(`git diff origin/master...HEAD`), the PR body
|
|
6
|
+
(`git diff origin/master...HEAD`), the PR body (author sections only until the
|
|
7
|
+
blind pass ends, see "Procedure"), and merge state. Principles §3
|
|
7
8
|
("Reviewing and delegating") is the base of this role and is not repeated. Lane mechanics (checkout, `TMPDIR`, push forms, Git grants,
|
|
8
9
|
summary shape) are `docs/pi-lens-subagent.md` "Orchestrator lane mechanics";
|
|
9
10
|
a brief supplies only `lane=<name>`, scope, and the grant.
|
|
@@ -21,6 +22,14 @@ a brief supplies only `lane=<name>`, scope, and the grant.
|
|
|
21
22
|
|
|
22
23
|
## Procedure
|
|
23
24
|
|
|
25
|
+
**Blind pass.** On the first review of a PR, read no bot output until you write
|
|
26
|
+
your findings (step 6). Bot output is a bot review or review thread, the bot
|
|
27
|
+
record, a bot-written block of the PR body, a bot-authored PR comment, and a
|
|
28
|
+
bot-published CI check (CodeRabbit, Sourcery, PR-Synopsis, SonarCloud). The bot
|
|
29
|
+
record is the PR-Synopsis App's record for the head (`synopsis-record.py <pr>
|
|
30
|
+
<head>`) plus its PR comment. The fixer's own body sections stay readable: they
|
|
31
|
+
are the author's claims. A verify round is exempt (#5319).
|
|
32
|
+
|
|
24
33
|
1. Merge state first: `gh pr view <N> --json mergeable,mergeStateStatus`, or
|
|
25
34
|
`git merge-tree --write-tree origin/master HEAD` when GitHub is flaky. A
|
|
26
35
|
conflicted PR is the top finding; report it immediately.
|
|
@@ -45,9 +54,17 @@ a brief supplies only `lane=<name>`, scope, and the grant.
|
|
|
45
54
|
5. Run the targeted suites, every test file that references a touched symbol,
|
|
46
55
|
and the governance selection in `docs/pi-lens-subagent.md`, after
|
|
47
56
|
`npm run build`.
|
|
48
|
-
6.
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
6. Write `FINDINGS_<pr>.json` from your own probes, each row with
|
|
58
|
+
`"source": "reviewer"` and `"matched": []`. On a first review, copy it to
|
|
59
|
+
`FINDINGS_<pr>.blind.json` before your first read of bot output, and never
|
|
60
|
+
edit the copy: it proves the order and feeds the scoreboard.
|
|
61
|
+
7. Read CI once (`docs/pi-lens-subagent.md`), confirm Unit tests executed, and
|
|
62
|
+
read the log of every failing check to judge infra against code. Then read
|
|
63
|
+
the bot record and the review threads, probe each bot finding, and fill in
|
|
64
|
+
`FINDINGS_<pr>.json` only: bot rows, `matched`, and `status`. The bots and
|
|
65
|
+
you review the same head, so the comparison measures the bots against your
|
|
66
|
+
own pass, not against a pass that already read them.
|
|
67
|
+
8. Clean up: revert mutations, delete probes, and leave
|
|
51
68
|
`git status --porcelain` empty.
|
|
52
69
|
|
|
53
70
|
## Compliance pass
|
|
@@ -82,7 +99,7 @@ does not ship.
|
|
|
82
99
|
| A relaxed or rewritten existing assertion | Mutate the behaviour the test is named for; a rewrite that stays green is a deleted test (AGENTS "Issue and PR design contract"; principles §2) | The red on the new assertion, with that behaviour broken | #4390 (the eviction smoke's rewrite passed with root re-registration broken) |
|
|
83
100
|
| A new decision branch on a session, lifecycle or delivery seam | Name its record, sink plus kind, and read it back through the real seam (`docs/invariants/session-telemetry.md` "Session, telemetry, and delivery"; shape 31) | The record literal, and the test that reads it back | #3873 (a fix that could not be shown to fire live), #3875 |
|
|
84
101
|
| A new failure path, catch or silent return | One bounded record per distinct event, in a stream a monitor reads without asking (principles §1 "Every new failure path gets bounded observability"; shape 31) | The record literal and its sink, or `none:` with its reason | #4562 (a failed log write stayed silent), #4575 (a failed save left no trace) |
|
|
85
|
-
| Every diff, every changed file, tests included | Read the whole diff file by file. Check each PR-body claim
|
|
102
|
+
| Every diff, every changed file, tests included | Read the whole diff file by file. Check each claim against the diff: PR-body lines, changelog fragments and user-doc sentences alike, with a probe when the claim is about behaviour. For each check the body cites as proof, name what it does not prove; a check cited for more than it covers is a finding. Look in the body for proof before calling it missing (principles §3 "Reviewing and delegating") | The body line or transcript quoted beside a claim the diff cannot show, or the finding names the body line that lacks it | #4574 F2, #4582 F1; 3 of Greptile's 4 false positives were a transcript already in the body (#4572, #4573, #4577); bots, not reviewers, caught a changelog overclaim (#5237) and a doc sentence the loader contradicts (#5252) |
|
|
86
103
|
|
|
87
104
|
Rows 1, 2 and 4 are mechanical from #4585: `scripts/check-pr-body.mjs`
|
|
88
105
|
(`lintDiffCompliance`, wired into both entry points) reds a body that omits
|
|
@@ -231,10 +248,16 @@ instead of rebuilding the probe.
|
|
|
231
248
|
Deprecated, Removed, Fixed, or Security, and `audience:` is `user` or
|
|
232
249
|
`internal` (`user` = a pi-lens user or agent can observe it; `internal` = CI,
|
|
233
250
|
tests, `formal/`, contributor docs, orchestration, refactors), followed by
|
|
234
|
-
exactly one top-level entry. A missing or unknown `audience` is an error.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
`
|
|
251
|
+
exactly one top-level entry. A missing or unknown `audience` is an error. A
|
|
252
|
+
`user` fragment also names an `area:` from the closed list and is one bold
|
|
253
|
+
headline sentence, an optional one-paragraph body and a trailing `(refs #N)`
|
|
254
|
+
(`.changelog/README.md`); `rollup-changelog.mjs --check` refuses every other
|
|
255
|
+
shape. The check cannot tell whether the headline states the effect (a noun
|
|
256
|
+
phrase with a period passes), or whether the area fits the change. Both are
|
|
257
|
+
the reviewer's judgment: read the headline alone, as the release body shows
|
|
258
|
+
it, and name a headline that does not say what changed for the user, or an
|
|
259
|
+
area the entry does not belong to, as a finding. `CHANGELOG.md` changes only
|
|
260
|
+
in the rollups `npm run changelog:release` generates.
|
|
238
261
|
- **Sort comparators.** Every new `.sort()` or `.toSorted()` has an explicit
|
|
239
262
|
comparator (SonarCloud S2871); an order that feeds an identity (dedupe key,
|
|
240
263
|
cache key, hash input) compares code units, not `localeCompare`.
|
|
@@ -260,6 +283,12 @@ instead of rebuilding the probe.
|
|
|
260
283
|
appear? Count them over a few runs on both heads. A green suite proves
|
|
261
284
|
nothing here (#4366 r2: a shared-client fold swapped stdin end for SIGTERM;
|
|
262
285
|
the shutdown record went from 3/3 to 0/12 and 11 sockets leaked).
|
|
286
|
+
- **Store-reader parity.** When the diff makes one reader of a store match
|
|
287
|
+
another reader's view, list every per-row state the reference reader honours
|
|
288
|
+
(disposition, stale or past-EOF, unchecked, an unrecognized value) and probe
|
|
289
|
+
each through the new reader. One case per state, not one per claim (#5302:
|
|
290
|
+
verify r2 passed the marked-row and clean-file cases and missed a past-EOF
|
|
291
|
+
row the widget demotes and the restore still published).
|
|
263
292
|
- **Windows path shapes.** A new test or runtime comparison of paths goes
|
|
264
293
|
through `toPosix` or `path.win32` (`AGENTS.md`). A host-default separator is
|
|
265
294
|
a finding even when Linux CI is green (#4356: Windows advisory red).
|
|
@@ -343,7 +372,8 @@ merge-order interactions with other open PRs, plus:
|
|
|
343
372
|
finding with its probe, or `refuted` with the probe that refutes it, so an
|
|
344
373
|
item nobody probed cannot read as cleared. A missing bot review is never
|
|
345
374
|
evidence of anything: never wait for one, never read its absence as a clear
|
|
346
|
-
signal, and let your own pass stand alone.
|
|
375
|
+
signal, and let your own pass stand alone. On a first review, list the
|
|
376
|
+
threads after the blind write. No `merge-ready` verdict while
|
|
347
377
|
any thread or alert stays undisposed; the merge condition is
|
|
348
378
|
`docs/pi-lens-merge-policy.md` "The loop, per PR" step 1 and step 4
|
|
349
379
|
(`:34`, `:81`). Recurrence: #4566 and #4575 (2026-10-17), where the threads
|
|
@@ -354,13 +384,24 @@ never commit it. The orchestrator's validator reads it before routing the
|
|
|
354
384
|
round. Shape:
|
|
355
385
|
|
|
356
386
|
```json
|
|
357
|
-
{"pr": 4710, "head": "<40-hex sha reviewed>", "verdict": "merge-ready|needs changes|redesign|conflicted", "oneWayDoors": ["..."], "findings": [{"id": "F1", "severity": "<one of the five severity words>", "file": "path", "line": 1, "claim": "one sentence", "probe": "command or probe name whose output proves it", "remedy": "the prescribed change, or null", "addsMechanism": true, "class": "fold|accepted residual|file"}]}
|
|
387
|
+
{"pr": 4710, "head": "<40-hex sha reviewed>", "verdict": "merge-ready|needs changes|redesign|conflicted", "oneWayDoors": ["..."], "findings": [{"id": "F1", "severity": "<one of the five severity words>", "file": "path", "line": 1, "claim": "one sentence", "probe": "command or probe name whose output proves it", "remedy": "the prescribed change, or null", "addsMechanism": true, "class": "fold|accepted residual|file", "source": "reviewer|greptile|coderabbit|qodo|sourcery", "matched": ["<other sources>"], "status": "confirmed|refuted"}]}
|
|
358
388
|
```
|
|
359
389
|
|
|
360
390
|
Write one entry per finding, with the same ids as the prose. `remedy: null`
|
|
361
391
|
means the fixer must design the change. `addsMechanism` is true when the
|
|
362
392
|
remedy adds a guard, branch, state, record, or lifecycle step, rather than a
|
|
363
|
-
fix to an existing line.
|
|
393
|
+
fix to an existing line. `source` is `reviewer` for your blind pass, or the
|
|
394
|
+
exact bot name (`greptile`, `coderabbit`, `qodo`, `sourcery`) for a row you
|
|
395
|
+
added from a bot finding. The names stand for the GitHub logins
|
|
396
|
+
`greptile-apps`, `coderabbitai`, `qodo-code-review` and `sourcery-ai`, in that
|
|
397
|
+
order. PR-Synopsis and SonarCloud are not sources: they stay unread until
|
|
398
|
+
step 6, and their rows are never scored. Every row with a `source` carries `matched`, the
|
|
399
|
+
other sources that found the same defect (`[]` when none). Every bot row also
|
|
400
|
+
carries `status`, `confirmed` or `refuted` by your probe. A refuted row still
|
|
401
|
+
gets a row, so the comparison counts it, but it routes nothing and blocks
|
|
402
|
+
nothing. After step 6, fill in only `FINDINGS_<pr>.json`; the scoreboard reads
|
|
403
|
+
the blind copy for what you found blind.
|
|
404
|
+
The prose report stays the record a human reads;
|
|
364
405
|
the JSON is what routing reads, so the two must agree. This exists because
|
|
365
406
|
the orchestrator re-typed each finding into a fix brief by hand, and routed
|
|
366
407
|
rounds by judgment instead of by the review's own data.
|
package/docs/pi-lens-subagent.md
CHANGED
|
@@ -236,6 +236,19 @@ before moving on; the plegma daemon's cgroup holds every worker's children
|
|
|
236
236
|
long-lived worktree (#3180); reproduce with `--dryRunOnly`, never under a kill
|
|
237
237
|
timeout.
|
|
238
238
|
|
|
239
|
+
Stop only the processes you started, by the PIDs you recorded: never `pkill`,
|
|
240
|
+
or a `pgrep -f` match, on a name another lane also runs. One worker killed
|
|
241
|
+
another lane's `lane:check` and one reviewer killed another lane's ast-grep
|
|
242
|
+
that way (2026-11-02). Never unlink, replace or re-point the linked
|
|
243
|
+
`node_modules` to get past a guard; report the refusal in the hand-back. The
|
|
244
|
+
orchestrator owns private installs (2026-11-02, #5199).
|
|
245
|
+
|
|
246
|
+
A test that copies scripts into a temp root resolves their imports from that
|
|
247
|
+
root upward. Under a `TMPDIR` inside the worktree it finds the worktree's
|
|
248
|
+
`node_modules` and passes, then fails on CI and on any outside `TMPDIR`. Run
|
|
249
|
+
such a test once with `TMPDIR` outside the worktree before the hand-back
|
|
250
|
+
(#5202 r2: `Cannot find module 'marked'`).
|
|
251
|
+
|
|
239
252
|
A sandboxed worker may find the shared `.git` and the linked `node_modules`
|
|
240
253
|
read-only and the network absent (a write-confined sandbox does this; the
|
|
241
254
|
runner's own notes say which mode lifts it). Run Vitest as
|
|
@@ -83,10 +83,14 @@ The trailing ` [PILENS_CFG_NNNN]` marker is appended by
|
|
|
83
83
|
`withConfigDiagnosticCode`, is idempotent, and is always last. Match on it:
|
|
84
84
|
|
|
85
85
|
```sh
|
|
86
|
-
# every
|
|
86
|
+
# every config file this session that is unreadable, unparsable, or not a JSON object
|
|
87
87
|
grep 'PILENS_CFG_0001' ~/.pi-lens/latency.log
|
|
88
88
|
|
|
89
|
-
#
|
|
89
|
+
# every unknown key and rejected value this session (typos, wrong types);
|
|
90
|
+
# latency.log keeps only the first notice's code per file, so read extension.log
|
|
91
|
+
grep -E 'PILENS_CFG_000[45]' ~/.pi-lens/extension.log
|
|
92
|
+
|
|
93
|
+
# drop only the whole-file notices; typo notices keep PILENS_CFG_0004 and PILENS_CFG_0005
|
|
90
94
|
pi ... 2>&1 | grep -v 'PILENS_CFG_0001'
|
|
91
95
|
```
|
|
92
96
|
|
|
@@ -99,11 +103,11 @@ this policy explicitly reserves the right to change.
|
|
|
99
103
|
|
|
100
104
|
| Code | Meaning | Emitter |
|
|
101
105
|
| --- | --- | --- |
|
|
102
|
-
| `PILENS_CFG_0001` | A config file exists but
|
|
106
|
+
| `PILENS_CFG_0001` | A config file exists but is unreadable, unparsable, or not a JSON object, so it is ignored. | `warnIgnoredConfigOnce` (`clients/config-warn.ts`), the single choke point behind the LSP, global, and project config loaders, and its default code for a read or parse failure. |
|
|
103
107
|
| `PILENS_CFG_0002` | A deprecated config **key** was accepted inside its deprecation window. | `deprecationRecords` (`clients/config-resolve.ts`), one record per `(file, key)`, delivered by `reportPiLensConfigRecords` (#2426). |
|
|
104
108
|
| `PILENS_CFG_0003` | A deprecated config **file location** was read inside its window. | Same producer and same delivery path as `PILENS_CFG_0002`. |
|
|
105
|
-
| `PILENS_CFG_0004` | A config field no schema property claims was dropped. | `validate()` (`clients/config-core/normalize.ts`) produces the record; `reportPiLensConfigRecords` (`clients/config-resolve.ts`) delivers it through `warnIgnoredConfigOnce` (#2426). |
|
|
106
|
-
| `PILENS_CFG_0005` | A config field's value did not match its schema
|
|
109
|
+
| `PILENS_CFG_0004` | A config field no schema property claims was dropped. | `validate()` (`clients/config-core/normalize.ts`) produces the record; `reportPiLensConfigRecords` (`clients/config-resolve.ts`) delivers it through `warnIgnoredConfigOnce` (#2426). The global and project loaders' own unknown-key scans pass the same code (`clients/lens-config.ts`, `clients/project-lens-config.ts`). |
|
|
110
|
+
| `PILENS_CFG_0005` | A config field's value did not match its schema, or one member of a list field was rejected by its id check (`dispatch.disabledRunners`, `lsp.disabledServers`). The rejected field or member is dropped; the rest of the file stays in effect. | Same producer and same delivery path as `PILENS_CFG_0004`, plus the loaders' own value checks (`clients/lens-config.ts`, `clients/project-lens-config.ts`, `clients/tool-config.ts`, `clients/lens-flag-registry.ts`), and the `dispatch.disabledRunners` and `lsp.disabledServers` id checks (`clients/dispatch/disabled-runners.ts`, `clients/lsp/config.ts`). |
|
|
107
111
|
| `PILENS_CFG_0006` | A config key that would modify an object's prototype (`__proto__`, `constructor`, `prototype`) was refused. | Both halves of the config core, through the shared policy in `clients/config-core/safe-object.ts`. |
|
|
108
112
|
| `PILENS_CFG_0007` | Further config notices were suppressed by a bound, and this one carries the count — the WHOLE count, including anything an earlier bound in the same pipeline dropped. Nothing about the config is wrong; the notice list was truncated. | `MigrationRecordCollector.finalize` (`clients/config-core/records.ts`) — the ONE producer, reached through `finalizeRecords` by every record list: the shared resolution, the global loader's unknown-key scan, the project loader's unknown-key scan, and its legacy-document enumeration. Rendered with neutral prose and recorded under the `config-notice-suppressed` degradation kind, never `config-ignored`. |
|
|
109
113
|
| `PILENS_CFG_0008` | Resolving a config failed internally, so the WHOLE file was ignored and pi-lens ran on defaults. | The two guards under the pipeline: `resolveConfig` (`clients/config-core/resolve.ts`) and the global loader's post-parse catch (`clients/lens-config.ts`). Carries the error class only, never its message. |
|
|
@@ -407,6 +411,36 @@ sends two spellings naming different files is refused rather than guessed at.
|
|
|
407
411
|
Adding a fourth spelling, or dropping one of these, changes this contract
|
|
408
412
|
through section 4.
|
|
409
413
|
|
|
414
|
+
### The MCP tool result block contract
|
|
415
|
+
|
|
416
|
+
An MCP tool result carries a `content` array of text blocks. For an **opted-in
|
|
417
|
+
JSON cell** (`module_report` `*-json`, `project_report` `view: "json"`, and
|
|
418
|
+
`lsp_navigation`, whose envelope is always JSON) the contract is:
|
|
419
|
+
|
|
420
|
+
- **block 0 is the payload.** It is one machine-parsed document; a stale-build
|
|
421
|
+
advisory or an ignored-arguments note never joins it.
|
|
422
|
+
- **later text blocks are annotations.** The `warmCodeStale: true` advisory and
|
|
423
|
+
the `Ignored unknown argument(s)` note ride their own trailing blocks, with
|
|
424
|
+
the ignored-arguments note ahead of the advisory when both are present.
|
|
425
|
+
- **the contract footer is stamped on the last text block.** `stripContractFooter`
|
|
426
|
+
(`tools/render-compact.ts`) is the single owner of `CONTRACT_FOOTER_TAIL_RE`;
|
|
427
|
+
a reader strips it before parsing block 0. The function is a no-op when no
|
|
428
|
+
footer is at the tail, so a payload whose footer rides another block is
|
|
429
|
+
returned byte-identical.
|
|
430
|
+
|
|
431
|
+
The cell opts in through a `jsonCell` marker in `details`; `stripResultDetails`
|
|
432
|
+
removes `details` before the wire, so the marker never leaks. Text cells keep
|
|
433
|
+
the single-block shape: the advisory is appended to the payload's own block.
|
|
434
|
+
|
|
435
|
+
The delivered text (all blocks joined, footer included) stays inside
|
|
436
|
+
`MAX_RESULT_BYTES`; the payload budget reserves the annotation bytes and the
|
|
437
|
+
block separators. A **truncated** JSON cell is not parseable by design: its
|
|
438
|
+
footer reports `truncated=true` and the advisory still rides a later block.
|
|
439
|
+
|
|
440
|
+
Observability: the `warmCodeStale` marker is the record; this contract adds no
|
|
441
|
+
telemetry. A display-only client that renders block 0 alone hides the advisory;
|
|
442
|
+
that is an accepted residual.
|
|
443
|
+
|
|
410
444
|
## 6. File I/O Lifecycle Bridge (v2)
|
|
411
445
|
|
|
412
446
|
`PiLensIOBridge` is public API from day one ([RFC 3654](rfcs/3654-unified-io-bridge-v2.md)).
|