Repository navigation
fix: strip the bootstrap's marks from failed requests' frames and order the missed stage after the page's reports - #6861
Conversation
… answered The page-code reading had two orderings that macOS runners lose: - It took each failed request's frame address in the response handler. A failure can reach the checker before the bootstrap's address rewrite does, so the image 404 in test_plain_check_reports_page_request_failures_but_ignores_optional_assets sometimes named its frame with the _leaf-recovered mark and the host key, and the render check's reading disagreed with run_page_code's. The frame's address is now read when the findings are stated. - It appended the page's missed stage before waiting for the runtime's report, which can reach the console during that wait, so the report sometimes followed the stage. The stage now joins the reports once the wait ends, as the findings' order says. Refs #6767
|
The report/stage ordering fix looks good.
|
…e bootstrap's marks A Frame follows its navigations, so reading its url at collection named the document the frame had gone on to. Each failure now captures the frame's address on arrival and strips the marks bootstrap.js takes off the address bar (ADDRESS_MARKS), which a failure can reach the check ahead of. A model test covers both, and another holds ADDRESS_MARKS to bootstrap.js's list. Co-Authored-By: Claude <[email protected]>
|
Done in 8949848. Each failure now takes its frame's address when the event arrives, and Locally, |
leaf-agent
left a comment
There was a problem hiding this comment.
The title and the first bullet describe a change this diff doesn't make. On main, frame_of already reads request.frame.url inside the requestfailed and response handlers, so frames were already captured when each failure arrived. The net change for frames is only frame_address removing the bootstrap's marks. As written, the squashed commit says frames are now read "after the page has answered" (they aren't) and "as it arrives" (that was already true). The 54-of-54 run also tested the intermediate version that read frames at collection, not this head. I'll rewrite the title and body around the net change and say which version each dispatch ran. The code and tests need no change.
|
The mutable-frame attribution is fixed, but
|
frame_address reserialized the kept query with urlencode, which writes ~ literally and * as %2A, where the bootstrap's URLSearchParams writes %7E and *. A failure that reached the checker before the bootstrap's rewrite then named a different address than one after it for queries with those characters. The kept pairs now go through the WHATWG form serializer's character set, and a model test checks that a marked and an already-rewritten address read the same.
|
Done in f4c5d83.
|
|
The revised form encoder matches the
|
urlsplit drops an empty fragment's delimiter, while URL.searchParams.delete() keeps it, so a failure arriving before the bootstrap's rewrite read as .../v1.html?q=%7E* and one after as .../v1.html?q=%7E*#.
|
Done in 7123ce1.
|
`ruff format` wraps an assertion that #6861 added to `tests/model/test_render_gate.py` in a form ruff doesn't accept, so the pre-commit step of `ci` on `main` failed ([run 45177782950](https://github.com/max-sixty/leaf/actions/runs/45177782950)). The Python tests in that run passed. This commit applies ruff's own formatting to that one line and changes nothing else. `pre-commit run ruff-format` on the file fails on `main` and passes here. Closes #6865 — automated triage Co-authored-by: leaf-agent <[email protected]>
The page-code reading (
src/leaf/render_gate/page_code.py) reported two facts in a form that depended on timing. On macOS runners both came out wrong often enough to failtest_plain_check_reports_page_request_failures_but_ignores_optional_assets, the recovered-frame failure in #6767:…/v1.html?t=test-page-key&_leaf-recovered, with the host key the bootstrap strips from the address bar, and the render check's reading disagreed withrun_page_code's. Each failure still takes its frame's address when it arrives, as it did before, andframe_addressnow removes the marksbootstrap.jsremoves and spells the query left as the bootstrap'sURLSearchParamsdoes, so a marked and a rewritten address read the same. Those marks areADDRESS_MARKSinrender_checks.py, and a test holds them to the bootstrap's list. Model tests cover a marked address, its rewritten spelling, and a navigation between two failures.findingsappendednot-readybefore waiting for the runtime's report, and the report can reach the console during that wait, so the report sometimes followed the stage. The stage now joins the reports after the wait, which is the order the findings' docstring states. A wait that raises still leaves the stage inreportsforrun_page_code's error path.Verified with
cidispatches of 54 copies of the test on thetest-macosrunner:mainfailed 8 of 54, every one on the recovered frame (run 45127377819).The PR's
testjob fails onlytest_every_skill_file_reads_in_one_command, onskills/leaf/references/module-input.mdat 30002 bytes; this diff doesn't touch that file,main's own push run fails the same way (run 45133210016), and #6826 fixes it. Locally, the test, its Firefox sibling,tests/model/test_render_gate.py, and the otherrun_page_codeand render-check page-code consumers pass.#6767 also tracks a Firefox wheel defect in
keepFootand the smooth-revision-above Firefox case, which this leaves open.Refs #6767 — automated triage