Repository navigation
Build again after #1203: cmd_trace and the rich-text tests take their app - #1225
Merged
Merged
Conversation
… app #1203 gives every cvc command its app as an argument, removes cvc_app() and makes cvc::ariadne::load_string take the app. It merged after #1168 and #1180, whose new code still used the old forms, so master does not build: - src/cvc-cli/main.cpp: cmd_trace (#1168) takes cvc::app & like the other commands and replays on it, not cvc_app(). - src/cvc/tests/ariadne_runtime_test.cpp: #1180's three AriadneRichText tests pass their app to load_string; each already makes one.
transfix
enabled auto-merge (squash)
November 14, 2026 08:27
This was referenced Nov 14, 2026
transfix
added a commit
that referenced
this pull request
Nov 14, 2026
…e browser test's fixture) into feat/wasm-weighted-gas
transfix
added a commit
that referenced
this pull request
Nov 14, 2026
Master gained #1203 (this branch's base), #1192 (state_exec Stage S, several steps a pick) and ten others. Conflicts, both #1192's run code against this branch's registry work: - async_scheduler.cpp: the slice setters from #1192, set_cycle_registry from here (it also gives the evaluator the registry). The cycle check takes the registry in the evaluation context (the one given, else its evaluator's own) where #1192 fell back to the thread's own, which this branch removes; collect_cycles_if_due now takes a registry. A run's steps go through the same context as its first; step_run's drain check is check_not_in_kernel, as step_once's is. - state_exec_groups_test.cpp: OC01's caller-pumped case keeps #1192's one step a pick and this branch's watched group. The file's note on leaks no longer speaks of a thread's own registry. Semantic, not textual: - #1192's Slices tests: SL04's spin-step and SL08's heavy take call_args and reach their context through it (eval_deadline_check(a.context()), a.context()->data), as this branch's other natives do. - cvc-cli's trace command (#1168) takes its app, and #1180's three rich-text tests pass theirs to load_string. Both landed after #1203's last master merge and still used what #1203 removed, so master does not build at 7ead20e or 69c7091; #1225 makes the same change there. Checked on Windows (MSVC Release): full build; groups 28/28; Slices and run-budget tests 19/19; rich text and heap 10/10; the cycle collector and registry tests, pycvc_ariadne, CvcCliTest.TraceInfoAndVerifyReplayASession and state_exec_async_test_slice256, 20/20.
transfix
added a commit
that referenced
this pull request
Nov 14, 2026
Conflict in src/cvc/world/generated_world.cpp: master's #1203 made the terrain generators each app's own (generators(app), terrainFrom), and #1215 had put the shore edge (shore_terrain) in the old make_terrain. shore_terrain now sits beside terrainFrom, which wraps any app's generator in it, so make_terrain(app, p) and to_world_params(app, p) both get the shore. #1203 also broke code that only feat/world-gym has: its edge and gym tests call generate_world, make_terrain and load_string without an app. They make one first now. cvc-cli's cmd_trace and three ariadne_runtime_test rich-text tests do not build on master itself after #1203. This takes #1225's fix for them line for line, so that #1170 builds; the two merge cleanly either way.
This was referenced Nov 14, 2026
This was referenced Nov 14, 2026
transfix
added a commit
that referenced
this pull request
Nov 14, 2026
…wser (G2, second part) (#1206) A guest's work now counts the same on wasmtime and in the browser, and however a call is sliced. - meter.h/.cpp: the gas pass, in C++. It reads a core module, charges each metered block's cost against a new exported i64 global, ari_gas, inline, and calls a new import, ari.gas(cost), only when the slice can't pay for the block. A block starts at a function's entry and after loop, if, else, end and the conditional branches. An instruction costs what wasmtime's fuel charges. The new import shifts every defined function's index, in calls, ref.func, element segments, exports, the start function and the name section. ari_gas starts at the start function's allowance. - It refuses GC types and instructions, the legacy exception handling, components, and code that names a global index the pass's own would take. A module that imports ari.gas already is left as it is. - It's C++ rather than paritytech/wasm-instrument, which the roadmap named: that crate and its parser, parity-wasm, haven't changed since 2022, and parity-wasm doesn't read reference types, which LLVM 19 turns on by default for wasm32. - meter_main.cpp: ari_wasm_meter, the pass as a command. Under Emscripten it runs in node. - cvc_ariadne_wasm_transform: binaryen reads the guest, ari_wasm_meter meters it, then wasm-opt --asyncify --pass-arg=asyncify-imports@ari.* -O1. This replaces --log-execution. - wasmtime validates and meters each module it compiles. A poll sets ari_gas to its slice; ari.gas is an async import that ends the poll. When a charge ends a slice, the next slice is at least that block's cost. Fuel stays on as a backstop (16 units per unit of gas). A start function past its allowance traps instead of hanging. - browser_runtime.cpp pauses at ari.gas instead of counting log_execution checks. The page sets ari_gas before each call, and the gas the guest took is the call's. kFuelPerCheck is gone. - Call::poll(gas), gas_used() and Instance::run(..., gas, ...) replace the fuel names. - Tests: WasmGasTest (ariadne_wasm_test). A module naming functions everywhere runs as it did. count(1000) costs 8001 in slices of 1, 7, 8, 100, 4096 and in one. A module is metered once. What the pass can't read is refused, and every prefix of a module is read or refused. A start function that never ends is refused. WasmTransformed.ASpinCountsTheSameOnBothBackends: the transformed guest's spin costs 24,000,001 in one slice and in 376 of 64,000, on wasmtime and in the browser. - The WASI guest (#1199) is metered and Asyncified in the transform too, and the transform passes binaryen CVC_WASM_GUEST_FEATURES on both runs. - The branch also carries the compile fixes for #1203's API change that #1225 and #1229 bring to master (cmd_trace, the rich-text tests' load_string, the browser test's fixture), which master may have first.
transfix
added a commit
that referenced
this pull request
Nov 14, 2026
…#1222-#1225, #1229) Master's #1190 (file-pick and http-upload) was written for a single async host; this branch runs an isolated document's programs on its own group's host, on a pool worker in an `any` group. - net_intrinsics.cpp: StartedRequest takes master's deliver()/on_outcome, settling through the host's finisher. http-upload is its own provider, `any` as the requests are: it parks on the calling program's host (ictx.host), takes its progress path from ictx.root_path (no tree walk on a worker), and a started upload (a browser page) keeps the host's finisher, not the host. - ariadne.cpp: file-pick, file-info and file-forget bind into the program's env as they are, in every group (install_backend_verbs), not through the backend verbs' host_proxied wrapper, which cannot park an async verb. file-pick parks on the program's own host, claims the Runtime's picker hub under its lock where it is called, and opens the picker on the host thread (exec_pool::run_on_host; inline when called there). Its answer goes through the host's finisher, as the host may be gone by then. - ci.yml: the sanitizer list keeps this branch's tests and master's point_classes_test. - STATE_EXEC_THREADED.md: rows for http-upload, the file verbs, and the contours and point-classes providers. The last two are registered without a kind, so they are host_only, and an isolated document in an app that installs them goes to a host-affinity group. - New test: AriadneIsolatedDocs.FilePickOpensItsPickerOnTheFramesThread.
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.
Master doesn't build since #1203 merged (7ead20e, still so at 69c7091). #1203 gives every
cvccommand its app as an argument, removescvc_app()and makescvc::ariadne::load_stringtake the app. #1168 and #1180 merged just before it, and their new code still uses the old forms:src/cvc-cli/main.cpp:cmd_trace(Input traces: record a session's inputs by tick and replay them exactly (R49) #1168) had the old(int, char **)signature, so it no longer fits the command table, and it calledcvc_app(), which is gone. It now takescvc::app &like the other commands and replays on that app.src/cvc/tests/ariadne_runtime_test.cpp: Ariadne: rich text, runs: on a text: with links (§5.20) #1180's threeAriadneRichTexttests calledload_string(yaml). They pass their app now; each test already makes one.MSVC, with these two files fixed:
error C2660: 'cvc::ariadne::load_string': function does not take 1 arguments(ariadne_runtime_test.cpp lines 8855, 8904 and 9000), andcvc_appundeclared incmd_trace.Checked
ninja -k 0).ctest -R "AriadneRichText|CvcCliTest"passes, 197/197, including all 8AriadneRichTexttests andCvcCliTest.TraceInfoAndVerifyReplayASession.Every open PR's CI builds its merge with master, so until this lands, each one fails at
cvc-cliorariadne_runtime_testwhatever its own change is. #1171 already has the samecmd_tracechange; the two merge cleanly.