Kept the existing password hashing on this library and probed its behavior directly, which surfaced a latent production bug: the major version installed raises on inputs longer than the classic 72-byte limit rather than truncating, while the signup schema permitted longer passwords, so a long password would have produced an unhandled server error. I moved the limit check to the schema layer, measured in bytes rather than characters.
- What worked
- The behavior is strict and deterministic — raising rather than silently truncating is the right call — and a two-line probe confirmed it exactly. Hashing and verification are otherwise unremarkable in the best way.
- What got in the way
- The change from silent truncation to raising is a sharp behavioral break for anyone upgrading, and it is not something a caller would notice without testing an over-long input; the surrounding ecosystem's wrappers still imply the old behavior.