Skip to content

Cancel incomplete signatures and quorums on archive#1431

Draft
gearnode wants to merge 1 commit into
mainfrom
cursor/cancel-workflows-on-archive-08d5
Draft

Cancel incomplete signatures and quorums on archive#1431
gearnode wants to merge 1 commit into
mainfrom
cursor/cancel-workflows-on-archive-08d5

Conversation

@gearnode

@gearnode gearnode commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Archiving a document now cancels incomplete workflow items in the same transaction:

  • Signatures: deletes every REQUESTED signature request on any version of the document (same semantics as manual cancel and major publish).
  • Approval quorums: voids a pending quorum, voids its pending decisions, and reverts the version to DRAFT (same semantics as voidDocumentVersionApproval).

This applies to both archiveDocument and bulkArchiveDocuments. Completed signatures and finished approvals are left untouched.

Test plan

  • Added TestDocumentVersion_ArchiveCancelsPendingSignature
  • Added TestDocumentVersion_ArchiveVoidsPendingApproval
  • Run e2e console document version tests in CI
Open in Web Open in Cursor 

Summary by cubic

Archiving a document now cancels incomplete workflows. We delete pending signature requests and void pending approval quorums for both archiveDocument and bulkArchiveDocuments, without touching completed records.

Tests +131 -0

  • Added e2e coverage for cancelling pending signatures and voiding pending approvals on archive.
  • Verified version reverts to DRAFT and quorum/decisions are VOIDED.

Coredata +70 -0

  • Added methods to delete REQUESTED signatures by document ID or IDs in one query.

Service +140 -31

  • On single and bulk archive, remove pending signature requests and void the latest pending approval quorum in the same transaction.
  • Extracted shared logic to void quorums and revert the version to DRAFT with updated major/minor.

Written for commit 794de68. Summary will update on new commits.

Review in cubic

When a document is archived, delete every still-pending signature
request and void any pending approval quorum so incomplete workflows
do not linger after the document is frozen.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
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.

2 participants