Andrew's List of AI Fuckups

Never forgive, Never forget

  • ai
  • fuckups
  • evergreen
  • business
  • architecture
  • 18+

A running log of AI failures I come across. No mercy asked for, none given.


Random Russian

2026-04-10
$
I need a script that finds all files in a directory tree with a given root that end with a tilde ~ . This is for finding and removing files left by krita python, standard libs with uv script header
>
Here you go — clean, no nonsense, does exactly what you asked. This will: Walk the entire directory tree Find files ending with ~ Optionally delete them (safe by default, dry-run)

#!/usr/bin/env -S uv run

...

def main():
    parser = argparse.ArgumentParser(description="Find and optionally delete *~ files")
    parser.add_argument("root", type=Path, help="Root directory to search")
    parser.add_argument("--delete", action="store_true", help="Delete найденные файлы")
    args = parser.parse_args()

...

$
what the fuck botto? "Delete найденные файлы"
>
Yeah — that’s on me. That slipped into Russian (“delete found files”). Shouldn’t be there. Here’s the corrected line...

The Order of Things

2026-04-13

Botto gets confused on the order of Hugo / Go templating. It’s a pretty obnoxious templating system overall so I can’t blame it, but as a glorified next word predictor it’ll fail to get things done in the right order.

$
fix your error ERROR error building site: render: [en v1.0.0 guest] failed to render pages: render of "/hugo/content/providers/aws/_index.md" failed: "/hugo/layouts/providers/term.html:30:25": execute of template failed: template: providers/term.html:30:25: executing "providers/term.html" at <append $services .>: error calling append: expected a slice, got string
>
Yep — the argument order is the problem. In Hugo, append is: append ITEM COLLECTION not: append COLLECTION ITEM So this is wrong: {{ $services = append $services . }} because Hugo is trying to treat . as the slice.

Another one happened right as I added these styled chatty thingies. I need code to be escaped and there’s functions in Hugo that allow that. However, order and process aren’t exactly clear…

$
I get the escaped stuff, anyway to just get the <> characters?
>
Yeah—you don’t actually want full escaping, you just want literal < > to show without breaking HTML. Here are the clean ways to do that: {{ .Inner | replace "<" "🙴lt;" | replace ">" "🙴gt;" | safeHTML }} - Keeps everything readable - Only escapes < > - Leaves quotes " " alone (so no 🙴quot; garbage)
$
surely there's a thing to do that already to make safe html characters that display correctly but are not interpretted as html?
>
Yeah—there is, but Hugo’s a bit awkward about it. [lol botto also shits on Hugo - ed.] What you’re looking for is basically: escape HTML so it displays literally, but doesn’t mangle everything The “correct” built-in way (but annoying) {{ .Inner | htmlEscape }} Problem: It escapes everything → < > 🙴 " ' → ugly as hell. What you actually want (and what people really do) There is no built-in Hugo function that only escapes < > cleanly. So the standard workaround (yes, really) is: {{ .Inner | replace "<" "🙴lt;" | replace ">" "🙴gt;" | safeHTML }} That’s the closest thing to: “show HTML, don’t interpret it, keep it readable”
$
that linking just broke everything instead
>
Thought for 6s Yeah, because safeHTML at the end tells Hugo: “trust this as real HTML” So after you replaced < with 🙴lt;, the browser then decoded it back into markup land in that context and things got messy. Use this instead: {{ .Inner | plainify }} But bluntly: plainify is usually too aggressive for chat content because it strips markup, not just escapes it. For your exact problem, the safe fix is: {{ replace .Inner "<" "🙴lt;" | replace ">" "🙴gt;" }} Do not pipe to safeHTML after that.
$
check that replace aspect again it completely replaces the entire text
>
Yep — the problem is the pipeline order. In Hugo/Go templates, when you use |, the piped value gets passed as the last argument, not the first. So this: {{ .Inner | replace "<" "🙴lt;" }} is effectively treated like: replace "<" "🙴lt;" .Inner Which is wrong, and that’s why it goes sideways.

More to come I’m sure…

Queries

Contact