Back to All Posts

#authorization

tuckerl.ee

Building thoughtful software with AI.Notes from the systems behind the work.

Also new

article

Device limit counts first and saves later, and the test never sends two at once

The licensing code I shipped checks how many devices a key already has, then inserts the new one in a separate step, so two activations racing for the last slot can both get in. The test activates devices one at a time and can't see it, a device racing itself gets a server error, and a key-only check passes for keys never bound anywhere. I found this by reading, not by running anything concurrent.

article

Billing mirror deleted, seat cap left with three opinions

Swapping a local copy of billing state for plan entitlements in the session was the right call, but it left the free-tier seat cap answered by three pieces of code that disagree, a random retry key on customer creation, signup that now depends on the payment provider, and billing endpoints that trust whatever organization the request names.

Workspace creation waited for a later webhook so invited people wouldn't get a spare one, and self-serve people could log in before it fired. Now the creation handler asks the identity provider for memberships on the spot, a later event repairs misses, and the session lookup retries, but the comment that justifies it contradicts the one it replaced and nothing tests which is right.