Repository navigation
Serve the developer distribution from dist.webfront.fr (#478) - #479
Conversation
…Pages CNAME (#478) The base URL moves to the custom domain and the sources advance to 0.6.5, which is not published yet: the pin stays on 0.6.4. site.mjs writes the CNAME file of the Pages branch from the base URL and the workflow versions it. wf run pin fetches the pinned archive where the distribution is served now, since the former github.io address redirects without CORS headers.
|
Warning Review limit reachedYou'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 20 minutes. View limit details
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. |
There was a problem hiding this comment.
🔵 Needs a closer look
Verifying the change would require confirming external, non-verifiable state—the actual bytes served at dist.webfront.fr, the DNS/CNAME and Pages HTTPS configuration, and the accepted breaking change for binaries pinned to the old github.io address—none of which can be checked here, and CI and full CTest were not run.
No open issues 🎉
What changed in this PR
This PR moves the WebFront developer distribution from the GitHub Pages project address (https://ambroise-leclerc.github.io/WebFront/) to the custom domain https://dist.webfront.fr/, per issue #478 and ADR-021 (#477). It advances the distribution sources to the unpublished 0.6.5 while deliberately keeping the merged pin in DeveloperReleaseData.hpp on the published 0.6.4, and teaches the publication tooling to emit a CNAME file and to verify the pin against wherever the distribution is served now. It explicitly does not close #478 (publishing 0.6.5 and re-pinning in DeveloperReleaseData.hpp / WebFrontBootstrap.cmake remain follow-up work).
Changes:
- New
customDomain()helper andsite.mjswriteDomain()write a rootCNAMEfor a custom-domain base URL (none for agithub.ioaddress), staged by the Pages workflow on every publication. pin.mjsnow fetches the pinned archive from the currentdistribution.jsonbase URL (the old address 301-redirects without CORS), relying on the pinned SHA-512 for integrity;permissions.fetchanddistribution.jsonbaseUrl updated accordingly.- Refreshed
bundles.jsonchecksums for the three changed inputs and updated changelog /DEVELOPER_ENVIRONMENT.md.
I verified the three refreshed bundles.json SHA-256 values exactly match the committed files, customDomain() logic and its test cases are internally consistent, the new writeDomain() callers all provide distribution.json, the workflow stages the new CNAME, and no remaining in-scope file (including PUBLISHING.md) carries a now-stale address. I found no objective defects to comment on. The remaining risk is operational and not verifiable in this environment (DNS/Pages/HTTPS/CORS state and the actual bytes served at the new domain), which I've recorded for human attention.
| File | Description |
|---|---|
js/developer/tools/distribution.mjs |
Adds customDomain() deriving the Pages custom domain from the base URL (empty for github.io, root-only). |
js/developer/scripts/site.mjs |
Writes the CNAME file from the distribution base URL during staging. |
js/developer/scripts/pin.mjs |
Fetches the pinned archive from the current base URL instead of the pinned header's (old) URL. |
js/developer/tools/distribution.json |
Advances version to 0.6.5 and switches baseUrl to https://dist.webfront.fr/. |
js/developer/webfront.project.json |
Allows fetching from the new dist.webfront.fr origin. |
.github/workflows/DeveloperDistribution.yml |
Stages the generated CNAME into the Pages commit when present. |
js/developer/environment/bundles.json |
Refreshes SHA-256 checksums of the three changed inputs. |
test/developer/specs/distribution-specs.mjs |
Adds specs for customDomain and CNAME staging; provisions distribution.json for existing staging test. |
docs/DEVELOPER_ENVIRONMENT.md / docs/CHANGELOG.md |
Document the domain move, the 0.6.5 advance, and the break for binaries pinned on the old address. |
Review effort: Balanced
…thub.io (#478) A script cannot delete a file, so site.mjs refuses a site that still has a CNAME without a custom domain, and the workflow removes it before staging so that the Pages commit records the deletion.
Refs #478, ADR-021 (#477). Does not close the issue: publication of 0.6.5 and the pin remain.
Changes
distribution.json:baseUrlbecomeshttps://dist.webfront.fr/; the sources advance to 0.6.5 (unpublished). The pin inDeveloperReleaseData.hppstays on the published 0.6.4, as for previous versions. Changing the base URL on 0.6.4 would have made the pinned header differ from a fresh build.site.mjswrites theCNAMEfile from the base URL (none for a github.io address; a custom domain must serve the site root); the workflow adds it to the Pages commit.pin.mjsfetches the pinned archive where the distribution is served now. The former github.io address answers with a 301 that carries no CORS headers, so a browser (and the wf script fetch) cannot follow it; the pinned SHA-512 still proves the bytes.permissions.fetchallows the new origin.bundles.jsonchecksums refreshed for the three changed inputs; the bundles themselves are unchanged. Changelog andDEVELOPER_ENVIRONMENT.mdnote the rupture for builds pinned on the old address.Verified locally
wf test: 124 specs pass (CEF driver under Xvfb).wf run pin: pins the published 0.6.4, fetched from dist.webfront.fr.wf run build build-distribution: header for 0.6.5 points to dist.webfront.fr.CheckBundleInputs: 48 inputs match.Known consequence
Binaries compiled with the former address (library 0.6.0 to 0.8.0) can no longer start the developer bootstrap in a browser. Measured in Firefox on 2026-11-02 and accepted in ADR-021.
Limit of the pin check
wf run pinproves the pinned bytes (fetched where the distribution is served now), not that a browser can start from the pinned address. Until 0.6.5 is published and pinned,DeveloperReleaseData.hppstill names the former github.io address, so an application built from this branch cannot start its developer environment in a browser (the domain was activated before this PR; merging it does not change that). The script now prints a WARNING in that case. Once the pin is on 0.6.5, the CI comparison with a fresh build guarantees the header carries the new address. Publishing 0.6.5 is the next step of #478.