Characterize cancellation notification and sequential-signing consistency

Open
#9,084 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
backend, testing

Research direction

Start with tests/integration/features/sign/cancel.feature and sequential_signing.feature; inspect how the existing PHPUnit integration environment persists signing requests and how the Behat scenarios observe notifications. Reproduce the controlled removal failure and the same-order signer flow described in the issue, then run the relevant integration tests. Done means the tests confirm no cancellation notification or false success after failed removal, and that C is activated and notified once only after A signs.

Written by the indexing model from the issue text.

Description

backend php

Goal

Verify that cancellation and sequential-signing notifications correspond to successful persisted state changes.

Test approach

Reuse tests/integration/features/sign/cancel.feature and sequential_signing.feature.

Persistence failure

Using PHPUnit integration with the existing Nextcloud test environment:

  1. Persist an active unsigned signing request.
  2. Introduce one controlled failure at the persistence boundary for its removal.
  3. Execute the cancellation operation.
  4. Reload the persisted state and observe cancellation events.

Expected:

  • The signer remains persisted.
  • No cancellation notification is emitted for an unsuccessful removal.
  • The operation does not silently report success.
  • Unrelated state is unchanged.

Use real persistence wherever possible and the minimum substitution necessary to reproduce the failure.

Sequential flow

Using Behat:

  1. Create signers A and B at the same first signing order, with C at the next order.
  2. Before anyone signs, remove pending signer B.
  3. Verify that A remains active and C is not prematurely activated or notified.
  4. Complete A's signature.
  5. Verify that C becomes eligible and receives the expected activation notification once.

This must not depend on modifying signer-removal permissions after a document becomes partially signed.

Boundaries

No generic failure-injection framework, broad notification refactor or new delivery mechanism.

Result and handoff

A passing test may be merged normally.

For a confirmed failure, preserve the test commit and sanitized execution evidence without merging a failing test. Request maintainer review to determine the smallest appropriate fix.

If the required correction extends beyond this investigation, establish a traceable follow-up and carry the same regression test into the corrective work.

Dominant language
PHP
Stars
844
Forks
176
Avg merge
14h 3m
Merged PRs (30d)
344

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LibreSign/libresign

All issues in LibreSign/libresign

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.