myxce/src/frontend/mcp-server
lei.chen bbe8ed3335 mcp: scheduler_pend_reasons returns numeric id for round-trip
formatPendJob used job.HumanID ("1-0-1786764804-0") as the tool's `id`,
but the apiserver rejects dash-form job IDs as query input (only numeric is
accepted, utils.IsNumeric) — so an id copied out of scheduler_pend_reasons
could not be fed back into scheduler_get_job/cancel/hold/release (HTTP 400).

Use job.ID (numeric, same as scheduler_list_jobs' `id`) and keep `human_id`
for display. Round-trip verified on the cluster: pend_reasons id ->
scheduler_get_job succeeds.

Test: TestFormatPendJobIDConsistency (id is numeric, human_id preserved,
both with and without a pending_reason).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-18 04:44:05 +00:00
..
cmd feat(mcp-server): scheduler_pend_reasons tool — bjobs -p equivalent 2026-08-15 03:25:28 +00:00
internal mcp: scheduler_pend_reasons returns numeric id for round-trip 2026-08-18 04:44:05 +00:00
go.mod Phase 0: scheduleragent + mcp-server read-only agent framework 2026-07-30 11:16:36 +08:00
go.sum Phase 0: scheduleragent + mcp-server read-only agent framework 2026-07-30 11:16:36 +08:00