From f05eaa9c6c54eb52a823f63b700ea564efde0392 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Fri, 23 Oct 2026 15:34:34 +0200 Subject: [PATCH 1/2] Pin developer environment 0.6.0 [#321] --- include/webfront/system/DeveloperReleaseData.hpp | 6 +++--- js/developer/environment/bundles.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/webfront/system/DeveloperReleaseData.hpp b/include/webfront/system/DeveloperReleaseData.hpp index 32c7ae3b..97bbb2e8 100644 --- a/include/webfront/system/DeveloperReleaseData.hpp +++ b/include/webfront/system/DeveloperReleaseData.hpp @@ -4,7 +4,7 @@ #include namespace webfront::developer::release { -inline constexpr std::string_view version{"0.5.0"}; -inline constexpr std::string_view environment{"https://ambroise-leclerc.github.io/WebFront/developer/0.5.0/environment.tgz"}; -inline constexpr std::string_view integrity{"sha512-TV6S61kUhnCJc99/Ow890Pro47mfZ0fBqki17lx0xnpCNmcfcqZPpO1SG09Su50WIEtRDopMxt3yvanFwbLEdQ=="}; +inline constexpr std::string_view version{"0.6.0"}; +inline constexpr std::string_view environment{"https://ambroise-leclerc.github.io/WebFront/developer/0.6.0/environment.tgz"}; +inline constexpr std::string_view integrity{"sha512-xidz8ggQFo/UUTttIii+3FRJmGpQPoHhbmk9Fv/wxRA4EKEhD5WeiAcstsuY8H/wXc/jo/bljIYkzyyyrJ1oEg=="}; } // namespace webfront::developer::release diff --git a/js/developer/environment/bundles.json b/js/developer/environment/bundles.json index ccaf989f..9e67694a 100644 --- a/js/developer/environment/bundles.json +++ b/js/developer/environment/bundles.json @@ -46,5 +46,5 @@ "js/developer/vendor/package-lock.json": "f6aefe8b4cb0b15f866f41eae425f6654d2c6c2d96438fd0da878c5651585616", "js/core/bootstrap/bootstrap.bundle.mjs": "536831257f0fc92e31911841750e1e59247f7c64e756b0fcb878efd9860a741f", "js/developer/environment/packages.bundle.mjs": "e36d1052285a313f7db67c1f58f8332da9e97446b1e2085422ebdae379288045", - "include/webfront/system/DeveloperReleaseData.hpp": "d5aaddb2ba839e4c8df46b7d37e2861163233a9018b0f2fb35a6f79831e16569" + "include/webfront/system/DeveloperReleaseData.hpp": "ad3707e158b1f268c679545e17d67b6ba245b2129614cf04dfeacdb351f2a354" } From c381e91588e91cc56d723a6d0dd7830f2066b816 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Fri, 23 Oct 2026 15:40:24 +0200 Subject: [PATCH 2/2] Pin the bootstrap environment of the tests on 0.6.0 and document the release [#321] --- cmake/WebFrontBootstrap.cmake | 10 +++++----- docs/CHANGELOG.md | 4 ++-- docs/DEVELOPER_ENVIRONMENT.md | 14 ++++++-------- docs/PROJECT_STATUS.md | 6 +++--- js/developer/tools/RELEASE_NOTES.md | 2 +- test/web/CMakeLists.txt | 10 ++++++++-- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/cmake/WebFrontBootstrap.cmake b/cmake/WebFrontBootstrap.cmake index 66eec1aa..37211659 100644 --- a/cmake/WebFrontBootstrap.cmake +++ b/cmake/WebFrontBootstrap.cmake @@ -2,11 +2,11 @@ # # It is distinct from include/webfront/system/DeveloperReleaseData.hpp (the environment applications start from) and is # updated by an explicit pull request, once a published environment can build and test itself without interaction. -# 0.5.0 is the last published environment: it has no non-interactive mode yet, so the driver tests run the environment built -# from the current sources (the "environment under test") until the first environment that can bootstrap itself is pinned. -set(WEBFRONT_BOOTSTRAP_VERSION "0.5.0") -set(WEBFRONT_BOOTSTRAP_URL "https://ambroise-leclerc.github.io/WebFront/developer/0.5.0/environment.tgz") -set(WEBFRONT_BOOTSTRAP_INTEGRITY "sha512-TV6S61kUhnCJc99/Ow890Pro47mfZ0fBqki17lx0xnpCNmcfcqZPpO1SG09Su50WIEtRDopMxt3yvanFwbLEdQ==") +# 0.6.0 is the first published environment that runs a wf command without interaction (runNonInteractive). The driver tests also +# run the environment built from the current sources (the "environment under test"), which may be ahead of this pin. +set(WEBFRONT_BOOTSTRAP_VERSION "0.6.0") +set(WEBFRONT_BOOTSTRAP_URL "https://ambroise-leclerc.github.io/WebFront/developer/0.6.0/environment.tgz") +set(WEBFRONT_BOOTSTRAP_INTEGRITY "sha512-xidz8ggQFo/UUTttIii+3FRJmGpQPoHhbmk9Fv/wxRA4EKEhD5WeiAcstsuY8H/wXc/jo/bljIYkzyyyrJ1oEg==") # A directory holding environment.tgz (the pinned archive) replaces the download on a machine without network access. set(WEBFRONT_BOOTSTRAP_DIR "" CACHE PATH "Directory with the pinned bootstrap environment.tgz, instead of downloading it") diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 9f658b3f..25e7edbd 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,9 +4,9 @@ ### Added -- `webfront-wf` test driver and bootstrap provisioning (#321): runs one `wf` command without interaction on a project +- `webfront-wf` test driver and bootstrap provisioning (#321, developer distribution 0.6.0 published as `developer-v0.6.0`, pinned by `DeveloperReleaseData.hpp` and by the bootstrap): runs one `wf` command without interaction on a project and exits with its status (64 usage, 70 bootstrap failure, 71 time limit, 72 no result), with an optional JSON report. - `cmake/WebFrontBootstrap.cmake` pins the bootstrap environment (0.5.0 for now) and, with `ENABLE_TESTING=ON`, downloads + `cmake/WebFrontBootstrap.cmake` pins the bootstrap environment (0.6.0) and, with `ENABLE_TESTING=ON`, downloads and verifies it at configure time, or takes it from `WEBFRONT_BOOTSTRAP_DIR`. `environment.json` declares `protocol` and `api`; `webfront.developer.config` exposes the supported versions and the loader refuses an incompatible archive with an explicit diagnostic. The Linux CEF job blocks the public network after configure. diff --git a/docs/DEVELOPER_ENVIRONMENT.md b/docs/DEVELOPER_ENVIRONMENT.md index 7a5c12f5..40b9628b 100644 --- a/docs/DEVELOPER_ENVIRONMENT.md +++ b/docs/DEVELOPER_ENVIRONMENT.md @@ -48,7 +48,7 @@ native tests from empty working directories, with developer callbacks absent. Pa HTTP 200, CORS `*` and the pinned archive bytes. These checks supplement offline CTest fixtures. The default configuration is generated in `include/webfront/system/DeveloperReleaseData.hpp` and targets -`https://ambroise-leclerc.github.io/WebFront/developer/0.5.0/environment.tgz`. This version (project manifest, `wf restore`, `wf run`, `wf check` and the complete terminal) is published and archived as `developer-v0.5.0`. Published 0.4.1 and 0.4.0 stay immutable; 0.4.0 targets the former include layout. The configuration pins one version and +`https://ambroise-leclerc.github.io/WebFront/developer/0.6.0/environment.tgz`. This version (`wf build`, `wf dev`, `wf test` and the non-interactive entry, on top of the 0.5.0 manifest, `wf restore`, `wf run`, `wf check` and the complete terminal) is published and archived as `developer-v0.6.0`. Published 0.5.0, 0.4.1 and 0.4.0 stay immutable; 0.4.0 targets the former include layout. The configuration pins one version and its SHA-512 rather than resolving a mutable `latest` channel. An explicit `DeveloperBootstrapOptions{.environment = url, .integrity = trustedHash}` still selects a different HTTPS/CORS repository or a same-origin test fixture. Users install neither npm nor Node.js. @@ -435,8 +435,7 @@ the Worker, cancels polling and aborts staged publication; a publication already the preview before stopping. The last successful preview stays available. Browser disconnection also stops the loop. -`wf build`, `wf dev` and `wf test` are in the 0.6.0 environment sources (not published); the release pin stays on published 0.5.0. To try -them before the next release, provision an archive rebuilt from these sources as described below. +`wf build`, `wf dev` and `wf test` are in developer distribution 0.6.0, which `DeveloperReleaseData.hpp` pins (published as `developer-v0.6.0`). ## Tests (`wf test`) @@ -526,11 +525,10 @@ field). `webfront.developer.config` carries `supported: {protocol: [1], api: [1] `Incompatible WebFront developer environment: api version 2, this application supports 1`; it never falls back. A change to the callbacks increments `apiVersion` and requires publishing a new bootstrap environment. -The pin is 0.5.0, the last published environment, which has no non-interactive mode: the driver reports it as a bootstrap -failure (70). Until an environment that can run `wf test` is published and pinned (the milestone of #321, a maintainer -step), the CTest cases `WfDriver*` run the environment built from the current sources (`WEBFRONT_DEVELOPER_FIXTURES`): -`wf install` and `wf test` on a fixture project (pass, fail, report file), an unknown command, the time limit, a wrong -integrity, a missing archive and archives with an incompatible protocol or API. `BootstrapProvisioning` checks the +The pin is 0.6.0, the first published environment with a non-interactive mode (`WfDriverPinned` runs `wf init` from it; the starters are not provisioned, only the archive). The other `WfDriver*` cases run the environment built from the current sources +(`WEBFRONT_DEVELOPER_FIXTURES`), which may be ahead of the pin: `wf install` and `wf test` on a fixture project (pass, fail, +report file), a starter, an entry module renamed in `environment.json`, an unknown command, the time limit, a wrong integrity, +a missing archive and archives with an incompatible protocol or API. `BootstrapProvisioning` checks the configure-time provisioning (verified download, reuse, local directory, wrong digest, malformed value). The Linux CEF CI job blocks the public network after the configure step. diff --git a/docs/PROJECT_STATUS.md b/docs/PROJECT_STATUS.md index 6ddad553..7ab77891 100644 --- a/docs/PROJECT_STATUS.md +++ b/docs/PROJECT_STATUS.md @@ -10,8 +10,8 @@ removed without redirect headers (see `docs/CHANGELOG.md`). Browser sources live components, build tools, vendoring tools); tests live in `test/{unit,web,fuzz,fixtures,cmake}`. The CTest case `RepositoryLayout` enforces the root. The generated-provider include changed, so the developer distribution is bumped to 0.4.1, published and archived as `developer-v0.4.1`. Version 0.5.0 (project manifest, `wf restore`, -`wf run`/`wf exec`, `wf check`, the complete terminal) is pinned by `DeveloperReleaseData.hpp`, published and archived as `developer-v0.5.0`. On 2026-10-23 Pages returned HTTP 200, -CORS `*` and archives byte-identical to a reproducible local build; the live `--public` test (CEF, Linux) downloaded them, +`wf run`/`wf exec`, `wf check`, the complete terminal) was published as `developer-v0.5.0`; 0.6.0 (`wf build`, `wf dev`, `wf test`, the non-interactive entry) is pinned by `DeveloperReleaseData.hpp`, published and archived as `developer-v0.6.0`. On 2026-10-23 Pages returned HTTP 200 for 0.6.0, +CORS `*` and archives byte-identical to a reproducible local build; the live `--public` test (WebKitGTK, Linux) downloaded them, fetched React from npm, ran the PI and Life previews and generated both providers. ## CI test duration (#298, 2026-10-21) @@ -132,7 +132,7 @@ Status snapshot: 2026-07-19. Optional mddlog integration note: 2026-10-02. Newco manifest permissions, which frame the `context` API only and are not a sandbox. Peers require explicit compatible roots/direct dependencies. The environment's terminal (#308) runs `wf`, built-in and C++ commands (`webfront::Commands`: per-browser coroutine sessions, streamed output, Ctrl+C cancellation without waiting, drained at shutdown) with - multi-row editing, CJK/emoji widths, persistent history and completion. `wf build` / `wf dev` (#309, environment sources) publish manifest entries and rebuild the preview automatically with a reused esbuild context, bounded input polling, error overlays and Ctrl+C cancellation; `wf test` (#310, environment sources) runs the manifest's specs under the project's locked `jasmine-core` in a hidden frame, with a structured report, exit codes 0/1/124/130 and a non-interactive entry that reports to C++; the release pin is unchanged. `webfront-wf` (#321) runs one `wf` command without interaction and returns its status; the bootstrap environment is pinned and verified at configure time (0.5.0 for now: the first environment able to run `wf test` still has to be published and pinned), and `environment.json` declares the `protocol` and `api` versions that the loader checks. `wf restore [--offline]` (0.5.0, #306) rebuilds or checks + multi-row editing, CJK/emoji widths, persistent history and completion. `wf build` / `wf dev` (#309, environment sources) publish manifest entries and rebuild the preview automatically with a reused esbuild context, bounded input polling, error overlays and Ctrl+C cancellation; `wf test` (#310, environment sources) runs the manifest's specs under the project's locked `jasmine-core` in a hidden frame, with a structured report, exit codes 0/1/124/130 and a non-interactive entry that reports to C++; the release pin is 0.6.0. `webfront-wf` (#321) runs one `wf` command without interaction and returns its status; the bootstrap environment is pinned and verified at configure time (0.6.0, which also contains `wf build`, `wf dev` and `wf test`), and `environment.json` declares the `protocol` and `api` versions that the loader checks. `wf restore [--offline]` (0.5.0, #306) rebuilds or checks the cache from the lock, from the application's registry option, else the manifest's, else npmjs. See [DEVELOPER_ENVIRONMENT](DEVELOPER_ENVIRONMENT.md) for exact commands and limits. diff --git a/js/developer/tools/RELEASE_NOTES.md b/js/developer/tools/RELEASE_NOTES.md index bb9be579..1f0e9e24 100644 --- a/js/developer/tools/RELEASE_NOTES.md +++ b/js/developer/tools/RELEASE_NOTES.md @@ -10,4 +10,4 @@ Version 0.4.0 updates the Life starter text for a developer audience. The simula Version 0.5.0 introduces the project manifest `webfront.project.json`: `wf init`, manifest-driven `wf install` (with `--update`), `wf preview` and `wf embed`, and a lock that records the digest of the manifest dependencies. `wf install` now requires a manifest. The starters ship their own manifest. -Version 0.6.0 (in development, not published) adds `wf test` (the project's Jasmine, obtained by `wf install jasmine-core`, runs the specs of `test.specs` in the browser, with a structured report and a non-interactive entry), `wf build` and incremental `wf dev`, with bounded input polling, diagnostics in the preview and Ctrl+C cancellation. A publication whose commit has completed is displayed before cancellation ends the command. The default pin remains on published 0.5.0. +Version 0.6.0 (published as `developer-v0.6.0`) adds `wf test` (the project's Jasmine, obtained by `wf install jasmine-core`, runs the specs of `test.specs` in the browser, with a structured report and a non-interactive entry), `wf build` and incremental `wf dev`, with bounded input polling, diagnostics in the preview and Ctrl+C cancellation. A publication whose commit has completed is displayed before cancellation ends the command. `DeveloperReleaseData.hpp` and the bootstrap environment of the tests pin it. `environment.json` now declares `api` (the `webfront.developer.*` version, 1); an environment that predates the field reads as 1. diff --git a/test/web/CMakeLists.txt b/test/web/CMakeLists.txt index 73dd3041..57679989 100644 --- a/test/web/CMakeLists.txt +++ b/test/web/CMakeLists.txt @@ -91,9 +91,9 @@ if(WEBFRONT_DEVELOPER_FIXTURES # webfront_add_driver_test( # [OUTPUT ] [REPORT ] [DRIVER_TIMEOUT ] [FORGE :] - # [ENVIRONMENT INTEGRITY ] [FRESH_PROJECT ] [RENAME_ENTRY ] [REQUIRES ] [PROVIDES ]) + # [ENVIRONMENT INTEGRITY ] [FRESH_PROJECT ] [RENAME_ENTRY ] [PINNED] [REQUIRES ] [PROVIDES ]) function(webfront_add_driver_test name status command) - cmake_parse_arguments(ARG "" "OUTPUT;REPORT;DRIVER_TIMEOUT;FORGE;ENVIRONMENT;INTEGRITY;FRESH_PROJECT;RENAME_ENTRY;REQUIRES;PROVIDES" "" ${ARGN}) + cmake_parse_arguments(ARG "PINNED" "OUTPUT;REPORT;DRIVER_TIMEOUT;FORGE;ENVIRONMENT;INTEGRITY;FRESH_PROJECT;RENAME_ENTRY;REQUIRES;PROVIDES" "" ${ARGN}) set(options -DEXPECT_STATUS=${status} "-DCOMMAND=${command}") foreach(option OUTPUT REPORT) if(ARG_${option}) @@ -105,6 +105,10 @@ if(WEBFRONT_DEVELOPER_FIXTURES list(APPEND options "-D${option}=${ARG_${option}}") endif() endforeach() + if(ARG_PINNED) + # No environment passed: the driver runs the pinned bootstrap environment provisioned at configure time. + list(APPEND options -DENVIRONMENT= -DINTEGRITY= -DREGISTRY=) + endif() if(ARG_DRIVER_TIMEOUT) list(APPEND options -DTIMEOUT=${ARG_DRIVER_TIMEOUT}) endif() @@ -126,6 +130,8 @@ if(WEBFRONT_DEVELOPER_FIXTURES FRESH_PROJECT "${CMAKE_CURRENT_BINARY_DIR}/wf-driver-starter") # The entry module is the one environment.json declares, not a fixed name. webfront_add_driver_test(WfDriverRenamedEntry 0 "list" RENAME_ENTRY runner.mjs) + # The pinned bootstrap environment, downloaded and verified at configure time, runs a command by itself. + webfront_add_driver_test(WfDriverPinned 0 "init" PINNED OUTPUT "Created webfront.project.json" FRESH_PROJECT "${CMAKE_CURRENT_BINARY_DIR}/wf-driver-pinned") webfront_add_driver_test(WfDriverUnknownCommand 1 "nosuchcommand" OUTPUT "nosuchcommand") webfront_add_driver_test(WfDriverTimeout 71 "run|sleep" OUTPUT "time limit of the driver" DRIVER_TIMEOUT 4) webfront_add_driver_test(WfDriverWrongIntegrity 70 "list" OUTPUT "Integrity check failed"