{"record":{"id":"f576f6527682fdd5","repo":"ruvnet/ruflo","slug":"witness-audit-error-for-deviceid-error-messa","errorCode":null,"errorMessage":"Witness audit error for ${deviceId}: ${error.message}","messagePattern":"Witness audit error for (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugin-iot-cognitum/src/plugin.ts","lineNumber":138,"sourceCode":"      onVersionMismatch: (deviceId, expected, actual) => {\n        context.logger.warn(`Firmware mismatch on ${deviceId}: expected ${expected}, got ${actual}`);\n        context.eventBus.emit('iot:firmware-mismatch', { deviceId, expected, actual });\n      },\n      onWatchError: (deviceId, error) => {\n        context.logger.warn(`Firmware watch error for ${deviceId}: ${error.message}`);\n      },\n    });\n    this.firmwareWatch.start();\n\n    const witnessAuditIntervalMs = (config['witnessAuditIntervalMs'] as number) ?? 600_000;\n    this.witnessAudit = new WitnessAuditWorker(this.coordinator, {\n      intervalMs: witnessAuditIntervalMs,\n      onGapDetected: (deviceId, fromEpoch, toEpoch) => {\n        context.logger.warn(`Witness chain gap on ${deviceId}: epoch ${fromEpoch} → ${toEpoch}`);\n        context.eventBus.emit('iot:witness-gap', { deviceId, fromEpoch, toEpoch });\n      },\n      onAuditError: (deviceId, error) => {\n        context.logger.warn(`Witness audit error for ${deviceId}: ${error.message}`);\n      },\n    });\n    this.witnessAudit.start();\n\n    context.logger.info('IoT Cognitum plugin initialized');\n  }\n\n  async shutdown(): Promise<void> {\n    if (this.witnessAudit) {\n      this.witnessAudit.stop();\n      this.witnessAudit = null;\n    }\n    if (this.firmwareWatch) {\n      this.firmwareWatch.stop();\n      this.firmwareWatch = null;\n    }\n    if (this.meshSync) {\n      this.meshSync.stop();","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugin-iot-cognitum/src/plugin.ts#L120-L156","documentation":"Log warning wired as an audit-callback error in the IoT plugin's initialize: the witness audit worker failed auditing a device; that audit round is skipped without stopping the periodic worker.","triggerScenarios":"Thrown at v3/@claude-flow/plugin-iot-cognitum/src/plugin.ts:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the witness audit error detail; ensure the witness chain store is readable for the device."],"exampleFix":null,"handlingStrategy":"try-catch","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-14T00:17:10.932Z"}