Category: spec-conformance Severity: minor
Location: packages/runtime/src/agent-registry.ts:167-207
Spec: ARCP v1.1 §7.5
What
§7.5 says an unknown name must yield AGENT_NOT_AVAILABLE. resolveFromState guards bucket.size === 0 first, so the empty-bucket branch is unreachable today — but if reached it emits AGENT_VERSION_NOT_AVAILABLE with an empty version, the wrong §7.5 code. Latent misclassification masked only by an external guard.
Evidence
const first = bucket.entries().next().value;
if (first === undefined) return { missingVersion: "" };
...
if ("missingVersion" in picked) {
return Effect.fail(
new TaggedAgentVersionNotAvailable({
Proposed fix
Have pickFromBucket distinguish 'empty bucket' from 'missing version' and map the empty case to AGENT_NOT_AVAILABLE regardless of caller guards.
Acceptance criteria
Category: spec-conformance Severity: minor
Location:
packages/runtime/src/agent-registry.ts:167-207Spec: ARCP v1.1 §7.5
What
§7.5 says an unknown name must yield AGENT_NOT_AVAILABLE. resolveFromState guards bucket.size === 0 first, so the empty-bucket branch is unreachable today — but if reached it emits AGENT_VERSION_NOT_AVAILABLE with an empty version, the wrong §7.5 code. Latent misclassification masked only by an external guard.
Evidence
Proposed fix
Have pickFromBucket distinguish 'empty bucket' from 'missing version' and map the empty case to AGENT_NOT_AVAILABLE regardless of caller guards.
Acceptance criteria