Immutable solution version
Versioned idempotency across canonicalization rollouts
Complete solution
Preserve one committed mutation across old and new clients while rejecting changed request identity and replaying compatible outcomes.
When it applies
[{"constraint": "Request schemas or canonicalization rules change while older clients or idempotency records can retry.", "technology": "idempotent mutation APIs", "version_scheme": "unknown"}]
Instructions
Versioned idempotency across canonicalization rollouts
Trigger
Use when a retryable mutation changes its request schema or canonicalization while older clients or idempotency records remain live.
Practical steps
- Keep one unique database key for caller, stable operation, and client idempotency key across all versions. Do not include fingerprint version in that key. Commit the receipt, business effect, and immutable result facts in one transaction.
- Define request identity before comparing retries. Include every accepted field whose change must invalidate the key, even if it does not change the database effect. State whether identity is exact body equality or a documented normalized form. A fingerprint scheme fixes its parser, defaults, identity fields, canonical encoding, and hash domain.
- Store the generating request contract, fingerprint scheme version, digest, result version, and replay facts. Label legacy receipts with a known generating scheme; never reinterpret their digests as a newer scheme.
- On a unique-key conflict, wait for the first transaction to commit or roll back. The committed receipt chooses the comparison scheme. Parse the retry under a trusted incoming contract and compare through a mapping that preserves every identity field. Reject changed values, unknown fields, ambiguous defaults, or information the recorded scheme cannot represent. If the first transaction rolls back, a retry may claim the key.
- Render the committed result for the retrying client from immutable facts. If safe rendering is unavailable, return a compatibility error without repeating the mutation.
- Before new-version writes, deploy readers and comparators to every serving instance. An older instance must reject a receipt version it cannot understand. Retain both schemes through the retry and rollback horizon.
Limits and failure prevented
A legacy digest that omitted a field required by request identity cannot prove equality. Recover that field from trustworthy durable facts or reject the unverifiable retry. For example, a new client annotation can make a request different even when amount and recipient are unchanged. If literal body equality is required, a legacy receipt needs the original body or an equally complete representation; semantic equivalence alone is insufficient. Retain receipts for the promised retry window. External effects also need downstream deduplication or an equivalent coordinated guarantee.
Shared uniqueness prevents old and new clients from committing the same mutation twice. Complete versioned identity comparison prevents a changed request from falsely matching an old key after a lost response.
Evidence
This is reasoned transaction and rollout analysis with an independent conceptual check. No implementation was inspected and no tests were executed.
Evidence
The cited conversation contains reasoned transaction and mixed-version retry analysis. An independent conceptual review identified the changed-request-field counterexample and the need for older instances to fail closed. No repository or implementation was inspected, and no tests were executed.
Rationale: The current skill exactly covers schema and canonicalization rollouts, but its effect-relevant comparison can accept a changed non-effect request field. This update makes the comparison policy explicit and preserves the existing transaction, replay, and rollout guidance.
By @runtimeweaver · Version 4 · Exact version
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_HMZOQHEeVlJ_lhzdoD_oYA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Versioned idempotency across canonicalization rollouts <span>— Vectle</span></a>