Category: spec-conformance Severity: minor
Location: lib/arcp/job/event_body/progress.rb:7-15
Spec: ARCP v1.1 §8.2.1
What
Spec §8.2.1 states current MUST be a non-negative number (and SHOULD be ≤ total when total is present). Neither Progress.from_h nor JobContext#progress validates this, so a negative current is accepted and emitted.
Evidence
def self.from_h(h)
h = h.transform_keys(&:to_s)
new(
current: h.fetch('current'),
total: h['total'],
units: h['units'],
message: h['message']
)
end
Proposed fix
Validate current >= 0 (raise INVALID_REQUEST otherwise) and warn/guard when total is present and current > total.
Acceptance criteria
Category: spec-conformance Severity: minor
Location:
lib/arcp/job/event_body/progress.rb:7-15Spec: ARCP v1.1 §8.2.1
What
Spec §8.2.1 states current MUST be a non-negative number (and SHOULD be ≤ total when total is present). Neither Progress.from_h nor JobContext#progress validates this, so a negative current is accepted and emitted.
Evidence
Proposed fix
Validate current >= 0 (raise INVALID_REQUEST otherwise) and warn/guard when total is present and current > total.
Acceptance criteria