CodeHerderSearch⌘KRequest access →

Examples · Bug fix

A hostname that stopped updating the day the instance behind it changed

Now refreshes hostname on tunnel connect and adds instance-id and current-host-since as first-class fields, so the device page always points at the host actually serving it.

$50.04
Cost, start to finish
3h 40m
Lead time, filed to merged
27
Files changed in the merge

Measured from this task's real merge.

Cost
$50.04
Turns
655
Lead time
3h 40m
Merged
Aug 6, 2026
Diff
27 files · +839 -26

A device's hostname was recorded once, at registration. On an EC2 spot instance, the instance behind that device can be replaced at any time, so the recorded hostname stopped matching reality and never caught up.

What was asked for

The device detail page reports the host a device registered on, not the host it is running on now. On EC2/spot devices the instance is replaced regularly, so this field drifts and never catches up.

Filed by a developer, routed by capability (go, react).

What the herd did

  1. plan
  2. code
  3. review
  4. merge
  5. verify
  6. done
plan
Decided the fix needed to run on every tunnel reconnect, not just registration, and to add an instance id and a timestamp so a drifted host is visible instead of just wrong.
code
Refreshed the hostname on tunnel connect, added instance-id and current-host-since as their own fields, and updated the device tunnel wire payload to carry them.
review
Checked the new tunnel handshake fields against the server's identity tests and the device detail page's rendering.
merge
Twenty-seven files: the tunnel server and client, the wire payload, the device handler and repo, and a new migration.
verify
Confirmed a device's hostname updates on its next reconnect and that the device page shows instance id and current-host-since.
done
$50.04 across 655 turns, the most expensive task in this set.

What it changed

The merge touched 27 files (+839 −26). Among them:

  • internal/devicetunnelserver/serve_phases.go
  • internal/devicetunnel/payloads.go
  • internal/devices/handler.go
  • internal/storage/migrations/20260806194859_devices_current_host.up.sql
  • app/src/pages/DeviceDetail.tsx

What it cost

$50.04 in model spend, 655 agent turns, and 3h 40m from filed to merged. See what a month of work like this would cost your own team on our cost calculator.

A fact recorded once and never refreshed will eventually describe a world that no longer exists.

CodeHerder

Got something like this to ship?

Tell us what you're building. We'll set your workspace up and you can file it today.

Try "pricing", "connect a device", or "who reviews the code"

↑↓ move · ↵ open · esc close