Repository navigation
WebFront 1.3.0 - #737
Merged
Merged
WebFront 1.3.0#737
Conversation
…null C string (#669) An infinity now equals only itself: infinity == approx(DBL_MAX) was true because the tolerance added to DBL_MAX overflowed. A null const char* equals only another null one and is written nullptr, instead of being turned into a std::string_view.
…past the largest double (#669) The exceptions of the run-ending listeners become the error of a "Run ending" test case, with their messages, so that the report no longer says failures="0" errors="0" for a run that exits with 1. When the difference of two finite values overflows, approx compares the halved difference with the halved tolerances: -DBL_MAX == approx(DBL_MAX).epsilon(1.1) was true because both sides overflowed to infinity.
…he run still ends (#669) The exception left run() before endRun(), and the run-ending listeners never finalized what runStarting had begun. It is now reported as a failure of the scenario, which does not run, and the run goes on.
9007199254740993LL == approx(9007199254740992.0).epsilon(0) was true: the measured value was converted to double. approx now accepts float, double and the integers of at most 53 bits; a 64-bit integer or a long double wider than a double selects a deleted operator, so the rounding becomes an explicit static_cast<double> or the comparison a checkEqual().
Every floating-point value was converted to double before being written, so checkEqual(1.0L, nextafter(1.0L, 2.0L)) failed with "left: 1, right: 1" where long double is wider. A long double is now written with LDBL_DECIMAL_DIG digits (<cfloat>, which keeps <limits> out of the core).
The exception left run() and no run-ending listener finalized what the others had prepared. Now the remaining run-starting listeners are not called and no scenario runs, but every run-ending listener is; run() returns 1 and the JUnit report has a "Run starting" test case whose error holds the message, as "Run ending" does for its listeners.
approx(double) converted a 64-bit integer or a wide long double implicitly, so
9007199254740992.0 == approx(uint64_t{9007199254740993}).epsilon(0) held. approx() and the Approx constructor now take
the same numbers as the comparison operators, and select a deleted overload for the others unless they are converted
explicitly.
- MSVC does not define LDBL_DECIMAL_DIG: write a long double with numeric_limits<long double>::max_digits10. - A failure a run listener records with check() fails the run and appears in the JUnit report, as an exception does. - A condition whose explain() throws still fails where it is checked, with the message of that exception. - A matcher whose description only converts to std::string works with check(text, matcher) and operator!. - readLines closes its file when reading throws; Eventually.hpp includes <cstdlib> for getenv and free. - The Listener contract says that runEnding is called for every run that selects a scenario, even without runStarting. - The self-test checks each run's notifications and the margin of approx at and just past its bound; the ADR index names ADR-012 1.9.
NoNodeDependency read require("abc", ...) as a CommonJS require: the text goes through a variable.
…ng-operands BDD: light core with optional parts, approx, run-ending listeners and checkEqual (#669)
The roots were captured when the build was configured and frozen in test properties, so a build configured in another account or container, or with other XDG variables than the run, restored the wrong paths to the programs the application starts. CaptureRealXdg.cmake, included by ctest through TEST_INCLUDE_FILES, now records them in the environment that launches the tests; RunWfDriver and RunWebFrontJasmine keep the first capture. A CTest case configures and runs a project with different roots.
…nes exactly (#664) A scratch directory with spaces, brackets or the word "configure" made the check fail although the roots were passed correctly.
…ach path (#664) - cmake/CaptureRealXdg.cmake is the only implementation: the consumers' Jasmine runner includes it instead of a copy, and RunStartupTime.cmake captures the roots too before replacing them. - RealXdgRootsReachTests drives a stand-in program through ctest, the Jasmine runner, the wf driver and the start-up measurement, with roots set, unset, mixed with an empty one, and inside a test that already captured them. - docs/CONSUMER_TESTING.md tells consuming projects about the variables; docs/WEBKITGTK.md documents WEBFRONT_TEST_XDG_CAPTURED and where the roots are captured.
WKWebViewStartupTime-warm failed on the macOS runner, here and on unrelated branches, by a few hundred milliseconds over its 5 s limit: the tests running beside it delayed the view's creation from 0.5 s to 3 s. The start-up cases are now RUN_SERIAL, which FrontendSelection checks for every native frontend.
…664) The Jasmine runner and the wf driver start it directly: with mode 100644 a fresh checkout failed with permission denied.
…v7avm Test helpers: export the real XDG roots hidden by the throwaway profile
Reserved webfront.inspector.* functions only in the developer environment, refused to connections without a view proof unless the application trusts loopback clients; tree nodes as lists of tuples on existing bridge types, paged and differential; explicit observer threads; writes only when the application provides them; one inspector.html page in a secondary window, a browser tab or a floating window. ADR-003, ADR-016 and ADR-025 refer to it.
… differences, choose the container on effective access (#678) - A source either calls a visitor under the application's lock or returns a reference on the executor that owns the object; every page, pass of differences and write runs whole inside that window. A lock taken in an accessor that returns a reference protects nothing. - changes is paged with a cursor; a pass is computed once and read from the stored set, with a resynchronisation signal; the per-connection memory is bounded to 10,000 nodes. - The cost of a page depends on the container: constant for random access, linear in the position otherwise; PagedSource lets the application page. - webfront.inspector.containers reports which containers would be admitted; a tab is only tried in the system browser with trustLoopbackClients, so CEF goes to the floating window.
… by view changes (#678) - Every node field has a byte bound; a node fits in maxNodeBytes (2 KiB) and a one-node page in minPageBytes (4 KiB). A path that would exceed 64 segments or 1,024 bytes is sent without children, flagged "depth reached". Registering the inspector static_asserts that the buffers policy allows minPageBytes, so a too small policy fails to compile. - value is paged by bytes over a per-connection snapshot capped at 16 MiB, cut on UTF-8 boundaries, with a typed refusal for a stale offset. - Calls of a connection on an observer run in reception order; children, fold and write give the memory a new revision and end a pass in progress, whose next page asks for resynchronisation. The inspector queues them until the pass ends. Interleaving is tested in BDD and in the browser.
…er (#678) - write carries the inspector's revision and the value it showed. Inside the same access window as the assignment, the target and every ancestor must still show what the memory recorded (label, value, child count), or the write is refused as stale. A value source cannot write; nodes with a truncated label or value are not writable; a PagedSource may give stable keys, which then identify the element in the path. - Every bound uses responseBudget = min(functionCallBufferSize, maxMessageSize) and counts all encoded headers; the static_assert covers a maxMessageSize smaller than the buffer, and write text is bounded too. - value returns a snapshot identifier, required with each later fragment, so two interleaved reads fail explicitly instead of reading each other.
…unded, paths bounded by construction (#678) - A response asking for resynchronisation has already emptied the memory of the observer for the connection; the inspector drops its tree and rereads from the root, so a deletion announced only in a lost page leaves nothing displayed or remembered. reset(observateur) does the same on request. - The write request must fit in requestBudget = maxMessageSize with all its arguments: every other argument is bounded (observer name 256 bytes, path, expected value), so maxWriteTextBytes is a constant given by limits(), checked by the page before sending and again by C++. - Path segments have known maximal sizes (decimal indices, field ranks rather than names, PagedSource keys of 128 bytes at most); a parent that could not give its children a path within 64 segments and 1,024 bytes is sent flagged "depth reached" instead of building an oversized node.
…window only for an admitted host (#678) - A source holding references: destruction waits for an operation in progress, like joining a jthread, and must happen outside every lock the source takes; a wait longer than five seconds logs the observer and its watch location. An owning source (watch with a shared_ptr to its state) is kept alive by each operation, so destruction never waits and is safe under the source's lock. - containers() reports secondaryWindow only when the frontend can open one and the host connection is admitted, since openWindow checks access.
…tible passes (#678) - Destroying the handle from inside its operation is allowed for an owning source, whose state the operation keeps alive, and forbidden for a source holding references: the destructor recognises the operation's thread, logs the observer and its watch location, and calls std::terminate. - Every value is written into a bounded sink (strings copied up to the bound, std::format_to_n otherwise) whose reported size detects truncation, so memory is bounded; formatting time is not, which the ADR states. - The 50-page bound of a pass is removed. A pass is interruptible at any time without resynchronisation: the stored set keeps each entry's value from before the pass, and entries not yet served are restored before the interrupting call runs, so the next pass finds those differences again. The inspector no longer queues its actions.
…ing, key contract (#678) - The memory bound covers WebFront's own allocations: kinds WebFront renders call no application code, while a std::formatter's own allocations and time are the application's responsibility, under the source's lock. - Paths are ASCII: each segment starts with '/' and a letter for its nature ('#' index or rank, '.' field rank, 'k' percent-encoded key), so decoding is reversible; a key whose encoding exceeds 128 bytes is not truncated, its element is addressed by position and not writable. - A PagedSource with keys also provides find(key); keys are unique and stable by contract. WebFront checks what is local: find's result must give back the same key, and duplicates within a page fall back to position with one diagnostic; other violations fall back to the keyless guarantee of the write precondition.
…tion, consistent child listings (#678) - The revision an interrupting call carries is the pass revision, checked before the interruption; the write then checks the rest of its precondition against the restored memory, which is what the inspector received. - children carries the revision. Each page starts with the parent read in the same operation; the memory keeps, for a listing in progress, the parent's child count and the last key served, and a later page that sees them changed serves nothing, flags the parent "children changed" and makes the inspector restart the listing. A pass also checks the child count and the keys at loaded positions of expanded parents.
…arries the revision (#678) - An unproven client could rewrite a project script through the webfront.developer.* writes, wait for the proven view to load it, and read the inspectors through that view. When the active frontend hands views the launch proof, begin, beginNew, write, commit, commitGroup and abort now require isLocalClient, as the inspectors do; project reads keep the origin check, and nothing changes with the system browser, which proves no view. ADR-016 1.7 is proposed for this amendment. - fold carries the revision; a stale one answers a resynchronising page without folding or interrupting anything.
A stale revision means the inspector's view and the memory diverged. It is checked before any other effect: children, fold and changes answer with a resynchronisation, which empties the memory and releases a pass in progress; write, which returns no page, is refused as stale with no effect at all, and the next call carrying the same revision gets the resynchronisation. The inspector sends a memory-changing call for an observer only after the previous one answered; reads may be sent at any time. Validation cases are aligned.
…ory resolves (#678) Memory-changing calls run in two phases. Validation checks everything that can fail without reading the object (access, revision, path, flags, text size and parsing, room in the memory after a possible restoration) and rejects with no effect. Once inside the access window, the interruption and the operation run and the call always resolves: write returns (revision, code, message), with stale or refused when the precondition or the mutator refuses after the interruption; pages cannot fail any more, a formatter exception becoming an opaque value and a key exception falling back to position. A refused write therefore never loses the revision.
…nded messages (#678) - watches(revision, after, count) pages the live observers by identifier, a number assigned at registration and never reused, which every call now uses instead of the name; the registry has its own revision, polled with a count of 0, and the identifier cursor neither skips nor repeats an observer when others come and go. - While the connection lives every request gets an answer: removing an observer replaces the answer of an operation in progress or queued with webfront.inspector.unknown, saying so when a write was already applied. - Messages from application code are cut to 256 UTF-8 bytes on a character boundary, so the write response has a fixed maximal size within the response budget.
Pin developer environment 1.2.1
…nts while the MCP listener closes (#720) Every automation_host launched by AutomationClient.py took WebView2's default user data folder, derived from its executable: the concurrent automation scenarios and the two launches of the stable one shared one WebView2 browser process. A launch that joined the browser process of a host being closed lost its window with it; the session closed, and the MCP listener closed with the client's request still unanswered, which the client read as a reset (WinError 10054). Each launch now has its own WEBFRONT_TEST_WEBVIEW2_PROFILE, as the wf driver and the Jasmine runner already do. The listener no longer resets its clients when it closes: it takes its backlog, closes, then serves the requests already sent for up to a second (a closed session says so). A peer's request is read before its two-second deadline is applied, and what a dropped peer sent is read first, so that its close is not a reset. The stable scenario names the failing launch, its port and the host's exit status, and attaches stable.log.
… at its deadline (#720) The automation client's profiles live under a temporary directory whose name holds a character outside the ANSI code page on Windows: read through _dupenv_s, it became '?' and the host could not create its WebView2 profile. DriverWebView2Options reads WEBFRONT_TEST_WEBVIEW2_PROFILE with _wdupenv_s. A pending peer reaching its deadline, or the end of the closing grace, is first fed what it already sent (up to the largest acceptable request), so that a complete request larger than one read is answered rather than dropped. The documentation says that a client has up to a second to complete its request while the listener closes, not that it is answered within that second.
Each automation_host now starts its own WebView2 browser process on a new profile. On the loaded Windows runner its first page can take far longer than the shared, warm browser process did: in the PR run, AutomationMcpWatchdog's last host reached its 30-second startup deadline before loading the page (71 instead of 70), and AutomationConsumerWindow's hosts were not ready within the client's 30 seconds. The client waits up to 90 seconds for a session to become ready (operations keep their own timeout), and the hosts of the scenarios get the application's default 90-second startup deadline. No case expects that deadline to expire.
…hen its thread runs late (#720) The pending peers left when the grace ends were discarded at once. A last pass without waiting now feeds each one what it already sent and dispatches a complete request, as the per-peer deadline already does.
… draw its prompt (#729) DeveloperBrowserIntegration-workspace failed on a loaded machine with "The collapsed terminal must have its prompt". The relaunched page writes its prompt before it reports that it is ready (mount awaits the C++ commands and the history, then shows the prompt), so what remained was xterm.js drawing its rows at the page's next animation frames, which the load held back for more than the 10 s of until. The wait now gets the 60 s of a launch, and when it expires it says what the rows show, the page's visibility and whether an animation frame still comes within one second.
…uare blocks (#725) * Inspectors: compact menu and panels, denser watches, text grids as square blocks (#723) The WebFront tab's menu is compact for a mouse (28 px entries, 13 px text, 24 px targets at least) and takes 44 px again under a coarse pointer. The inspector panels have smaller margins, rows and controls, keep 24 px click areas (44 px under a coarse pointer) and a visible focus. In the Watches panel, elements that are all leaves of one kind show their kind once, on their container, with their labels in a narrow column. A container of strings of the same length, such as Life's grid, shows as a block: one line per element in square character cells, keeping the highlighting of changed lines, the full value and the edition in place. Its Tree button shows the elements one by one again; the choice is kept per watch and container in this browser. Only the display changes: the pages and passes of ADR-027 section 3 are the same. * Developer integration: report the size of Life's grid block (#723) * Watches: a block shows only a sequence labelled by its indices, never the fields of an object or the keys of a map (#723) * Watches: a block names each line by its index for assistive technologies, and its controls take 44 px under a coarse pointer (#723) * Watches: no block for strings that break their line; a Full value button keeps 24 px in a block (#723) * Watches: say why a writable line of a block is as high as its text with a mouse (#723)
#726) The Detach button of the floating window's bar and the Attach button of a detached panel's header become 16 px inline SVG icons in currentColor: a frame with an arrow leaving it to the top right, and an arrow entering it. Their aria-label and title say the whole action; a greyed Detach keeps its name and its tooltip still gives the reason. The class names stay.
…upts a command (#721) (#727) * Terminal: the system's shortcuts copy and paste, Escape or Stop interrupts (#721) Ctrl+C/Cmd+C copies the terminal's selection, Ctrl+V pastes (multi-line paste unchanged), Ctrl+A selects the terminal and Ctrl+X copies: attachShortcuts leaves them to the engine instead of xterm.js's control characters. \x03 no longer clears the line nor interrupts a command. A command is interrupted by Escape (with no selection; Escape clears a selection) or by the Stop button, in the floating window's bar or over the terminal's corner. The interruption itself is unchanged (signal aborted, 130, webfront.commands.cancel, grace period, status interrupted); its messages say "interrupted". Specs of the keys and of the editor (terminal-specs.mjs); the integration specs interrupt through the editor's Escape and the Stop button, and press real keys in CEF (DevTools Input.dispatchKeyEvent) for copy, paste, select all and Escape. Docs, help texts, Commands.hpp comments and the changelog follow; packages.bundle.mjs and bundles.json are refreshed, the pin is unchanged. * DeveloperTest: pressKeys does not use the application on a frontend other than CEF (#721)
…for its load (#716) (#728) * Tell why the early secondary window did not connect (#716) The second-window lifecycle case now reports, when the window opened as the first one started never announces itself, whether the window was opened, how many times its page was requested from the server and how many WebSocket connections reached the application. It also turns on WEBFRONT_STARTUP_TRACE, whose milestones now name the page of a secondary window, so that the start of each window is told apart in the log. WebView2 traces the creation of its environment, the request of each view and the end of the initial navigation. * WebView2: a secondary window waits for the first window's own load (#716) A secondary window requested as the first window starts was created as soon as the first window's environment existed, so that its view was created beside the first one's, and its page could load before the first page. This is the only state the windows opened later never meet, and the early window of WebView2Lifecycle-second-window once never connected there. The request now waits (WindowNotReady, retried by invokeOnUIThreadWhenReady) until the first window has called Navigate(), which its startup watchdog bounds. * Shorten the #716 changelog entry under the 420-character limit
# Conflicts: # docs/CHANGELOG.md
Automation: isolate each host's WebView2 profile and answer clients while the MCP listener closes
Give the collapsed terminal of the relaunched page a launch's time to draw its prompt (#729)
…mit, give CEF 120 s (#730) (#734) * WebFrontBrowserIntegration: name the wf test stage at the driver's limit, give CEF 120 s (#730) WebFrontBrowserIntegration failed twice on a loaded machine with "The time limit of the driver elapsed" after 50 s, with no spec named: the driver and wf test had the same limit, and the driver's started earlier (with the bootstrap), so it always ended the run before wf test could report the stage it reached (#690). The driver's page now watches the stages that the wf test runner posts from its frame (the frame the driver creates), and C++ keeps the last one: the driver's time limit names it, with the specs finished and the spec in progress or the suite whose hook runs between specs. The environment is unchanged. WfDriverTestStage runs a spec that never settles under a command limit of 30 s and expects the spec in the message; WfDriverTests pins the message. The suite needs 16 s on an idle machine and exceeded 50 s at a load average of 22: the CEF test now has 120 s (the driver 110 s), above the 90 s of WebKitGTK and WKWebView. * FrontendSelection expects the 120 s of the CEF browser integration test (#730)
…s own navigation (#731) (#733) * CEFLifecycle-navigation-allow-list counts only the cancellation of its own navigation (#731) The case failed once on a loaded machine with "Frontend reported an unexpected navigation cancellation": the page took any cancellation that the lifecycle client reported as the outcome of the navigation it started. The client reports a cancellation whenever the content policy refuses a navigation of the main frame, and in the allow-list case the page's destination is admitted, so the cancelled navigation was another one, to a URL outside the allow-list. The CEF client now names the cancelled URL in the event and on stderr, with the kind of navigation and the frame's URL. The page counts only the cancellation of its own destination; any other one is logged through policyOtherCancellation and the page keeps waiting for its navigation. Frontends that do not name the URL keep the previous behaviour. * FrontendLifecycle: keep the plain cancellation script of the other frontends in a build with CEF alone (#731)
Co-authored-by: webfront-release[bot] <webfront-release[bot]@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
AM-L
approved these changes
Nov 28, 2026
The SourceFormat check of the release pull request found WebKitGTK.hpp, WebKitGTKPolicy.hpp, InspectorDistribution.cpp and WebKitGTKPolicyTests.cpp unformatted. The Role and LLM lines of the WebKitGTKPolicy.hpp header exceeded the 160-column limit, which made clang-format merge the header fields; they are shortened so that each field keeps its own line.
Its formatter wrote 1 GiB, one character at a time, through std::format_to_n: 2.5 s in a release build, beyond the 180 s limit of the GCC 13 ARM64 sanitizer job, which ran it for the first time on the release pull request. The size meant no bound of the implementation; four times maxSnapshotBytes, the largest bound, shows the same cut (0.33 s for the whole scenario).
…4 KiB The GCC 13 ARM64 sanitizer job still timed out: that runner is 45 to 85 times slower than a workstation on memory-heavy tests, and the scenario spent most of its time reading a full value of 16 MiB, the default snapshot bound. As the neighbouring scenario already does, the bench sets its own bound; AutomationStateTests checks the default of 16 MiB. Under GCC 13 with ASan and UBSan the scenario drops from 2.3 s to 0.38 s.
DeveloperBrowserIntegration-terminal waited 4 s for the coop script to print
'waiting'; on the second of the three passes of the release pull request's
desktop job, a loaded runner held its worker back longer ('The script did not
start'). Like the other starts of the developer specs (#660, #729), it now has
bootstrapLimitMs.
WfDriverBlockedPage timed out at 120 s on the second pass of the release pull
request's desktop job, although its driver ended in 9 s: the web content
process that the page blocks inherits the driver's stdout and stderr, and
execute_process waited for those pipes until WebKit killed that process
('WebProcess didn't exit as expected', 19 s later in the first pass, never
within the limit in the second). With files, the script waits for the driver
only; the case drops from 21 s to 10 s locally.
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.
Release 1.3.0: version, changelog and compatibility table (developer environment 1.3.0, API 1).
masteris recorded as a parent of the branch (-s ours: its tree is the 1.2.0 release that #661 already brought intodevelop), so the squash merges without conflict. Breaking changes (Ctrl+C in the terminal,providesViewProof()for frontends that prove their view, the reservedwebfront.inspector.names, external tools writing the project) are listed with their migration in the changelog; the 1.3.0 section is condensed to the format limits ofChangelogFormat.