{"record":{"id":"f08aa2ea2056bb9b","repo":"BigPizzaV3/CodexPlusPlus","slug":"dream-skin-target-art-should-serialize","errorCode":null,"errorMessage":"dream skin target art should serialize","messagePattern":"dream skin target art should serialize","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/assets.rs","lineNumber":172,"sourceCode":"            &serde_json::to_string(\"1.2.0\").unwrap(),\n        )\n        .replace(\n            \"__DREAM_SKIN_STYLE_REVISION_JSON__\",\n            &serde_json::to_string(&style_revision).unwrap(),\n        )\n        .replace(\n            \"__DREAM_SKIN_PAYLOAD_REVISION_JSON__\",\n            &serde_json::to_string(&payload_revision).unwrap(),\n        );\n    if payload.contains(\"__DREAM_\") || payload.contains(\"__GLASS_VISION_\") {\n        panic!(\"dream skin target renderer contains unresolved placeholders\");\n    }\n\n    let art_assignment = include_art.then(|| {\n        format!(\n            \"window.__CODEX_PLUS_DREAM_SKIN_ART__ = {};\\n\",\n            serde_json::to_string(&dream_skin_art_data_uri(settings))\n                .expect(\"dream skin target art should serialize\")\n        )\n    });\n    let skin_api_bootstrap = dream_skin_skin_api_bootstrap_script(&theme);\n    payload = format!(\n        \"(() => {{\\nwindow.__CODEX_PLUS_EXTERNAL_DREAM_SKIN_RUNTIME__ = true;\\nwindow.__CODEX_PLUS_CLEAR_DREAM_SKIN__?.();\\n{}window.__CODEX_PLUS_DREAM_SKIN_ART_SIGNATURE__ = {};\\nwindow.__CODEX_PLUS_DREAM_SKIN_THEME__ = {};\\nwindow.__CODEX_PLUS_DREAM_SKIN_RUNTIME_REVISION__ = {};\\nwindow.__CODEX_PLUS_DREAM_SKIN_TARGET_ENGINE__ = {};\\n{}const result = {};\\nconst state = window.__CODEX_DREAM_SKIN_STATE__ || window.__CODEX_GLASS_VISION_SKIN_STATE__;\\nif (state) {{\\n  state.version = `codex-plus:${{String(window.__CODEX_PLUS_DREAM_SKIN_PLATFORM__ || 'unknown')}}:${{window.__CODEX_PLUS_DREAM_SKIN_TARGET_ENGINE__}}:r${{window.__CODEX_PLUS_DREAM_SKIN_RUNTIME_REVISION__}}`;\\n  state.observer?.disconnect?.();\\n  if (state.timer) clearInterval(state.timer);\\n  state.observer = null;\\n  state.timer = null;\\n}}\\nwindow.__CODEX_PLUS_DREAM_SKIN_PAYLOAD_SIGNATURE__ = {};\\nreturn result;\\n}})()\",\n        art_assignment.unwrap_or_default(),\n        serde_json::to_string(&dream_skin_art_content_signature(settings)).unwrap(),\n        theme,\n        serde_json::to_string(DREAM_SKIN_RENDERER_REVISION).unwrap(),\n        serde_json::to_string(engine).unwrap(),\n        skin_api_bootstrap,\n        payload,\n        serde_json::to_string(&payload_revision).unwrap(),\n    );\n    payload\n}\n\nfn managed_dream_skin_css(settings: &BackendSettings) -> String {","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/assets.rs#L154-L190","documentation":"dream_skin_target_runtime_script serializes the dream skin art assignment to embed into the injected runtime script, and this expect-style error fires if serde_json::to_string fails. Serializing internal art data should never fail, so the error signals an internal invariant violation (e.g. a non-string map key in art config), not user error.","triggerScenarios":"Thrown at crates/codex-plus-core/src/assets.rs:172 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the art payload for non-string JSON map keys","Check recent changes to dream skin art data structures","Report as a bug; this path is expected to be infallible"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}