pi-lens 4.4.4 → 4.4.6
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.md +477 -0
- package/README.md +45 -3
- package/config/biome/core.jsonc +3 -3
- package/config/dependency-cruiser-eager-allowlist.json +1 -0
- package/dist/{chunk-UBOQLVT2.js → chunk-2DDDCJDL.js} +4 -4
- package/dist/{chunk-RKKOYPRA.js → chunk-2DMLM3ZO.js} +13 -15
- package/dist/chunk-2F47TQOA.js +73 -0
- package/dist/{chunk-O4NWQT6I.js → chunk-2PHMIAKO.js} +4 -4
- package/dist/{chunk-DGUKIYSI.js → chunk-2RLWJO5K.js} +8 -10
- package/dist/{chunk-S67KYG37.js → chunk-2X4VLOCC.js} +2 -2
- package/dist/{chunk-TIQ2PKDW.js → chunk-3MYEA7QD.js} +4 -4
- package/dist/{chunk-3DA2JDOL.js → chunk-3WEPUD2V.js} +551 -203
- package/dist/{chunk-AMERCH6V.js → chunk-4AVZ3TG7.js} +15 -16
- package/dist/{chunk-IYNJ6YPZ.js → chunk-4PCQCU47.js} +4 -4
- package/dist/chunk-4WX4CTUE.js +57 -0
- package/dist/{chunk-P63GXC37.js → chunk-5APMQ2IJ.js} +31 -4
- package/dist/{chunk-ZIVJBOO3.js → chunk-5CV5ITZF.js} +2 -2
- package/dist/{chunk-6DLWKFEX.js → chunk-5ZR3APIM.js} +41 -42
- package/dist/{chunk-XTBDCR27.js → chunk-63RIVFQI.js} +4 -4
- package/dist/{chunk-GSLNCYGG.js → chunk-75SY4F24.js} +13 -14
- package/dist/{chunk-U44DJXQP.js → chunk-7RQXA5GG.js} +15 -18
- package/dist/chunk-A3YNG5KP.js +45 -0
- package/dist/{chunk-5OFV52AM.js → chunk-AE37FEGH.js} +1 -1
- package/dist/{chunk-BWD5EPKO.js → chunk-AMXIUN2R.js} +4 -6
- package/dist/{chunk-3KAZU3VR.js → chunk-ARD426WI.js} +2 -2
- package/dist/{chunk-BW5KFIQC.js → chunk-AWQWXSW4.js} +1 -0
- package/dist/{chunk-YH5MVY2U.js → chunk-BHUWL2Y3.js} +7 -7
- package/dist/{chunk-CT4MN5IU.js → chunk-BI5LAQ3Y.js} +353 -359
- package/dist/{chunk-KAPJINKN.js → chunk-BM5GS6ZH.js} +2 -2
- package/dist/{chunk-TLX72JTG.js → chunk-BWYQUPOS.js} +1 -1
- package/dist/chunk-CFRQMBGP.js +49 -0
- package/dist/{chunk-RMLC67LF.js → chunk-CJYKEW2L.js} +2 -30
- package/dist/chunk-CKEQFGLT.js +32 -0
- package/dist/{chunk-IWDLU6K3.js → chunk-DC4CFXM5.js} +4 -6
- package/dist/{chunk-ZVUL7QYY.js → chunk-DMSLNKF7.js} +29 -32
- package/dist/{chunk-KN35K52N.js → chunk-DQXSPYRI.js} +3 -3
- package/dist/{chunk-HYGZEMX6.js → chunk-EVDGNG4F.js} +11 -5
- package/dist/{chunk-SRYEJNES.js → chunk-F5Z6URKM.js} +2 -2
- package/dist/{chunk-UMS2MFPZ.js → chunk-F6X3YJWD.js} +2 -3
- package/dist/{chunk-XYURS6EN.js → chunk-FA5LDARD.js} +15 -17
- package/dist/{chunk-24AKHFGP.js → chunk-FFL3A2VP.js} +6 -6
- package/dist/chunk-FJIVKLPH.js +31 -0
- package/dist/chunk-G2B7F6ZU.js +88 -0
- package/dist/{chunk-US7ECLD7.js → chunk-GAACZY6R.js} +131 -41
- package/dist/{chunk-MZGQNL3Y.js → chunk-GMTFDAOK.js} +12 -13
- package/dist/{chunk-VOOAPROD.js → chunk-GNSIWBAT.js} +3 -3
- package/dist/chunk-GTAI2J6U.js +27 -0
- package/dist/{chunk-RVK72CZX.js → chunk-GZE7WOI4.js} +1362 -459
- package/dist/{chunk-IUE7SSKV.js → chunk-H7HTEQUZ.js} +13 -7
- package/dist/{chunk-EUXZEFTV.js → chunk-HK6JVFZC.js} +3 -3
- package/dist/chunk-IPDG45G5.js +26 -0
- package/dist/{chunk-5HSRT26B.js → chunk-J6JP25XU.js} +16 -15
- package/dist/{chunk-HWCCCQNX.js → chunk-JL6CXUMW.js} +13 -6
- package/dist/{chunk-EBC36LNN.js → chunk-K2YGBXOA.js} +17 -17
- package/dist/{chunk-WMYE35PX.js → chunk-KLQVC3XC.js} +7 -5
- package/dist/{chunk-ATKJFDQN.js → chunk-KSR7RGQY.js} +12 -14
- package/dist/{chunk-POMLXPMY.js → chunk-KXF5R4UN.js} +1 -1
- package/dist/{chunk-LLJNQKQW.js → chunk-LEJOJDXL.js} +20 -13
- package/dist/{chunk-JUKMK5Y4.js → chunk-MA77RSFN.js} +10 -11
- package/dist/{chunk-GAQ7OQG6.js → chunk-MKVZQUEG.js} +85 -96
- package/dist/{chunk-2EECBNC5.js → chunk-MN7MHUXQ.js} +75 -0
- package/dist/{chunk-DEL2U6CM.js → chunk-MT6BVNFW.js} +16 -14
- package/dist/chunk-NDMCVUYK.js +507 -0
- package/dist/{chunk-HRNHZA3N.js → chunk-NIU2IPC5.js} +12 -16
- package/dist/{chunk-AGSS7277.js → chunk-NNKXDXXS.js} +7 -24
- package/dist/{chunk-V35JG4JB.js → chunk-OJLTLYHB.js} +152 -334
- package/dist/{chunk-J6MPGQTS.js → chunk-OLAWH5UQ.js} +81 -15
- package/dist/{chunk-T57LYLZT.js → chunk-OOU2WZZE.js} +1 -1
- package/dist/{chunk-CYRKQRPM.js → chunk-OSTKYB55.js} +2 -4
- package/dist/chunk-P4QNXS6I.js +27 -0
- package/dist/chunk-PKES3ISE.js +297 -0
- package/dist/{chunk-ROYSX2S5.js → chunk-PO45POGF.js} +2 -2
- package/dist/{chunk-T7FEBKXN.js → chunk-PPIBVH4R.js} +7 -9
- package/dist/{chunk-3RKP3FMS.js → chunk-PQJFG24Z.js} +295 -23
- package/dist/{chunk-KUA4OJ5Y.js → chunk-Q3UZHW6N.js} +846 -350
- package/dist/{chunk-N5FLEO7W.js → chunk-Q4EMRFNA.js} +37 -37
- package/dist/{chunk-5IUSNGOC.js → chunk-Q4FCYCRE.js} +28 -21
- package/dist/chunk-Q6D6VMI4.js +22 -0
- package/dist/{chunk-UZ2XCLYS.js → chunk-QGSTQH4D.js} +8 -8
- package/dist/{chunk-DUO2TU77.js → chunk-RZOXUSPC.js} +10 -4
- package/dist/{chunk-JMYYOTQG.js → chunk-S26LC76R.js} +13 -1
- package/dist/{chunk-GMX5OS7B.js → chunk-S67UJDGQ.js} +11 -12
- package/dist/chunk-SCIUNBPF.js +44 -0
- package/dist/{chunk-RKBXZN3A.js → chunk-SJJYRZB4.js} +2 -2
- package/dist/chunk-SXGD4ANG.js +25 -0
- package/dist/{chunk-YCWYO6TQ.js → chunk-T7FTXGS3.js} +48 -45
- package/dist/{chunk-FM4RDMKT.js → chunk-TIQJPRDD.js} +115 -61
- package/dist/{chunk-XHJBS436.js → chunk-TIYGSODX.js} +25 -25
- package/dist/{chunk-S2HEXIWI.js → chunk-U2SDMG7C.js} +10 -6
- package/dist/{chunk-2KXTHF3M.js → chunk-U6OC3QEM.js} +253 -33
- package/dist/{chunk-AWSCPCN2.js → chunk-UCGQT677.js} +19 -19
- package/dist/chunk-UHGF5UT5.js +32 -0
- package/dist/{chunk-JW3YWBVB.js → chunk-UN4TEBWN.js} +17 -19
- package/dist/{chunk-ZHH37KZL.js → chunk-V3APN3DY.js} +17 -17
- package/dist/{chunk-ED36RF6Y.js → chunk-V63BC55Q.js} +1 -1
- package/dist/{chunk-XBJVAEEO.js → chunk-VG5JS5SW.js} +3 -2
- package/dist/{chunk-W66O5E25.js → chunk-VPBIMOAQ.js} +13 -15
- package/dist/chunk-VQH24FIP.js +37 -0
- package/dist/{chunk-YNE3RP52.js → chunk-VSFLRN5Y.js} +8 -1
- package/dist/{chunk-7D6L4MTX.js → chunk-W2V54OCL.js} +3 -3
- package/dist/{chunk-2FN63LPV.js → chunk-W5LGKNET.js} +13 -14
- package/dist/{chunk-IQWN5JCP.js → chunk-W5R5SABV.js} +13 -14
- package/dist/{chunk-R3T7CLQ2.js → chunk-WIZWZR4C.js} +41 -41
- package/dist/{chunk-TOY6QKOH.js → chunk-WQOIR3QY.js} +17 -17
- package/dist/{chunk-Y6GZHWSJ.js → chunk-XAIT2YGS.js} +6 -6
- package/dist/chunk-XCUHKYCQ.js +23 -0
- package/dist/{chunk-GSM5UU7A.js → chunk-XQCSWV2G.js} +44 -35
- package/dist/{chunk-OHKJ7PQF.js → chunk-YBSONGSZ.js} +43 -39
- package/dist/{chunk-GXFV6MYU.js → chunk-YISME6ON.js} +72 -39
- package/dist/chunk-YRD4ISED.js +30 -0
- package/dist/{chunk-SD4I7ZO4.js → chunk-YSBHPOY6.js} +43 -53
- package/dist/{chunk-QBFBRV2B.js → chunk-Z2XAOKHK.js} +4 -2
- package/dist/{chunk-5VSF4UUQ.js → chunk-Z7IGUAXL.js} +34 -39
- package/dist/{chunk-MPNJLASA.js → chunk-ZKXQKGWZ.js} +10 -13
- package/dist/{chunk-J64T55EI.js → chunk-ZQ6NZZTB.js} +75 -9
- package/dist/chunk-ZUUI3ZSA.js +38 -0
- package/dist/{chunk-7HXE67BN.js → chunk-ZYNI26MI.js} +2 -2
- package/dist/index.js +32674 -27567
- package/dist/mcp/analyze-cli.js +11 -12
- package/dist/mcp/cli.js +46 -45
- package/dist/mcp/server.js +1210 -574
- package/dist/mcp/worker.js +65 -65
- package/dist/probes/installer.js +21 -23
- package/docs/adr/0010-trace-validation-session-lifecycle.md +390 -0
- package/docs/adr/README.md +1 -0
- package/docs/agent-tools.md +28 -7
- package/docs/ast-grep_rules_catalog.md +5 -3
- package/docs/configuration.md +12 -1
- package/docs/defect-shapes.md +738 -0
- package/docs/engineering-principles.md +12 -0
- package/docs/environment-variables.md +20 -0
- package/docs/features.md +16 -1
- package/docs/globalconfig.md +37 -8
- package/docs/invariants/caches-stores.md +30 -0
- package/docs/invariants/dispatch-runners.md +164 -0
- package/docs/invariants/git-guard-host.md +53 -0
- package/docs/invariants/language-config.md +31 -0
- package/docs/invariants/lsp-trust-exec.md +286 -0
- package/docs/invariants/paths-os.md +59 -0
- package/docs/invariants/session-telemetry.md +74 -0
- package/docs/lsp-capability-matrix.md +105 -12
- package/docs/lsp-idle-eviction.md +37 -18
- package/docs/pi-lens-fixer.md +24 -2
- package/docs/pi-lens-investigator.md +14 -0
- package/docs/pi-lens-merge-policy.md +32 -17
- package/docs/pi-lens-monitor.md +66 -10
- package/docs/pi-lens-orchestration.md +41 -0
- package/docs/pi-lens-release.md +20 -0
- package/docs/pi-lens-retro.md +5 -4
- package/docs/pi-lens-reviewer.md +54 -7
- package/docs/pi-lens-subagent.md +10 -3
- package/docs/release-qa-baseline.md +19 -7
- package/docs/servercapabilities.md +47 -47
- package/docs/settings.md +9 -5
- package/docs/subagent-compat.md +1 -1
- package/docs/usage.md +1 -0
- package/package.json +8 -5
- package/rules/ast-grep-rules/rule-tests/no-return-value-in-generator-test.yml +17 -0
- package/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-js-test.yml +86 -0
- package/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-test.yml +86 -0
- package/rules/ast-grep-rules/rule-tests/unchecked-numeric-parse-python-test.yml +15 -0
- package/rules/ast-grep-rules/rules/no-return-value-in-generator.yml +9 -4
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +119 -0
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +119 -0
- package/rules/ast-grep-rules/rules/unchecked-numeric-parse-python.yml +13 -2
- package/rules/rule-catalog.json +25 -1
- package/scripts/analyze-pi-lens-logs.mjs +15 -5
- package/scripts/lib/is-main-module.mjs +27 -0
- package/scripts/lib/scratch-home-env.mjs +21 -0
- package/scripts/rpc-load-check.mjs +4 -6
- package/scripts/warm-loader-cache.mjs +2 -5
- package/dist/chunk-3PTHXJXR.js +0 -28
- package/dist/chunk-3QED2P4V.js +0 -31
- package/dist/chunk-5WRPDP2A.js +0 -47
- package/dist/chunk-ABBOA7UD.js +0 -157
- package/dist/chunk-CUHSHSB6.js +0 -273
- package/dist/chunk-GL5LUMZE.js +0 -51
- package/dist/chunk-HAD7QRQI.js +0 -30
- package/dist/chunk-JORED7EX.js +0 -44
- package/dist/chunk-KYUB6QDC.js +0 -72
- package/dist/chunk-LZSEQW6A.js +0 -57
- package/dist/chunk-M2IFVFWU.js +0 -79
- package/dist/chunk-M2UD3LPU.js +0 -88
- package/dist/chunk-MBKQHGA7.js +0 -39
- package/dist/chunk-R7YOCSNV.js +0 -23
- package/dist/chunk-SKAMFC7A.js +0 -28
- package/dist/chunk-SYE6T2EB.js +0 -28
- package/dist/chunk-TRETHTQO.js +0 -26
- package/dist/chunk-UA7ZXYDR.js +0 -184
- package/dist/chunk-XTFDJI3T.js +0 -24
- package/dist/chunk-Z3CCVDUB.js +0 -76
package/docs/pi-lens-reviewer.md
CHANGED
|
@@ -63,24 +63,24 @@ does not ship.
|
|
|
63
63
|
| A new `it(` or `test(` title, or a case added to a table test | Red first: the case fails on the pre-fix source, with the failure the defect names (principles §2 "Red first") | The pre-fix transcript, with its `Tests N failed` line naming the new titles | #4577 (Greptile, 2026-10-17: round-4 cases shipped with no red) |
|
|
64
64
|
| A new guard, branch, filter, cap or fallback | Mutation red on that predicate, both directions, in a compile-valid change (principles §2 "Mutation output is quoted") | The `scripts/mutate.mjs` transcript and its `RED` status line, with the one test it reds | #4575 (Greptile r4304045025: no mutation red for the saveOnly rule) |
|
|
65
65
|
| A file under `clients/lsp/`, `formal/`, or any path `formal/switch-pins.json` names | The model moves with the code: a `.tla`/`.cfg` hunk and its TLC verdict, or a `TLA+ unaffected:` line; a flipped constant flips its config and its pin (AGENTS shape 68) | The line, or the model diff plus the verdict, and the pin's test name for a flipped constant | #4575 (Greptile r4304045020: the model did not move with the code), #4387, #4393 |
|
|
66
|
-
| A spawn, shell or path seam: `clients/package-manager.ts`, `clients/lsp/launch.ts`, `clients/path-utils.ts`, `clients/safe-spawn.ts`, or any `trySpawn` caller | Read the Windows lane, and keep a shim cell that asserts the platform command (AGENTS "Test requirements"; "Dispatch, runners, formatters, and installers") | The `Unit tests Windows` row on the head, or the shim cell's platform assertion | #4566 (Greptile r4304149666: the `.cmd` cells), #4356, #4263 |
|
|
67
|
-
| A rung that can execute project code | Judge the rung by the resolved target under every trust state, never by the name it was called with (
|
|
66
|
+
| A spawn, shell or path seam: `clients/package-manager.ts`, `clients/lsp/launch.ts`, `clients/path-utils.ts`, `clients/safe-spawn.ts`, or any `trySpawn` caller | Read the Windows lane, and keep a shim cell that asserts the platform command (AGENTS "Test requirements"; `docs/invariants/dispatch-runners.md` "Dispatch, runners, formatters, and installers") | The `Unit tests Windows` row on the head, or the shim cell's platform assertion | #4566 (Greptile r4304149666: the `.cmd` cells), #4356, #4263 |
|
|
67
|
+
| A rung that can execute project code | Judge the rung by the resolved target under every trust state, never by the name it was called with (`docs/invariants/lsp-trust-exec.md` "LSP, trust, and process execution") | The target table: each spelling, its resolved path, and the verdict under trusted, unknown and denied | #4566 (an empty `PATH` and a global link each ran project code), #4530 |
|
|
68
68
|
| A new shared helper | Net-count rule: delete a same-shape sibling in this change (principles §1 "Net-count rule for shared helpers") | The deleted sibling in `Change outline`, or the unsafe-to-fold reason with its follow-up link | #2585 r1, #2617 r1 (an existing override and scan set bypassed or recopied), #3064, #3065, #3066, #3068 (a fold's newly sole predicate left untested) |
|
|
69
69
|
| A second writer, reader or mirror of one shared record | Design shared state once, with a reason or kind discriminator per writer (principles §1 "Design shared state once"; AGENTS shape 24) | The writers-by-axis table, and the discriminator each writer carries | #1631/#1641 (the `stale` collision that was green alone), #1633, #1703 |
|
|
70
70
|
| A durable record whose shape changes, or a new version of one | Keep the fixture corpus: every version that produced the record still parses (principles §2 "Keep fixture corpora") | The fixture path and the parser test that replays it | #3594 R2-F1 (AGENTS shape 57) |
|
|
71
71
|
| A cache or memo key | Key every input the value depends on, trust scope and install state included (AGENTS shape 6) | The key's input list beside the value's dependencies, and the mutation that changes one input | #4562 (a large update left a cached answer), #4566 (a trust change left tools missing) |
|
|
72
72
|
| A test-side source scan, census, ratchet or detector | Detectors match code, not prose, and fail closed on an unlisted spelling (principles §2 "Detectors match code"; AGENTS shape 69) | The blanked-source read, and three plants the author did not design for: an alias, an indirect call, a value through another binding | #2693 (a ratchet counted four sites where six existed), #4439 |
|
|
73
73
|
| A workflow, action or job | The edited lane runs on a pull request, or a branch run is quoted with its run id (AGENTS "Commands and gates") | `gh workflow run <file> --ref <branch>` with its run id, or the PR-eligible cell's name | #3043, #3085 |
|
|
74
|
-
| A `continue-on-error` producer or a nightly floor | The producer reports to `scripts/assert-evaluated.mjs`, and its floor reds below the measured count (
|
|
74
|
+
| A `continue-on-error` producer or a nightly floor | The producer reports to `scripts/assert-evaluated.mjs`, and its floor reds below the measured count (`docs/invariants/lsp-trust-exec.md` "LSP, trust, and process execution") | The floor value beside the run's evaluated count | #4518 |
|
|
75
75
|
| A path a host tool was given (a `~`, an `@` prefix, a `file://` URL), or a path re-resolved after it left disk | Resolve by provenance, one seam per provenance; a generated or recovered path is never re-resolved (AGENTS shape 74) | The resolver the caller uses, and the path form it accepts, before and after | #4576, #4577 (a bash operand resolved on the host-argument ladder, then an absolute spelling rewritten) |
|
|
76
76
|
| A path recovered from disk, a synthetic write event, or a path pi-lens generates | The path carries its provenance, host argument, shell token, recovered or generated, and nothing re-derives it (AGENTS shape 58) | The provenance the caller states at the injection point, and the resolver it therefore skips | #4577 (a recovered name was re-folded), #4558 |
|
|
77
77
|
| A path-keyed map, normalizer or path comparison | Normalize on write, read, delete and rehydrate, and test Windows separators and casing (AGENTS shape 1) | The writer and reader table, with the normalizer each one calls | #3178 (four rounds, two inverted arms, one unmeasured swap) |
|
|
78
|
-
| A session, lifecycle, generation or turn-end seam | Capture the generation before the await, and key the state by the session that owns it (AGENTS shapes 21 and 22; "Session, telemetry, and delivery") | The captured scope or generation the write checks, and the test that races it | #4258 (a stale activation rebinding a held bridge), #4154 |
|
|
78
|
+
| A session, lifecycle, generation or turn-end seam | Capture the generation before the await, and key the state by the session that owns it (AGENTS shapes 21 and 22; `docs/invariants/session-telemetry.md` "Session, telemetry, and delivery") | The captured scope or generation the write checks, and the test that races it | #4258 (a stale activation rebinding a held bridge), #4154 |
|
|
79
79
|
| A lifecycle, ownership or queue-ordering change | Name a cell and a mutation per axis: owner and identity, last leave, and queue ordering (principles §1 "Identity and lifecycle rules"; AGENTS shapes 21 and 22) | The state table with one row per axis, and the mutation transcript for each cell | #4563 (seven lifecycle findings), #4575 (a slow send overwrote a newer edit), #4562 |
|
|
80
|
-
| A lifecycle change | The TLA+ model moves with the code, and `docs/pi-lens-monitor.md` gains the row for a new store or hand-off branch (AGENTS shape 68; "Session, telemetry, and delivery") | The model diff or `TLA+ unaffected:` line, and the monitor-doc row | #4563, #4569 (held documents undercounted), #4575 |
|
|
80
|
+
| A lifecycle change | The TLA+ model moves with the code, and `docs/pi-lens-monitor.md` gains the row for a new store or hand-off branch (AGENTS shape 68; `docs/invariants/session-telemetry.md` "Session, telemetry, and delivery") | The model diff or `TLA+ unaffected:` line, and the monitor-doc row | #4563, #4569 (held documents undercounted), #4575 |
|
|
81
81
|
| A delivery surface, or a bound on findings that reach the model | A bound discloses its truncation on the rendered surface, and a skipped or unavailable result is not clean (AGENTS shape 10) | The rendered truncation line, or the skip reason from `RUNNER_SKIP_REASONS` | #3166 r2 (an 80-finding input bound zeroed a neighbour's errors) |
|
|
82
82
|
| 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
|
-
| 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 (
|
|
83
|
+
| 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
84
|
| 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
85
|
| Every diff, every changed file, tests included | Read the whole diff file by file. Check each PR-body claim against the diff, and 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) |
|
|
86
86
|
|
|
@@ -124,6 +124,13 @@ real seam. Check that every gate the diff adds is exercised through that path.
|
|
|
124
124
|
*follow-up issue* (p2 or higher only, with its seam group), or *stay
|
|
125
125
|
specific* (with the reason). A missing verdict is a finding (#3622; the
|
|
126
126
|
optional ast-grep assist is #3684).
|
|
127
|
+
- **A new test's layer.** A registration question (flags, tools, commands,
|
|
128
|
+
declarations) belongs on tier 1 (`tests/support/pi-runner.ts`), a
|
|
129
|
+
session-flow case on tier 2 (`tests/support/pi-session.ts`), and a
|
|
130
|
+
JSON-lines sink on `readNdjsonRows` (`tests/support/ndjson-rows.ts`), with
|
|
131
|
+
`skipped === 0` asserted when the claim needs the complete output. A fake of
|
|
132
|
+
an in-process store or registry is a finding; other doubles only where
|
|
133
|
+
`AGENTS.md` admits them, which holds the detail.
|
|
127
134
|
- Review the pre-push self-scan with `npm run astgrep:self-scan`; `pr-preflight`
|
|
128
135
|
runs the same gate after its build.
|
|
129
136
|
- Require the exact-pin rule in `docs/pi-lens-subagent.md` on the MERGE of
|
|
@@ -140,6 +147,18 @@ real seam. Check that every gate the diff adds is exercised through that path.
|
|
|
140
147
|
observability, changelog, commit, and PR-body requirements.
|
|
141
148
|
- Re-run the PR's `## Class sweep` search yourself and widen it when the
|
|
142
149
|
named shape is broader than the touched seam (#4273, #4268).
|
|
150
|
+
- Read the `## Fold check` against the open issues and pull requests the PR's
|
|
151
|
+
mechanism has: the lint checks the form (candidate, decision, reason), not
|
|
152
|
+
that every candidate was found, so decide whether the section's search was
|
|
153
|
+
wide enough and whether each `not folded` reason holds (#4711). Open each
|
|
154
|
+
candidate's diff (`gh pr diff <n>`) or the files its issue names: a
|
|
155
|
+
`not folded` line is a finding when the candidate edits the same hunk or
|
|
156
|
+
symbol, or owns a rule this PR re-derives, and a member your own search finds
|
|
157
|
+
that the `## Class sweep` missed is a finding too. The gates check form only
|
|
158
|
+
and the author writes these lines, so this read is the only judgment they
|
|
159
|
+
get. Recurrence: #4713 wrote "shares no clients/ file" beside #4712, and the
|
|
160
|
+
review then re-derived a `clients/analysis-root.ts` rule #4712 edits, while
|
|
161
|
+
the class sweep missed a single-scan-root member.
|
|
143
162
|
- On a bug-closing PR, check the `## Detection` lesson: the layer named under
|
|
144
163
|
`Should have been caught by:` must be one that would actually have caught
|
|
145
164
|
the bug, and `Gap:` must be a real issue, test, or reason (#4288). Judge
|
|
@@ -300,7 +319,10 @@ the reproduction command or probe output, expected and observed behaviour, the
|
|
|
300
319
|
root cause, cost, and a concrete remedy, and whether it is an
|
|
301
320
|
issue-acceptance or a repository-standard finding. Severity requires a
|
|
302
321
|
reproduced failure; a high-severity hypothesis without a failure scenario is
|
|
303
|
-
at most medium.
|
|
322
|
+
at most medium. A remedy that adds mechanism for an unreproduced race or edge
|
|
323
|
+
case is filed as a hypothesis with its trigger path and cost, for the
|
|
324
|
+
maintainer to decide, not prescribed to the fixer (principles §1, speculative
|
|
325
|
+
robustness).
|
|
304
326
|
|
|
305
327
|
Start with one verdict: `merge-ready`, `needs changes`, `redesign`, or
|
|
306
328
|
`conflicted`. Then give spec-compliance and standards-compliance findings under
|
|
@@ -327,6 +349,31 @@ merge-order interactions with other open PRs, plus:
|
|
|
327
349
|
(`:34`, `:81`). Recurrence: #4566 and #4575 (2026-10-17), where the threads
|
|
328
350
|
outlived the rounds that should have read them.
|
|
329
351
|
|
|
352
|
+
Beside the prose report, write `FINDINGS_<pr>.json` at the worktree root, and
|
|
353
|
+
never commit it. The orchestrator's validator reads it before routing the
|
|
354
|
+
round. Shape:
|
|
355
|
+
|
|
356
|
+
```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"}]}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Write one entry per finding, with the same ids as the prose. `remedy: null`
|
|
361
|
+
means the fixer must design the change. `addsMechanism` is true when the
|
|
362
|
+
remedy adds a guard, branch, state, record, or lifecycle step, rather than a
|
|
363
|
+
fix to an existing line. The prose report stays the record a human reads;
|
|
364
|
+
the JSON is what routing reads, so the two must agree. This exists because
|
|
365
|
+
the orchestrator re-typed each finding into a fix brief by hand, and routed
|
|
366
|
+
rounds by judgment instead of by the review's own data.
|
|
367
|
+
|
|
368
|
+
State the change's rollback cost as a required summary line. Name every
|
|
369
|
+
one-way door it ships: something users or other code can come to depend on,
|
|
370
|
+
which a revert does not undo. Examples are a config key or flag users set, a
|
|
371
|
+
durable record shape already written to disk, a public tool, MCP or CLI
|
|
372
|
+
surface, or a migration. Each one-way door needs its proof in the PR: an
|
|
373
|
+
old-record parse fixture, a deprecation path, or a stated reason it is safe.
|
|
374
|
+
`none` is a valid answer, and state it. The JSON's `oneWayDoors` lists the
|
|
375
|
+
same items.
|
|
376
|
+
|
|
330
377
|
Use short, active, plain prose.
|
|
331
378
|
|
|
332
379
|
## Documentation and prose standard
|
package/docs/pi-lens-subagent.md
CHANGED
|
@@ -201,7 +201,14 @@ Each pre-push head has a durable result record at
|
|
|
201
201
|
`$(git rev-parse --git-common-dir)/pi-lens-prepush/<sha>.json`. It contains the
|
|
202
202
|
head/base, timestamp, selected test files and their `changed`, `mirror`,
|
|
203
203
|
`import`, `history`, or `governance` reason, plus passed/failed/skipped
|
|
204
|
-
counts, the Vitest exit code, and wall time.
|
|
204
|
+
counts, the Vitest exit code, and wall time. `base` is the ref the selection
|
|
205
|
+
diffed. A `tests-complete` record carries `treeBound` only when the tests ran
|
|
206
|
+
in a clean checkout of exactly that head (HEAD equal to it, no tracked
|
|
207
|
+
edits before or after the run); other heads keep their previous record
|
|
208
|
+
(`tests-not-started` after a pass, the run's own outcome after a failure). A re-push of a head
|
|
209
|
+
whose `treeBound` record passed the same selection skips the build and tests,
|
|
210
|
+
keeps the record and appends one `pre-push-skip` row to `pre-push.log` (#4724);
|
|
211
|
+
any other re-push overwrites it. Writes prune records
|
|
205
212
|
older than fourteen days. The provisional record is written before build and
|
|
206
213
|
self-scan work with outcome `tests-not-started`; preparation failures update it
|
|
207
214
|
to `build-failed` or `self-scan-failed`. The write uses a same-directory
|
|
@@ -214,8 +221,8 @@ foreground, push with the targeted and governance suites green and say that
|
|
|
214
221
|
the full suite was delegated to CI.
|
|
215
222
|
|
|
216
223
|
Pin `PI_LENS_HOME` and `PILENS_DATA_DIR` to `<worktree>/.probe-home` for
|
|
217
|
-
probes, smoke scripts, and `npm install`/`npm ci` (`
|
|
218
|
-
and operating systems"); a test that inspects the install record also pins
|
|
224
|
+
probes, smoke scripts, and `npm install`/`npm ci` (`docs/invariants/paths-os.md`
|
|
225
|
+
"Paths, data, and operating systems"); a test that inspects the install record also pins
|
|
219
226
|
`PI_LENS_INSTALL_LOG`. Never export them for a Vitest run: the setup keeps
|
|
220
227
|
the real home on purpose (#3178). Kill every language server a probe spawns
|
|
221
228
|
before moving on; the plegma daemon's cgroup holds every worker's children
|
|
@@ -79,6 +79,7 @@ PR's packed tarball (#2700, the check #2587 was missing). `attw`
|
|
|
79
79
|
| install-selftest | the runtime dependency graph and the `pi.skills` manifest resolve AS INSTALLED | npm-install | `node <installed>/scripts/install-selftest.mjs --allow-soft` | process exits 0 and no `[FAIL]` line | selftest stdout | `scripts/install-selftest.mjs` verbatim — install-smoke's `smoke` job | #1605 lane 5 (real-host install), narrower: this row asserts the packaged artifact resolves, not that a host classifier parses |
|
|
80
80
|
| skills-registered | a real pi registers the four pi-lens skills from the installed package | pi-rpc | `pi install <installed pkg>` then `pi --mode rpc` plus `{"type":"get_commands"}` | at least 4 commands with `source` `skill`; every `sourceInfo.path` inside the installed package AND no `sourceInfo.source` is `extension:index` (pi's `pi.skills` manifest is the only registrar; the extension's `resources_discover` handler used to re-add the whole directory and undo settings package filters, #1416) | get_commands response JSON | new probe on the #2589 mechanism — the recurrence is #2587; #1416 widened it to the manifest-registrar direction | — |
|
|
81
81
|
| commands-registered | the extension loads and registers its `lens-*` slash commands | pi-rpc | same RPC session as above | at least 1 command with `source` `extension` named `lens-*`, and zero `extension_error` events | same get_commands response plus the event stream | `scripts/rpc-load-check.mjs` assertion — install-smoke's `pi-load` job, which runs it against the PUBLISHED package only | #1605 lane 1 (real-host): the same real-host principle, applied to extension registration rather than stderr classification |
|
|
82
|
+
| lsp-warm-resolved | the extension's session-start LSP warm resolves in the installed candidate | pi-rpc | same RPC session as above | pinned `PI_LENS_HOME/extension.log`, observed for 10 s after `get_commands` (a `warm failed` record ends it early), has an `LSP warm resolved` record and no `warm failed` record of any warm; only records stamped at or after the session start count; the witness proves the LSP module loads, not that a language server spawned; a candidate older than the success record (4.4.3 and earlier) has no positive witness and FAILs | extension log NDJSON | new — the existing pi-rpc rows did not read the session-start warm log; recurrence #4314 | `scripts/rpc-load-check.mjs` (install-smoke `pi-load`) reds on any `warn` record of a published package; this row is the release gate's positive witness |
|
|
82
83
|
| mcp-tools-registered | the MCP mirror advertises the `pilens_*` tool surface | mcp-stdio | `node <installed>/dist/mcp/server.js` then `initialize` plus `tools/list` | every advertised tool name starts `pilens_`, and the set contains analyze, diagnostics, turn_end, lsp_navigation, health | tools/list response JSON | new — no smoke drives the MCP mirror from an install | — |
|
|
83
84
|
| mcp-diagnostics-full | `lens_diagnostics` full mode answers on a fixture repo | mcp-stdio | `tools/call` `pilens_diagnostics` with `mode` `full` and `refreshRunners` `cheap`, POLLED | text carries a `Summary (N files diagnosed this session)` line with N at least 1 | tool result text | new — `tests/clients` covers the handler, nothing covers it through a packaged install | — |
|
|
84
85
|
| mcp-turn-end | the turn-end pipeline runs over the turn's files and returns an advisory | mcp-stdio | `tools/call` `pilens_turn_end` with the fixture file | text carries `Turn-end over N file(s).` with N at least 1 | tool result text | new — `scripts/smoke-availability-lifecycle.mjs` covers lifecycle availability, not the packaged turn-end path | #1605 lane 2 (availability-lifecycle): overlaps the turn-end half; #1605 asserts latch recovery, this row asserts the packaged turn-end path answers at all |
|
|
@@ -154,16 +155,26 @@ newest-in-range lane reads it, bounded above so `"*"` can never mean
|
|
|
154
155
|
matrix has passed on. A newer host enters the window in ONE change: run this
|
|
155
156
|
matrix on it, add it to that test's verified list, and move the workflow's
|
|
156
157
|
ceiling together. P1 is one verified host per minor line from 0.86 onward;
|
|
157
|
-
0.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
0.86–1.4 are in-window, and every minor line below 0.86 falls outside the
|
|
159
|
+
window entirely, so none needs a dedicated host. A ceiling past an unrun
|
|
160
|
+
minor still claims that minor, so the verified-minor ratchet names the admitted
|
|
161
|
+
lines explicitly.
|
|
162
|
+
|
|
163
|
+
The floor is 0.86.1 (#4688, maintainer decision 2026-10-20). 0.80–0.85 are
|
|
164
|
+
out of the window: since #4644 pi-lens injects context only from a `context`
|
|
165
|
+
event that carries a system head, and those hosts keep the prompt in
|
|
166
|
+
`agent.state.systemPrompt` and never emit `context_with_system`, so they
|
|
167
|
+
receive no findings and no guidance. Raising the floor was chosen over reviving
|
|
168
|
+
the old hosts; a real 0.80.10 session delivered the staged guidance at
|
|
169
|
+
`91c939e10` and nothing at `e7a0a8aba` (`markerReachedProvider: false` on all
|
|
170
|
+
3 requests).
|
|
161
171
|
|
|
162
172
|
### Verified hosts
|
|
163
173
|
|
|
164
|
-
The certified policy is `>=0.
|
|
165
|
-
|
|
166
|
-
|
|
174
|
+
The certified policy is `>=0.86.1 <1.5.0`, and this table is the whole verified
|
|
175
|
+
set: `tests/packaging.test.ts` fails when it and `PI_HOST_SUPPORTED_RANGE`
|
|
176
|
+
disagree. Each listed minor line has a release-QA witness; the workflow ceiling
|
|
177
|
+
and `tests/packaging.test.ts` list are updated together.
|
|
167
178
|
|
|
168
179
|
| host | date | pi-lens commit | result |
|
|
169
180
|
| --- | --- | --- | --- |
|
|
@@ -174,6 +185,7 @@ updated together.
|
|
|
174
185
|
| 1.1.0 | 2026-10-08 | 2fda17a53d62267cd9035fa04380bbf0e2de4318 | 15 pass / 1 skipped (git-install-loads) |
|
|
175
186
|
| 1.2.0 | 2026-10-16 | 9400454891d5a1beb0a4d2d9452dece276e22e71 | 15 pass / 1 skipped (git-install-loads) |
|
|
176
187
|
| 1.3.0 | 2026-10-16 | 9400454891d5a1beb0a4d2d9452dece276e22e71 | 15 pass / 1 skipped (git-install-loads) |
|
|
188
|
+
| 1.4.0 | 2026-10-22 | 75a1a3c893ed0ac44a3081dd3d475c1e72349099 | 15 pass / 1 skipped (git-install-loads) |
|
|
177
189
|
|
|
178
190
|
Re-run any row with `node scripts/release-qa.mjs --pi <host>` at the listed commit.
|
|
179
191
|
|
|
@@ -6,55 +6,55 @@ server's `initialize` handshake. Generated by `node scripts/server-capabilities.
|
|
|
6
6
|
absent on the generating host are listed under *Unavailable* — run in a
|
|
7
7
|
provisioned environment (the nightly) to capture those rows.
|
|
8
8
|
|
|
9
|
-
_Last generated: 2026-10-
|
|
9
|
+
_Last generated: 2026-10-25 on linux; 41 servers captured, 9 unavailable._
|
|
10
10
|
|
|
11
11
|
## Diagnostic mode + navigation/edit operations
|
|
12
12
|
|
|
13
|
-
Legend: ✓ advertised, · not. **mode** = document diagnostics (`pull` = `textDocument/diagnostic`, else push-only); **ws-pull** = advertises `workspace/diagnostic` (one project-wide pull — the #387 Item 2 fast path); **save** = `textDocumentSync.save` (#3407): `save` gets `textDocument/didSave`, `save+text` gets it with the document text (`includeText`), · declares none, ? not captured. **def**=definition, **tDef**=typeDefinition, **decl**=declaration, **ref**=references, **hov**=hover, **sig**=signatureHelp, **dSym**=documentSymbol, **wSym**=workspaceSymbol, **cAct**=codeAction, **rnm**=rename, **impl**=implementation, **cHir**=callHierarchy; **cmds** = executeCommand allowlist size.
|
|
13
|
+
Legend: ✓ advertised, · not. **mode** = document diagnostics (`pull` = `textDocument/diagnostic`, else push-only); **ws-pull** = advertises `workspace/diagnostic` (one project-wide pull — the #387 Item 2 fast path); **save** = `textDocumentSync.save` (#3407): `save` gets `textDocument/didSave`, `save+text` gets it with the document text (`includeText`), · declares none, ? not captured. **def**=definition, **tDef**=typeDefinition, **decl**=declaration, **ref**=references, **hov**=hover, **sig**=signatureHelp, **dSym**=documentSymbol, **wSym**=workspaceSymbol, **cAct**=codeAction, **rnm**=rename, **impl**=implementation, **cHir**=callHierarchy, **dCre**=didCreateFiles; **cmds** = executeCommand allowlist size.
|
|
14
14
|
|
|
15
|
-
| server | mode | ws-pull | save | def | tDef | decl | ref | hov | sig | dSym | wSym | cAct | rnm | impl | cHir | cmds |
|
|
16
|
-
|
|
17
|
-
| ast-grep | push-only | · | · | · | · | · | · | ✓ | · | · | · | ✓ | · | · | · | 1 |
|
|
18
|
-
| bash | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
|
|
19
|
-
| clojure | push-only | · | save+text | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 64 |
|
|
20
|
-
| cmake | push-only | · | save | · | · | · | · | ✓ | · | · | · | · | · | · | · | 0 |
|
|
21
|
-
| cpp | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 3 |
|
|
22
|
-
| csharp | pull | ✓ | save+text | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 0 |
|
|
23
|
-
| css | pull | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 0 |
|
|
24
|
-
| cue | push-only | · | save | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 1 |
|
|
25
|
-
| dart | push-only | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 18 |
|
|
26
|
-
| deno | pull | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 2 |
|
|
27
|
-
| docker | push-only | · | · | ✓ | · | · | · | ✓ | ✓ | ✓ | · | · | ✓ | · | · | 0 |
|
|
28
|
-
| docker-official | push-only | · | · | ✓ | · | · | · | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 1 |
|
|
29
|
-
| emmylua | pull | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | · | · | · | 4 |
|
|
30
|
-
| expert | push-only | · | save | ✓ | · |
|
|
31
|
-
| fish | push-only | · | save+text | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 23 |
|
|
32
|
-
| fsharp | push-only | · | save+text | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 0 |
|
|
33
|
-
| gleam | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | ✓ | ✓ | · | · | 0 |
|
|
34
|
-
| go | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 50 |
|
|
35
|
-
| html | pull | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | · | · | ✓ | · | · | 0 |
|
|
36
|
-
| json | pull | · | · | · | · | · | · | ✓ | · | ✓ | · | ✓ | · | · | · | 0 |
|
|
37
|
-
| kotlin | push-only | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 1 |
|
|
38
|
-
| lua | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 6 |
|
|
39
|
-
| marksman | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
|
|
40
|
-
| opengrep | push-only | · | save | · | · | · | · | ✓ | · | · | · | ✓ | · | · | · | 2 |
|
|
41
|
-
| php | push-only | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | · | 0 |
|
|
42
|
-
| powershell | push-only | · | save+text | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
|
|
43
|
-
| prisma | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 0 |
|
|
44
|
-
| python | push-only | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | ✓ | 0 |
|
|
45
|
-
| python-jedi | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
|
|
46
|
-
| ruby | pull | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
|
|
47
|
-
| rust | pull | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 0 |
|
|
48
|
-
| svelte | pull | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 0 |
|
|
49
|
-
| terraform | push-only | · | save | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 7 |
|
|
50
|
-
| tinymist | push-only | · | save | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 29 |
|
|
51
|
-
| toml | push-only | · | · | · | · | · | · | ✓ | · | ✓ | · | · | ✓ | · | · | 0 |
|
|
52
|
-
| typescript | push-only | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 8 |
|
|
53
|
-
| typos | push-only | · | · | · | · | · | · | · | · | · | · | ✓ | · | · | · | 1 |
|
|
54
|
-
| vue | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 0 |
|
|
55
|
-
| yaml | push-only | · | · | ✓ | · | · | · | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 1 |
|
|
56
|
-
| zig | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
|
|
57
|
-
| zizmor | push-only | · | · | · | · | · | · | · | · | · | · | · | · | · | · | 0 |
|
|
15
|
+
| server | mode | ws-pull | save | def | tDef | decl | ref | hov | sig | dSym | wSym | cAct | rnm | impl | cHir | dCre | cmds |
|
|
16
|
+
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
17
|
+
| ast-grep | push-only | · | · | · | · | · | · | ✓ | · | · | · | ✓ | · | · | · | · | 1 |
|
|
18
|
+
| bash | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
|
|
19
|
+
| clojure | push-only | · | save+text | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 64 |
|
|
20
|
+
| cmake | push-only | · | save | · | · | · | · | ✓ | · | · | · | · | · | · | · | · | 0 |
|
|
21
|
+
| cpp | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 3 |
|
|
22
|
+
| csharp | pull | ✓ | save+text | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 0 |
|
|
23
|
+
| css | pull | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 0 |
|
|
24
|
+
| cue | push-only | · | save | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 1 |
|
|
25
|
+
| dart | push-only | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 18 |
|
|
26
|
+
| deno | pull | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 2 |
|
|
27
|
+
| docker | push-only | · | · | ✓ | · | · | · | ✓ | ✓ | ✓ | · | · | ✓ | · | · | · | 0 |
|
|
28
|
+
| docker-official | push-only | · | · | ✓ | · | · | · | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 1 |
|
|
29
|
+
| emmylua | pull | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | · | · | · | · | 4 |
|
|
30
|
+
| expert | push-only | · | save | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | ✓ | ✓ | · | 2 |
|
|
31
|
+
| fish | push-only | · | save+text | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 23 |
|
|
32
|
+
| fsharp | push-only | · | save+text | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 0 |
|
|
33
|
+
| gleam | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | ✓ | ✓ | · | · | · | 0 |
|
|
34
|
+
| go | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 50 |
|
|
35
|
+
| html | pull | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | · | · | ✓ | · | · | · | 0 |
|
|
36
|
+
| json | pull | · | · | · | · | · | · | ✓ | · | ✓ | · | ✓ | · | · | · | · | 0 |
|
|
37
|
+
| kotlin | push-only | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 1 |
|
|
38
|
+
| lua | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 6 |
|
|
39
|
+
| marksman | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | · | ✓ | 0 |
|
|
40
|
+
| opengrep | push-only | · | save | · | · | · | · | ✓ | · | · | · | ✓ | · | · | · | ✓ | 2 |
|
|
41
|
+
| php | push-only | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | · | · | 0 |
|
|
42
|
+
| powershell | push-only | · | save+text | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
|
|
43
|
+
| prisma | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 0 |
|
|
44
|
+
| python | push-only | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | ✓ | · | 0 |
|
|
45
|
+
| python-jedi | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
|
|
46
|
+
| ruby | pull | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
|
|
47
|
+
| rust | pull | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 0 |
|
|
48
|
+
| svelte | pull | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 0 |
|
|
49
|
+
| terraform | push-only | · | save | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | · | 7 |
|
|
50
|
+
| tinymist | push-only | · | save | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 29 |
|
|
51
|
+
| toml | push-only | · | · | · | · | · | · | ✓ | · | ✓ | · | · | ✓ | · | · | · | 0 |
|
|
52
|
+
| typescript | push-only | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 8 |
|
|
53
|
+
| typos | push-only | · | · | · | · | · | · | · | · | · | · | ✓ | · | · | · | · | 1 |
|
|
54
|
+
| vue | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 0 |
|
|
55
|
+
| yaml | push-only | · | · | ✓ | · | · | · | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 1 |
|
|
56
|
+
| zig | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
|
|
57
|
+
| zizmor | push-only | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | 0 |
|
|
58
58
|
|
|
59
59
|
## Raw advertised capability keys
|
|
60
60
|
|
|
@@ -74,7 +74,7 @@ surface, including providers pi-lens does not yet consume.
|
|
|
74
74
|
- **docker**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentLinkProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, renameProvider, signatureHelpProvider, textDocumentSync
|
|
75
75
|
- **docker-official**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentLinkProvider, documentSymbolProvider, executeCommandProvider, hoverProvider, inlayHintProvider, inlineCompletionProvider, renameProvider, semanticTokensProvider, textDocumentSync
|
|
76
76
|
- **emmylua**: codeActionProvider, definitionProvider, diagnosticProvider, documentSymbolProvider, executeCommandProvider, hoverProvider, referencesProvider, textDocumentSync, workspaceSymbolProvider
|
|
77
|
-
- **expert**: codeActionProvider, codeLensProvider, completionProvider, definitionProvider, documentFormattingProvider, documentSymbolProvider, executeCommandProvider, experimental, hoverProvider, referencesProvider, textDocumentSync, workspace, workspaceSymbolProvider
|
|
77
|
+
- **expert**: callHierarchyProvider, codeActionProvider, codeLensProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentSymbolProvider, executeCommandProvider, experimental, foldingRangeProvider, hoverProvider, implementationProvider, referencesProvider, selectionRangeProvider, signatureHelpProvider, textDocumentSync, workspace, workspaceSymbolProvider
|
|
78
78
|
- **fish**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, executeCommandProvider, foldingRangeProvider, hoverProvider, implementationProvider, inlayHintProvider, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, workspace, workspaceSymbolProvider
|
|
79
79
|
- **fsharp**: callHierarchyProvider, codeActionProvider, codeLensProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, implementationProvider, inlayHintProvider, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, typeDefinitionProvider, workspaceSymbolProvider
|
|
80
80
|
- **gleam**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, referencesProvider, renameProvider, signatureHelpProvider, textDocumentSync, typeDefinitionProvider, workspace
|
|
@@ -100,7 +100,7 @@ surface, including providers pi-lens does not yet consume.
|
|
|
100
100
|
- **typos**: codeActionProvider, executeCommandProvider, positionEncoding, textDocumentSync, workspace
|
|
101
101
|
- **vue**: codeActionProvider, colorProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentLinkProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, experimental, foldingRangeProvider, hoverProvider, inlayHintProvider, linkedEditingRangeProvider, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, textDocumentSync, workspace
|
|
102
102
|
- **yaml**: codeActionProvider, codeLensProvider, completionProvider, definitionProvider, documentFormattingProvider, documentLinkProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, executeCommandProvider, foldingRangeProvider, hoverProvider, renameProvider, selectionRangeProvider, textDocumentSync, workspace
|
|
103
|
-
- **zig**: codeActionProvider, colorProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider,
|
|
103
|
+
- **zig**: codeActionProvider, colorProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, inlayHintProvider, positionEncoding, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, typeDefinitionProvider, workspace, workspaceSymbolProvider
|
|
104
104
|
- **zizmor**: textDocumentSync
|
|
105
105
|
|
|
106
106
|
## Advertised executeCommand allowlists
|
package/docs/settings.md
CHANGED
|
@@ -79,6 +79,7 @@ column is the effective behavior when nothing is set.
|
|
|
79
79
|
| `--no-opengrep` | `opengrep.enabled` | global | Opengrep scanner **on** |
|
|
80
80
|
| `--no-read-guard` | `readGuard.enabled` | global | read-before-edit monitor **on** |
|
|
81
81
|
| `--no-lens-context` | `contextInjection.enabled` | global | context injection **on** |
|
|
82
|
+
| `--lens-retain-injections` | `contextInjection.retain` | global | **off** |
|
|
82
83
|
| `--lens-turn-summary` | `turnSummary.enabled` | global | **off** |
|
|
83
84
|
| `--lens-actionable-warnings` | `actionableWarnings.enabled` | global | **off** |
|
|
84
85
|
| `--lens-actionable-warning-actions` | `actionableWarnings.includeLspCodeActions` | global | **off** |
|
|
@@ -88,7 +89,7 @@ column is the effective behavior when nothing is set.
|
|
|
88
89
|
| `--lens-compact-lsp-status` | `ui.compactLspStatus` | global | **off** (footer lists the active server names) |
|
|
89
90
|
| `--lens-hide-lsp-status` | `ui.hideLspStatus` | global | **off** (footer publishes the `pi-lens-lsp` status; outranks `ui.compactLspStatus` when both are set) |
|
|
90
91
|
| `--lens-compact-widget` | `ui.compactWidget` | global | **off** (widget stacks file rows, suppressed count and blocker details below its summary header; **on** renders only that header — languages + totals, plus the `LSP↑` chip while servers are spawning) |
|
|
91
|
-
| `--no-lazy-tools` | `tools.lazy` | global |
|
|
92
|
+
| `--no-lazy-tools` | `tools.lazy` | global | `true`: the five situational tools start inactive on every model (`"auto"` only on a model that keeps mid-conversation system messages, `false` never) |
|
|
92
93
|
| `--no-tool=<name>` | `tools.<name>.enabled` | project | every lens tool **on** |
|
|
93
94
|
| `--lens-turn-end-madge` | `turnEnd.madge.enabled` | global | **off** (madge runs at session start, not per turn) |
|
|
94
95
|
| `--no-knip` | `knip.enabled` | project | knip analyzer **on** |
|
|
@@ -99,10 +100,13 @@ column is the effective behavior when nothing is set.
|
|
|
99
100
|
| `--no-dead-code` | `deadCode.enabled` | project | dead-code analyzer **on** |
|
|
100
101
|
| `--no-complexity` | `complexity.enabled` | project | complexity analyzer **on** |
|
|
101
102
|
|
|
102
|
-
`--no-lazy-tools` keeps every pi-lens tool active for
|
|
103
|
-
advertised tool list never changes. The
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
`--no-lazy-tools` (or `tools.lazy: false`) keeps every pi-lens tool active for
|
|
104
|
+
the whole session, so the advertised tool list never changes. The opt-in
|
|
105
|
+
`"auto"` decides per model, at session start and on a model switch only; see
|
|
106
|
+
[globalconfig.md](globalconfig.md#startup-controls) for the rule, why `true`
|
|
107
|
+
stays the default, and the precedence over `tools.<name>.enabled`. The `pi_lens_activate_tools` loader
|
|
108
|
+
stays registered and keeps its usual description; when the tools it names are
|
|
109
|
+
already active, calling it is a no-op.
|
|
106
110
|
|
|
107
111
|
The `tools.<name>.enabled` population covers every model-facing pi and MCP
|
|
108
112
|
tool. The loader `pi_lens_activate_tools` and MCP lifecycle tools
|
package/docs/subagent-compat.md
CHANGED
|
@@ -111,7 +111,7 @@ mechanism `.github/workflows/install-smoke.yml` already uses) and drives
|
|
|
111
111
|
needed, matching `scripts/rpc-load-check.mjs`'s no-model-required design.
|
|
112
112
|
|
|
113
113
|
**Every invocation sets `PI_LENS_STARTUP_MODE=full`.** pi-lens's
|
|
114
|
-
cold-start-quick optimization (see
|
|
114
|
+
cold-start-quick optimization (see HISTORY.md "Session-start critical path")
|
|
115
115
|
forces the *first* `session_start` of any process onto the fast "quick"
|
|
116
116
|
path regardless of `--print` — that path returns before the subagent-light
|
|
117
117
|
-mode check (and the heavyweight-scan skip it gates) ever runs. This was
|
package/docs/usage.md
CHANGED
|
@@ -110,6 +110,7 @@ pi --lens-guard # Block git commit/push when unresolved blockers exist
|
|
|
110
110
|
pi --lens-checkout-guard # Decline git commands that rewrite the working tree while another live pi-lens session shares this dirty checkout (experimental)
|
|
111
111
|
pi --no-opengrep # Disable the Opengrep security scanner (default-on auxiliary LSP)
|
|
112
112
|
pi --no-read-guard # Disable the read-before-edit behavior monitor
|
|
113
|
+
pi --lens-retain-injections # Re-send injected findings unchanged in later requests, for exact-prefix (local) prompt caches
|
|
113
114
|
pi --lens-turn-summary # Persist a per-turn summary of diagnostics, autofixes, and autoformats
|
|
114
115
|
pi --lens-compact-tool-line # Render tool results as one compact, theme-aware line (closes #1327)
|
|
115
116
|
pi --lens-compact-lsp-status # Collapse the footer LSP status to one state glyph instead of the server names (refs #3099)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-lens",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo",
|
|
6
6
|
"repository": {
|
|
@@ -114,7 +114,9 @@
|
|
|
114
114
|
"scripts/analyze-pi-lens-logs.mjs",
|
|
115
115
|
"scripts/install-selftest.mjs",
|
|
116
116
|
"scripts/lib/host-provided-deps.mjs",
|
|
117
|
+
"scripts/lib/is-main-module.mjs",
|
|
117
118
|
"scripts/lib/latency-log-phases.mjs",
|
|
119
|
+
"scripts/lib/scratch-home-env.mjs",
|
|
118
120
|
"scripts/lib/skills-predicate.mjs",
|
|
119
121
|
"scripts/lib/web-tree-sitter-dir.mjs",
|
|
120
122
|
"scripts/lib/warm-loader-cache.mjs",
|
|
@@ -126,8 +128,8 @@
|
|
|
126
128
|
"banner.png"
|
|
127
129
|
],
|
|
128
130
|
"dependencies": {
|
|
129
|
-
"@ast-grep/cli": "0.
|
|
130
|
-
"@ast-grep/napi": "^0.
|
|
131
|
+
"@ast-grep/cli": "0.51.0",
|
|
132
|
+
"@ast-grep/napi": "^0.51.0",
|
|
131
133
|
"js-yaml": "^5.2.2",
|
|
132
134
|
"minimatch": "^10.2.6",
|
|
133
135
|
"pidusage": "^4.0.1",
|
|
@@ -162,13 +164,14 @@
|
|
|
162
164
|
]
|
|
163
165
|
},
|
|
164
166
|
"allowScripts": {
|
|
165
|
-
"@ast-grep/cli@0.
|
|
167
|
+
"@ast-grep/cli@0.51.0": true,
|
|
166
168
|
"@google/genai@2.21.0": true,
|
|
167
169
|
"esbuild@0.28.2": true,
|
|
168
170
|
"fsevents@2.3.3": false,
|
|
169
171
|
"protobufjs@7.6.6": true
|
|
170
172
|
},
|
|
171
173
|
"overrides": {
|
|
172
|
-
"qs": "^6.15.4"
|
|
174
|
+
"qs": "^6.15.4",
|
|
175
|
+
"undici": "^8.12.2"
|
|
173
176
|
}
|
|
174
177
|
}
|
|
@@ -17,6 +17,17 @@ valid:
|
|
|
17
17
|
def handler():
|
|
18
18
|
return 42
|
|
19
19
|
yield
|
|
20
|
+
- |
|
|
21
|
+
# #4840: the yield belongs to the lambda, not to make().
|
|
22
|
+
def make():
|
|
23
|
+
f = lambda: (yield)
|
|
24
|
+
return f
|
|
25
|
+
- |
|
|
26
|
+
# #1806 shape: the only yield is in a nested def; return 2 is not a generator return.
|
|
27
|
+
def outer():
|
|
28
|
+
def inner():
|
|
29
|
+
yield 1
|
|
30
|
+
return 2
|
|
20
31
|
invalid:
|
|
21
32
|
- |
|
|
22
33
|
def gen():
|
|
@@ -32,3 +43,9 @@ invalid:
|
|
|
32
43
|
yield 1
|
|
33
44
|
return 99
|
|
34
45
|
return inner_gen
|
|
46
|
+
- |
|
|
47
|
+
# #4840: a lambda elsewhere in a real generator does not hide its yield.
|
|
48
|
+
def gen():
|
|
49
|
+
key = lambda x: x
|
|
50
|
+
yield key(1)
|
|
51
|
+
return 2
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
id: no-sql-in-code-execute-js
|
|
2
|
+
valid:
|
|
3
|
+
# `.query` belongs to `no-sql-in-code`; this rule holds the `.execute` arms.
|
|
4
|
+
- 'db.query("SELECT * FROM users WHERE id = " + id)'
|
|
5
|
+
# Constant SQL, the parameterized idiom, and a literal-only concatenation.
|
|
6
|
+
- 'db.execute("SELECT * FROM users")'
|
|
7
|
+
- 'db.execute("SELECT * FROM users WHERE id = ?", [id])'
|
|
8
|
+
- 'db.execute("SELECT * FROM " + "users")'
|
|
9
|
+
- 'db.execute(sql`SELECT * FROM users WHERE id = ${id}`)'
|
|
10
|
+
# The callee-name shapes #2909 reported: `execute` is also a task method.
|
|
11
|
+
- 'runner.execute("delete " + id)'
|
|
12
|
+
- 'queue.execute(`update ${id}`)'
|
|
13
|
+
- 'command.execute("update " + name)'
|
|
14
|
+
- 'task.execute("updated " + name)'
|
|
15
|
+
# Only the first argument is read.
|
|
16
|
+
- 'db.execute("id = " + id, "DELETE FROM t")'
|
|
17
|
+
- 'ui.execute("Please select an item from " + list)'
|
|
18
|
+
- 'ui.execute("Item " + n + " selected from list")'
|
|
19
|
+
- 'job.execute("update " + id, { set: true })'
|
|
20
|
+
- 'menu.execute("select " + item, { from: x })'
|
|
21
|
+
# `SELECT` and `WITH` are whole words.
|
|
22
|
+
- 'job.execute("selected from " + source)'
|
|
23
|
+
- 'ui.execute("Within the select list " + id)'
|
|
24
|
+
- 'ui.execute("Item " + n + " select from list")'
|
|
25
|
+
# \N is not an escape; JavaScript reads it as N.
|
|
26
|
+
- 'runner.execute("\NSELECT * FROM " + source)'
|
|
27
|
+
- 'runner.execute("-- note\NSELECT * FROM " + source)'
|
|
28
|
+
# A template with no substitution is constant SQL.
|
|
29
|
+
- 'db.execute(`SELECT * FROM users`)'
|
|
30
|
+
# The first argument must open with a quote or backtick.
|
|
31
|
+
- 'db.execute(update + " SET x = 1")'
|
|
32
|
+
# An escaped tab does not end a -- comment.
|
|
33
|
+
- 'db.execute("-- c\tSELECT * FROM t WHERE id = " + id)'
|
|
34
|
+
invalid:
|
|
35
|
+
- 'db.execute("SELECT * FROM users WHERE id = " + id)'
|
|
36
|
+
- 'db.execute("DELETE FROM sessions WHERE token = " + token, [])'
|
|
37
|
+
- 'db.execute(`SELECT * FROM users WHERE id = ${id}`)'
|
|
38
|
+
- 'db.execute("UPDATE users SET name = ''" + n + "''")'
|
|
39
|
+
- 'db.execute("DELETE FROM t WHERE id = " + id)'
|
|
40
|
+
- 'db.execute("SELECT*FROM t WHERE id=" + id)'
|
|
41
|
+
- 'db.execute(`SELECT pg_sleep(${n})`)'
|
|
42
|
+
- 'db.execute("INSERT INTO t (a) VALUES (''" + a + "'')")'
|
|
43
|
+
- |-
|
|
44
|
+
db.execute(`
|
|
45
|
+
SELECT *
|
|
46
|
+
FROM users
|
|
47
|
+
WHERE id = ${id}
|
|
48
|
+
`)
|
|
49
|
+
- 'db.execute("CREATE OR REPLACE VIEW v AS SELECT * FROM " + t)'
|
|
50
|
+
- 'db.execute("DROP TABLE " + table)'
|
|
51
|
+
- 'db.execute("ALTER TABLE " + table + " ADD COLUMN x int")'
|
|
52
|
+
- 'db.execute("GRANT SELECT ON " + table + " TO app")'
|
|
53
|
+
- 'db.execute("REVOKE ALL ON " + table + " FROM app")'
|
|
54
|
+
- 'db.execute("WITH u AS (SELECT * FROM users) SELECT * FROM u WHERE id = " + id)'
|
|
55
|
+
- 'db.execute("MERGE INTO t USING s ON t.id = " + id)'
|
|
56
|
+
- 'db.execute("TRUNCATE TABLE " + table)'
|
|
57
|
+
- 'db.execute("REPLACE INTO t VALUES (" + v + ")")'
|
|
58
|
+
- 'db.execute("/* by id */ SELECT * FROM t WHERE id = " + id)'
|
|
59
|
+
- |-
|
|
60
|
+
db.execute(`-- one user
|
|
61
|
+
SELECT * FROM users WHERE id = ${id}`)
|
|
62
|
+
- "db.execute('SELECT * FROM t WHERE id = ' + id)"
|
|
63
|
+
- 'db?.execute("SELECT * FROM t WHERE id = " + id)'
|
|
64
|
+
- 'db?.execute("DELETE FROM t WHERE id = " + id, [])'
|
|
65
|
+
# Escape sequences as written in source, not real whitespace.
|
|
66
|
+
- 'db.execute("\nSELECT * FROM users WHERE id = " + id)'
|
|
67
|
+
- 'db.execute("\tDELETE FROM t WHERE id = " + id)'
|
|
68
|
+
- 'db.execute("\r\nUPDATE users SET a = " + a)'
|
|
69
|
+
- 'db.execute("-- user lookup\nSELECT * FROM users WHERE id = " + id)'
|
|
70
|
+
- 'db.execute("-- c\rSELECT * FROM t WHERE id = " + id)'
|
|
71
|
+
# A comment before the first argument is a named child of `arguments`.
|
|
72
|
+
- |-
|
|
73
|
+
db.execute(
|
|
74
|
+
// by id
|
|
75
|
+
`SELECT * FROM users WHERE id = ${id}`)
|
|
76
|
+
- 'db.execute(/* by id */ "SELECT * FROM users WHERE id = " + id)'
|
|
77
|
+
# Not SQL, but it matches the sibling's `SELECT ... ${` arm;
|
|
78
|
+
# ts_sql_injection_sink flags the same template.
|
|
79
|
+
- 'queue.execute(`select ${id}`)'
|
|
80
|
+
# Statement-shaped English that the alternation still accepts (#4804
|
|
81
|
+
# review): pinned so a later narrowing has a red row to work against.
|
|
82
|
+
- 'acl.execute("grant " + role)'
|
|
83
|
+
- 'search.execute("create index " + field)'
|
|
84
|
+
- 'config.execute("merge into " + base)'
|
|
85
|
+
- 'runner.execute("delete from " + cacheKey)'
|
|
86
|
+
- 'ui.execute("select " + label + " from the list")'
|