Skip to content

Forward unmatched job progress envelopes to ARCPClient.unhandled #55

@nficano

Description

@nficano

ARCPClient.dispatch(envelope:) yields most envelopes it does not consume internally to unhandled, but job.progress is the exception. At Sources/ARCP/Client/ARCPClient.swift:175, a progress envelope with a jobId is delivered only when that job id maps to a pending invocation in invokeByJobId. If the progress belongs to a job submitted by another client, a raw client.send invocation, a subscription payload that was unwrapped by higher-level code, or any other path not tracked by ARCPClient.invoke, the envelope is silently dropped instead of being exposed on the public unhandled stream.

Fix prompt: Add an else path for job.progress that yields unmatched envelopes to unhandledContinuation, preserving the existing typed progress delivery for invocations started through invoke. Add a client dispatch test that sends a job.progress envelope for an unknown job id and asserts that it appears on client.unhandled, plus a regression test proving tracked invocations still receive progress through InvocationResult.progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingseverity:mediumMedium severity issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions