probing: add cancel command for stuck measurements#17
Conversation
`nxthdr probing cancel <id>` POSTs /api/measurement/{id}/cancel to resolve a stuck/in-progress measurement (e.g. an agent died mid-run). Also surfaces the new cancelled state: `measurements` and `measurement-status` now show status "cancelled" (and per-agent "cancelled") via a shared measurement_label helper.
Pairs with saimiris-gateway #47.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @matthieugouel's task in 1m 32s —— View job PR Review
Two findings worth addressing before merge: 1.
|
- include the API 'message' in the kv block so it survives -o json/-o csv (was text-only). - rename the per-agent table header 'complete' -> 'status' since the column now shows cancelled/yes/no (it's also the JSON key / CSV column). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds
nxthdr probing cancel <id>to resolve a stuck/in-progress measurement — pairs with the gateway endpoint in saimiris-gateway#47 (POST /api/measurement/{id}/cancel). (roadmap nxthdr/roadmap#38)Changes
probing cancel <id>→ POSTs the cancel endpoint, reportscancelled/agents_cancelled(idempotent — a no-op with a message if already terminal).measurements(list) andmeasurement-statusnow show statuscancelled(and per-agentcancelled), via a sharedmeasurement_label(cancelled, complete)helper. Newmeasurement_cancelledfields are#[serde(default)], so the CLI still works against a gateway that predates the cancel deploy.Testing
cargo build+cargo clippy --all-targetsclean. End-to-end test against prod once gateway #47 is deployed (cancel the real stuckcf78cc3d…measurement).🤖 Generated with Claude Code