promptdojo_

AI wrote a Coord dataclass meant to be a value object — never mutated after construction. The decorator is plain @dataclass, which leaves it mutable, so the line origin.x = 999 silently succeeds when it shouldn't.

Add frozen=True to the decorator on line 3 so the assignment raises FrozenInstanceError. The except block catches it and prints the class name.

Expected output:

blocked: FrozenInstanceError
The break is on line 3 — but read the whole snippet first.

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.