Skip to content

fix: parallel flow signer status#6172

Merged
vitormattos merged 2 commits intomainfrom
fix/parallel-flow-signer-status
Dec 13, 2025
Merged

fix: parallel flow signer status#6172
vitormattos merged 2 commits intomainfrom
fix/parallel-flow-signer-status

Conversation

@vitormattos
Copy link
Copy Markdown
Member

No description provided.

When file status is ABLE_TO_SIGN (1) in parallel flow, all signers
should be set to ABLE_TO_SIGN regardless of individual signer status
sent by frontend. This fixes the issue where signers remained in DRAFT
status (0) even after clicking 'Request signatures'.

The logic now:
1. Check file status DRAFT first - keep all signers as DRAFT
2. Check file status ABLE_TO_SIGN - apply flow-based logic:
   - Parallel: All signers get ABLE_TO_SIGN
   - Ordered: Only first signer gets ABLE_TO_SIGN
3. Fallback to individual signer status for other cases

Resolves issue where sign_request records stayed at status 0 while
libresign_file was updated to status 1.

Signed-off-by: Vitor Mattos <[email protected]>
Added two unit tests to validate status determination logic:

1. testParallelFlowIgnoresSignerDraftStatusWhenFileIsAbleToSign:
   Validates that in parallel flow, all signers are set to ABLE_TO_SIGN
   when file status is ABLE_TO_SIGN, ignoring individual DRAFT status
   sent by frontend.

2. testOrderedFlowRespectsSigningOrderWhenFileIsAbleToSign:
   Validates that in ordered flow, only the first signer (order 1)
   gets ABLE_TO_SIGN status, while subsequent signers remain DRAFT
   until their turn.

Also updated getService() method to accept optional
SequentialSigningService parameter for testing different flows.

Signed-off-by: Vitor Mattos <[email protected]>
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 13, 2025
@vitormattos vitormattos self-assigned this Dec 13, 2025
@vitormattos vitormattos added this to the Next Major (33) milestone Dec 13, 2025
@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable32

@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable31

@vitormattos vitormattos merged commit 25e6961 into main Dec 13, 2025
65 checks passed
@vitormattos vitormattos deleted the fix/parallel-flow-signer-status branch December 13, 2025 13:27
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant