{"record":{"id":"83e28102b9e06e65","repo":"deepseek-ai/deepseek-harness","slug":"styles-insert-css-needs-a-css-string","errorCode":null,"errorMessage":"styles.insert(css) needs a CSS string","messagePattern":"styles\\.insert\\(css\\) needs a CSS string","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-client-runner/src/client/evaluator.ts","lineNumber":90,"sourceCode":"      )\n    },\n  })\n}\n\n/** Per-package style-tag bookkeeping behind the `styles.insert` symbol. */\nexport class DynamicCordisStyles {\n  private readonly tags = new Set<HTMLStyleElement>()\n\n  /** @param pluginId - owning Plugin ID, stamped as `data-dyn` on every tag. */\n  constructor(private readonly pluginId: CordisDynamicPluginId) {}\n\n  /**\n   * Inject one stylesheet, removed automatically on package unload.\n   * @param css - raw CSS text.\n   * @returns disposer removing this one tag early.\n   */\n  insert(css: string): () => void {\n    if (typeof css !== 'string') throw new Error('styles.insert(css) needs a CSS string')\n    const tag = document.createElement('style')\n    tag.dataset.dyn = this.pluginId\n    tag.textContent = css\n    document.head.append(tag)\n    this.tags.add(tag)\n    return () => {\n      this.tags.delete(tag)\n      tag.remove()\n    }\n  }\n\n  /** Live tag count (load-report contribution summary). */\n  get count(): number {\n    return this.tags.size\n  }\n\n  /** Remove every tag this package still owns (unload path). */\n  dispose(): void {","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-client-runner/src/client/evaluator.ts#L72-L108","documentation":"Error \"styles.insert(css) needs a CSS string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}