Question
Implement a constant-time string equality check used to compare secrets (tokens, MACs) without leaking timing. Given two strings `a` and `b`, return True if they are equal. Your comparison must not short-circuit on the first differing character; if the lengths differ you may return False immediately (length is not secret here). Do not use Python's built-in `==`, `hmac`, or `secrets` comparison helpers.
constant_time_equal(a: str, b: str) → bool["abc","abc"]outtrueState your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.