Category: spec-conformance Severity: major
Location: src/Arcp.Runtime/JobContext.fs:66-69
Spec: ARCP v1.1 §8.2.1
What
Spec §8.2.1: 'current MUST be a non-negative number. If total is present, current SHOULD be ≤ total.' The runtime emits any value, including negative current or current > total, producing non-conformant events.
Evidence
member _.EmitProgressAsync
(current: decimal, total: decimal option, units: string option, message: string option, _ct: CancellationToken)
: Task =
emit (JobEventBody.Progress(current, total, units, message))
Proposed fix
Reject (raise ArcpException InvalidRequest) when current < 0m. When total is Some t and current > t, either raise or clamp+log per a documented policy; the spec language is SHOULD, so a logged warning is acceptable but silent emission is not.
Acceptance criteria
Category: spec-conformance Severity: major
Location:
src/Arcp.Runtime/JobContext.fs:66-69Spec: ARCP v1.1 §8.2.1
What
Spec §8.2.1: '
currentMUST be a non-negative number. Iftotalis present,currentSHOULD be ≤total.' The runtime emits any value, including negative current or current > total, producing non-conformant events.Evidence
Proposed fix
Reject (raise ArcpException InvalidRequest) when current < 0m. When total is Some t and current > t, either raise or clamp+log per a documented policy; the spec language is SHOULD, so a logged warning is acceptable but silent emission is not.
Acceptance criteria