your 2am cron backup has no idea you're on a personal hotspot. it'll happily push 4gb of restic through your phone tether and you find out on the bill a week later 🧵
so i built a little thing that sits between cron and the backup. checks the network first, exits silent if you're tethered/low-data, and kills the job mid-run if you tether after it starts. reads macOS's own isExpensive/isConstrained flags so it catches personal hotspot even when the laptop thinks it's plain wifi.
Killed a distributed lock in my job queue by pushing the constraint into Mongo.
A partial unique index on dedupeKey, filtered to status: "pending", lets only one pending job per key exist. Concurrent enqueues for the same key collide at the index instead of racing in app code. No Redlock, no lock service.
The partial filter is the whole trick. Unscoped, uniqueness would block re-running a key after its first job finishes. Scoped to pending you get single-flight: one job active, one allowed to queue behind it, the rest bounce at insert.
Most “AI agent” failures aren’t model failures. They’re harness failures.
The repo is messy. The tests don’t run cleanly. The docs assume context the agent doesn’t have.
Fix the harness, the same model gets dramatically better.
@mattpocockuk Yes, this is a pattern that I’ve also been using. The the only thing different is that during my hand off process I want my agent to update any ongoing project documents so they don’t get stale.
@steipete@isaiaheaston_ Would love to get a shot to join the team. In this latest release I contributed a couple PRs for the heartbeat storm and also the TUI deadlock