recordResponse abstract method

Future<void> recordResponse(
  1. String id,
  2. Object? response
)

Attach the response a completed execution produced, so a later duplicate can be answered with it per §7.2 (Disposition of a duplicate) rather than merely absorbed in silence.

A guard that records nothing still satisfies item 11 — the effect does not happen twice — and is the right shape for a fire-and-forget specification, which has no response to return.

response is a JSON map for a refusal, and for a success when the caller passed responseToJson to consumeInbound; otherwise a success arrives as the TrustTaskDocument itself. A guard that persists the response needs the map, so its callers must pass responseToJson.

Implementation

Future<void> recordResponse(String id, Object? response);