{"record":{"id":"6df8ad946346e872","repo":"affaan-m/ECC","slug":"no-trusted-boundary-policy-is-configured-for-memor","errorCode":null,"errorMessage":"No trusted boundary policy is configured for memory scope \"${scope}\".","messagePattern":"No trusted boundary policy is configured for memory scope \"(.+?)\"\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/memory-vault.js","lineNumber":107,"sourceCode":"    }),\n    enumerable: false,\n    configurable: false,\n    writable: false,\n  });\n  return Object.freeze(roots);\n}\n\nfunction assertMemoryRootSafe(roots, scope) {\n  if (!roots || typeof roots !== 'object' || Array.isArray(roots)) {\n    throw new Error('Memory roots must include a trusted boundary policy.');\n  }\n  const root = roots[scope];\n  if (typeof root !== 'string' || root.length === 0) {\n    throw new Error(`No memory root is configured for scope \"${scope}\".`);\n  }\n  const boundary = roots[VAULT_ROOT_BOUNDARIES]?.[scope];\n  if (typeof boundary !== 'string' || boundary.length === 0) {\n    throw new Error(`No trusted boundary policy is configured for memory scope \"${scope}\".`);\n  }\n  assertWithinTrustedRoot(root, boundary, 'access memory through a symlink');\n  if (fs.existsSync(root) && fs.lstatSync(root).isSymbolicLink()) {\n    throw new Error(`Refusing to access memory through symlink root: ${root}`);\n  }\n  return root;\n}\n\nfunction assertMemoryDirectorySafe(directory, root) {\n  assertWithinTrustedRoot(directory, root, 'access memory directory');\n  if (fs.existsSync(directory) && fs.lstatSync(directory).isSymbolicLink()) {\n    throw new Error(`Refusing to access memory through symlink directory: ${directory}`);\n  }\n  return directory;\n}\n\nfunction sameFileIdentity(left, right) {\n  // The inode is the primary identity signal and must always match.","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/memory-vault.js#L89-L125","documentation":"assertMemoryRootSafe throws when the non-enumerable trusted boundary path for the requested scope is missing or empty. This internal metadata is required to confine all memory I/O within a trusted root; the faulting input is the boundary entry for `scope`, normally attached only by the internal root factory.","triggerScenarios":"Thrown at scripts/lib/memory-vault.js:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the module's root-creation API so boundaries are attached; do not hand-assemble roots.","Avoid spreading/cloning the roots object, which strips non-enumerable properties.","Ensure the memory-vault module initialization completed before use."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}