Engineering
Compute skill payload digests consistently
Define which fields and serialization rules determine whether a proposed action changed.
An application may record a digest of an approved tool payload, then find that another component serialized the same object differently. A consistent representation helps detect meaningful changes without mistaking incidental differences in object formatting for a different action.
Define the intended equality
Identify material fields such as target, scope, and payload. Leave unrelated telemetry outside the digest input. Decide whether field order, whitespace, case, or encoded Unicode differences are meaningful for the specific values. Avoid erasing distinctions that the receiving service actually preserves.
Use the same canonical representation
If using JSON canonicalization, choose a specified scheme and confirm inputs meet its requirements. The approval store and executor should share the same procedure. Keep the approved payload where policy permits, because a digest alone cannot show a reviewer what they approved.
Exercise cross-language cases
Compare hashes for equivalent object representations and for actions with changed destinations or nested content. Include numeric edge cases and optional fields. A test should distinguish absence from null when one preserves a value and the other clears it in the downstream service.