{"record":{"id":"01ee6618ed9f4b1c","repo":"affaan-m/ECC","slug":"invalid-installstate-identity-targetroot-must-be","errorCode":null,"errorMessage":"Invalid installState identity: targetRoot must be a non-empty string","messagePattern":"Invalid installState identity: targetRoot must be a non-empty string","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/state-store/queries.js","lineNumber":362,"sourceCode":"      ? []\n      : installState.operations,\n    installedAt: installState.installedAt || new Date().toISOString(),\n    sourceVersion: installState.sourceVersion ?? null,\n  };\n}\n\nfunction normalizeInstallStateIdentity(identity) {\n  if (!identity || typeof identity !== 'object') {\n    throw new Error('Invalid installState identity: expected targetId and targetRoot');\n  }\n\n  const targetId = identity.targetId;\n  const targetRoot = identity.targetRoot;\n  if (typeof targetId !== 'string' || targetId.length === 0) {\n    throw new Error('Invalid installState identity: targetId must be a non-empty string');\n  }\n  if (typeof targetRoot !== 'string' || targetRoot.length === 0) {\n    throw new Error('Invalid installState identity: targetRoot must be a non-empty string');\n  }\n\n  return { targetId, targetRoot };\n}\n\nfunction normalizeGovernanceEventInput(governanceEvent) {\n  return {\n    id: governanceEvent.id,\n    sessionId: governanceEvent.sessionId ?? null,\n    eventType: governanceEvent.eventType,\n    payload: governanceEvent.payload ?? null,\n    resolvedAt: governanceEvent.resolvedAt ?? null,\n    resolution: governanceEvent.resolution ?? null,\n    createdAt: governanceEvent.createdAt || new Date().toISOString(),\n  };\n}\n\nfunction normalizeWorkItemInput(workItem) {","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/lib/state-store/queries.js#L344-L380","documentation":"Generic guard inside normalizeInstallStateIdentity: identity.targetRoot exists but is not a non-empty string. targetRoot locates the installation on disk and must be a real path string.","triggerScenarios":"Thrown at scripts/lib/state-store/queries.js:362 when the library encounters an invalid state.","commonSituations":"Raised when input validation fails because: Invalid installState identity: targetRoot must be a non-empty string. Typically caused by a missing, malformed, or out-of-range argument or configuration value.","solutions":["Provide a value that satisfies the validation: Invalid installState identity: targetRoot must be a non-empty string","Check the calling command or configuration for the reported field and correct it, then retry.","Run the command with --help to review the expected input shape and allowed values."],"exampleFix":"Correct the invalid input so that the following holds: Invalid installState identity: targetRoot must be a non-empty string","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}