loadwise 0.5.1 → 0.6.1
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/PERFORMANCE.md +31 -6
- package/README.md +580 -1024
- package/bin/loadwise.js +4 -0
- package/lib/accessibility/frontend-detect.js +2 -1
- package/lib/accessibility/rule-ids.js +12 -9
- package/{editor/accessibility-examples.cjs → lib/editor/accessibility-examples.js} +20 -21
- package/lib/editor/actions.js +117 -0
- package/{editor/apply-fix.cjs → lib/editor/apply-fix.js} +1 -6
- package/{editor/control-flow-comparison.cjs → lib/editor/control-flow-comparison.js} +1 -3
- package/lib/editor/diagnostics.js +365 -0
- package/lib/editor/dismissals.js +111 -0
- package/lib/editor/editor-document.js +99 -0
- package/{editor/finding-comparison.cjs → lib/editor/finding-comparison.js} +4 -7
- package/lib/editor/fix-edits.js +200 -0
- package/lib/editor/language-server.js +437 -0
- package/{editor/maintainability-examples.cjs → lib/editor/maintainability-examples.js} +1 -3
- package/{editor/perf-site-comparison.cjs → lib/editor/perf-site-comparison.js} +1 -3
- package/lib/editor/perf-watch.js +78 -0
- package/{editor/performance-examples.cjs → lib/editor/performance-examples.js} +129 -128
- package/{editor/reliability-examples.cjs → lib/editor/reliability-examples.js} +100 -41
- package/lib/editor/scan-session.js +334 -0
- package/{editor/security-examples.cjs → lib/editor/security-examples.js} +28 -32
- package/lib/editor/server-commands.js +232 -0
- package/{editor/source-example.cjs → lib/editor/source-example.js} +3 -5
- package/{editor/standalone-performance-examples.cjs → lib/editor/standalone-performance-examples.js} +349 -333
- package/lib/editor/types/dismissal.js +1 -0
- package/lib/editor/types/fix-example.js +1 -0
- package/lib/editor/types/source-document.js +1 -0
- package/lib/editor/workspace-files.js +78 -0
- package/lib/editor/workspace-paths.js +22 -0
- package/lib/maintainability/analyze-source.js +2 -0
- package/lib/maintainability/apply-fix.js +1 -1
- package/lib/maintainability/cli.js +1 -1
- package/lib/maintainability/examples.js +58 -41
- package/lib/maintainability/rule-ids.js +29 -14
- package/lib/maintainability/scan-changed.js +3 -0
- package/lib/maintainability/scan.js +13 -9
- package/lib/maintainability/tsconfig-strict.js +69 -0
- package/lib/maintainability/type-safety-hygiene.js +204 -0
- package/lib/performance/analyze.js +2 -0
- package/lib/performance/cli-arguments.js +0 -2
- package/lib/performance/cli-policy.js +17 -9
- package/lib/performance/cli-scan.js +10 -8
- package/lib/performance/cli.js +4 -23
- package/lib/performance/editor-signal.js +1 -1
- package/lib/performance/finding-text.js +3 -3
- package/lib/performance/fix-cli.js +1 -1
- package/lib/performance/frontend-perf.js +7 -0
- package/lib/performance/frontend-render-perf.js +200 -0
- package/lib/performance/llm-max-tokens.js +56 -0
- package/lib/performance/native.js +46 -26
- package/lib/performance/polyglot.js +22 -1
- package/lib/performance/pooling.js +38 -23
- package/lib/performance/projects.js +42 -21
- package/lib/performance/rule-ids.js +236 -222
- package/lib/performance/site-fixes/database.js +3 -1
- package/lib/performance/site-fixes/integrity.js +15 -1
- package/lib/performance/source-inputs.js +18 -6
- package/lib/performance/unscanned-javascript.js +66 -19
- package/lib/reliability/analyze.js +12 -0
- package/lib/reliability/child-process.js +106 -0
- package/lib/reliability/error-values.js +177 -0
- package/lib/reliability/pool-timeout.js +79 -0
- package/lib/reliability/react-bugs.js +602 -0
- package/lib/reliability/resource-leaks.js +3 -6
- package/lib/reliability/rule-ids.js +169 -127
- package/lib/reliability/switch-exhaustive.js +284 -0
- package/lib/reliability/uncaught-exception.js +223 -0
- package/lib/security/auth-crypto/rule-ids.js +3 -2
- package/lib/security/cli.js +6 -5
- package/lib/security/deps/rule-ids.js +1 -0
- package/lib/security/examples/auth-crypto.cjs +5 -4
- package/lib/security/examples/deps.cjs +1 -0
- package/lib/security/examples/exposure.cjs +55 -42
- package/lib/security/examples/files.cjs +1 -0
- package/lib/security/examples/injection.cjs +1 -0
- package/lib/security/examples/moved.cjs +5 -4
- package/lib/security/examples/request-forgery.cjs +1 -0
- package/lib/security/exposure/client-env.js +113 -0
- package/lib/security/exposure/frontend-security.js +12 -10
- package/lib/security/exposure/index.js +14 -3
- package/lib/security/exposure/jsx-url.js +267 -0
- package/lib/security/exposure/next-image-config.js +34 -0
- package/lib/security/exposure/package-manifest.js +45 -0
- package/lib/security/exposure/react-version.js +45 -0
- package/lib/security/exposure/rule-ids.js +16 -12
- package/lib/security/files/index.js +1 -1
- package/lib/security/files/rule-ids.js +1 -0
- package/lib/security/injection/code.js +24 -10
- package/lib/security/injection/command.js +81 -28
- package/lib/security/injection/nosql.js +109 -22
- package/lib/security/injection/redos.js +152 -308
- package/lib/security/injection/regex-pattern.js +290 -0
- package/lib/security/injection/regex.js +30 -11
- package/lib/security/injection/rule-ids.js +2 -1
- package/lib/security/injection/shared.js +19 -1
- package/lib/security/injection/sql.js +83 -2
- package/lib/security/request-forgery/rule-ids.js +1 -0
- package/lib/security/rule-descriptions.js +36 -32
- package/lib/security/rule-ids.js +74 -67
- package/lib/security/taint/filename-guard.js +3 -1
- package/lib/security/taint/guards.js +84 -10
- package/lib/security/taint/index.js +124 -13
- package/lib/security/taint/propagate.js +10 -7
- package/lib/security/taint/sanitizers.js +7 -3
- package/lib/security/taint/sources.js +6 -3
- package/lib/security/taint/summaries.js +13 -1
- package/lib/security/taint/url-parts.js +14 -5
- package/lib/shared/agent-session.js +2 -2
- package/lib/shared/check.js +9 -6
- package/lib/shared/explain.js +5 -5
- package/lib/shared/fix-convergence.js +1 -1
- package/lib/shared/formats/finding-location.js +6 -2
- package/lib/shared/formats/sarif.js +3 -3
- package/lib/shared/heap-limit.js +6 -0
- package/lib/shared/pillars.js +7 -7
- package/lib/shared/rule-docs.js +12 -0
- package/lib/shared/scan-cache.js +0 -1
- package/lib/shared/workspaces.js +31 -9
- package/package.json +25 -17
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/schema/loadwise.config.schema.json +44 -0
- package/editor/README.md +0 -47
- package/examples/redis-keys.otlp.json +0 -22
- package/lib/maintainability/notify-editor.js +0 -1
- package/lib/performance/editor-report.js +0 -191
- package/lib/performance/editor-setup.js +0 -189
- package/lib/performance/editor-watch-supervisor.js +0 -104
- package/lib/performance/editor-watch.js +0 -193
- package/lib/performance/notify-editor.js +0 -1
- package/lib/performance/recursive-watch.js +0 -181
- /package/lib/{performance/types/editor-report.js → editor/types/comparison.js} +0 -0
package/PERFORMANCE.md
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
# Checker performance
|
|
2
2
|
|
|
3
|
-
These measurements use the actual CLI on Windows x64
|
|
3
|
+
These measurements use the actual CLI on Windows x64. Each section records the Loadwise version it measured and the Node version where known. Older sections were not re-run for later releases. Use the commands below to measure on your own code and hardware.
|
|
4
|
+
|
|
5
|
+
## Version 0.6.0
|
|
6
|
+
|
|
7
|
+
Re-measured locally on Windows x64 with Node 26.13.1 and TypeScript 6.0.3, with `LOADWISE_AGENT=0`. The OS file cache was warm and other work was running on the machine, so treat small differences as noise.
|
|
8
|
+
|
|
9
|
+
| Benchmark | Runs | Median result |
|
|
10
|
+
| --------------------------------------------------- | ---------------------------- | ----------------------------------------------------------------------------------- |
|
|
11
|
+
| `bench:scan`, 52 modules, 48 findings | 9 fresh programs, 2 warmups | Program creation 127.8 ms, rule analysis 261.4 ms, total 376.0 ms |
|
|
12
|
+
| `bench:scan -- --large`, 3,200 files, `--engine js` | 3 fresh processes per config | `tsconfig.json` 3.96 s, 300 MiB peak RSS; eight referenced projects 5.72 s, 277 MiB |
|
|
13
|
+
| `bench:scan -- --large --native`, 3,200 files | 3 fresh processes per config | `tsconfig.json` 2.34 s, 233 MiB peak RSS; eight referenced projects 2.56 s, 242 MiB |
|
|
14
|
+
| `bench:traces`, 24,000 spans, 480 findings | 12 rounds, 3 warmups | Scan 24.5 ms, JSON parse and scan 73.0 ms |
|
|
15
|
+
| `bench:traces -- --cache-lookups`, 720 findings | 12 rounds, 3 warmups | Scan 15.9 ms, JSON parse and scan 41.8 ms |
|
|
16
|
+
| `bench:patterns` | 12 pairs, 3 warmups | See below |
|
|
17
|
+
| `bench:security`, 12,000 same-name call sites | 7 samples, 2 warmups | Index and first lookup 5.73 ms, other lookups 0.02 ms |
|
|
18
|
+
|
|
19
|
+
Every large-fixture batch checked the 72 exact expected findings across all 3,200 files. The trace runs checked complete result equality each round. The pattern benchmark compared results by hash each pair. The native engine was 1.7 times faster on the single project and 2.2 times faster on the eight referenced projects. On this machine the default `auto` engine picks the native one, so these rows force each engine. The trace and pattern benchmarks no longer compare against a saved earlier implementation, so there is no before and after column for them.
|
|
20
|
+
|
|
21
|
+
| Pattern | Slower form | Faster form |
|
|
22
|
+
| ---------------------------------------------- | ------------------------: | ----------------------: |
|
|
23
|
+
| 300 customers and orders, per-customer queries | 2.343 ms (301 statements) | 0.768 ms (2 statements) |
|
|
24
|
+
| First matching order | 0.970 ms | 0.005 ms |
|
|
25
|
+
| 12,000 membership lookups in 8,000 IDs | 69.460 ms | 0.747 ms |
|
|
26
|
+
| Collect 4,000 transformed IDs | 20.147 ms | 0.019 ms |
|
|
27
|
+
|
|
28
|
+
Not re-measured for 0.6.0: the VS Code, NestJS and TypeORM checkouts, the live PostgreSQL, MongoDB and Redis checks, the Python OpenTelemetry integration, the watch-mode timings and the ORM integration. They need external checkouts, services or tooling that this run did not have. The sections below still describe the versions they name.
|
|
4
29
|
|
|
5
30
|
## Version 0.3.0
|
|
6
31
|
|
|
@@ -41,7 +66,7 @@ All **14** original NestJS membership sites were reviewed against the linked ups
|
|
|
41
66
|
|
|
42
67
|
The original native scan on VS Code used 97,564 requests across the JS/Go boundary. Checking async context before resolving symbols and batching up to 256 candidate identifiers reduced requests to 10,958 in an instrumented build with the ORM rules, before adding the Promise and sorting rules. In a separate six-process interleaved comparison on the same 22 original rules, the baseline median was 24.68 s and the optimized median was 9.92 s. All six JSON outputs matched. That series ran under concurrent local workload. Absolute results vary with system load and project shape. The native compiler still materializes the syntax trees in JS.
|
|
43
68
|
|
|
44
|
-
|
|
69
|
+
As of 0.2.0, the optional real-types integration checked TypeORM 0.3.28, Sequelize 6.37.7, Sequelize 7.0.0-alpha.47, Mongoose 8.19.1, Knex 3.1.0 and Kysely 0.28.8. The current pins are in `test/performance/integration/orms/package.json` and were not re-measured. Both compiler engines reported all 19 seeded findings at the same locations and left the control lines quiet. Separate fixtures used a generated Prisma 7.10.1 client, Drizzle 0.45.4 across PostgreSQL, MySQL and SQLite declarations, and `@types/pg` 8.23.1. A small SQLite check also ran an actual scoped Drizzle query against two tenants. These targeted checks measure behavior on known examples. They do not estimate precision for arbitrary applications.
|
|
45
70
|
|
|
46
71
|
The row-scope fixtures use different fields and authorization helpers in the same project, including `Invoice.organizationId` and `Workspace.workspace_id`. They cover incorrect field names, wrong helper provenance, and a run with row-scope checking disabled. In the SQLite test, Drizzle generated SQL for the physical column `org_id` while the checker recognized the public property `organizationId`.
|
|
47
72
|
|
|
@@ -80,7 +105,7 @@ In the final 22-rule watch test, six alternating edits added and cleared a findi
|
|
|
80
105
|
|
|
81
106
|
The polyglot source checker separately scanned 756 real Python 3.12 standard-library files (production modules, tests excluded). It returned zero findings on four runs. With parsing-error validation enabled, its first check took 386 ms and three further runs had a 383 ms median including native process startup.
|
|
82
107
|
|
|
83
|
-
## Trace exports
|
|
108
|
+
## Trace exports (0.2.1 and earlier)
|
|
84
109
|
|
|
85
110
|
The trace benchmark used 24,000 spans (11.1 MiB of JSON), including 4,800 eligible DB spans and 480 expected groups. It checked the complete output on every run. The optimized reader indexes attributes in one pass and reuses bounded operation-signature fingerprints.
|
|
86
111
|
|
|
@@ -91,7 +116,7 @@ The trace benchmark used 24,000 spans (11.1 MiB of JSON), including 4,800 eligib
|
|
|
91
116
|
|
|
92
117
|
These are local medians from an interleaved run against the saved pre-optimization implementation. The trace numbers exclude process startup and disk I/O. Run `npm run bench:traces` to reproduce the workload, or add `-- --cache-lookups` for the 720-finding fixture with identical key reads.
|
|
93
118
|
|
|
94
|
-
## Application behavior
|
|
119
|
+
## Application behavior (0.2.1 and earlier, SQLite part re-run in 0.6.0 above)
|
|
95
120
|
|
|
96
121
|
The application-pattern benchmark uses Node's in-memory SQLite, prepared statements and an index. Fetching one page of 300 customers and their orders took 301 statements with per-customer lookups and two with batching. Both variants returned equal, ordered results including customers with zero orders. The collection comparisons include the cost of building the lookup Set.
|
|
97
122
|
|
|
@@ -99,7 +124,7 @@ A separate integration check used Python 3.12, the OpenTelemetry SDK and its sql
|
|
|
99
124
|
|
|
100
125
|
Run `npm run bench:patterns` to compare application code. Its output measures the example workload. It makes no prediction about network round-trips, production caches or real database latency.
|
|
101
126
|
|
|
102
|
-
## Live database checks
|
|
127
|
+
## Live database checks (0.2.1 and earlier)
|
|
103
128
|
|
|
104
129
|
| Engine | Measured outcome on isolated test data |
|
|
105
130
|
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -107,4 +132,4 @@ Run `npm run bench:patterns` to compare application code. Its output measures th
|
|
|
107
132
|
| MongoDB 8.2.3 | A collection scan examined 20,000 documents for one match. Indexing reduced that to one. Deep skip walked 15,010 index entries even though top-level documents examined was only ten. The keyset query returned the same documents and passed. A separate sort spilled 79 times and was detected. |
|
|
108
133
|
| Redis 7.2.16 | Python instrumentation captured a real `KEYS` operation. Incremental `SCAN` returned the same fixture key and passed. Eight default-redacted GETs produced a batching finding. Eight reads of a visible synthetic key produced a request-local reuse finding. One GET reused eight times returned the same values and passed. |
|
|
109
134
|
|
|
110
|
-
SQL Server, MySQL, MariaDB, DynamoDB, Cassandra and additional language/driver combinations are covered by contract fixtures
|
|
135
|
+
SQL Server, MySQL, MariaDB, DynamoDB, Cassandra and additional language/driver combinations are covered by contract fixtures only. The live database checks above establish a different level of evidence.
|