feat: reland v4 BE handling (reverts #9775)#9785
Merged
Merged
Conversation
This reverts commit cdc25de.
scottheng96
marked this pull request as ready for review
July 23, 2026 05:24
eliotlim
approved these changes
Jul 23, 2026
|
Tick the box to add this pull request to the merge queue (same as
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #9775 reverted the V4 BE handling (PR 2/5 of the MRF V3→V4 response migration, #9637, together with its bug fixes #9769 and #9770) so the Dependabot security fixes could be released independently. With that release out, the V4 BE work needs to land again — PR 3/5 (FE sends V4) is blocked until the backend accepts V4-native submissions.
Solution
Revert the revert: this PR reverts cdc25de (#9775), restoring the V4 BE pipeline exactly as it was before the revert. The conflict resolution was verified byte-identical to the pre-revert tree (
cdc25de38^) across all 17 files, sitting cleanly on top of the SDK/response-v4utils that #9776 cherry-picked back onto develop (those are untouched by this PR).The restored state includes all four bug fixes that were part of the original V4 BE line:
previousResponsesplumbed intocheckIsResponseChangedV4so only changed fields are re-validated, fixing rejection of verified email/mobile fields with expired OTP signatures on later workflow steps.emailDomainMatchesAllowed.triggerGuardDutyScanThenDownloadCleanFileChainV4promotes the real filename intoanswer.value, so attachments no longer surface as a bare quarantine UUID in email/PDF Q&A, response JSON, webhooks, and admin CSV.mrfVersion: 1) viaadaptV4ToV3, so existing webhook consumers keep working unchanged.Breaking Changes
adaptV3ToV4shim with WARN logging for rollout monitoring), and webhook consumers continue to receive V3-shaped encrypted payloads.Tests
Unit suites pass locally: multirespondent-submission, submission.service, and email-validation (10 suites, 291 tests) plus response-v4 (7 tests).
TC1: MRF submission end-to-end (V4 path)
TC2: Verified field carried across workflow steps (#9769 regression)
TC3: Wildcard email domain restriction (#9770 regression)
@*.gov.sg)user@agency.gov.sg)TC4: Attachment filename in downstream sinks
TC5: Webhook compatibility
mrfVersion: 1)TC6: Stale V3 client shim
version>= 3 and < 4)🤖 Generated with Claude Code