| UPDATE packet is reprocessed and no newer PROCESSED UPDATE packet exists |
The packet passes the stale packet validation, proceeds through the normal reprocessing flow, invokes the Draft API , updates the resident identity, and completes successfully. |
| UPDATE packet is reprocessed and a newer PROCESSED UPDATE packet exists |
The packet is identified as stale. Processing is stopped, the Draft API is not invoked, the packet is marked as FAILED, the failure reason is recorded, the failure status is published, and the resident is notified to submit a new update request. |
| Update packet A is reprocessed while Update packet B is still IN_PROGRESS |
Only PROCESSED UPDATE packets are considered during stale packet validation. Since Update packet B is still IN_PROGRESS, it is ignored and Update packet A proceeds with reprocessing. If Update packet B completes successfully later, its changes overwrite UpdateA, ensuring the latest resident state is preserved. |
packetCreateDateTime is null (legacy packets) |
The stale packet validation is skipped when packetCreateDateTime is null. The packet continues through the existing reprocessing flow to maintain backward compatibility with legacy packets created before this field was introduced. |
Two UPDATE packets have the same packetCreateDateTime |
The validation uses a strict greater-than (>) comparison. Since neither packet has a later timestamp, neither is considered stale. Both packets are eligible for processing, and the packet that completes last determines the final resident identity. |
| UPDATE packet has a null reference registration ID (UIN) |
No matching processed UPDATE packets can be identified for comparison. The stale packet validation returns no results, and the packet continues through the normal reprocessing flow. |
| NEW packet is reprocessed after a previous FAILED attempt |
The stale UPDATE validation is not executed. The NEW packet proceeds through the normal reprocessing flow. This supports legitimate retry scenarios such as failures at ABIS or downstream processing stages. |
| NEW packet is reprocessed after it was already PROCESSED successfully |
The stale UPDATE validation is not executed. The packet is reprocessed as per the existing flow, and any duplicate enrollment continues to be handled by the existing ABIS deduplication mechanism. |
| LOST packet is reprocessed |
LOST packets continue through their existing processing branch (lostAndUpdateUin). No stale packet validation is performed, and no behavior changes are introduced as part of this feature. |
| ACTIVATED packet is reprocessed |
ACTIVATED packets continue through their existing processing branch. Since they do not reconstruct or publish draft data, they are not impacted by this feature. |
| DEACTIVATED packet is reprocessed |
DEACTIVATED packets continue through their existing processing branch. Since they do not reconstruct or publish draft data, they are not impacted by this feature. |
| Multiple consecutive UPDATE packets of the same UIN are reprocessed in chronological order |
Each packet is validated independently. Only the latest UPDATE packet that does not have a newer successfully processed UPDATE packet is allowed to proceed. Any older UPDATE packets are marked as FAILED to prevent resident identity regression. |
| Multiple consecutive UPDATE packets of the same UIN are reprocessed out of chronological order |
Every reprocessed UPDATE packet is compared against the latest successfully processed UPDATE packet for the resident. Any packet older than the latest processed UPDATE is rejected, irrespective of the order in which reprocessing is initiated. |
1. Problem Statement (Mandatory)
As part of the Draft API reimplementation, the Registration Processor now reconstructs the draft for each packet during packet reprocessing. This introduces a regression scenario for UPDATE packets.
When multiple UPDATE packets exist for the same resident, reprocessing an older packet can overwrite the identity changes already applied by a newer successfully processed packet, causing the resident's identity to regress to an older state.
The resident identity no longer represents the latest successful update.
This behavior must be prevented while continuing to allow legitimate retries of NEW packets.
Purpose (Mandatory)
2. Goals
Prevent Resident Identity Regression
Preserve Data Consistency
Support Safe Reprocessing
Improve Reprocessing Reliability
Provide Clear Failure Handling
Maintain Backward Compatibility
Protect the Integrity of the Draft API Flow
populateDraftWithIdentity) is executed only when the packet being reprocessed represents the latest valid UPDATE for the resident, preventing stale data from being propagated to the draft and published identity.3. Out of Scope
4. Acceptance Criteria (Mandatory)
Given an UPDATE packet is being reprocessed, When the created date of UPDATE packet id latest than the previous processed packet Then
- the packet shall continue through the normal processing flow
- Draft API shall be invoked
- resident identity shall be updated
- packet shall complete successfully.
Given an UPDATE packet is being reprocessed, When a latest UPDATE packet has already been successfully processed, Then
- the packet shall not proceed further
- Draft API shall not be invoked
- resident identity shall remain unchanged
- packet status shall be marked as FAILED
- failure event shall be published
- resident shall be notified about request have been failed and prompt them to re try on updating details.
Given a NEW packet is being reprocessed, When the packet is retried, Then
- no stale packet validation shall be executed
- normal reprocessing shall continue
- duplicate detection, if applicable, shall continue through existing ABIS logic.
Whenever a stale UPDATE packet is rejected:
- packet status shall be updated to FAILED
- failure reason shall indicate that a newer UPDATE has already been processed
- notification shall be triggered for the resident.
The system shall never allow an older UPDATE packet to overwrite identity information already committed by a newer successfully processed UPDATE packet.
Basic Flow
An UPDATE packet enters the reprocessing flow.
The Registration Processor identifies the resident using the packet's reference registration ID (UIN).
The processor verifies whether the packet being reprocessed is an UPDATE packet.
The processor retrieves the latest successfully processed UPDATE packet for the same resident.
The processor compares the
packetCreateDateTime (pkt_cr_dtimes)of the current packet with the latest successfully processed UPDATE packet.For a stale UPDATE packet:
For a valid UPDATE packet:
The reprocessing flow ends with either:
Flow Summary
Alternate Scenarios
packetCreateDateTimeis null (legacy packets)packetCreateDateTimeis null. The packet continues through the existing reprocessing flow to maintain backward compatibility with legacy packets created before this field was introduced.packetCreateDateTime>) comparison. Since neither packet has a later timestamp, neither is considered stale. Both packets are eligible for processing, and the packet that completes last determines the final resident identity.lostAndUpdateUin). No stale packet validation is performed, and no behavior changes are introduced as part of this feature.Non Functional Requirement
Related Issues / PRs (As Applicable)
Draft API Implementation : #2326