fix(daemon-client): name both versions and the side to upgrade on an RPC protocol mismatch

Merged
IM
5d ago
+96-18

Summary

The remote RPC protocol refusal said only "incompatible", so agents had to dig into details to learn which versions differed and what to upgrade. The message now names the client and remote versions and protocols, and says which side to upgrade. When the mismatched link is the daemon behind a proxy, it names that daemon, or tells you to upgrade both the client and the proxy. A client-local details.upgradeSide (remote, client or client-and-proxy) carries the same decision.

The wire format is unchanged; the ledger ack is updated.

Before / after

From tests (this needs an older remote daemon, so there's no local device run). Client 0.21.41 (protocol 3) against a remote daemon 0.21.36 (protocol 2):

base a4f2dcad0: Remote daemon RPC protocol is incompatible
head 75fb80a78: Remote daemon RPC protocol is incompatible: this client runs agent-device 0.21.41 (RPC protocol 3); the remote agent-device-daemon runs 0.21.36 (RPC protocol 2). Upgrade agent-device on the remote host.

Validation

  • Head 75fb80a78, check:affected --run --head, exactCommit: true. Every gate passes except unit, where upload-http-deadline and committed-source-tree fail the same way on clean main on this macOS host.
  • check:daemon-wire-compat passes against v0.21.41 with the protocol unchanged.
  • Four new cases (older and newer daemon, each direct and behind a proxy) fail without the fix.

Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.