{"chunk_end": 953, "chunk_start": 1, "error": "RuntimeError('Gemini response was not valid JSON: Expecting \\',\\' delimiter: line 12 column 6 (char 927); raw=\\'{\\\\n  \"chunk_summary\": \"The file implements a multi-turn scene extraction pipeline using LLMs, featuring brittle substring-based scenario segmentation and blind mutation of both prompts and generated T2I text.\",\\\\n  \"findings\": [\\\\n    {\\\\n      \"line_start\": 214,\\\\n      \"line_end\": 451,\\\\n      \"category\": \"semantic_string_judgment\",\\\\n      \"severity\": \"P1\",\\\\n      \"evidence\": \"scene_text.find(st), fulltext.find(start_text), if split_text in scene_text\",\\\\n      \"why_problematic\": \"The pipeline relies on LLMs to \\\\\\'exactly copy\\\\\\' snippets from the source scenario (lines 61, 174, 288) to identify split points. Substring matching is brittle to minor LLM hallucinations such as punctuation or spacing changes, leading to failed or shifted scene boundaries.\",\\\\n      \"recommended_fix\": \"Use character offsets or line indices returned by the LLM, or use a fuzzy matcher/anchor-based approach that is resilient to minor text variations.\"\\\\n    },\\\\n    {\\\\n      \"line_start\": 736,\\\\n      \"line_end\": 741,\\\\n      \"category\": \"blind_string_mutation\",\\\\n      \"severity\": \"P1\",\\\\n      \"evidence\": \"_re_cine.sub(r\\\\\\'카메라 구도 선택지:\\'')", "path": "backend/app/modules/pipeline/scene_extractor_v2.py", "scan_kind": "python"}
{"chunk_end": 3657, "chunk_start": 1, "error": "RuntimeError('Gemini response was not valid JSON: Expecting \\',\\' delimiter: line 12 column 6 (char 1186); raw=\\'{\\\\n  \"chunk_summary\": \"The file defines a builder for the RenderPromptCard, which centralizes T2I generation rules; however, it contains several instances of offloading semantic classification to the LLM via brittle phrase lists and scenario-specific demographic bias.\",\\\\n  \"findings\": [\\\\n    {\\\\n      \"line_start\": 1494,\\\\n      \"line_end\": 1663,\\\\n      \"category\": \"blind_string_mutation\",\\\\n      \"severity\": \"P1\",\\\\n      \"evidence\": \"replace the common-noun person reference inside fixed_elements[i].description (e.g. \\\\\\'An Asian man\\\\\\' / \\\\\\'a woman\\\\\\' / \\\\\\'a figure\\\\\\') with the matched C## or C##O##\",\\\\n      \"why_problematic\": \"This establishes a contract for the LLM to perform blind substring replacement on natural-language scenario text (fixed_elements). This is brittle and prone to errors in character identity injection, potentially leading to \\\\\\'phantom\\\\\\' figures if the replacement is incomplete or contextually incorrect.\",\\\\n      \"recommended_fix\": \"Instead of instructing the LLM to perform string replacement, provide the fixed_elements and the ID mapping as separate structured context and ask the LLM to generate the prompt using the IDs directly, or use a structured template system.\"\\\\n    },\\\\n    {\\\\n      \"line_start\": 582,\\\\n      \"line_end\": 1191,\\\\n\\'')", "path": "backend/app/core/steps/render_prompt_card.py", "scan_kind": "python"}
