Weekly Update: branch-janitor Infrastructure Complete + Web Fixes
What Got Done
This week saw three core tasks land for branch-janitor:
Evidence Collector (TASK-063)
Pure function collectEvidence(repoRoot) with zero side effects. Collects branch state — ahead/behind, age, upstream, worktree, PRs — and trash evidence for zz-trash/ namespace branches.
10 test cases covering all major scenarios.
Append-Only Ledger (TASK-064)
JSONL-based audit log with:
append()— atomic append with dir auto-createreadRecent()— streaming backward read, no full file loadhasRecentDecision()— time-windowed branch+action dedup
12 test cases, handles corrupted lines gracefully.
Claude Runner (TASK-065)
runJanitor() spawns claude -p, pipes EvidencePack via stdin, parses JSON output into JanitorReport.
7 test cases covering mock scenarios, timeouts, exit code failures, and parse errors.
Web Fixes
- Antd Spin self-closing warning (the tip only works in nested/fullscreen mode)
- CSRF exempt route not actually being applied (Flask-WTF never applied exempt_path)
- WebSocket HMR port issue — set VITE_HMR_PORT=443 to go through reverse proxy
The Unfiltered Take
Over-Engineering Alarm
Ledger + evidence + runner — split this fine, really? Run-all-the-way-to-the-end splitting, all for "extensible later" — classic self-comfort.
Lazy Web Fixes
CSRF exempt didn't work? Seen that config a hundred times, how still fall into the pit? No tests written, just deploy and roll dice. Antd warnings worth fixing? Oh right, code cleanliness matters.
Real Anxiety
Building branch-janitor this complex is fundamentally not trusting automation. Ten layers of defense instead of accepting "oops, we messed up." Classic control-freak syndrome.
Found this helpful? Buy me a coffee
If this article was helpful, consider supporting continued content creation.

