Skip to content

test(sequential-signing): preserve additional #8948 coverage - #9041

Merged
vitormattos merged 5 commits into
mainfrom
follow-up/8948-reconcile
Oct 20, 2026
Merged

vitormattos merged 5 commits into
mainfrom
follow-up/8948-reconcile

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Reconciles the remaining distinct test coverage from #8948 against current main after #8912 merged the production fix.

Preserved from André Maia's contribution:

  • activateNextOrder() returns no activated signers for parallel flows and performs no sign-request lookup;
  • every identify-method group of every activated signer is notified.

The production changes and the remaining rejection/notification tests from #8948 already have equivalent or stronger coverage in main through #8912. André Maia remains credited as co-author of this reconciliation commit.

Related: #8948, #8912

With `rejection_behavior = continue`, a rejection releases the next
signing order of every document it closes inside one transaction.
`SequentialSigningService::releaseNextOrder()` notified each released
signer right away, so when a later document of an envelope failed and
the transaction rolled back, the signer had already been told that a
document was ready to sign.

`activateNextOrder()` now performs only the state change and returns
the signers it activated, and `notifyActivatedSigners()` sends their
notifications. `releaseNextOrder()` calls both, so the signing flow and
`reorderAfterDeletion()` keep their behavior. The rejection collects the
released signers and notifies them after the commit.

`notifyActivatedSigners()` owns the delivery error policy: each signer
is notified by `notifySigner()`, which isolates every identify method,
so one failed delivery does not keep the remaining signers, already
able to sign, from being told. Only `\Exception` is isolated and logged
with the sign request and identify method; an `\Error` is a programming
error and stays visible.

Resolves: #8803
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: André Maia <andrefnkmm@gmail.com>
…d signers

Notifying the signers released by a rejection runs after the commit, so
nothing raised there may turn a recorded rejection into an error. Two
gaps remained:

- `SequentialSigningService::notifySigner()` loaded the identify methods
  outside the isolated delivery, so an exception from that lookup (a lost
  database connection, for example) escaped `reject()`. The signer got an
  error for a rejection that was already saved and could not retry.
- `reject()` notified the released signers before dispatching
  `SignatureRejectedEvent`, so an error while notifying skipped the event.

The lookup is now isolated and logged like a failed delivery, and the
remaining signers are still notified. `persistRejection()` returns the
released signers and `reject()` dispatches the event before notifying
them.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: André Maia <andrefnkmm@gmail.com>
@vitormattos
vitormattos requested a review from a team as a code owner October 6, 2026 15:18
Cherry-pick the remaining applicable coverage from André Maia's
0eb8da9 after resolving it against
#8912, which already merged the production changes and overlapping tests.

Cherry-picked-from: 0eb8da9
Co-authored-by: André Maia <andrefnkmm@gmail.com>

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Preserve the remaining applicable coverage from André Maia's #8948
series after resolving the follow-up against current main. The production
fixes and error-ordering changes from 7cee8ff
are already present through #8912, so only the distinct notification
coverage remains to apply.

Cherry-picked-from: 7cee8ff
Co-authored-by: André Maia <andrefnkmm@gmail.com>

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Preserve the original commits from #8948 as ancestors of this merge while reconciling the branch with current main and the focused tests from #9041.

The production fix and overlapping tests remain as integrated by #8912; the diff against main consists exclusively of the 38 additional test lines from #9041.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos merged commit b3f7269 into main Oct 20, 2026
66 checks passed
@vitormattos
vitormattos deleted the follow-up/8948-reconcile branch October 20, 2026 00:08
@vitormattos vitormattos added this to the Next Major (36) milestone Oct 20, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants