Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
## 2026-09-23 - Independent Connection Pools for Fire-and-Forget
**Learning:** When attempting to make database updates non-blocking (fire-and-forget) to fix "Write on Read" bottlenecks, reusing the main request's database connection is unsafe. The surrounding code will often close or return the connection to the pool while the async background task is still running, leading to race conditions and "Connection closed" errors.
**Action:** When implementing fire-and-forget updates in services, explicitly acquire a new background connection (`initPool().then(pool => pool.getConnection())`), capture synchronous context (like `tenantId`) to prevent async state loss, and handle errors/cleanup in a standalone promise chain that ends with `.finally(() => bgConn.close())`.
## 2024-05-23 - Optimizing Lookup Arrays in Scanners
**Learning:** Arrays used inside hot loops (like exact string match arrays using `.includes()` in `securityScanner.ts`) can become performance bottlenecks as `.includes()` has O(N) complexity and `array.some(v => array.includes(v))` operates at O(N*M). Converting the array to a `Set` makes lookups O(1). Additionally, dynamically defining static arrays inside functions causes them to be reallocated on every single call.
**Action:** Always hoist static arrays and convert exact-match arrays to `Set`s when optimizing frequently-called scanner functions.
3 changes: 3 additions & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"tailwind-merge": "^2.3.0",
"three": "^0.185.1"
},
"overrides": {
"@grpc/grpc-js": "1.14.5"
},
"devDependencies": {
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^7.0.1",
Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@
},
"overrides": {
"uuid": "11.1.1",
"fast-uri": ">=3.1.6"
"fast-uri": ">=3.1.6",
"@grpc/grpc-js": "1.14.5",
"brace-expansion": "2.1.6",
"proxy-addr": "2.0.8",
"compression": "1.8.2",
"@modelcontextprotocol/sdk": "1.31.0"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.11",
Expand All @@ -65,11 +70,11 @@
"typescript": "^7.0.2"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.1",
"@modelcontextprotocol/sdk": "1.31.0",
"@types/compression": "^1.8.1",
"@typescript-eslint/typescript-estree": "^8.0.0",
"chokidar": "^5.0.0",
"compression": "^1.8.1",
"compression": "1.8.2",
"cors": "2.8.5",
"dotenv": "^17.4.2",
"express": "^4.19.2",
Expand Down
Loading
Loading