diff --git a/benchmarks/data.js b/benchmarks/data.js index 9cdbb20..775a143 100644 --- a/benchmarks/data.js +++ b/benchmarks/data.js @@ -1,39 +1,8 @@ window.BENCHMARK_DATA = { - "lastUpdate": 1764000493591, + "lastUpdate": 1764006913419, "repoUrl": "https://github.com/czlonkowski/n8n-mcp", "entries": { "n8n-mcp Benchmarks": [ - { - "commit": { - "author": { - "email": "56956555+czlonkowski@users.noreply.github.com", - "name": "Romuald Członkowski", - "username": "czlonkowski" - }, - "committer": { - "email": "noreply@github.com", - "name": "GitHub", - "username": "web-flow" - }, - "distinct": true, - "id": "318986f5468cca51f6b0851f98b86da672bbe810", - "message": "🚨 HOTFIX v2.19.2: Fix critical session cleanup stack overflow (#316)\n\n* fix: Fix critical session cleanup stack overflow bug (v2.19.2)\n\nThis commit fixes a critical P0 bug that caused stack overflow during\ncontainer restart, making the service unusable for all users with\nsession persistence enabled.\n\nRoot Causes:\n1. Missing await in cleanupExpiredSessions() line 206 caused\n overlapping async cleanup attempts\n2. Transport event handlers (onclose, onerror) triggered recursive\n cleanup during shutdown\n3. No recursion guard to prevent concurrent cleanup of same session\n\nFixes Applied:\n- Added cleanupInProgress Set recursion guard\n- Added isShuttingDown flag to prevent recursive event handlers\n- Implemented safeCloseTransport() with timeout protection (3s)\n- Updated removeSession() with recursion guard and safe close\n- Fixed cleanupExpiredSessions() to properly await with error isolation\n- Updated all transport event handlers to check shutdown flag\n- Enhanced shutdown() method for proper sequential cleanup\n\nImpact:\n- Service now survives container restarts without stack overflow\n- No more hanging requests after restart\n- Individual session cleanup failures don't cascade\n- All 77 session lifecycle tests passing\n\nVersion: 2.19.2\nSeverity: CRITICAL\nPriority: P0\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude \n\n* chore: Bump package.runtime.json to v2.19.2\n\n* test: Fix transport cleanup test to work with safeCloseTransport\n\nThe test was manually triggering mockTransport.onclose() to simulate\ncleanup, but our stack overflow fix sets transport.onclose = undefined\nin safeCloseTransport() before closing.\n\nUpdated the test to call removeSession() directly instead of manually\ntriggering the onclose handler. This properly tests the cleanup behavior\nwith the new recursion-safe approach.\n\nChanges:\n- Call removeSession() directly to test cleanup\n- Verify transport.close() is called\n- Verify onclose and onerror handlers are cleared\n- Verify all session data structures are cleaned up\n\nTest Results: All 115 session tests passing ✅\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude \n\n---------\n\nCo-authored-by: Claude ", - "timestamp": "2025-10-13T11:54:18+02:00", - "tree_id": "cfc4c528ea123da4a891f3b9ef54f4c219aafa57", - "url": "https://github.com/czlonkowski/n8n-mcp/commit/318986f5468cca51f6b0851f98b86da672bbe810" - }, - "date": 1760349356727, - "tool": "customSmallerIsBetter", - "benches": [ - { - "name": "sample - array sorting - small", - "value": 0.0136, - "range": "0.3096", - "unit": "ms", - "extra": "73341 ops/sec" - } - ] - }, { "commit": { "author": { @@ -1552,6 +1521,37 @@ window.BENCHMARK_DATA = { "extra": "73341 ops/sec" } ] + }, + { + "commit": { + "author": { + "email": "56956555+czlonkowski@users.noreply.github.com", + "name": "Romuald Członkowski", + "username": "czlonkowski" + }, + "committer": { + "email": "noreply@github.com", + "name": "GitHub", + "username": "web-flow" + }, + "distinct": true, + "id": "05424f66af655c36deeb78e0cfceb5cbc9a9fd7f", + "message": "feat: Session Persistence API for Zero-Downtime Deployments (v2.24.1) (#438)\n\n* feat: Add session persistence API for zero-downtime deployments (v2.24.1)\n\nImplements export/restore functionality for MCP sessions to support container\nrestarts without losing user sessions. This enables zero-downtime deployments\nfor multi-tenant platforms and Kubernetes/Docker environments.\n\nNew Features:\n- exportSessionState() - Export active sessions to JSON\n- restoreSessionState() - Restore sessions from exported data\n- SessionState type - Serializable session structure\n- Comprehensive test suite (22 tests, 100% passing)\n\nImplementation Details:\n- Only exports sessions with valid n8nApiUrl and n8nApiKey\n- Automatically filters expired sessions (respects sessionTimeout)\n- Validates context structure using existing validation\n- Handles null/invalid sessions gracefully with warnings\n- Enforces MAX_SESSIONS limit during restore (100 sessions)\n- Dormant sessions recreate transport/server on first request\n\nFiles Modified:\n- src/http-server-single-session.ts: Core export/restore logic\n- src/mcp-engine.ts: Public API wrapper methods\n- src/types/session-state.ts: Type definitions\n- tests/: Comprehensive unit tests\n\nSecurity Note:\nSession data contains plaintext n8n API keys. Downstream applications\nMUST encrypt session data before persisting to disk.\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude \n\nConceived by Romuald Członkowski - https://www.aiadvisors.pl/en\n\n* feat: implement 7 critical session persistence API fixes for production readiness\n\nThis commit implements all 7 critical fixes identified in the code review\nto make the session persistence API production-ready for zero-downtime\ncontainer deployments in multi-tenant environments.\n\nFixes implemented:\n1. Made instanceId optional in SessionState interface\n2. Removed redundant validation, properly using validateInstanceContext()\n3. Fixed race condition in MAX_SESSIONS check using real-time count\n4. Added comprehensive security logging with logSecurityEvent() helper\n5. Added duplicate session ID detection during export with Set tracking\n6. Added date parsing validation with isNaN checks for Invalid Date objects\n7. Restructured null checks for proper TypeScript type narrowing\n\nChanges:\n- src/types/session-state.ts: Made instanceId optional\n- src/http-server-single-session.ts: Implemented all validation and security fixes\n- tests/unit/http-server/session-persistence.test.ts: Fixed MAX_SESSIONS test\n\nAll 13 session persistence unit tests passing.\nAll 9 MCP engine session persistence tests passing.\n\nConceived by Romuald Członkowski - https://www.aiadvisors.pl/en\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude \n\n---------\n\nCo-authored-by: Claude ", + "timestamp": "2025-11-24T18:53:26+01:00", + "tree_id": "d6d24a33a7a1e3bc94294f00557b9f8bc2dd6d70", + "url": "https://github.com/czlonkowski/n8n-mcp/commit/05424f66af655c36deeb78e0cfceb5cbc9a9fd7f" + }, + "date": 1764006913151, + "tool": "customSmallerIsBetter", + "benches": [ + { + "name": "sample - array sorting - small", + "value": 0.0136, + "range": "0.3096", + "unit": "ms", + "extra": "73341 ops/sec" + } + ] } ] }