The contract tests against a real Paperless-ngx are one required check¶
- Status: accepted
- Date: 2026-11-29
- Amends 0015: the contract tests are a required check, by one job that sums up both lines of Paperless-ngx, instead of none
Context¶
The jobs Paperless-ngx 2.x and Paperless-ngx 3.x of .github/workflows/e2e.yml run the contract tests against a real Paperless-ngx (0015): every Monday, when started by hand, and in a pull request that can change how the app talks to Paperless (tests/e2e/affected.sh with E2E_QUESTION=contract). In any other pull request each line passes in seconds, as its step of the tests is skipped. Decision 0015 made them no required check, so that a failure of Paperless itself blocks no other change.
Auto-merge waits only for the required checks. On 2026-11-29 a pull request merged by auto-merge four seconds after its last required check ended, while both lines of its last commit had already failed in a fault of the pull request itself; the run of main for that merge was green, as a push to main skips the contract tests. The pull request that fixed it merged while one of its own lines was still running. On 2026-11-18 Renovate's update of the Paperless-ngx image, the change these tests exist for, merged with auto-merge turned on while a line still ran. A rule of Renovate that leaves the merge to Renovate alone doesn't hold once auto-merge is turned on for the pull request.
In the 30 days before, the contract tests failed in no run because of the image of Paperless or the network; the failures were those of that one pull request.
Options¶
- Keep them out of the required checks, and rely on Renovate's own merge and on the issue of Monday. A broken change reaches
mainwhenever auto-merge is on, and nobody hears of it before Monday. - Require each line, Paperless-ngx 2.x and Paperless-ngx 3.x. A push or a night skips the matrix, which then reports a single check named
Paperless-ngx ${{ matrix.line }}.x, and a new line, such as 4.x, would leave a required check behind that never reports. - One job
contract teststhat sums up both lines, as a required check, as the jobvariantsof the blueprint's workflow Variants does. It needspaperlessand runs withalways()on the events ofpaperless, so it reports on every pull request: it passes when both lines passed, also when the filter skipped their tests, and fails when a line failed or was cancelled.
Decision¶
Option 3. The job contract of .github/workflows/e2e.yml, named contract tests, is in required_checks of [branch] in .github/repository.project.toml, and the workflow Settings applies it to the rules of main when the change merges.
- Its
ifhasalways(). With the defaultsuccess(), a line that failed would skip the gate, and GitHub counts a required check that was skipped as passed. - There is no
pathsfilter on the workflow and no condition that skips the gate in a pull request: the check would never report, and the pull request would wait forever. Nocontinue-on-erroreither: a Paperless image that can't be pulled doesn't pass. - Its step prints no error of its own, so that the flaky-test bot of After the checks gives the line that failed the row, not the gate as well; the gate runs again with the lines that the bot runs again.
- A push to
mainstill doesn't run the contract tests:maintakes only a pull request that is up to date with it, so the pull request tested the same tree, and both images are pinned by their digests. The run of Monday stays, with its issue.
The reason of 0015 still holds: only a pull request that changes the files of the filter waits for a real Paperless, and one that changes none of them, such as most of Renovate's, the blueprint bot's and the release, passes the check within seconds.
Consequences¶
- Auto-merge waits for both lines of Paperless-ngx in a pull request that changes how the app talks to Paperless. The contract tests take 2 to 4 minutes beside the end-to-end tests, which take longer, so most such pull requests wait no longer than before.
- A pull request from a fork, or with the label
no-bot-fixes, that meets a new shape of an answer of Paperless fails its line by design, and now can't merge until the fixtures are committed. - When ghcr.io can't serve an image, the line fails and so does the gate; the flaky-test bot runs the failed jobs once more, and the next update of the branch runs them again, as for the end-to-end tests.
- Renovate's rule for the group Paperless-ngx keeps
platformAutomerge: false, now so that the workflow Paperless fixtures can commit new fixtures after a passing run before the pull request merges. - Pull requests that are open when the change merges get the check with their next run.