Repository navigation
Consolidate six duplicated helpers in dev/, tests/ and worker/ - #6733
Merged
Merged
Conversation
Weekly duplicate sweep of dev/, build/, tests/ and worker/. Each set moves onto one home and every caller follows; behavior is unchanged. - The core's and bundled packages' stylesheets less what they vendor: interact_support.shipped_sheets, replacing two sheets() functions and five inline loops in the model tests. - Running tests/js_facts.mjs: dev/tests/test_js_facts.py now calls interact_support.js_facts. - Lowercase hex of bytes in the Worker: routing.hex (formerly newSessionId), with storage's two SHA-256 digests through one sha256Hex. - Whether a pid is alive: leaf.machine.pid_alive, replacing two os.kill(pid, 0) copies in tests. - Reading an example's seeded log: read_event_lines(seed_log(source)), replacing three inline parsers, one of which split on splitlines(). - The bundled registries and which keys are elements, in leaf_dev: docs and logs usage read leaf.schema's paths and is_element_name rather than their own paths, "lf-" prefix test and regex; stills and test_product_page take leaf.schema.DEFAULT_PACKAGE.
Collaborator
Author
|
The one red test, The red pytest step also skipped the Worker dry-run deploy. On this head the Worker still bundles. The dry run stopped only at the container image build, which needs Docker the sandbox lacks, and this PR touches no container files. |
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.
This week's duplicate sweep of
dev/,build/,tests/andworker/(week 47) moves six duplicated helpers onto one home each and moves every caller. Behavior stays the same. The touched model tests, the dev js_facts tests and the Worker's routing, storage and index tests pass. A script compared the old and new outputs of the consolidatedleaf_devfunctions and the seeded-log reads across the corpus, and they match.interact_support.shipped_sheetssheets()intest_interface_fonts.py(#4804) andtest_theme_tokens.py(#6025). Five inline loops intest_interact_layer.py(#3138, #3886)tests/js_facts.mjsinteract_support.js_facts(#2666)dev/tests/test_js_facts.py(#5118)routing.hex, which isnewSessionId(#313) renamed, plus asha256Hexinstorage.tsstorage.ts(#2652)leaf.machine.pid_alive_aliveintests/process/test_codex_tool.py(#3331).running()intest_interact_layer.py(#1774)read_event_lines(seed_log(source))(#4484)test_render_pages.py,test_interact_product.py(#924) andtest_render_gate.py(#509). The last one split lines withsplitlines(), which also breaks at U+2028leaf.schema.ASSETS/BUNDLED_PACKAGES/DEFAULT_PACKAGE,leaf.registry.contract.is_element_name,docs.registries()docs.py's ownASSETS/PACKAGES(#3593) and itsstartswith("lf-")checks (#2660).logs usage's hand-written regex and registry list (#5970).ROOT / "packages" / "default"instills.py(#3927) andtest_product_page.py(#3593)is_element_nameand the two checks it replaces give the same answer for every key in the bundled registries today. A selector key such aslf-options.selectedwould have passed thelf-prefix test.Sets found and left alone
test_render_gate.py,test_render_pages.pyandtest_interact_layer.py, but none of the tests changed here.EDITOR_ROOTSshadow-root keepers, the/api/interactionbatch predicates, CDPtouch()closures, one-line patch templates, reply-holding route handlers, and thedata-lf-entryruntime-module import snippet indev/leaf_dev/states.pyand in tests. Each would mean editing browser tests that this sweep can't run on a shared host. They suit a sweep that can run those tests.build/browser/build.mjsbuilds signals-core and Lit with esbuild calls that repeatbuild/vendor.mjs'sbundle(). Merging them changes build options and needs a fullcheck:browserbyte comparison, so it was left for a change that runs that._build.py'scheck_linksrepeatsleaf_website.released_path, but it also needs the matched page's root and kind. The list of API-key variables an eval drops is repeated across Python and the Promptfoo configs, as subsets and supersets of one another. The Codex token-expiry check has different thresholds, 1 h and 60 s.eval_user.py,interact_support.available_loopback_port). The XDG state root inleaf_dev.state_homeandleaf.state.state_home. Thesettledhelper in twotests/runtimefiles.