`unshareDevServer` applied Effect.ignore, so a failed removal was
indistinguishable from a successful one. `shareDevServer` then served
over routes it had not removed: stale path entries from the older
`tsdev t3` layout (/ws, /api pointing at a separate backend port) would
survive, producing a URL that loads while its API calls resolve to a
dead port. The serve-failed message also asserted the port was cleared
without knowing it.
It now reports whether the port is clear, and sharing refuses when it
is not. `tailscale serve … off` exits nonzero with "handler does not
exist" when nothing was mapped — the normal first-share case — so that
counts as cleared; anything else does not. The dev-runner finalizer
warns, with the command to run, when cleanup does not take.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>