Project · experiment #01
Sleep Debt
My AI code reviewer gets meaner the less I sleep: my sleep debt becomes review debt. Drag the slider to see how it would review the same file after different nights.
Mutable default that mutates itself, dict mutation during iteration, identity comparison on strings, an off-by-one that blocks exact redemptions, and a bare except that turns a corrupt ledger into an empty one. I'd like to go back to bed. Fix these first.
reviewed under 5.5h of sleep · mood: senior dev who got paged at 3am
- nit
mathis imported and never used, like my alarm's snooze limit. Remove it. - criticalMutable default
bonus_tiers=[], and line 12 appends to it, so tiers pile up across calls like unread wake-up notifications. Usebonus_tiers=None. - major
is "gold"checks identity, not equality. It only works when string interning happens to cooperate, which is about as reliable as my REM cycle. Use==. - minor
/ 4 * 0.25is two unexplained constants counted like sheep, and floats for currency. Name the conversion rate and useDecimal.
These are real reviews the bot wrote on the same file, one run per persona, trimmed to four comments each. Didn't log sleep? HR opens an investigation.
How it works
- 01
I log my sleep
Every morning I read the hours off my Amazfit and log them with one command. It saves locally and pushes the number to the repo as a GitHub variable.
- 02
Sleep picks the reviewer
Under 5h it's my dad, 5–6h a senior who got paged at 3am, then a tech lead, then a supportive mentor. Commit after midnight and it gets one level harsher, because research says those commits have the most bugs.
- 03
Claude reviews in character
A GitHub Action sends the diff to Claude with the persona. It has to find real bugs and nitpicks, blame them on my sleep, and never invent facts. Then it requests changes on the PR.