Category: spec-conformance Severity: minor
Location: src/Arcp.Runtime/SessionState.Dispatch.cs:85-91, src/Arcp.Runtime/JobManager.cs:444-455, src/Arcp.Core/Messages/MessageTypeNames.cs
Spec: ARCP v1.1 §7.4, §12
What
Spec §7.4: "The runtime acknowledges with job.cancelled and emits job.error with code CANCELLED." The SDK has no job.cancelled message type at all and never sends the acknowledgement — it only emits the terminal job.error{CANCELLED} from the run-loop. Separately, when job.cancel references a job that does not exist (or belongs to another principal), JobManager.Cancel returns false and the dispatcher discards the result, so no JOB_NOT_FOUND (§12) is surfaced; the client gets silence.
Evidence
case MessageTypeNames.JobCancel:
if (env.Payload is JobCancelPayload cancel)
{
if (JobId.TryParse(cancel.JobId, null, out var jid))
_server.JobManager.Cancel(jid, Principal?.Subject, cancel.Reason); // bool result ignored
}
break;
grep for job.cancelled/JobCancelled across src/ returns nothing.
Proposed fix
- Add
MessageTypeNames.JobCancelled = "job.cancelled" and a payload; on a successful Cancel, send job.cancelled to the submitting session before the run-loop emits job.error{CANCELLED}.
- When
Cancel returns false, send session.error{JOB_NOT_FOUND}.
Acceptance criteria
Category: spec-conformance Severity: minor
Location:
src/Arcp.Runtime/SessionState.Dispatch.cs:85-91,src/Arcp.Runtime/JobManager.cs:444-455,src/Arcp.Core/Messages/MessageTypeNames.csSpec: ARCP v1.1 §7.4, §12
What
Spec §7.4: "The runtime acknowledges with
job.cancelledand emitsjob.errorwith codeCANCELLED." The SDK has nojob.cancelledmessage type at all and never sends the acknowledgement — it only emits the terminaljob.error{CANCELLED}from the run-loop. Separately, whenjob.cancelreferences a job that does not exist (or belongs to another principal),JobManager.Cancelreturnsfalseand the dispatcher discards the result, so noJOB_NOT_FOUND(§12) is surfaced; the client gets silence.Evidence
grepforjob.cancelled/JobCancelledacrosssrc/returns nothing.Proposed fix
MessageTypeNames.JobCancelled = "job.cancelled"and a payload; on a successfulCancel, sendjob.cancelledto the submitting session before the run-loop emitsjob.error{CANCELLED}.Cancelreturnsfalse, sendsession.error{JOB_NOT_FOUND}.Acceptance criteria
job.cancelproduces ajob.cancelledack followed byjob.error{CANCELLED, final_status:"cancelled"}.job.cancelfor a non-existent/foreign job yieldsJOB_NOT_FOUND.