ADR 0057: A pull request proves that Karyo builds and starts; the suites run every night
Status: Accepted. Supersedes in part ADR 0023: the image-determinism audit runs in the release workflow, not in a pull request's CI.
Context
Until this decision every pull request ran the whole pipeline: the backend compile, about 2,500 backend tests, the Keycloak realm suites, the Pact verification, the console's lint, unit tests, docs helper tests and diagram re-render, the floor app's lint, unit tests and build, detekt, the image audit with the legal-file and SBOM checks and both image builds, and the Trivy scan. A full run took about 15 minutes.
The owner decided on 2026-10-19 to cut a pull request's CI to "just the basic checks, just so basic that only test those which if fails doesn't bring karyo up", because a separate plan for functional testing will own behaviour. Six recommendations were accepted with it: four required checks on every pull request, the full backend suite nightly with a failure reported, the tests that plan replaces deleted later (not by this decision), the security scan nightly, the image release checks moved into the release workflow, and the runner group kept at three runners.
What brings Karyo up was not tested by any job before: no workflow started the images it built.
Decision
- A pull request runs four required checks, in
.github/workflows/ci.yml: Compile (the main and test sources of every module, and the licence operational test sources), Front-end build (the console and the floor app), Image build (both images), and Karyo starts. - Karyo starts runs the built images as a first deployment does - the production Compose file, the shipped production realm, the managed Keycloak and an empty database - and passes only if every migration applied, the application reports healthy, Keycloak loaded the realm, the console loads through the web server and its API calls reach the application, and one user signs in. The production realm defines no application users and demo mode creates none, so that user is System, the setup account every fresh managed installation creates (ADR 0053), signing in through the console's own client. The job adds no way in that a real installation lacks.
- A change that can affect none of those jobs runs none of them. A documentation-only,
nightly-only or end-to-end
tests/pull request runs only the job that decides this, and a backend test-source change runs only Compile (scripts/ci-changes.sh). - Everything else runs every night on
main(.github/workflows/nightly.yml): the backend suites with the Pact verification, the realm suites, detekt, both front ends' lint and unit tests, the docs helper tests, the diagram re-render, and the Trivy scan of an application image built that night. A failure opens, or comments on, the one open issue labelledci-nightly. - The image release checks run in the release workflow: the determinism audit (already in its
preparejob), the jar legal-file verification and the SBOM checks, beside the double-build proof and the scans it already ran (ADR 0056).
Consequences
- A pull request that breaks a test, lint, a document or the scan merges green. The nightly run
reports it after the merge, so
maincan be red for up to a day, and the fix is a new pull request. Contributors run the checks for what they touched before opening one (contributing). - A pull request that stops Karyo starting cannot merge green: a migration that fails on an empty database, a migration directory Flyway does not read, an application that does not become healthy, a realm Keycloak cannot import, a console the web server does not serve, or a sign-in that fails.
- Karyo starts covers one fresh managed installation, not an upgrade over existing data, an external identity provider or the extended profile, and it serves the console without running it in a browser.
- The image audit, the legal files and the SBOM are proved at release time. A change that breaks one is found by the next release or its dry run, not by its pull request.
- The tests the functional testing plan replaces are still run nightly until that plan covers them; deleting them is a later decision.
Alternatives considered
- Keep the whole pipeline on every pull request. Rejected by the owner: about 15 minutes a run for checks whose failure does not stop Karyo coming up.
Evidence
.github/workflows/ci.yml,jobs.compile, jobs.frontend, jobs.package, jobs.karyo-starts- the four checksscripts/ci-karyo-starts.sh,check_migrations, check_health, check_realm, check_console, check_sign_in- the five start-up checksscripts/ci_karyo_sign_in.py,sign_in_once- System's sign-in throughkaryo-webscripts/ci-changes.sh,classify- which jobs a change runs.github/workflows/nightly.yml,jobs.report- theci-nightlyissue.github/workflows/release.yml,jobs.prepare.steps: Audit image-build determinism,jobs.build.steps: Verify the jar legal files, Generate and check the three SBOMs- the release checks
Related
- The delivery pipeline - every job of the three workflows
- ADR 0023 - reproducible images
- ADR 0056 - the release workflow