Category: spec-conformance Severity: blocker
Location: src/Errors/ErrorCode.php:16-56
Spec: ARCP v1.1 §12
What
§12 defines the canonical wire codes. The PHP enum diverges on multiple required entries: spec INVALID_REQUEST (PHP emits INVALID_ARGUMENT), spec INTERNAL_ERROR (PHP emits INTERNAL), spec RESUME_WINDOW_EXPIRED (absent; LifecycleHandler::handleResume emits DATA_LOSS), spec JOB_NOT_FOUND/AGENT_NOT_AVAILABLE/DUPLICATE_KEY/TIMEOUT are also absent.
Evidence
case Cancelled = 'CANCELLED';
case Unknown = 'UNKNOWN';
case InvalidArgument = 'INVALID_ARGUMENT';
case DeadlineExceeded = 'DEADLINE_EXCEEDED';
case NotFound = 'NOT_FOUND';
...
case Internal = 'INTERNAL';
...
case LeaseExpired = 'LEASE_EXPIRED';
case BudgetExhausted = 'BUDGET_EXHAUSTED';
case AgentVersionNotAvailable = 'AGENT_VERSION_NOT_AVAILABLE';
Proposed fix
Rename enum cases to the canonical strings (InvalidRequest='INVALID_REQUEST', InternalError='INTERNAL_ERROR') and add ResumeWindowExpired='RESUME_WINDOW_EXPIRED', JobNotFound='JOB_NOT_FOUND', AgentNotAvailable='AGENT_NOT_AVAILABLE', DuplicateKey='DUPLICATE_KEY', Timeout='TIMEOUT'.
Acceptance criteria
Category: spec-conformance Severity: blocker
Location:
src/Errors/ErrorCode.php:16-56Spec: ARCP v1.1 §12
What
§12 defines the canonical wire codes. The PHP enum diverges on multiple required entries: spec
INVALID_REQUEST(PHP emitsINVALID_ARGUMENT), specINTERNAL_ERROR(PHP emitsINTERNAL), specRESUME_WINDOW_EXPIRED(absent; LifecycleHandler::handleResume emitsDATA_LOSS), specJOB_NOT_FOUND/AGENT_NOT_AVAILABLE/DUPLICATE_KEY/TIMEOUTare also absent.Evidence
Proposed fix
Rename enum cases to the canonical strings (InvalidRequest='INVALID_REQUEST', InternalError='INTERNAL_ERROR') and add ResumeWindowExpired='RESUME_WINDOW_EXPIRED', JobNotFound='JOB_NOT_FOUND', AgentNotAvailable='AGENT_NOT_AVAILABLE', DuplicateKey='DUPLICATE_KEY', Timeout='TIMEOUT'.
Acceptance criteria