• Decode the reason a resource node was updated by a commit. Returns one of the seven ResourceUpdateReason values.

    Type Parameters

    • T

    Parameters

    Returns ResourceUpdateReason

    The decoder is a pure function: same inputs produce same outputs, no side effects, no graph reads. The decision tree:

    1. If the intent prefix is one of the resource adapter's known labels (fetch:*:start, fetch:*:loaded, fetch:*:stale, fetch:*:error, invalidate:*, fail:*), return the matching reason.
    2. Otherwise (the commit was on a different node and a downstream derived's recompute carried the resource into the changed-set), return 'dep-changed'.

    The pre/post arms are not strictly required for any single decode step — the intent label suffices — but they are accepted in the signature so a future schema-bump that needs cross-arm disambiguation does not break adopter call sites.