Repository navigation
Conversation
dispatch_seq folds the spec's one-token step over a sequence of tokens; incremental_new_ensures and incremental_pump_ensures state what the incremental driver (exec::incremental, next commit) is to meet: the initial parser, and a pump that leaves the parser where the spec's step takes it over some tokens, returning for actions, at the insertion point, or once stopped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…shared natives WebIDL attributes are accessor properties on prototypes (WebIDL §3.7.6), so item 7.12 needs them in the engine: - clazel-js-vm: an accessor property is an ACCESSOR attribute bit and a Cell::Accessor pair in its slot. OrdinaryGet (§10.1.8.1 steps 4 to 8) and OrdinarySetWithOwnDescriptor (§10.1.9.2 steps 4 to 7) call the getter and setter with the receiver, for property reads and writes, global identifiers and primitive bases; ValidateAndApplyPropertyDescriptor (§10.1.6.3) gets its accessor steps (2.c, 5.c, 5.d, 6.a, 6.b); object literal getters and setters (DefineMethod forms 1 and 2) run; the instanceof operator (§13.10.2, OrdinaryHasInstance §7.3.21) runs. - clazel-js-builtins: ToPropertyDescriptor (§6.2.6.5) reads get and set. - clazel-js: define_property takes accessors; get_own_property; delete_property, new_array, new_array_from and is_array over the VM's arrays; shared_function, a re-entrant native for Sync closures (open question 14's proposal, beside function, which keeps its Busy rule). The Test262 runners gain two classifications for tests that instanceof now reaches and that stop at the missing eval (fail stays 0). The API test that listed arrays and delete_property as NotImplemented now asserts that they work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scope::function and define_method take Fn + Send + Sync, and the table holds each closure in an Arc that a call clones, so JavaScript that calls a native function while it is running runs it again, nested, instead of getting Error::Busy. HTML's document.write needs this: it runs the parser, which runs a script, which calls document.write (item 7.15). The test that pinned Busy now checks a three-deep re-entrant call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spec and the contracts first (CLAUDE.md rule 3); the exec functions and their theorems follow in the next commit. - set_data: DOM §4.10 "replace data" with offset 0 and count the node's length, which is what CharacterData's data setter (and textContent and nodeValue on character data) do. Requires a Text, Comment or ProcessingInstruction node. - set_wrapper: the wrapper slot Phase 4 reserved becomes the bindings' object id; nothing else changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… step's contract exec::incremental::Incremental is Phase 4's "a driver, not a restructured spec": the proven tokenizer and step over an input stream that grows at the insertion point (document.write), pausing after every step that asks for an action (ScriptReady), at the insertion point, and at the end of an input that is not closed (a document.open parser). Verus proves that every call meets its callee's contract, that the invariant holds after every method, that every pump ends, and incremental_pump_ensures: the parser after a pump is the parser before given some tokens by the spec's step. It is not proven equal to parse; the html5lib document cases run through it and give parse_real's tree, and cases naming no scripting flag are now checked with scripting on as well (all 1,931 give the same tree). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HTML's "clean up after running script" performs a microtask checkpoint when the last script on the stack returns; a host that runs a page's scripts from one scope (item 7.15) reaches the job queue there. Runtime::run_jobs now calls it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exec functions meet the contracts of the previous commit, and Verus proves them (477 verified, 0 errors locally): - theorem_set_data_wf and theorem_set_data_host_acyclic: replacing all of a character data node's data keeps wf and host_acyclic, the node keeps its kind (and a processing instruction its target), its data is the new data, and every other node is unchanged. - theorem_set_wrapper_wf and theorem_set_wrapper_host_acyclic, through lemma_set_wrapper_wf (no clause of wf_with reads a wrapper): the slot holds the given id and nothing else changes. Two mutations, each killed with a certificate: set-data-keeps-old and set-wrapper-ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ppers, DOMException Item 7.12 over clazel-js's public API: - xtask/src/bindings/glue.rs: cargo xtask bindings now also writes src/generated/bindings.rs from the vendored IDL: for each exposed interface a trait the platform implements (IDL values as Rust types; every method defaults to a NotSupportedError naming the member), a native function per member (this check, argument count, conversions, overload resolution, the call, the result), and the installation of interface objects, prototypes, constants, attributes and operations (WebIDL §3.7). Dictionaries, enumerations and unions become Rust types with their conversions (§3.2.18, §3.2.19, §3.2.24). Members it cannot bind are listed with the reason in the file's header. check keeps failing when the file is stale. - convert.rs: §3.2 for every type used (ConvertToInt with EnforceRange and Clamp, float and double, DOMString with LegacyNullToEmptyString, ByteString, USVString, object, interface, callback interface and function, sequence from an Array). - overload.rs: the effective overload set and the overload resolution algorithm (§2.5.8, §3.6). - platform.rs: one wrapper per platform object, made on first access with its unforgeable members and kept by the platform; brand checks; [SameObject]. - install.rs: [Replaceable], [PutForwards]; exception.rs: DOMException. - tests/bindings.rs: idlharness-style checks over a small platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripting::Page parses a document with the scripting flag on through clazel-treebuilder's incremental driver and runs its scripts through clazel-js's public API, its state in the engine's Host: - "prepare the script element" (HTML 4.12.1.1) on ScriptReady: the type string, classic and module scripts, inline and external ones (fetched by the embedder: take_requests and fetched), async, defer, the pending parsing-blocking script, nomodule, event/for; mark as ready; execute the script element with document.currentScript; create and run a classic script, reporting exceptions, with a microtask checkpoint when the last script returns; - the text mode's end tag script steps (script nesting level, parser pause flag, insertion point), the tokenizer blocked on a parsing-blocking script, abort a parser, and the end (deferred scripts, DOMContentLoaded, the load event's wait for async scripts); - document.write, writeln, open and close, as edits of the input stream at the insertion point; - module scripts' HTML half (module map, fetch a single module script, HostLoadImportedModule, fetch the descendants of and link, run a module script), which ends in the engine's NotImplemented today; - evaluate a javascript: URL, and performance.now() coarsened to 100 us; - the minimum globals before 7.12's bindings: document (write, writeln, open, close, currentScript), performance.now, a wrapper per node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion-timing pages tests/scripting.rs checks each algorithm step: inline, external, async and defer ordering, the parsing-blocking script, document.write (nested, split tags, from external scripts), open and close, currentScript, javascript: URLs, module scripts reaching the engine, performance.now's coarsening, and a meta charset's reparse. It runs the six html5lib scripted_*.dat tree-construction cases (2 pass, 4 listed: they need 7.12's DOM methods) and 21 vendored WPT execution-timing pages with a stand-in for testharness.js and testlib.js, which the engine cannot run yet (17 pass, 4 listed: eval, Location, DOM methods, timers). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A click on a link whose URL is a javascript: URL sends no Navigate: the URL is the page's to evaluate in its own renderer (item 7.15), and the kernel never sees it. This renderer does not host scripting::Page yet, so the click does nothing for now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Page is the clazel-js host and clazel-webidl's platform (items 7.12, 7.13, and 7.15's Window, Location, History, Navigator and console): - Node, Document, DocumentType, DocumentFragment, CharacterData, Text, Comment, Element, NodeList, HTMLCollection, DOMTokenList and the exposed HTML element interfaces, over clazel-dom's proven operations (pre-insert, replace, replace all, remove, clone, attribute changes, set_data), with their preconditions checked first. A node's wrapper is kept in clazel-dom's wrapper slot, the others' in a side table. - EventTarget, Event, CustomEvent, AbortController and AbortSignal over the events module's dispatch; listeners are JS values kept by handles, and a listener can read the event and change listeners while it runs; its exception is reported to the host's log. events::TargetId gains Object for targets that are not nodes. - Window, Location (navigation through PageHooks::navigate), History (pushState and replaceState with "can have its URL rewritten", through PageHooks::update_url), Navigator with a fixed user agent string naming only Clazel, and console, written by hand (console.idl is not vendored), which logs to the host and never to the page. - tests/bindings.rs runs script against parsed documents, with checks transcribed from WPT's dom/ and html/ tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Miri The run took 201 s under Miri with every 7th page; two pages keep it near 130 s, well under the 300 s limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Miri found it: 4294967297 converted to long gave 0 under Miri and 1 natively, because step 10 used f64 %. Step 10 is now computed exactly on the double's significand and exponent, and [Clamp]'s round-half-to-even reads the parity of an integer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides made native closures re-entrant. One API: every closure is an Arc<NativeFn> that is Send + Sync (#294's design); Scope::shared_function (#295's name) stays as an alias of Scope::function, and SharedNativeFn is an alias of NativeFn. Cargo.toml dependencies are the union. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne host (7.15, 7.12) HTML's script processing and the WebIDL platform objects were each a clazel-js Host. A runtime has one, so scripting's state is now a field of page::Page (the parser's tree moves to Page::arena when the parser is done) and Page forwards the module-loading and rejection hooks to it. Both sides' tests pass unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vent loop (7.15, 7.17) Page::for_document takes the renderer's parsed tree, reaches its script elements in tree order through HTML's script processing, and installs the bindings with the members HTML adds (timers, queueMicrotask, requestAnimationFrame, performance.now, localStorage, document.write and cookie, readyState, currentScript). The event loop drives timers and microtasks, lifecycle events reach addEventListener listeners, and cookies, storage and navigation go through PageHooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The graphical renderer hands the parsed tree to clazel-web's page and keeps it running: scripts before the first paint, FetchScript for external ones, timers and microtasks between messages, a restyle, layout and paint after a script changed the document, a clicked javascript: link run in the page, Navigate and UpdateUrl from location and history, and cookies and storage as the kernel's messages waiting for their answers. The socket is shared with the natives (page::link) and read with a timeout where the host allows one. Phase 2's line scripts are retired: a kind 1 commit is JavaScript, run in an empty document, with the same messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…un are JavaScript Phase 2's kind 1 format is deleted with its parser. The host tests, the adversarial run, the exit demo and the WPT cookies/ run send the same messages from JavaScript; the cookie run writes any cookie text as a string literal, so no case is skipped for not fitting a line. The bad-script test now expects an uncaught ReferenceError on stderr and exit status 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in the bindings (7.14) - Vendor webref's pointerevents.idl (the only file that has MouseEvent and WheelEvent at the pinned commit), and drop MouseEvent and MouseEventInit from the generator's EXTERNAL list. - The generator gives an event handler IDL attribute (EventHandler, OnErrorEventHandler, OnBeforeUnloadEventHandler: HTML 8.1.8.1) a getter and setter that call Platform::event_handler_get and event_handler_set with the event type's name, as [Reflect] ones call reflect_get; convert::event_handler is the [LegacyTreatNonObjectAsNull] conversion. Previously these attributes were left out. - Expose UIEvent, MouseEvent, WheelEvent, KeyboardEvent, FocusEvent, InputEvent and UserActivation. - Regenerated bindings; the model's counts and the test mock follow. clazel-web does not build against this commit alone: the next one implements the new traits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DOM 2.9 dispatch gains the activation target and the legacy-pre-activation, activation and legacy-canceled-activation behaviors; the page implements UIEvent, MouseEvent, WheelEvent, KeyboardEvent, FocusEvent, InputEvent and UserActivation, event handlers (HTML 8.1.8: IDL attributes and content attributes, compiled on first use), user activation (HTML 6.4), focus, and the input API the renderer calls: click, key, wheel, scroll. Default actions: following a link, submitting and resetting a form (through clazel-forms' submit_exec), checkboxes, radios, labels, Tab, Enter and implicit submission. The "events are recorded, not dispatched" note is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(7.14) A click Input is hit-tested through layout to an element and dispatched as mousemove, mousedown, mouseup and click with the default actions (links, forms, checkboxes, focus); a scroll Input is a cancelable wheel event and, if the page scrolls, a scroll event; a key Input goes to the focused element. A page repaints only if a listener or a javascript: URL ran. A POST form is the kernel's Submit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…om/events through a stand-in harness (7.14) - window.event is the event whose listener is running (DOM 2.10 inner invoke). - document.createEvent for Event, CustomEvent, UIEvent, MouseEvent, KeyboardEvent and FocusEvent (DOM 4.5's table; the other interfaces are NotSupportedError). - Event.timeStamp reads the page's clock, as performance.now() does. - tests/wpt_events.rs runs 64 vendored dom/events pages with a stand-in for testharness.js: 38 pass (109 subtests), 26 are listed with the reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ppy's too_many_arguments initMouseEvent and initKeyboardEvent have 15 and 10 arguments, more than clippy's too_many_arguments (7), which the workspace keeps. The generator gives an operation of more than 7 parameters one struct for its arguments. clippy and tests of clazel-web, clazel-webidl and clazel-renderer are clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 23, 2026 18:49 — with
GitHub Actions
Error
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 23, 2026 19:48 — with
GitHub Actions
Error
… sandbox; the engine makes no thread of its own The Linux seccomp filter has no clone, so the engine's helper threads (a 256 MiB-stack thread for any source over 64 code points to parse and any program over 256 AST nodes to compile) killed the sandboxed renderer with SIGSYS as soon as a page ran a script of any size. - clazel-js-syntax and clazel-js-vm: an off-by-default switch (exec::set_inline, clazel_js::set_inline_parsing) makes the two helpers run on the calling thread; a counter lets tests see that no thread is made. - clazel-renderer: sandbox::enter_process (no_new_privs and the namespaces on Linux; Seatbelt on macOS, which confines every thread; the AppContainer check on Windows, which is the process's) on the only thread, then the renderer thread (256 MiB stack, inline parsing on) is made and calls enter_thread (Landlock, and the seccomp filter on every thread with SECCOMP_FILTER_FLAG_TSYNC, so the main thread, which only joins, is filtered too). The order differs from "spawn, then enter from inside" because unshare(CLONE_NEWUSER) fails in a multithreaded process, and the renderer's filter was installed without TSYNC (only the GPU process's was). - Tests: three binaries (syntax, vm, clazel-js) fail if a thread is made with the switch on, and show the default still makes one. No clazel-sys or allowlist change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… renderer's own stack The thread made before the sandbox cannot be made: after unshare(CLONE_NEWPID) clone with CLONE_THREAD fails with EINVAL (Linux repro: "cannot make the renderer thread: Invalid argument"), and unshare(CLONE_NEWUSER) fails once there is a second thread, so the thread can be made neither before nor after the namespaces. The renderer is single-threaded again, with the engine's inline-parsing switch on (so no helper thread, no SIGSYS). A source nested at the parser's limit may overflow the main stack; that ends the renderer, inside the sandbox. enter_process and enter_thread stay (enter() is both). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 23, 2026 22:11 — with
GitHub Actions
Error
On Linux the standard library reads a UnixStream with recv, which is the recvfrom system call; the renderer's seccomp allowlist has read and leaves recvfrom out, so a graphics renderer was killed with SIGSYS on its first read (CI: browse_gpu, sheets, reftests). Set the timeout through the UnixStream before the sandbox, then read through a File on the same descriptor; SO_RCVTIMEO applies to read as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
temporarily deployed
to
full-verification
November 23, 2026 23:13 — with
GitHub Actions
Inactive
…tays Each builds a page with every generated WebIDL interface: about 290 s of Miri time, almost all installation, over xtask's per-test limit in total (the Miri job timed out at 6 h). a_page_with_the_bindings_runs_a_script (262 s) keeps the installation covered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
temporarily deployed
to
full-verification
November 24, 2026 15:08 — with
GitHub Actions
Inactive
Both sides carry the accessor commit (4d0c1d5 here, 02c1cb2 on main, rebased onto Promise/RegExp/Symbol). The engine files were merged with 4d0c1d5 as the base, so main's rebased accessor work, classes, Object, Map/Set and Reflect come in whole, and this branch's later engine changes (re-entrant natives, Scope::run_jobs, the inline-parsing switch) stay: - clazel-js-vm (handlers, heap, interp, props), clazel-js-builtins (object, conformance_builtins), clazel-js tests/accessors: main's. This branch had nothing past the accessor commit in them. - clazel-js (scope, state, native, lib, api tests): main's plus this branch's re-entrance and run_jobs; README open question 13 from main, 14 (answered) from here. - clazel-web Cargo.toml: clazel-js is already a dependency here, so main's second entry is dropped; the README no longer calls it dev-only. - Cargo.lock: this branch's, then `cargo update -w` (clazel-js-builtins now names clazel-js-regexp). Now that classes and for...of run, two WPT dom/events pages pass (EventTarget-constructible, passive-by-default) and leave the expected failures (40 pass, 226 subtests, 24 listed), and the scripting test of an engine report uses a BigInt literal instead of a class. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
temporarily deployed
to
full-verification
November 24, 2026 17:50 — with
GitHub Actions
Inactive
A property slot with the ACCESSOR bit may hold a Cell::LazyAccessor: the property exists, in its place and with its attributes, and the embedder's maker is asked for [[Get]] and [[Set]] the first time something needs either (Vm::accessor_pair), which turns the cell into an Accessor in place. The four readers of a pair go through it; an own property's enumerability is answered from its attributes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…en first needed Script cannot tell: tests/lazy_accessors.rs runs 28 first uses on an object built each way and compares what the script saw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A page defines about 550 attributes (940 getter and setter functions) and uses few. Miri time of a page with every interface and a one-line script: 292 s before, 192 s now (69 s with #305's heap). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at needs the realm Page::for_document installs the interfaces before the first source text is compiled for the realm, before a node is wrapped, or when the embedder asks for the engine; a document with no script never does. The Miri ignore reasons state the page's measured cost now (192 s, was 292 s). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…smaller big script clazel-renderer: the two-page click and wheel tests are one test a page; the tests that draw two frames use a 16 px wide viewport and, under Miri, do not also draw the first frame alone; the GPU process test draws the lists it already has under Miri. clazel-js: the inline-parsing script is 64 statements under Miri (still over both thresholds). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s-input (#300) Conflicts in clazel-js-vm's interp.rs and clazel-js's runtime.rs: the lazy accessor maker and main's world hook are both kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nts-input (#300) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is tree (69 s) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Phase 7 item 7.14, events and input. Builds on #298 (renderer pipeline: the page hosted in the renderer with an event loop, which contains the WebIDL bindings and scripting); until #298 merges this PR's diff includes its commits.
What works end to end
A click
Inputis hit-tested through layout to an element and becomesmousemove,mousedown,mouseup,clickat it; a scrollInputis a cancelablewheelevent and then ascrollevent; a keyInputgoes to the focused element. Default actions run when the event was not canceled: a link is followed (the existingNavigate, or ajavascript:URL run by the page), a submit button submits its form (NavigateforGET, the kernel'sSubmitforPOST, throughclazel-forms' provensubmit_exec), reset, checkbox, radio, label, Tab / Enter / Space / Backspace / typing withbeforeinputandinput.clazel-web/src/events.rs, DOM §2.9): the activation target, legacy-pre-activation behavior before the listeners, activation or legacy-canceled-activation behavior after the flags are unset. Capture / target / bubble,stopPropagation,stopImmediatePropagation,preventDefaultand passive listeners were already there; the "events are recorded, not dispatched" deviation is gone (it was stale:flush_eventsalready dispatched).UIEvent,MouseEvent,WheelEvent,KeyboardEvent,FocusEvent,InputEventwith constructors, dictionaries andinit*methods; focus (blur,focusout,focus,focusin,changeon leaving a changed text control),document.activeElement,focus(),blur(),click(),tabIndex,createEvent,window.event.on*IDL attributes (generated:Platform::event_handler_get/event_handler_set) and content attributes, compiled on first use, with the handler's place among the listeners where it was first set,return falsecancels, body handlers are the Window's.clazel-web/src/user_activation.rs, notified bymousedownandkeydown(not Escape) before dispatch,navigator.userActivation,consume_user_activation. The hook for 7.16's popup rule is described in that module: the kernel's own record of theInputit forwards is the guarantee, andclazel-kernelis not touched.Tests
clazel-web/tests/activation.rs(7),user_activation.rs(5),ui_events.rs(48): hand-made trees and parsed documents driven through the input API, expectations written from the standards.clazel-web/tests/wpt_events.rs: 64 vendored WPTdom/events/pages through a stand-in fortestharness.js(the engine cannot run the real one yet): 38 pass (109 subtests), 26 are listed with the reason each.uievents/is not vendored;dom/events/scrolling/andnon-cancelable-when-passive/need layout/a window and are not run.clazel-renderer: 5 new tests (click runs the handler of the element under the pointer and the page repaints; a canceled click is not a navigation; submit buttons giveNavigateandSubmit; canceled wheel and scroll event; keys reach the focused input). All other tests still pass.Changes outside clazel-web (read before merging)
xtask/src/bindings,clazel-webidl): event handler attributes are generated (previously left out);UIEvent,MouseEvent,WheelEvent,KeyboardEvent,FocusEvent,InputEvent,UserActivationare exposed; an operation of more than 7 parameters gets its arguments in one struct (so clippy'stoo_many_argumentsstays on).bindings.rsis regenerated: whoever merges second into the DOM-API branch re-runscargo xtask bindings.pointerevents.idladded at the pinned webref commit (the only file withMouseEventandWheelEvent);MouseEventandMouseEventInitleave the generator's EXTERNAL list; the inventory is regenerated.page/mod.rs(oneuifield, oneObject::UserActivation,PageHooks::submit,HookCall::Submit, the twoPlatformhandler methods),page/node.rs(createEventandactiveElement/hasFocusinimpl DocumentImpl; the emptyimpl HTMLElementImpl for Page {}is replaced bypage/input.rs'sclick,focus,blur,tabIndex: expect a trivial conflict with the 7.13 branch if it fills that impl),page/window.rs(navigator.userActivation),scripting/bound.rs(window.event, the initial handler scan).clazel-webnow depends onclazel-forms(Cargo.lock +1 line).clazel-kernel,clazel-ipc,clazel-sys,clazel-js-*,docs/STATUS.md, SPEC-REVIEWS, SYS-AUDITS; no tier raised; no mutation, test or theorem removed.Not done, and deviations
withorFunction()): the element, form and document scope chain is missing.onerrorgets one argument: there is noErrorEvent, so a listener's exception is logged, not fired at the window (Event-dispatch-throwing.htmlis listed).submitis a plainEvent(noSubmitEvent.submitter); constraint validation is not run; a link's or form'stargetis ignored (this tab; 7.16'sOpenTab).HTMLInputElement,HTMLFormElementand the other control interfaces are not exposed (7.13): the control state isPage::control_value/control_checked, overclazel-forms' control state table, for 7.13's IDL attributes to read and write.mouseover,mouseout,mouseenter,mouseleave,dblclick,contextmenu,auxclick, pointer events, composition and drag events are not fired; main button only; hit testing ignoresz-index, clipping andpointer-events.Inputand theInputmessage has no modifiers; the renderer readskeyas a Unicode scalar (8, 9, 13, 27, 127 for the control keys, 0xF700-0xF703 for arrows), documented in the renderer README.wpt_eventsruns 2 of its 64 pages under Miri, aswpt_execution_timingdoes.Linux sandbox (seccomp) fix, and an open item
#298's renderer was killed by the Linux seccomp filter (SIGSYS) as soon as a page ran a script of any size: the engine parses a source over 64 code points and compiles a program over 256 AST nodes on a helper thread (
clazel-js-syntax/src/exec.rs,clazel-js-vm/src/compile.rs), and the filter has noclone. This PR adds an off-by-default switch (clazel_js::set_inline_parsing, anAtomicBoolinclazel-js-syntax) that makes those two helpers run on the calling thread, and the renderer'smainturns it on beforesandbox::enter(). A renderer thread made before the sandbox does not work (afterunshare(CLONE_NEWPID)aCLONE_THREADclone is EINVAL;unshare(CLONE_NEWUSER)fails with a second thread), so the renderer stays single-threaded; the PID namespace is kept. No change toclazel-sysor the seccomp allowlist. Three test binaries (clazel-js-syntax,clazel-js-vm,clazel-jstests/inline.rs) fail if a thread is made with the switch on. Confirmed on Linux (arm64, privileged Docker):cargo test -p clazel --test adversarialpasses.Open item: stack per nesting level, measured (release build, macOS arm64, parse + compile on a thread with a given stack, inline switch on). Smallest stack at which a source nested N deep parses and compiles, at 64 KiB steps (coarser steps for the others):
[[[...1...]]](((...1...))){{{...}}}blocksx=>x=>...1function f(){function f(){...}}parse-error); the deepest accepted is N=511, which needs at most 1024 KiBSo
MAX_DEPTH1024 fits in the 8 MiB main-thread stack with a margin of about 4x for the worst pattern measured (arrow functions, about 2 MiB). Not measured: mixed nesting, other targets (Linux x86-64 frames may differ), and the interpreter's own recursion. The limits are unchanged: the renderer will pick its value once #296'snesting_depthlands.Verification
cargo xtask verify --changed origin/claude/phase7-integration: see the comment below. CI's full verification (proofs wait for approval) has not run.🤖 Generated with Claude Code