Repository navigation
Browser path: cypkg on ari's wasm page, tested in Chrome, deployed to GitHub Pages - #2
Merged
Merged
Conversation
tools/site.sh assembles /apps/cypkg/ from ari's xterm.js page (transfix/libcvc#887) and share/cypkg/. web/ariadne.config.json pins main.ari, turns the network on for the page's own origin and passes --server {origin}, so cypkg browses the registry that serves it. The fixture registry serves a site too (--site), with a strict CSP. tests/browser.mjs drives the page in headless Chrome over DevTools with real keys and checks the terminal's text: 7 steps, passing locally. The first results show 3.7 s after navigation; ari.wasm is 3.1 MB gzipped. CI gains a browser job that builds ari's single-threaded wasm page from libcvc with #887 too and runs the test. tools/libcvc.sh does both jobs' fetching and merging; tools/libcvc-resolve.py resolves the one known conflict (#887 and #896 in src/ari/main.cpp) and fails on any other.
Until a registry serves /apps/cypkg/, CI publishes the browser build to https://cy-pca.github.io/cypkg/. The browser job assembles it from the page it just tested, with web/ariadne.config.pages.json (--net-allow https://cvcpkg.org, --server https://cvcpkg.org), and a pages job deploys it on pushes to main. tools/site.sh takes the config as an optional third argument. That origin needs cvcpkg.org's CORS to allow it. Served locally from a plain static server, the page loads and runs, and its search is blocked only by the missing Access-Control-Allow-Origin (roadmap C5).
libcvc master (#889) added #include <cstdlib> at the top of state_exec_builtins_test.cpp, where #883 adds #include <cmath>, so #883 stopped merging and both CI jobs failed at their checkout. A conflict whose two sides only add #include lines now keeps both, sorted, in any file. With it, all seven PRs merge onto master again, and tests/run.sh passes on the ari built from them.
In CI every step passed, then rmSync failed with ENOTEMPTY on the profile Chrome was still writing as it shut down, and the job failed. Wait for Chrome's exit (at most 5 s), retry the removal, and never let cleanup change the result.
cy-pca/llm-gate@v1 fails a pull request (and a push to main) whose commits, title or description carry AI-assistant attribution: co-author trailers naming an AI, "generated with" footers, AI session links, AI bot authors. The same workflow as cy-pca/cvcpkg's, on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cypkg's browser path. The same documents run in ari's xterm.js page, the FTXUI backend built for wasm (transfix/libcvc#887), served from the registry's own origin.
What's here
tools/site.sh ARI_WEB OUTassemblesOUT/apps/cypkg/from ari's page files (ari.html,ari.js,ari.wasm,ari-web.*,xterm/) andshare/cypkg/*.ari.index.htmlis a copy ofari.html, so/apps/cypkg/opens the terminal.web/ariadne.config.json:src_param: false);--net);--server {origin}, so cypkg browses the registry that serves it.Host flags come only from this file, never from the URL.
--site DIR. It serves the site and the API from one origin with a strict Content-Security-Policy, as a registry should serve/apps/cypkg/(C1).tests/browser.mjsruns the page in headless Chrome over DevTools (Node 22, no other dependency). It sends real keys and reads the terminal's text throughwindow.ariadneWeb.text(). Its 7 steps mirror the tmux test:It fails on a page failure, a document warning or a CSP violation.
browserjob. It builds ari's single-threaded wasm page from libcvc with #887 too, using cvcpkg's emsdk and wasm deps as libcvc'sari-wasmjob does, caches it by source tree, assembles the site and runs the test.tools/libcvc.shnow does both jobs' fetching and merging.tools/libcvc-resolve.pyresolves the one known conflict: #887 and #896 insrc/ari/main.cpp, where both sides of both hunks are wanted. Any other conflict fails. Delete it once either PR is rebased onto the other or merged.Checked locally
tests/run.shwith every layer passes, including 3c (the browser).--netfrom the config fails the browser test at its first step, with the reason in the log.ari.wasmis 8.8 MB raw, 3.1 MB gzipped;ari.jsis 26 KB gzipped;xterm/is 0.4 MB.GitHub Pages (55a9be0)
main's tested page to https://cy-pca.github.io/cypkg/. Pages is enabled for this repo with GitHub Actions as its source.web/ariadne.config.pages.json(--net-allow https://cvcpkg.org,--server https://cvcpkg.org). Apagesjob deploys it on pushes tomainonly.https://cy-pca.github.iowith CORS (CVCPKG_CORS_ORIGINS). Today it doesn't: the preflight is a 400, and GETs carry noAccess-Control-Allow-Origin.Not in this PR