Skip to content

ci: add a quick tier and run the complete check in parallel jobs - #122

Open
enpasos wants to merge 8 commits into
mainfrom
ci/tiered-parallel-checks
Open

enpasos wants to merge 8 commits into
mainfrom
ci/tiered-parallel-checks

Conversation

@enpasos

@enpasos enpasos commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Ein Fix-Versuch zieht bisher rund 2 h 40 Remote-Prüfung nach sich. Dieser PR setzt die Product-Owner-Entscheidung vom 11. November 2026 um: Schnellprüfung bei jedem Push, Vollprüfung als finale Qualitätskontrolle, und die Vollprüfung läuft parallel, ohne dass eine Prüfung entfällt.

Zwei Stufen

  • Schnellprüfung (jeder Lauf, auch Draft-PRs): die vier kleinen Vertragsjobs, dazu quick-checks (Strukturtests der CI, Lint, Typprüfung, validate:graph, validate_schemas.py) und backend-quick-checks (Tests des CI-Runners, Backend-Compile). Diese Jobs warten auf keinen anderen Job.
  • Vollprüfung (Push auf main, manueller Start, PRs, die kein Draft sind): alle übrigen Jobs, parallel.
  • Ein Draft bekommt nur die Schnellprüfung. „Ready for review" startet die Vollprüfung für diesen Head. Drafts lassen sich nicht mergen; ein mergebarer PR trägt also immer eine Vollprüfung seines aktuellen Heads.
  • Keine Stufe wählt Jobs nach geänderten Pfaden aus.

Parallelisierung der Vollprüfung

Bisher (Dauer am 11.11.) Jetzt
frontend-ci (64 min) frontend-ci + goal-book-contracts (test:goal-book-pipeline)
graph-validation (132 min) graph-validation + curriculum-assessment-proofs + curriculum-integrated-build + curriculum-package-contracts
backend-ci (120–135 min) backend-ci (alle Testklassen außer der Reduktionsbeweis-Klasse, drei parallele Test-JVMs) + backend-reduction-proofs (zwei Partitionen, die nicht auf den Buch-Build warten)

scripts/run_backend_ci.py definiert die drei Backend-Partitionen. Jede schließt genau das aus, was eine andere einschließt. ./gradlew check ohne Optionen läuft lokal unverändert vollständig und seriell.

Keine Prüfung entfällt

  • Inventar vorher/nachher: Alle 204 bisherigen Workflow-Schritte stehen mit identischem Befehl, Arbeitsverzeichnis und Umgebung weiter in der Vollprüfung. Geändert sind nur die drei Backend-Schritte (Partition, Forks, Cache-Schlüssel v2).
  • Backend-Partitionen: siehe Abschnitt „Geprüft".
  • Abgespaltene Jobs behalten Runner-Image, Werkzeuge und das im selben Lauf verifizierte Buch-Artefakt des Ursprungsjobs. curriculum-package-contracts erzeugt zusätzlich dieselben Runtime-Assets wie zuvor.
  • Neue Dauerprüfungen: scripts/ci_tiers.test.mjs (7 Tests: Stufen, Abhängigkeiten, Partitionen, Umgebung abgespaltener Jobs) und 6 weitere Tests in scripts/test_run_backend_ci.py.

Abweichung vom Vorschlag

Der App-Build läuft weiter zweimal. Die beiden Builds sind bewusst verschieden (einmal ohne, einmal mit frisch erzeugten Runtime-Assets), und ihre 14 Minuten bestehen fast nur aus der erneuten Prüfung der Lernzielbücher. Zusammenlegen hätte eine Prüfung gestrichen.

Zusätzlich: Zeitlimit der Beweis-Verifikation

scripts/prerequisite_reduction_semantic_kind.py begrenzt die Verifikation des vollständigen Reduktionsbeweises auf einen Versuch ohne Ausweichweg. Sie dauerte vor #121 273 s und im #121-Lauf 526 s; in diesem PR überschritt ein langsamerer Runner bei unveränderten Daten das 600-Sekunden-Limit, und der Paketvertrags-Job scheiterte. Das Limit steht jetzt bei 1.800 s (am 9. November war es aus demselben Grund von 180 auf 600 gestiegen). Ein Timeout bleibt ein harter Fehler; der Test, der den Wert festschreibt, ist angepasst. Der alte serielle Workflow ist davon genauso betroffen.

Nicht enthalten

Beweise an ihre Eingaben binden, schlanker Checkout und Laufzeitbudget (Schritte 3 bis 5 des Vorschlags). run_ci.sh ist unverändert.

