Skip to content

Run the tests, the regeneration of the assets and the CI without Node.js [#318] - #344

Merged
AM-L merged 7 commits into
developfrom
318-no-node-tests
Oct 24, 2026
Merged

AM-L merged 7 commits into
developfrom
318-no-node-tests

Conversation

@ambroise-leclerc

Copy link
Copy Markdown
Collaborator

Closes #318. Epic #303.

Stacked on #343 (the pin of the tests to 0.6.1): until it merges, the diff also shows its commit.

No path of WebFront depends on Node.js, npm or npx any more: configure, build, tests, regeneration of the embedded assets, building and publishing the environment, and the CI.

What changed

  • Provisioning at configure. cmake/WebFrontRegistry.cmake downloads the ten real packages of the tests' npm registry (test/web/registry-packages.json: name, version, SHA-512), verifies them and stops the configure on a wrong digest. -DWEBFRONT_REGISTRY_DIR replaces the downloads on a machine without network, like -DWEBFRONT_BOOTSTRAP_DIR does for the bootstrap environment.
  • Fixtures built by wf, inside CTest. wf run test-registry (test/web/registry/) builds the registry (the real archives byte for byte, plus the synthetic ones); SelfBuildInstall installs the build dependencies from it; SelfBuild builds the environment from the current sources; DeveloperFixtures assembles what the browser tests read. WEBFRONT_DEVELOPER_FIXTURES and WEBFRONT_REQUIRE_NODE are gone. The environment built this way is byte for byte the published 0.6.1 (sha512-wBYPxKJQ...), so no environment version changes.
  • JavaScript tests. The 86 tests of node --test became 84 Jasmine specs in test/developer/specs/, run by the repository's own wf test (DeveloperSpecs on a copy of the sources; the wf-package job on the checkout and its lock, where jasmine-core is now locked). Two moved to CMake because they need no browser: the checksums of the bundle inputs (BundleInputsFresh, BundleInputsRejectsChange) and the command names reserved by the terminal and by webfront::Commands (CommandNamesAgree). The mapping of every former tool and test is in docs/NODE_TOOLS_MIGRATION.md.
  • Regeneration. The core headers are rendered, and checked, by js/core/EmbedAsset.cmake, in pure CMake. Decision recorded in ADR-016 v1.3: the freshness of the headers must be checkable by a build that has no browser, so one renderer in CMake serves generation and checking; wf run embed-core and the Node.js generator are deleted. EmbeddedAssetGenerator (format, padding, exit status, path with spaces, symbolic link) replaces embed.test.mjs, and a Catch2 scenario decodes each header with the C++ data it declares and compares it with its source.
  • Guard. NoNodeDependency audits every tracked file (imports and APIs of Node, commands, configuration, requirement in current documentation, "like node.js" positioning). Its exceptions are in test/cmake/NodeGuardExceptions.cmake, each with a reason; an exception that matches nothing fails. NoNodeDependencyRejectsInjections injects node:fs, a workflow install command, engines.node, a Node script nobody calls, an old command in a guide, npx, a find_program, a shebang, a CommonJS require, a requirement and the positioning, and checks that a registry URL, package metadata, the bundlers' compile-time constant and a test of the rejection of a Node import pass.
  • Deleted. js/developer/tools/{build,check,*-check,fixtures,pages,pin-check,registry-fixture-node,release-check,site,archive-release}.mjs, js/developer/vendor/{embed.mjs,embed.test.mjs,package.json,package-lock.json}, the package job and the comparison of Developer packages, setup-node and the npm cache of the three jobs, the .gitignore and .gitattributes rules of vendor/.
  • CI. Every job (desktop on three platforms, sanitizers, CEF) removes the JavaScript runtimes from the runner before anything else (remove-node now also works on Windows). The CEF job's configure downloads and verifies the registry packages, then the network is cut as before.

Evidence

Local, WebKitGTK, GCC 15, with node, nodejs, npm, npx and corepack absent from PATH (checked with command -v): configure from an empty build directory, build, and the whole CTest suite: 306/306 (54 web-integration; DeveloperSpecs runs 84 specs in 32 s). The guard fails on every injection listed above and passes on the tree. NewcomerDocsMatchExamples and RepositoryLayout pass.

CEF/Xvfb: BuildAndTest.yml is dispatched on this branch (the change is in the browser test infrastructure); the result is posted below.

Not done here

….js [#318]

Configure downloads, and verifies against their SHA-512, the pinned bootstrap
environment and the ten real packages of the tests' npm registry
(test/web/registry-packages.json). `wf run test-registry` builds the registry,
SelfBuild* builds the environment from the current sources, and the fixture
DeveloperFixtures assembles what the browser tests read, so
WEBFRONT_DEVELOPER_FIXTURES and WEBFRONT_REQUIRE_NODE are gone. The environment
built this way is byte for byte the published 0.6.1.

The 86 tests of `node --test` become 84 Jasmine specs in test/developer/specs,
run by the repository's own `wf test` (DeveloperSpecs; the wf-package job on the
checkout, where jasmine-core is now locked). The checksums of the bundle inputs
and the command names reserved by the terminal and by webfront::Commands move to
CMake tests.

The core headers are rendered and checked by js/core/EmbedAsset.cmake, in pure
CMake (ADR-016 v1.3), with a Catch2 scenario that decodes each of them. The
Node.js tools, vendor/package*.json, the generator, `wf run embed-core` and the
comparison job of Developer packages are deleted.

NoNodeDependency audits every tracked file; its exceptions are listed with
their reason, and NoNodeDependencyRejectsInjections proves it. Every CI job
removes the JavaScript runtimes from the runner first (also on Windows).
Copilot AI balanced review requested due to automatic review settings October 23, 2026 22:14
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d27cf952-9ac8-4ad0-bb67-0bd07f233773
📥 Commits

Reviewing files that changed from the base of the PR and between 5d5a10a and 3b93cb0.

📒 Files selected for processing: 3
  • js/core/EmbedAsset.cmake
  • test/cmake/CheckEmbedAsset.cmake
  • test/cmake/CheckNoNode.cmake

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45b1eabb-c7eb-4177-9b54-5f889849ed8d
📥 Commits

Reviewing files that changed from the base of the PR and between 89ef117 and 5d5a10a.

⛔ Files ignored due to path filters: 1
  • js/developer/vendor/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing: 84
  • .gitattributes
  • .github/actions/remove-node/action.yml
  • .github/actions/wf-driver/action.yml
  • .github/workflows/BuildAndTest.yml
  • .github/workflows/DeveloperDistribution.yml
  • .gitignore
  • AGENTS.md
  • CMakeLists.txt
  • README.md
  • cmake/WebFrontBootstrap.cmake
  • cmake/WebFrontRegistry.cmake
  • docs/CHANGELOG.md
  • docs/DEVELOPER_ENVIRONMENT.md
  • docs/EMBEDDED_ASSETS.md
  • docs/NODE_TOOLS_MIGRATION.md
  • docs/PROJECT_STATUS.md
  • docs/TEST_PERFORMANCE.md
  • docs/UI_COMPONENTS.md
  • docs/WKWEBVIEW.md
  • docs/adr/ADR-009-modules-et-assets-reproductibles.md
  • docs/adr/ADR-016-bootstrap-comme-socle.md
  • docs/adr/README.md
  • include/webfront/system/DeveloperReleaseData.hpp
  • js/core/EmbedAsset.cmake
  • js/core/EmbedTextAsset.cmake
  • js/core/WebFrontAssets.cmake
  • js/developer/environment/bundles.json
  • js/developer/environment/embed.mjs
  • js/developer/environment/installer.mjs
  • js/developer/environment/packages.mjs
  • js/developer/scripts/build.mjs
  • js/developer/scripts/embed-core.mjs
  • js/developer/tools/PUBLISHING.md
  • js/developer/tools/RELEASE_NOTES.md
  • js/developer/tools/archive-release.mjs
  • js/developer/tools/asset-header.mjs
  • js/developer/tools/build.mjs
  • js/developer/tools/bundle-inputs.json
  • js/developer/tools/check.mjs
  • js/developer/tools/development-check.mjs
  • js/developer/tools/distribution-check.mjs
  • js/developer/tools/distribution.mjs
  • js/developer/tools/fixtures.mjs
  • js/developer/tools/manifest-check.mjs
  • js/developer/tools/pages.mjs
  • js/developer/tools/pin-check.mjs
  • js/developer/tools/registry-fixture-node.mjs
  • js/developer/tools/release-check.mjs
  • js/developer/tools/restore-check.mjs
  • js/developer/tools/scripts-check.mjs
  • js/developer/tools/site.mjs
  • js/developer/tools/testing-check.mjs
  • js/developer/vendor/embed.mjs
  • js/developer/vendor/embed.test.mjs
  • js/developer/vendor/package.json
  • test/cmake/AssembleDeveloperFixtures.cmake
  • test/cmake/CheckBundleInputs.cmake
  • test/cmake/CheckBundleInputsNegative.cmake
  • test/cmake/CheckCommandNames.cmake
  • test/cmake/CheckEmbedAsset.cmake
  • test/cmake/CheckNewcomerDocs.cmake
  • test/cmake/CheckNoNode.cmake
  • test/cmake/CheckNoNodeNegative.cmake
  • test/cmake/CheckSelfBuildRefresh.cmake
  • test/cmake/NodeGuardExceptions.cmake
  • test/cmake/PrepareSelfBuildProject.cmake
  • test/cmake/RunWfDriver.cmake
  • test/developer/memory-bridge.mjs
  • test/developer/specs/development-specs.mjs
  • test/developer/specs/distribution-specs.mjs
  • test/developer/specs/environment-specs.mjs
  • test/developer/specs/manifest-specs.mjs
  • test/developer/specs/restore-specs.mjs
  • test/developer/specs/scripts-specs.mjs
  • test/developer/specs/testing-specs.mjs
  • test/developer/support.mjs
  • test/unit/CMakeLists.txt
  • test/unit/EmbeddedCoreAssetsTests.cpp
  • test/web/CMakeLists.txt
  • test/web/registry-packages.json
  • test/web/registry/build.mjs
  • test/web/registry/fixture.mjs
  • webfront-packages.lock.json
  • webfront.project.json
💤 Files with no reviewable changes: 25
  • js/developer/tools/bundle-inputs.json
  • js/developer/tools/release-check.mjs
  • js/developer/tools/fixtures.mjs
  • js/developer/tools/testing-check.mjs
  • .gitattributes
  • js/developer/tools/registry-fixture-node.mjs
  • js/developer/vendor/package.json
  • js/developer/tools/development-check.mjs
  • .gitignore
  • js/developer/tools/asset-header.mjs
  • js/developer/tools/scripts-check.mjs
  • CMakeLists.txt
  • js/core/EmbedTextAsset.cmake
  • js/developer/scripts/embed-core.mjs
  • js/developer/tools/distribution-check.mjs
  • js/developer/vendor/embed.test.mjs
  • js/developer/tools/restore-check.mjs
  • js/developer/tools/pin-check.mjs
  • js/developer/tools/check.mjs
  • js/developer/vendor/embed.mjs
  • js/developer/tools/archive-release.mjs
  • js/developer/tools/manifest-check.mjs
  • js/developer/tools/pages.mjs
  • js/developer/tools/site.mjs
  • js/developer/tools/build.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Cette PR retire Node.js et npm des parcours de build, de test et de CI décrits ici. Elle migre la génération des en-têtes vers CMake, ajoute le provisionnement vérifié des paquets de test et transfère les tests développeur vers wf test.

Changes: Parcours sans Node.js

Layer / File(s) Summary
Génération et validation des assets
js/core/EmbedAsset.cmake, js/core/WebFrontAssets.cmake, test/cmake/*, test/unit/*
CMake génère les en-têtes du cœur et vérifie leur contenu par comparaison des octets. De nouveaux tests CMake et C++ contrôlent le format, la fraîcheur et la correspondance avec les sources.
Provisionnement du registre et des fixtures
cmake/WebFrontBootstrap.cmake, cmake/WebFrontRegistry.cmake, test/web/*, test/cmake/AssembleDeveloperFixtures.cmake, test/cmake/PrepareSelfBuildProject.cmake, webfront.project.json, webfront-packages.lock.json
CMake vérifie les archives épinglées et prépare un registre local pour les tests. Les tests navigateur assemblent leurs fixtures à partir des sorties SelfBuild. Jasmine et les spécifications sont configurés dans le projet.
Spécifications développeur
test/developer/specs/*, test/developer/support.mjs
Les spécifications couvrent les fonctions de développement, de distribution, d’environnement, de restauration et d’exécution des scripts. Les utilitaires partagés chargent les modules du projet et initialisent esbuild-wasm.
Retrait des anciens outils et adaptation de la CI
.github/actions/*, .github/workflows/*, js/developer/tools/*, js/developer/vendor/*, test/cmake/CheckNoNode*
Les workflows retirent les étapes Node.js et npm. Les anciens scripts et tests Node.js sont supprimés. Une garde CMake audite les références ciblées et valide les exceptions déclarées.
Documentation des nouveaux parcours
README.md, AGENTS.md, docs/*, docs/adr/*, js/developer/tools/PUBLISHING.md, js/developer/tools/RELEASE_NOTES.md
Les guides décrivent les parcours avec CMake, wf et les archives vérifiées. Les documents d’architecture et les commandes de régénération sont actualisés.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant CMake
  participant Registry as webfront_provision_registry
  participant Archives as WEBFRONT_REGISTRY_DIR_or_TLS
  participant TestRegistry
  participant Builder as test-registry
  CMake->>Registry: Provisionner les archives du manifeste
  Registry->>Archives: Copier ou télécharger les archives
  Registry-->>CMake: Retourner le répertoire vérifié
  TestRegistry->>Builder: Construire le registre local
  Builder-->>TestRegistry: Écrire build-registry et integrities.json
Loading

Possibly related issues

Possibly related PRs

Suggested reviewers: am-l

Merge Risk: ⚪ Minimal · up to 5d5a1

No concrete issue identified here prevents merging after the usual CI checks.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Linked Issues check Warning Le PR couvre la plupart des objectifs de #318 : provisioning vérifié, exécution CTest sans Node, migration des tests, génération CMake, garde globale et nettoyage de la CI. Cependant, il retire aussi … Fournir la preuve complète de publication requise par #321, avec Pages et l’archivage des releases, avant de conserver la suppression de Node dans ces parcours. Fournir aussi une preuve révisable du traitement de `js/developer/vendor/packag…
Docstring Coverage Warning Docstring coverage is 51.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 17 files. (41 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed Le titre décrit clairement le changement principal : exécuter les tests, la régénération des assets et la CI sans Node.js.
Description check Passed La description est directement liée aux changements. Elle précise la suppression des dépendances Node.js, la migration des tests, les modifications CMake et CI, ainsi que les résultats de validation.
Out of Scope Changes check Passed Les changements restent liés à #318. Les tests Jasmine et CMake, la documentation technique, le registre de test, la génération des assets et les modifications CI soutiennent directement la suppressio…
Full details: Out of Scope Changes check

Explanation

Les changements restent liés à #318. Les tests Jasmine et CMake, la documentation technique, le registre de test, la génération des assets et les modifications CI soutiennent directement la suppression de Node.js et de npm. Aucun changement indépendant non lié n’est démontré dans le résumé du PR.

Full details: Linked Issues check

Explanation

Le PR couvre la plupart des objectifs de #318 : provisioning vérifié, exécution CTest sans Node, migration des tests, génération CMake, garde globale et nettoyage de la CI. Cependant, il retire aussi le job et les outils de publication Node sans fournir la preuve complète exigée par #318 via #321. Cette preuve doit couvrir Pages et l’archivage des releases. Le fichier exclu js/developer/vendor/package-lock.json empêche aussi d’établir l’audit complet de tous les fichiers suivis.

Resolution

Fournir la preuve complète de publication requise par #321, avec Pages et l’archivage des releases, avant de conserver la suppression de Node dans ces parcours. Fournir aussi une preuve révisable du traitement de js/developer/vendor/package-lock.json, car ce fichier est exclu de l’évidence fournie.

Full details: Docstring Coverage

Explanation

Docstring coverage is 51.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 17 files. (41 skipped: 41 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

EmbedAsset.cmake wrote CRLF on Windows (file(WRITE) is a text-mode write), so a
header it rendered was stale for its own check: file(CONFIGURE) writes LF. The
global guard skipped no empty entry of the file list. DeveloperSpecs timed out
on Windows compiling with esbuild-wasm: the two specs that did are dropped
(DeveloperBrowserIntegration covers the real compiler) and the specs now take
2.5 s. The registry no longer unpacks large archives (configure extracts their
package.json), the refresh build doubles as the reproducibility build, and the
permission test runs a script that writes at once.
Their shortening is left to a separate pull request.
Their shortening is left to a separate pull request.
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.

Tests, régénération des ressources et CI sans Node.js ni npm

3 participants