{"record":{"id":"5affff03454d59ee","repo":"iflytek/astron-agent","slug":"assistant-backend-data-does-not-conform-to-specifications","errorCode":null,"errorMessage":"Assistant backend data does not conform to specifications","messagePattern":"Assistant backend data does not conform to specifications","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/workflow/impl/BotChainServiceImpl.java","lineNumber":141,"sourceCode":"        botMap.setOpen(openStr);\n        botMap.setGcy(gcyStr);\n    }\n\n    /**\n     * Get new node ID\n     *\n     * @param original Original node ID string\n     * @return New node ID string, if the original string contains a colon, add a random UUID after the\n     *         colon, otherwise throw an exception\n     */\n    public static String getNewNodeId(String original) {\n        int colonIndex = original.indexOf(':');\n        if (colonIndex != -1) {\n            return original.substring(0, colonIndex + 1) + UUID.randomUUID();\n        }\n        // If no colon is found, return the original string\n        log.info(\"***** {} no colon found\", original);\n        throw new RuntimeException(\"Assistant backend data does not conform to specifications\");\n    }\n}\n","sourceCodeStart":123,"sourceCodeEnd":144,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/workflow/impl/BotChainServiceImpl.java#L123-L144","documentation":"Thrown by BotChainServiceImpl.getNewNodeId when regenerating a node ID during workflow cloning (replaceNodeId) and the original node id string contains no ':' separator. The method expects ids of the form '<prefix>:<suffix>' and rewrites the suffix with a UUID; a colon-less id means the stored canvas JSON (open/gcy fields) does not match the expected backend schema.","triggerScenarios":"Cloning/duplicating a bot whose workflow canvas JSON contains legacy or hand-edited node ids without the '<prefix>:' prefix; imported/exported workflow templates produced by a different tool version; upstream MaaS data whose node id format changed between versions.","commonSituations":"Older workflows created before the id-format convention was introduced; workflows imported via exported templates that bypassed server-side id generation; manual DB edits of the open/gcy JSON columns; a MaaS upgrade that changed node id generation.","solutions":["Find the offending node id in the log line '***** {id} no colon found' and inspect the bot's open/gcy JSON to locate the malformed node.","Migrate the legacy node id to the '<prefix>:<uuid>' format (or add a tolerant branch that generates a fresh prefixed id instead of throwing).","If caused by an import/export path, regenerate node ids server-side after import so all ids conform before replaceNodeId runs.","Pin the workflow schema version and reject/repair templates whose node ids lack the separator at import time.","Add a data-migration script for existing rows whose canvas JSON contains colon-less node ids."],"exampleFix":"// before\npublic static String getNewNodeId(String original) {\n    int colonIndex = original.indexOf(':');\n    if (colonIndex != -1) {\n        return original.substring(0, colonIndex + 1) + UUID.randomUUID();\n    }\n    log.info(\"***** {} no colon found\", original);\n    throw new RuntimeException(\"Assistant backend data does not conform to specifications\");\n}\n// after\npublic static String getNewNodeId(String original) {\n    int colonIndex = original.indexOf(':');\n    if (colonIndex != -1) {\n        return original.substring(0, colonIndex + 1) + UUID.randomUUID();\n    }\n    // legacy ids without prefix: mint a fresh prefixed id instead of failing the clone\n    log.warn(\"Node id has no colon prefix, generating new id: {}\", original);\n    return \"node:\" + UUID.randomUUID();\n}","handlingStrategy":"validation","validationCode":"// before cloning/importing a workflow, validate node ids in the canvas JSON\nJSONArray nodes = JSONObject.parseObject(botMap.getOpen()).getJSONArray(\"nodes\");\nfor (Object o : nodes) {\n    String id = ((JSONObject) o).getString(\"id\");\n    if (id == null || !id.contains(\":\")) {\n        throw new IllegalArgumentException(\"Node id missing '<prefix>:' separator: \" + id);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    BotChainServiceImpl.replaceNodeId(botMap);\n} catch (RuntimeException e) {\n    if (e.getMessage().contains(\"does not conform to specifications\")) {\n        // a node id lacked the colon prefix: inspect 'no colon found' logs,\n        // repair/migrate the canvas JSON, then retry the clone\n    }\n}","preventionTips":["Validate node id format ('<prefix>:<suffix>') at workflow import and save time, not only at clone time.","Run a one-time migration over stored open/gcy JSON to normalize legacy colon-less ids.","Reject exported templates whose canvas JSON doesn't match the server schema at upload.","Never hand-edit open/gcy JSON columns directly in the DB.","Watch the 'no colon found' log as a canary for schema drift from upstream MaaS."],"tags":["workflow","node-id","data-format","canvas-json"],"backgroundTag":"invalid-identifier-format","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}