Category: spec-conformance Severity: blocker
Location: arcp-runtime/src/main/java/dev/arcp/runtime/session/SessionLoop.java:561-574
Spec: ARCP v1.1 §9.5 (also §7.3)
What
The lease-expiry watchdog transitions the job to TIMED_OUT and emits job.error with final_status: "timed_out" carrying code LEASE_EXPIRED. §9.5 requires the runtime emit job.error with code LEASE_EXPIRED and final_status: "error", and §7.3 explicitly states LEASE_EXPIRED results in final_status: "error".
Evidence
private void terminateExpiredJob(JobRecord record) {
if (record.transitionTo(JobRecord.Status.TIMED_OUT)) {
var w = record.worker();
if (w != null) {
w.cancel(true);
}
emitJobError(
record,
JobError.TIMED_OUT,
ErrorCode.LEASE_EXPIRED,
"lease expired at " + record.constraints().expiresAt());
Proposed fix
Transition the record to Status.ERROR (not TIMED_OUT) and pass JobError.ERROR as the final_status when the cause is lease expiry, keeping ErrorCode.LEASE_EXPIRED.
Acceptance criteria
Category: spec-conformance Severity: blocker
Location:
arcp-runtime/src/main/java/dev/arcp/runtime/session/SessionLoop.java:561-574Spec: ARCP v1.1 §9.5 (also §7.3)
What
The lease-expiry watchdog transitions the job to
TIMED_OUTand emitsjob.errorwithfinal_status: "timed_out"carrying codeLEASE_EXPIRED. §9.5 requires the runtime emitjob.errorwith codeLEASE_EXPIREDandfinal_status: "error", and §7.3 explicitly statesLEASE_EXPIREDresults infinal_status: "error".Evidence
Proposed fix
Transition the record to
Status.ERROR(notTIMED_OUT) and passJobError.ERRORas thefinal_statuswhen the cause is lease expiry, keepingErrorCode.LEASE_EXPIRED.Acceptance criteria
expires_atis reached for an active job, the emittedjob.errorcarriesfinal_status: "error"and codeLEASE_EXPIRED, and the job's terminal status isERROR.