{"record":{"id":"08595ea22dc35e02","repo":"ruvnet/ruflo","slug":"resource-limits-exceeded-check-violations-join","errorCode":null,"errorMessage":"Resource limits exceeded: ${check.violations.join(', ')}","messagePattern":"Resource limits exceeded: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugins/src/security/index.ts","lineNumber":541,"sourceCode":"    check(): { ok: boolean; violations: string[] } {\n      const violations: string[] = [];\n      const memUsage = process.memoryUsage();\n      const memMB = memUsage.heapUsed / 1024 / 1024;\n\n      if (memMB > config.maxMemoryMB) {\n        violations.push(`Memory usage ${memMB.toFixed(1)}MB exceeds limit ${config.maxMemoryMB}MB`);\n      }\n\n      return {\n        ok: violations.length === 0,\n        violations,\n      };\n    },\n\n    async enforce<T>(fn: () => Promise<T>): Promise<T> {\n      const check = this.check();\n      if (!check.ok) {\n        throw new Error(`Resource limits exceeded: ${check.violations.join(', ')}`);\n      }\n\n      return Promise.race([\n        fn(),\n        new Promise<never>((_, reject) =>\n          setTimeout(() => reject(new Error('Execution time limit exceeded')), config.maxExecutionTime)\n        ),\n      ]);\n    },\n  };\n}\n\n// ============================================================================\n// Export All\n// ============================================================================\n\nexport const Security = {\n  // Validation","sourceCodeStart":523,"sourceCodeEnd":559,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugins/src/security/index.ts#L523-L559","documentation":"ResourceMonitor.enforce checked process.memoryUsage() before running the wrapped function and found heap usage above the configured maxMemoryMB. The violations list names the exceeded limit(s); the operation is aborted up front rather than executing under memory pressure.","triggerScenarios":"A plugin operation exceeds one or more configured resource limits (memory, time, size, etc.).","commonSituations":"Heavy plugin workload hitting sandbox caps, or limits configured too tightly.","solutions":["Reduce the plugin's resource usage (batch work, stream large data).","Raise the relevant resource limits in the security configuration if the workload is legitimate.","Inspect check.violations to identify which specific limit was hit."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}