Change commands and retries
Which version remains binding in the event of repeated publication?
Scale alone does not ensure consistent retry behaviour. This proposed API binds the role, business object, change payload and expected state to each new intent. An idempotency key identifies the same intent after a response is lost.
Starting point Test 833.33 requests/s as a separate media profile.
Assumptions for the example case
Own fictitious example draft: A news article with text and an image; two-person approval; limited-time image right; versioned publication and correction. Figures and quality goals are illustrative test assumptions. Outside are legal advice, automated verification of source truth and comprehensive advertising sales.
Retries and new intent
Publication envelope and rights event
The same publication key reads the open order; another version collides, a rights expiration takes effect once.
Proposed domain API contracts
- POST
/articles/{id}/versionsSave a new editorial version.
- Input
- Author identity,N-121, text, source references,B-121-digest, expected version and key.
- Result
- New immutable version; existing release is not transferred.
- Retry behaviour
- An identical operation by the same authorised role on the same object, using the same key and canonical payload, returns the stored original result. A changed payload under that key is rejected. External result identifiers are durably deduplicated after authentication; new intents check the current version again.
- POST
/articles/{id}/approvalsApprove the fixed version through two-person review.
- Input
- Other authorized person,N-121,V-3, image digest,R-121, usage channel and expected version.
- Result
- F-121 binds exactly this version; self-approval or obsolete status is rejected.
- Retry behaviour
- An identical operation by the same authorised role on the same object, using the same key and canonical payload, returns the stored original result. A changed payload under that key is rejected. External result identifiers are durably deduplicated after authentication; new intents check the current version again.
- POST
/articles/{id}/publicationsDeliver the approved version.
- Input
- On-duty editorial staff,F-121,V-3, scheduled time and key.
- Result
- Durable publication order; publication only after matching evidence from the destination.
- Retry behaviour
- An identical operation by the same authorised role on the same object, using the same key and canonical payload, returns the stored original result. A changed payload under that key is rejected. External result identifiers are durably deduplicated after authentication; new intents check the current version again.
- POST
/publication-evidenceConfirm delivery or invalidation.
- Input
- Authenticated target, unique receipt, publication reference, version, digest and target state.
- Result
- Matching evidence closes the pending command; an incorrect digest remains an investigation case.
- Retry behaviour
- An identical operation by the same authorised role on the same object, using the same key and canonical payload, returns the stored original result. A changed payload under that key is rejected. External result identifiers are durably deduplicated after authentication; new intents check the current version again.
- GET
/articles/{id}/publicationRead the editorial and technical publication status.
- Input
- Authorized editor, N-121.
- Result
- Release, active version, end of rights and pending edge-cache invalidation.
- Retry behaviour
- Repeating a read creates no business effect; the returned current state may change between requests.
Include the version in the command
Bind the publication command to a version and digest.
A retry arrives after a change of text.
V-3 remains the requested version.
- Alternative considered
- Loading the latest text on retry changes the original command.
- Trade-off
- A new version needs a new command.
- Reassess
- Multichannel publication requires separate target references.
Terms in this step
- Include the version in the command
- V-3 remains the requested version.
Try it yourself
A publication retry arrives after a change of text. Which version is delivered and what content is conflict?
A hint for your attempt
Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.
Compare with a possible solution
- First part of the solution
- Identical order remains bound to V-3 and the stored digest.
- Second part of the solution
- New text version under the same key is rejected; it needs new release and its own publication order.
Apply to your project
Which corresponding assumption in your project would you check first? Consider this trigger: Multichannel publication requires separate target references.