Repository navigation
Collect the suite's browser problems as records, and the health sensors' as data - #2694
Merged
Merged
Conversation
`leaf package check PACKAGE --render --json` prints one object: `status`, each widget quality finding as a record (`code`, `at`, `values`, `severity`, `text`), and `browser`, naming the gate asked for and run and the browser that ran it, or why none could. Without `--render` it prints the object with no findings and a null `browser`. Without `--json`, the lines a reader sees are unchanged. The command boundary now renders a `WidgetQuality` record rather than printing as it reads. Worked examples that cannot be drawn become an `unreadable-examples` error finding; its words are the line the command printed before. `test_package_check_render_reports_findings_as_advice` reads the records from `--json` instead of regex-parsing first-paint sizes out of the lines. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…-json` `package check --json` now prints its object when the package check refuses the package, with the refusal as a `package` error finding and status 1, rather than exiting with empty stdout. Examples that cannot be drawn keep the name of the browser that tried to draw them. Without `--json`, output is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…rs' as data
The browser fixture's per-page problem list (`page.lf_errors`) now holds
`Finding` records (`render_gate/findings.py`) instead of sentences: the
console entries, failed responses, exceptions and window errors it takes
from Playwright's events, as the render gate takes them, and the health
sensors' findings. `write_watch.js`, `shift_watch.js` and `words_watch.js`
hand each finding over through a `__leafWatchFinding` binding as
`{code, ...values}`. They no longer write a sentence to the console, and
the shift watch's evidence travels as a field, not as `shift evidence:
{json}` inside one. The sensors' codes are `moved-without-input`,
`typing-moved`, `shift-watch-missed`, `unchanged-write` and
`words-left-screen`, and their words, written once in the findings
module, are the sentences the sensors used to print. A console entry's
record also carries the script that wrote it (`url`).
Tests name an expected problem by its fields, `{"code": "failed-load",
"status": 400}` or a function of the record, or by a fragment of what the
page itself said (`render_harness.is_problem`). The fragment checks over
the harness's and sensors' sentences, about 140 of them, are now field
checks. A recurring ResizeObserver notice is the notice's record with
`confirmation: recurred`, as the gate reports it. `collect_page_errors`
and `collect_page_exceptions` collect records, and `leaf-dev probe`,
`verify-site`, the journey and the example previews render them at their
output. A failing test prints each problem in its words.
No user-visible behaviour changes. `leaf-dev probe`'s `errors` and the
verifier's messages print the same words as before.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/scripts/leaf/findings.py
# Conflicts: # skills/leaf/scripts/leaf/findings.py # tests/render_harness.py
# Conflicts: # skills/leaf/scripts/leaf/findings.py
leaf-agent
previously approved these changes
Oct 12, 2026
No user-visible behaviour changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 12, 2026
…iew journey
`get_by_role("dialog")` resolves to `.lf-auxiliary-envelope`, a native
dialog sized 0x0 by design (`chrome.css`), so `to_be_visible()` failed
on main too and `to_be_hidden()` held whether or not the panel closed.
The journey now checks the `Threads` region the envelope holds. No
user-visible behaviour changes.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 13, 2026
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.
The browser fixture's per-page problem list (
page.lf_errors) now holdsFindingrecords (leaf/findings.py, #2662) instead of sentences. Tests read the records by field, and render text only in a failing assertion's message. This is the second follow-up #2662 named. The third,package check --json, landed in #2684. This replaces #2691, which closed when its stacked base branch was deleted.Before and after: one harness entry
A refused event POST, before:
"400 http://127.0.0.1:53111/api/event"matched by
consume_browser_errors(page, "400"), which read a leading400. After:matched by
consume_browser_errors(page, {"code": "failed-load", "status": 400}).A health sensor's report, before, a console sentence that
shift_evidencesplit the JSON back out of:After, a record the shift watch hands over through a binding, which
str()still words as above:What changed
watched()keeps the recordconsole_finding,window_findingandexception_findingalready built, rather thanstr()of it. These are the same readers the render gate uses. A console entry's record also carries the script that wrote it (url). A recurring ResizeObserver notice is that notice's record withconfirmation: "recurred", as the gate reports it, andRECURRING_RESIZE_NOTICEis gone.write_watch.js,shift_watch.jsandwords_watch.jscall a__leafWatchFindingbinding with{code, ...values}. Before, they wrote sentences to the console. The new codes aremoved-without-input,typing-moved,shift-watch-missed,unchanged-writeandwords-left-screen. Their words live inleaf/findings.pyand are the sentences the sensors used to print. Shift evidence is theevidencefield, andshift_evidence()reads it directly.render_harness.is_problemis the one matcher behindconsume_browser_errorsandreported_browser_errors. It accepts three forms:{code, ...fields}, each field compared by equality;said()), for console entries, exceptions and window errors.The digit-prefix rule (
_names) is gone. Every fragment check over a harness or sensor sentence is now a field check: HTTP statuses, shift nodes and offsets, typed words and their field, unchanged writes. The shift tests'moved_within(place)andnames_moveread the watch's node names, which place a text node or a shadow-tree node inside its element (#text in button#control). The old substring checks relied on that.collect_page_errorsandcollect_page_exceptionscollect records. The gate's own page-error listener usescollect_page_exceptions.leaf-dev probe, the site verifier,leaf-dev journey, the example previews and the arrangement gate print the records' words where they output, so their output is unchanged.tests/journeys/test_render_commands.py::test_plain_check_reports_page_request_failures_but_ignores_optional_assetsstill called.startswithonrun_page_code's records, which have beenFindings since Report render-gate and page-check findings as records, withpage check --json#2662. It now reads their fields.tests/AGENTS.md, "Browser errors", says how to name an expected problem.No user-visible behaviour changes.
Proof
test_message_delivery_appearance_and_first_frame[panel*](appearance changed in the pending states, a macOS image comparison) fails the same way on the base commit, run in a throwaway checkout.test_an_authenticated_navigation_journey_becomes_credential_free_review_evidencealso failed on the base: it assertedget_by_role("dialog")visible, which resolves to the 0x0.lf-auxiliary-envelope. It now reads theThreadsregion inside the envelope, and passes.tests/model/test_chrome_contracts.pypasses; its fake page now holds records too.tests/browser/test_website_server.pyandtest_html_control_uses_browser_without_leaf_payloadpass. The latter fails only when it shares an xdist worker with a browser-fixture test ("Sync API inside the asyncio loop"), independent of this change.Left for a follow-up
#text in div.cm-line in shadow of leaf-text#field), whichmoved_withinreads by suffix. Reporting the node's element and shadow host as fields would remove that last parse.