From 39d8653fb158c892570f5fa9af74ae496c2b3967 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Sat, 21 Nov 2026 20:02:22 +0000 Subject: [PATCH 1/3] docs(developer): document verified 3rdparty dependency update lifecycle Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- developer_manual/dependency-updates.rst | 152 ++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 developer_manual/dependency-updates.rst diff --git a/developer_manual/dependency-updates.rst b/developer_manual/dependency-updates.rst new file mode 100644 index 00000000..35441967 --- /dev/null +++ b/developer_manual/dependency-updates.rst @@ -0,0 +1,152 @@ +.. SPDX-FileCopyrightText: 2026 LibreCode coop and contributors +.. SPDX-License-Identifier: CC-BY-3.0 + +Updating vendored dependencies +============================= + +LibreSign's scoped PHP dependencies are maintained in the +`LibreSign/3rdparty repository `_, +not by editing generated files inside the LibreSign application repository. +This is the **maintainer procedure** for updating the ``3rdparty`` Git +submodule in `LibreSign/libresign `_. + +It applies to pull requests targeting ``main`` or a maintained ``stableXX`` +branch of the two **code** repositories. In those repositories ``stableXX`` +refers to the Nextcloud major. This differs from documentation branches such +as ``stable15``, which refer to the LibreSign release major; see +:doc:`getting-started/branch-policies`. + +Automated update sequence +------------------------- + +Use **one source PR and one destination PR** for the same target branch. + +1. In `LibreSign/3rdparty pull requests `_, + review the Dependabot version change, ``composer.lock`` and the intended + target branch. Do not merge yet. + +2. As a maintainer with write permission, post this **entire comment** on + the open 3rdparty PR: + + .. code-block:: text + + /composer-update + + The bot regenerates scoped vendor files and, when needed, commits them + to the source PR with a GitHub-verified signature and DCO sign-off. + An acknowledgement (eyes reaction and a status comment with the Actions + link) is attempted; the status comment is updated with the result. + A thumbs-up means regeneration **finished**, not that review or CI passed. + If the command fails, inspect the linked Actions logs before retrying. + +3. Wait for the **new source HEAD's** checks to complete, especially + ``Check vendor changes``, PHP lint and DCO. Confirm there are no failures, + missing mandatory checks or unexpected changes to generated files. + +4. Comment on that **same 3rdparty PR**: + + .. code-block:: text + + /libresign-pr + + The automation checks the source PR and creates a corresponding PR in + LibreSign, targeting the matching branch and initially pointing its + ``3rdparty`` gitlink to the **proposed source HEAD**. Inspect the + created PR, changed files and CI. It is not ready for its final merge yet. + +5. Once the 3rdparty PR is approved, **merge the 3rdparty PR first**. + Record the **actual merged SHA** from that repository, not the Dependabot + head SHA. + +6. On the **linked LibreSign PR**, comment: + + .. code-block:: text + + /update-3rdparty + + The bot updates the ``3rdparty`` gitlink to the **merged source SHA** + with a new, signed and DCO-compliant commit. Verify that the gitlink + actually matches the merged SHA and that the updated LibreSign CI runs + against the new HEAD. + +7. After all relevant LibreSign checks and reviews pass, merge the LibreSign + PR. Verify the branch's final ``3rdparty`` gitlink matches the intended + 3rdparty merged commit. + +The commands do **not** merge PRs. They operate on same-repository PR +branches for authorized maintainers; forks are excluded. Do not copy +unreviewed changes across repositories or assume that a green source +check proves LibreSign's signing and certificate integration is safe. +Follow :doc:`getting-started/tests` for the affected test matrix. + +When the source PR was merged early +----------------------------------- + +A merged 3rdparty PR cannot reliably run the original PR-creation flow +again. Create a **separate, narrowly scoped** LibreSign PR targeting the +corresponding code branch. Its only change should be the ``3rdparty`` +gitlink pointing directly to the **source merge SHA**. + +Create a new cryptographically signed, DCO-compliant commit and run the +normal LibreSign CI. Do not try to reconstruct the old source PR, amend +reviewed commits or force-push to substitute a merge SHA. The prior +`LibreSign integration PR #9590 `_ +illustrates this fallback. + +Manual update when automation is unavailable +-------------------------------------------- + +Use a clean, disposable working tree. Follow the 3rdparty +`PHP-Scoper and Composer instructions +`_ +to regenerate libraries; do not edit generated ``composer/`` files by hand. + +Commit and review changes to the source PR first. On a separate LibreSign +branch, update **only** the submodule reference to the proposed source HEAD, +make a verified signed/DCO commit and open a destination PR. After the +source PR is merged, add a **new** verified signed/DCO commit to the +destination PR pointing to the actual merged SHA. Rerun LibreSign CI and +complete required reviews before merging. Preserve the incremental history +(no ``git commit --amend``, squash or force-push to replace reviewed commits). + +Merge commit signatures and DCO +------------------------------- + +A successful DCO check on a PR validates the submitted commits, **not** +a separate merge commit created later by GitHub. A green ``Verified`` badge +on a merge commit likewise does not prove the DCO sign-off is present. + +When using a GitHub merge method that creates a merge commit, ensure its +message includes a ``Signed-off-by: Name `` trailer matching the +**effective merge-commit author**. Confirm the author's actual name and +email instead of assuming they equal the local Git configuration or bot +identity. Preserve the reviewed, individually signed commits. + +After merging **each repository PR**, inspect the actual merge SHA for a +verified cryptographic signature and a DCO trailer matching its author. +If these are missing, stop using the defective merge procedure and correct +it for future merges. Do **not** rewrite protected history to repair +already published merges. For general requirements, see +:doc:`getting-started/commits`. + +Troubleshooting +--------------- + +* **No acknowledgement:** Inspect the issue-comment Actions run on the + source repository. The reaction API may fail even when the visible + status comment works; check the workflow log. +* **Regeneration failed:** Inspect the first failing Composer or commit + verification step. Do not merge without a regenerated, reviewed source + HEAD. Never disable signature or DCO checks to make an update pass. +* **Source HEAD changed after CI:** Wait for new checks and issue the + subsequent command only after confirming the revised commit. +* **Destination branch or PR already exists:** Inspect and continue that + PR rather than creating a duplicate or overwriting its branch. +* **Source PR already merged:** Use the direct gitlink PR procedure above. +* **Destination checks fail:** Diagnose the LibreSign integration independently + of the successful 3rdparty Composer checks. + +The current workflow definitions live in the code repositories. This page +is the single maintainer-facing source for their **cross-repository sequence**; +repository READMEs and contribution guides should link here rather than +repeat the procedure. From a275d2b8ccb8574477c8289acb64595ba3bfc6e9 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Sat, 21 Nov 2026 20:02:34 +0000 Subject: [PATCH 2/3] docs(developer): surface dependency update guide in manual navigation Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- developer_manual/index.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/developer_manual/index.rst b/developer_manual/index.rst index 4ab20930..fe6a526b 100644 --- a/developer_manual/index.rst +++ b/developer_manual/index.rst @@ -18,6 +18,8 @@ Start here runtime. - :doc:`development-workflow` — follow work from an issue to a reviewed pull request. +- :doc:`dependency-updates` — maintain vendored Composer libraries and the + 3rdparty submodule across repositories. - :doc:`getting-started/tests` — choose and run the appropriate validation. - :doc:`api/index` — work with the public API. - :doc:`integration/index` — choose an integration architecture for an existing system. @@ -50,6 +52,7 @@ For professional services or partnerships, error-handling getting-started/index development-workflow + dependency-updates api/index integration/index webhooks/index From 0239d33b144a09842135f677f28e49cf08de836e Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Sat, 21 Nov 2026 20:06:19 +0000 Subject: [PATCH 3/3] docs(developer): fix Sphinx title underline length Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- developer_manual/dependency-updates.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/dependency-updates.rst b/developer_manual/dependency-updates.rst index 35441967..e74bd1e9 100644 --- a/developer_manual/dependency-updates.rst +++ b/developer_manual/dependency-updates.rst @@ -2,7 +2,7 @@ .. SPDX-License-Identifier: CC-BY-3.0 Updating vendored dependencies -============================= +============================== LibreSign's scoped PHP dependencies are maintained in the `LibreSign/3rdparty repository `_,