{"record":{"id":"686299d622bcd1c2","repo":"TencentCloud/TencentDB-Agent-Memory","slug":"module-mod-module-param-param-param-name","errorCode":null,"errorMessage":"Module '${mod.module}', param '${param.param_name}': param_value is required","messagePattern":"Module '(.+?)', param '(.+?)': param_value is required","errorType":"validation","errorClass":"ParamRegistryError","httpStatus":null,"severity":"error","filePath":"MemoryCore/src/metadata/config/param-registry.ts","lineNumber":123,"sourceCode":"      if (!param.param_name || typeof param.param_name !== \"string\") {\n        throw new ParamRegistryError(\n          `Module '${mod.module}': each param must have a 'param_name' string`,\n        );\n      }\n      if (!PARAM_NAME_RE.test(param.param_name)) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}': invalid param_name '${param.param_name}': must match ${PARAM_NAME_RE}`,\n        );\n      }\n      if (seenParams.has(param.param_name)) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}': duplicate param_name '${param.param_name}'`,\n        );\n      }\n      seenParams.add(param.param_name);\n\n      if (param.param_value === undefined || param.param_value === null) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}', param '${param.param_name}': param_value is required`,\n        );\n      }\n      if (!param.description) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}', param '${param.param_name}': description is required`,\n        );\n      }\n      if (\n        !Array.isArray(param.allowed_scopes) ||\n        param.allowed_scopes.length === 0\n      ) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}', param '${param.param_name}': allowed_scopes must be non-empty array`,\n        );\n      }\n      for (const scope of param.allowed_scopes) {\n        if (scope !== \"global\" && scope !== \"user\") {","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/3efcd317b84146d6a08518ac0f7ee7c8a8d200ec/MemoryCore/src/metadata/config/param-registry.ts#L105-L141","documentation":"Every param must have an actual value: buildRegistry throws this when param.param_value is undefined or null. The registry exists to hold concrete parameter values, so a param without one is invalid and blocks loading.","triggerScenarios":"A param entry in data.modules[i].params has no param_value field, or it is explicitly null/undefined, when loadParamRegistry builds the registry.","commonSituations":"Templates left with \"param_value\": null pending a real value; scripts that emit the key but skip values; YAML/JSON converted where empty values become null.","solutions":["Set a concrete param_value appropriate for the parameter's type","Remove the param entry if it has no value yet","Fix the generator/converter so it emits real values instead of null","Pre-load validate that every param has param_value !== undefined && !== null"],"exampleFix":"// before\n{ \"param_name\": \"max_entries\", \"param_value\": null, ... }\n// after\n{ \"param_name\": \"max_entries\", \"param_value\": 1000, ... }","handlingStrategy":"validation","validationCode":"for (const m of data.modules) {\n  for (const p of m.params ?? []) {\n    if (p.param_value === undefined || p.param_value === null) {\n      throw new Error(`${m.module}.${p.param_name} has no param_value`);\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  const registry = await loadParamRegistry();\n} catch (e) {\n  if (e instanceof ParamRegistryError && e.message.includes('param_value is required')) {\n    console.error('Set a concrete value for the named param:', e.message);\n  } else throw e;\n}","preventionTips":["Never ship templates with param_value: null; fill values before commit","Make generators emit defaults for param_value","Validate value presence in CI before loading the registry"],"tags":["configuration","validation","missing-field"],"backgroundTag":"missing-required-argument","analyzedSha":"3efcd317b84146d6a08518ac0f7ee7c8a8d200ec","analyzedAt":"2026-09-01T05:44:22.276Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}