Geprüft

  • Vollprüfung remote, alle 16 Jobs grün auf e81146e81d (enthält main bis 81070f302d): Schnellprüfung, Buch-Build, frontend-ci, goal-book-contracts, graph-validation, die drei abgespaltenen Curriculum-Jobs, backend-ci (2.753 Tests) und beide Beweis-Partitionen.
  • Gemessene Laufzeiten dieses Laufs: Schnellprüfung 16 min; Buch-Build 45 min; danach parallel curriculum-assessment-proofs 65 min, curriculum-package-contracts 60 min, graph-validation 57 min, goal-book-contracts 53 min, backend-ci 44 min, curriculum-integrated-build 39 min, frontend-ci 32 min; Beweis-Partitionen 33 und 39 min ab Start. Vollprüfung damit rund 1 h 50. Der alte serielle Workflow brauchte auf main für denselben Inhalt über 3,5 h.
  • Drei parallele Test-JVMs bringen auf dem Hosted Runner wenig (Testschritt 34 statt rund 42 min); den Gewinn im Backend bringt das Auslagern der Beweise.
  • Schnellprüfung auf einem Draft (e4bf6b3860): sechs Jobs grün nach 16,5 min; die neun Jobs der Vollprüfung erschienen als „skipped".
  • Backend-Partitionen (Gradle --test-dry-run): ungefiltert 2.558 Tests in 290 Klassen; die Partitionen ergeben 2.549 + 8 + 1 = 2.558, ohne Überschneidung und ohne Lücke.
  • Workflow-Inventar: 204 Schritte vorher; in der Vollprüfung fehlen unverändert nur die drei ersetzten Backend-Schritte.
  • Infrastrukturausfälle während der Läufe, nicht durch diesen PR verursacht: DNS-Ausfall für ubuntu.com auf den Runnern (13:54 bis 17:02 UTC, drei Versuche scheiterten in apt-get; inzwischen durch fix(ci): fail over between Ubuntu package sources #124 abgefedert), Ausfall von GitHub Actions (ab 20:48 UTC, Artefakt-Upload des Buch-Builds scheiterte), ein Runner-Verlust im Frontend-Job. Jeweils nur die betroffenen Jobs wurden neu gestartet.
  • Stand von main: 9c9251fc0f enthält main bis 402778caed. docs/qa-ci/ci.md wird auf main aus docs/qa-ci/lanes-source/ generiert und beschreibt die zwei Stufen bereits; dieser PR ändert die CI-Dokumentation deshalb nicht mehr. Der MkDocs-Build war auf e81146e81d rot, weil dieser Stand den auf main inzwischen behobenen Font-Cache-Fehler des Kompendium-Builds enthielt.
  • Lauf auf dem aktuellen Head 9c9251fc0f: gestartet; Ergebnis wird hier nachgetragen.

🤖 Generated with Claude Code

enpasos and others added 4 commits November 11, 2026 13:35
Every run, including draft pull requests, now gets a quick tier: the four
small contract jobs plus early repeats of lint, type-check, graph and schema
validation and a backend compile. The complete check runs on pushes to main,
on manual starts and on pull requests that are not drafts; marking a draft
ready for review starts it for that head.

The complete check keeps every former step and runs it in parallel jobs:

- frontend-ci without the goal-book pipeline, which moves to
  goal-book-contracts
- graph-validation split into curriculum-assessment-proofs,
  curriculum-integrated-build and curriculum-package-contracts
- backend-ci with three parallel test JVMs and without the
  prerequisite-reduction proofs, which run as two partitions that do not
  wait for the goal-book build

scripts/run_backend_ci.py owns the three complementary backend partitions.
scripts/ci_tiers.test.mjs keeps the tiers, the job dependencies and the
partitions complete. Without options ./gradlew check still runs the whole
suite serially.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A skipped matrix job is listed with its unexpanded name, so the name now
says what the job is even on a draft pull request.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The terminology check reads the workflow too and retires the wording the
first job name used.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Both sides added a paragraph at the same place in AGENTS.md and CLAUDE.md;
both are kept.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@enpasos
enpasos marked this pull request as ready for review November 11, 2026 13:05
The Node bridge verifies the complete prerequisite-reduction proof in one
bounded attempt without fallback. That verification took 273 s before the
remaining protected subjects were added and 526 s after; a slower hosted
runner then exceeded the 600-second bound on unchanged data and failed the
package contracts. The bound moves to 1800 seconds; a timeout stays a hard
failure.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
enpasos added a commit that referenced this pull request Nov 11, 2026
Since about 13:50 UTC on 11 November 2026 the package steps of `main` and
of PR #122 fail with exit code 100 after two minutes. The APT setup allowed
only the direct Ubuntu endpoints, with a 30 s timeout and two retries, so a
source that does not answer the runners fails every job that installs
packages. Job logs were not available; the cause is inferred from the
timeout pattern and from the same step passing shortly before.

Each Ubuntu stanza now reads a mirror list with the direct endpoint first
and the runner image's Azure mirror second. APT's mirror transport moves a
failed or stalled file to the other source. Same-source retries are off,
because they multiply the wait and APT 2.8 can hang when they meet mirror
redirects. A pre-update hook probes each source and lets one that answers
go first, so a source that accepts connections and then stalls does not
cost the timeout for every file.

Suites, components and Signed-By are unchanged: every mirror is verified
against the same keyring and the signed index hashes. No workflow step
command changes.

The guard test pins the new policy and proves the failover offline against
a signed local fixture repository. Behaviour on a real runner during an
outage is not proven until this runs in CI.

Co-authored-by: enpasos <matthias.unverzagt@enpasos.ai>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
enpasos and others added 3 commits November 11, 2026 20:13
…tier branch

AGENTS.md and docs/qa-ci/ci.md were changed on both sides and merge without
conflict. The new jobs use the shared ubuntu-apt action and satisfy the
updated scripts/ci_ubuntu_apt.test.mjs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
docs/qa-ci/ci.md is now generated from docs/qa-ci/lanes-source, and that
source already describes the two tiers and the parallel jobs. The conflict
is resolved by taking the generated page from main, so this branch no
longer changes the CI documentation.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main only adds the LuaTeX font-cache fix in scripts/doc_compendium/engine.py.
Without it the MkDocs build check of this pull request failed on the merge
with the previous main.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant