From 51cd26e13ddcbd2650871c93e224a2c76957975c Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc <6860842+ambroise-leclerc@users.noreply.github.com> Date: Wed, 11 Nov 2026 20:09:15 +0100 Subject: [PATCH 1/2] Declare GCC 13 S2 support and add sanitizer coverage --- .github/workflows/BuildAndTest.yml | 29 +++++++- README.md | 2 +- docs/CHANGELOG.md | 2 + docs/PROJECT_STATUS.md | 10 +++ docs/TEST_TIERS.md | 2 +- .../ADR-022-profils-et-niveaux-de-support.md | 73 +++++++++++++++++++ docs/adr/README.md | 5 +- 7 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 docs/adr/ADR-022-profils-et-niveaux-de-support.md diff --git a/.github/workflows/BuildAndTest.yml b/.github/workflows/BuildAndTest.yml index ec7bfc8c..b593c57a 100644 --- a/.github/workflows/BuildAndTest.yml +++ b/.github/workflows/BuildAndTest.yml @@ -352,6 +352,10 @@ jobs: sudo apt-get install -y clang-23 lld-23 echo "CC=clang-23" >> "$GITHUB_ENV" echo "CXX=clang++-23" >> "$GITHUB_ENV" + - name: Report the selected compiler + shell: bash + run: | + if [ "$RUNNER_OS" = Windows ]; then cl 2>&1 || true; else "${CXX:-c++}" --version; fi # No compiler cache: a new user compiles everything. - name: Configure shell: bash @@ -367,10 +371,12 @@ jobs: gcc13-arm64: if: github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'workflow_dispatch' && inputs.repeat_desktop_tests) runs-on: ubuntu-24.04-arm - timeout-minutes: 45 + timeout-minutes: 60 env: CC: gcc-13 CXX: g++-13 + ASAN_OPTIONS: detect_leaks=1:abort_on_error=1 + UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1 steps: - uses: actions/checkout@v7 - uses: ./.github/actions/remove-node @@ -401,6 +407,27 @@ jobs: run: cmake --build build --parallel 4 - name: Fast tests run: ctest --test-dir build -L fast --output-on-failure --no-tests=error --parallel 4 + # Exercise coroutine lifetimes with the oldest supported compiler as well (#525). + - name: Configure GCC 13 ASan and UBSan + run: >- + cmake -S . -B build-sanitizers -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_EMBED_WEBKITGTK=OFF -DWEBFRONT_ENABLE_TESTING=ON + -DWEBFRONT_BUILD_EXAMPLES=OFF -DWARNINGS_AS_ERRORS=OFF -DENABLE_CACHE=OFF + -DCMAKE_CXX_SCAN_FOR_MODULES=OFF + -DWEBFRONT_ENABLE_SANITIZER_ADDRESS=ON -DWEBFRONT_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON + - name: Build GCC 13 sanitizer tests + run: cmake --build build-sanitizers --parallel 2 + - name: GCC 13 sanitizer fast tests + run: ctest --test-dir build-sanitizers -L fast --output-on-failure --no-tests=error --parallel 4 + - name: Retain GCC 13 test diagnostics + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-log-gcc13-arm64 + path: | + build/Testing/Temporary/LastTest.log + build-sanitizers/Testing/Temporary/LastTest.log + if-no-files-found: ignore sanitizers: if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.base_ref == 'master') diff --git a/README.md b/README.md index 77bdfc87..8dd2063f 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ int main() { ## Game of Life: from console to native application -The example starts with a C++ simulation, adds a React interface, then embeds that interface in the executable. You need Git, CMake **3.31+** and a C++23 compiler. The initial CMake configuration, the first bootstrap and the first `wf install` need internet access; afterwards the downloaded environment and packages are cached and can be verified offline. +The example starts with a C++ simulation, adds a React interface, then embeds that interface in the executable. You need Git, CMake **3.31+** and a C++23 compiler (GCC **13+**; GCC 13 has best-effort S2 support). See the [compiler support policy](docs/adr/ADR-022-profils-et-niveaux-de-support.md) for the tested toolchains and limits. The initial CMake configuration, the first bootstrap and the first `wf install` need internet access; afterwards the downloaded environment and packages are cached and can be verified offline. ```bash git clone https://github.com/ambroise-leclerc/WebFront.git diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 9f592a2c..ec7d1aed 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -16,6 +16,8 @@ these entries stays in the GitHub releases and the Git history. ### Changed +- Declare GCC 13 as the best-effort S2 minimum for the library and examples, document the GCC 14 exit clause and qualified Clang scope, and add GCC 13 ASan/UBSan fast tests (#525, ADR-022). + - Open the developer page on the interface, over the whole window, once the project has a preview; the terminal moves to a floating, movable window behind a tab on the right edge that shows the session's state, and keeps its session when collapsed. Its shortcut is F9, or the manifest's new optional `developer.terminalShortcut`. Environment sources 0.9.1, not published yet (#539, `docs/DEVELOPER_ENVIRONMENT.md`). ### Fixed diff --git a/docs/PROJECT_STATUS.md b/docs/PROJECT_STATUS.md index 457aeacd..fb15b76a 100644 --- a/docs/PROJECT_STATUS.md +++ b/docs/PROJECT_STATUS.md @@ -3,6 +3,16 @@ Release history belongs in the [changelog](CHANGELOG.md) and Git; architecture decisions and their evidence are indexed in [the ADRs](adr/README.md). +## Compiler support + +GCC 13 is the minimum for the library and examples, with best-effort S2 support: the +weekly and `master` PR ARM64 job builds everything without `-Werror`, runs the fast tier, +and repeats that tier under ASan/UBSan. Browser frontends are disabled in this job. +GCC 16 remains the reference compiler. Clang 23 is qualified in the extended jobs; +no older upstream Clang minimum is qualified. AppleClang and MSVC follow the native CI images. +Optional C++26 reflection and mddlog retain their separate compiler requirements. +The [support ADR](adr/ADR-022-profils-et-niveaux-de-support.md) defines the GCC 14 exit clause. + ## Supported paths WebFront is a header-only C++23 HTTP/WebSocket core plus a standalone developer environment. diff --git a/docs/TEST_TIERS.md b/docs/TEST_TIERS.md index 6f6ce7fc..e93417db 100644 --- a/docs/TEST_TIERS.md +++ b/docs/TEST_TIERS.md @@ -72,7 +72,7 @@ dispatch with `repeat_desktop_tests`: 2026 generator. There is no compiler cache: a new user compiles everything; - the `gcc13-arm64` job (#548): GCC 13 on a hosted Linux aarch64 runner (`ubuntu-24.04-arm`), compiling the library, the examples and the tests with warnings that are not errors (libstdc++ 13 reports false `-Wnull-dereference` positives, #526), then running - the fast tier. It has no browser frontend. A compile error or a failing fast test under GCC 13 on aarch64 turns it red; + the fast tier, then rebuilding the tests under GCC 13 ASan/UBSan and repeating the fast tier (#525, S2 support). It has no browser frontend. A compile error or a failing fast test under GCC 13 on aarch64 turns it red; - the address/undefined and thread sanitizers, the five fuzzers, and the GCC and Clang CEF browser integration. The portability matrix does not vary the CMake version: `setup-cmake` pins the SHA-256 of each archive it installs, so diff --git a/docs/adr/ADR-022-profils-et-niveaux-de-support.md b/docs/adr/ADR-022-profils-et-niveaux-de-support.md new file mode 100644 index 00000000..e8b89ce9 --- /dev/null +++ b/docs/adr/ADR-022-profils-et-niveaux-de-support.md @@ -0,0 +1,73 @@ +# ADR-022 : Profils de compilateurs et niveaux de support + +## Versions + +| Version | Date | État | Auteur | Évolution | Révision Git | +| --- | --- | --- | --- | --- | --- | +| 1.0 | 2026-11-11 | Acceptée | Ambroise Leclerc | Plancher GCC 13 S2, profils et clause de sortie. | Présente modification (#525). | + +## État + +Acceptée le 2026-11-11 : option B de #525, choisie par le mainteneur. + +## Contexte + +« Un compilateur C++23 » ne définit pas une matrice qualifiée. GCC 13 compile les +interfaces et exemples actuels ; #525 rapporte une qualification sur Orin avec GCC +13.4, hors sanitizers. #548 fournit déjà le job Linux aarch64. Les faux positifs +libstdc++ sous `-Wnull-dereference` rendent coûteux un second engagement `-Werror`. +Les corrections de compatibilité de #526 et le plancher CMake de #527 sont distincts. + +## Décision + +| Profil | Niveau | Engagement et limites | +| --- | --- | --- | +| GCC 16, Linux | S1, référence | Suite desktop à chaque PR, avertissements en erreurs ; tiers étendus selon TEST_TIERS. | +| GCC 13, Linux aarch64 | S2, best effort | Minimum déclaré pour les en-têtes et exemples ; compilation de toutes les cibles, tests rapides puis ASan/UBSan sur ces tests, chaque semaine et sur les PR vers master. Sans `-Werror`, sans navigateur. | +| Clang 23, Linux | S2 | Qualification des consommateurs, CEF et sanitizers dans les jobs étendus ; aucun plancher antérieur qualifié. | +| MSVC, AppleClang | S1 sur les images CI | Versions fournies par windows-2025 et macos-26 ; pas de promesse pour les versions antérieures. | + +S1 décrit la validation de référence à chaque PR ; S2 une validation périodique +limitée à son profil. Un échec S2 rend le job rouge et demande une investigation ; +ce niveau ne promet ni tous les tiers, ni tous les avertissements en erreurs. +Les commandes et déclencheurs exacts sont dans [TEST_TIERS](../TEST_TIERS.md). +GCC 11 et 12 ne sont pas visés. Un compilateur et sa bibliothèque standard doivent +fournir notamment `` et ``, les concepts et les coroutines. +Le minimum GCC ne s'applique pas à la réflexion C++26 (GCC 16) ni à mddlog +(GCC 16.1 exactement). Il ne qualifie pas à lui seul un BSP, CUDA ou un NDK. + +Le plancher passe à GCC 14 dès qu'une des conditions suivantes est satisfaite : + +- une fonctionnalité GCC 14 simplifie nettement un en-tête public ; +- un défaut de génération de code GCC 13 est démontré ; +- une dépendance épinglée exige un compilateur plus récent ; +- Scarthgap atteint le 30 avril 2028. + +Ce relèvement est annoncé comme rupture dans le changelog, avec sa cause et les +profils CI mis à jour. Une montée de dépendance doit donc vérifier ce plancher. + +## Éléments vérifiés et portée des preuves + +- [stdexec en amont](https://github.com/NVIDIA/stdexec) annonce GCC 12 ; cela ne + remplace pas la compilation de la révision épinglée par stdnet. +- [CUDA 13.2, tableau 3](https://docs.nvidia.com/cuda/archive/13.2.0/cuda-installation-guide-linux/index.html#host-compiler-support-policy) + accepte GCC 6 à 15 sur x86_64 et Arm64 SBSA. La limite GCC 13 rapportée pour + CUDA 12.6 ne doit donc pas être extrapolée à CUDA 13.2. Cela ne constitue pas + une qualification WebFront avec nvcc ni de toutes les variantes JetPack. +- L'image [Ubuntu 24.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md) + est mutable : le job S2 impose `gcc-13`/`g++-13`, vérifie sa version et aarch64. + Le job portability historique sans sélection explicite ne prouve pas à lui seul + un plancher ; il imprime désormais le compilateur effectivement choisi. +- Aucun BSP NXP i.MX précis n'est sélectionné dans #525. Sa version GCC reste à + vérifier dans le manifeste du BSP retenu ; aucune qualification i.MX n'est annoncée. + +## Alternatives et conséquences + +L'option A laisse les régressions silencieuses. L'option C (GCC 14) exclut les +outillages GCC 13 alors que le code actuel compile. L'option D impose les coûts +des faux positifs et de tous les tiers à deux générations éloignées de GCC. +L'option B garde une voie pour les systèmes embarqués, au prix d'un gel partiel +des fonctionnalités publiques et d'un passage sanitizer supplémentaire en CI. +Les anciennes versions Clang ne reçoivent pas un minimum déduit des seules +fonctionnalités : leur qualification nécessite des tests à l'exécution avec une +bibliothèque standard identifiée. NDK et AppleClang restent des profils distincts. diff --git a/docs/adr/README.md b/docs/adr/README.md index ae6bfa61..1f20852e 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -1,13 +1,15 @@ # WebFront architecture decision records This directory describes WebFront’s architectural choices and the constraints to preserve -when making changes or generating code. It contains **21 ADRs**, with unique numbers (18 accepted decisions and 3 proposals). +when making changes or generating code. It contains **22 ADRs**, with unique numbers (19 accepted decisions and 3 proposals). The accepted baseline corresponds to commit `b031ab5` dated **2026-10-19**; the developer environment proposals are dated **2026-10-20**, the direct frontend access proposal **2026-10-24**, the DOM access proposal **2026-10-26**, the developer automation proposal **2026-10-28**, accepted **2026-10-29**, the system services proposal **2026-10-31**, and the developer environment publication proposal **2026-11-02**. Each ADR is versioned according to the decision’s creation and its significant changes in the Git history. The ADRs themselves are written in French. +The compiler support policy was accepted on **2026-11-11** (ADR-022). + ## Reading guide and scope The format draws on [MduX’s ADR register](https://github.com/ambroise-leclerc/MduX/tree/develop/docs/adr): @@ -62,6 +64,7 @@ verification evidence remain in [PROJECT_STATUS](../PROJECT_STATUS.md). | [ADR-019](ADR-019-developpement-automatisable-et-agents.md) | Automating the developer environment through shared operations and an optional local MCP adapter | Accepted | 2026-10-28 | 1.2 — 2026-10-29 | | [ADR-020](ADR-020-services-systeme.md) | System services (files, clipboard, shell, notifications…) through optional C++ portals with per-connection backends, granting handles rather than paths | Proposed | 2026-10-31 | 1.8 — 2026-11-09 | | [ADR-021](ADR-021-publication-de-l-environnement-developpeur.md) | Simplifying the publication of the developer environment: automate the release, keep pinned hashes, no dedicated server | Accepted (domain delivered; phase 1 to implement) | 2026-11-02 | 1.0 — 2026-11-02 | +| [ADR-022](ADR-022-profils-et-niveaux-de-support.md) | Compiler profiles, GCC 13 S2 minimum and exit clause | Accepted | 2026-11-11 | 1.0 — 2026-11-11 | Numbering follows the reading topics; milestones and individual file histories provide the chronology, which does not follow the numerical order. From 808a095b733854fd83e9901ddd468da6a41c5212 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc <6860842+ambroise-leclerc@users.noreply.github.com> Date: Wed, 11 Nov 2026 20:13:38 +0100 Subject: [PATCH 2/2] Support older Git in regression checks and allow manual ARM64 validation --- .github/scripts/check-no-ai-attribution.sh | 2 +- .github/workflows/BuildAndTest.yml | 6 +++++- docs/CHANGELOG.md | 2 ++ docs/TEST_TIERS.md | 7 +++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/scripts/check-no-ai-attribution.sh b/.github/scripts/check-no-ai-attribution.sh index c66c95ba..5195a26d 100755 --- a/.github/scripts/check-no-ai-attribution.sh +++ b/.github/scripts/check-no-ai-attribution.sh @@ -27,7 +27,7 @@ if [ -n "$base" ]; then fi # One Git process supplies all records. Bash matches each line directly, avoiding four grep # processes and two git-show processes per regression case (especially costly on macOS). -if ! git log --no-show-signature --no-notes --no-decorate --no-patch --no-color --no-graph -z --format='%H%x00%an <%ae>%n%cn <%ce>%x00%B' "$revision" >"$commits"; then +if ! git log --no-show-signature --no-notes --no-decorate --no-patch --no-color -z --format='%H%x00%an <%ae>%n%cn <%ce>%x00%B' "$revision" >"$commits"; then echo "::error::unable to list the commits in $revision" exit 1 fi diff --git a/.github/workflows/BuildAndTest.yml b/.github/workflows/BuildAndTest.yml index b593c57a..941b4c3a 100644 --- a/.github/workflows/BuildAndTest.yml +++ b/.github/workflows/BuildAndTest.yml @@ -9,6 +9,10 @@ on: - cron: '23 4 * * 1' workflow_dispatch: inputs: + gcc13_arm64: + description: 'Also run GCC 13 ARM64 and its ASan/UBSan fast tests' + type: boolean + default: false repeat_desktop_tests: description: 'Also run the desktop matrix, repeating the complete CTest suite three times' type: boolean @@ -369,7 +373,7 @@ jobs: # tier. Warnings are not errors here: libstdc++ 13 reports false -Wnull-dereference positives (#526), so -Werror stays with the # reference compiler (#525). A browser frontend needs a display and CEF has no aarch64 job yet, so both are off. gcc13-arm64: - if: github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'workflow_dispatch' && inputs.repeat_desktop_tests) + if: github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'workflow_dispatch' && (inputs.repeat_desktop_tests || inputs.gcc13_arm64)) runs-on: ubuntu-24.04-arm timeout-minutes: 60 env: diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ec7d1aed..bbb288ec 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -22,6 +22,8 @@ these entries stays in the GitHub releases and the Git history. ### Fixed +- Run the commit attribution regression checks with older Git versions by dropping the unsupported `git log --no-graph` option (#525). + - Build with `-DWEBFRONT_EMBED_CEF=ON` on Linux aarch64 instead of failing on `-m64`, and cross-compile CEF: WebFront pins CEF 156.0.28, whose package selects the archive and `PROJECT_ARCH` from the target (#523). ## [0.9.0] - 2026-11-10 diff --git a/docs/TEST_TIERS.md b/docs/TEST_TIERS.md index e93417db..d67d8395 100644 --- a/docs/TEST_TIERS.md +++ b/docs/TEST_TIERS.md @@ -75,6 +75,13 @@ dispatch with `repeat_desktop_tests`: the fast tier, then rebuilding the tests under GCC 13 ASan/UBSan and repeating the fast tier (#525, S2 support). It has no browser frontend. A compile error or a failing fast test under GCC 13 on aarch64 turns it red; - the address/undefined and thread sanitizers, the five fuzzers, and the GCC and Clang CEF browser integration. +Manual dispatch with `gcc13_arm64=true` adds the GCC 13 ARM64 job and its sanitizer pass +to the extended checks without enabling the repeated desktop matrix. For example: + +```bash +gh workflow run BuildAndTest.yml --ref -f gcc13_arm64=true +``` + The portability matrix does not vary the CMake version: `setup-cmake` pins the SHA-256 of each archive it installs, so another version needs its checksum added first.