{"record":{"id":"92684ea038898a71","repo":"deepseek-ai/deepseek-harness","slug":"typert-loader-ctx-baseurl-is-unset-the-loader-n","errorCode":null,"errorMessage":"typert-loader: ctx.baseUrl is unset — the loader needs the config-tree anchor to resolve plugin packages","messagePattern":"typert-loader: ctx\\.baseUrl is unset — the loader needs the config-tree anchor to resolve plugin packages","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/typert/loader/src/index.ts","lineNumber":290,"sourceCode":"    || !('_zod' in codec.schema)\n    || typeof (codec.schema as { parse?: unknown }).parse !== 'function') {\n    throw new Error(`typert-loader: ${pkgName} ${subject} is not backed by a zod v4 schema`)\n  }\n}\n\n/**\n * Scan current Loader entries during activation, then follow entry mounts and\n * unmounts for this plugin's lifetime.\n * @param ctx - plugin context carrying `typert` and `loader`.\n * @param config - explicit package artifacts in addition to Loader entries.\n */\nexport async function apply(ctx: Context, config: Config): Promise<void> {\n  // Resolution anchor: the config tree's baseUrl (the cordis.yml directory,\n  // whose package declares every composed plugin as a dependency). This\n  // package's own URL would miss sibling packages under pnpm's isolated\n  // node_modules.\n  if (ctx.baseUrl === undefined) {\n    throw new Error('typert-loader: ctx.baseUrl is unset — the loader needs the config-tree anchor to resolve plugin packages')\n  }\n  const require = createRequire(ctx.baseUrl)\n  const configured = new Set((config as ResolvedConfig).packages)\n\n  // Registered contributions by entry name; the disposer withdraws the entry's registration.\n  const registered = new Map<string, () => Promise<void>>()\n  // In-flight import/register tasks by entry name.\n  const pending = new Map<string, Promise<void>>()\n  // Artifact paths by package name. Negative verdicts (unresolvable specifier —\n  // loader builtins, subpath rows — or no typert export) are cached as null and\n  // never expire: plugin-set changes take effect on restart.\n  const artifactPath = new Map<string, string | null>()\n  // Imported+validated manifests by package name (one import per package per process).\n  const manifests = new Map<string, Promise<TypertContribution>>()\n  const dirty = new Set<string>()\n  let flushQueued = false\n  let active = true\n  ctx.effect(function* () {","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/typert/loader/src/index.ts#L272-L308","documentation":"Error \"typert-loader: ctx.baseUrl is unset — the loader needs the config-tree anchor to resolve plugin packages\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/typert/loader/src/index.ts:290 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set ctx.baseUrl by loading the config through the standard cordis loader so the config-tree anchor exists."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}