Cloud Native: name the step a refused Native call came from
Merged
TE
4d ago+39+39+01234567890123456789-10-10-01234567890123456789
Why. A capture's cloud.machines reply showed link_route: "link (native failed: refused(400))". NativeDeviceEnrollmentError.refused is thrown from four places (device revoke, owner ops such as host.enroll/host.network.bind, the signed Native reads, and the host.network.target read), so the reason didn't say which call got the 400.
What.
refused(Int)becomesrefused(Int, step: String). The step is the owner op name, orMETHOD /pathwith device and mesh ids swapped for{device}/{mesh}(viaNativeDeviceScope.step). It never holds an id or a token.NativeDeviceEnrollmentErrornow conforms toCustomStringConvertible. Every other case prints exactly what it printed before, andrefusedprintsrefused(400) at POST /v1/devices/{device}/signed/tunnel(or... at host.network.target).- The two tests that build
refusedare updated.CloudNativeFirstLauncherTestsnow checks the literal route stringlink (native failed: refused(400) at host.network.target).
Risk. None. Only the error's detail changes; nothing branches on the status or the step.
Agent session: agent session
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Makes NativeDeviceEnrollmentError.refused carry the step that got the status, so the cloud.machines link route says which call was refused instead of just refused(400).
refused(Int)becomesrefused(Int, step: String); the step is an owner op name or aMETHOD /pathtemplate with device and mesh ids replaced by{device}/{mesh}.NativeDeviceEnrollmentErrornow conforms toCustomStringConvertible, printing every case exactly as before exceptrefused, which prints e.g.refused(400) at POST /v1/devices/{device}/signed/tunnelorrefused(400) at host.network.target.- Only error detail changes; nothing branches on the status or the step.