Repository navigation
Run browser tests and developer previews on the compiled kernel - #2767
Merged
Merged
Conversation
Prepare one content-addressed installation per payload and compiler revision, preserving build-free consumer installs and native package imports. Replace private runtime imports with canonical public and diagnostic entries. Move rule-only contracts to Node while retaining native parser, focus, layout, storage, readiness, and action/undo coverage in browsers. Keep logical module paths distinct from URL spellings through delivery and offline export, including Unicode and punctuation in native package graphs.
…-suite-8036 # Conflicts: # skills/leaf/scripts/leaf/exporting.py # skills/leaf/scripts/leaf/revision_delivery.py # tests/browser/test_render_initial_delivery.py # tests/browser/test_render_margin.py # tests/browser/test_render_navigation.py # tests/browser/test_render_projection.py # tests/journeys/test_render_early_threads.py # tests/journeys/test_widget_vocabularies.py # tests/model/test_revision_delivery.py
leaf-agent
previously approved these changes
Oct 13, 2026
…-suite-8036 # Conflicts: # dev/leaf_dev/preview.py
leaf-agent
reviewed
Oct 13, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
cached_installation chooses identity before taking its lock, then skips the second identity check when content already exists. If a preview refresh begins just before a payload edit, and that older content is cached, this call can return the old kernel after the edit. The watcher may have consumed that edit as the refresh trigger, leaving the live page on stale runtime bytes until another save. I reproduced the cache-hit path with the identity changing between those two reads. Recheck the payload identity on cache hits and retry selection when it changed, as the build path already does before publishing.
leaf-agent
previously approved these changes
Oct 13, 2026
leaf-agent
previously approved these changes
Oct 13, 2026
leaf-agent
approved these changes
Oct 13, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 13, 2026
…2788) The [main CI run](https://github.com/max-sixty/leaf/actions/runs/38471630809) failed three copied-runtime preview tests and one visual-inventory render check after #2767 switched developer previews and browser tests to the compiled kernel. This PR restores those checks while keeping the compiled runtime. A copied runtime has no Git metadata, so preparation now copies its payload from the filesystem. A preview selecting that runtime clears an inherited `LEAF_HOST_LAUNCHER`, which otherwise redirects its page commands to the host checkout and prevents runtime edits from triggering a re-vendor. The preview fixture supplies the development compiler dependencies and tests startup failures using resources the compiled page loads. The render check continues to require the TypeError and its explanation without depending on a function name lost to minification. Verification: the four failed cases and the distribution cache tests passed together (17 tests); the stopped-service case passed again after restoring its real network-failure arrangement. Ruff check and format checks passed on the changed files. Co-authored-by: leaf-agent <[email protected]>
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.
Browser tests and developer previews now use the existing compiled kernel instead of loading private runtime source modules. A shared content-addressed prepared installation builds once per payload/compiler revision and refreshes producer metadata independently, preserving one runtime instance and the build-free consumer installation and custom-package workflow.
Most of the diff migrates test observations to the captured page's public widget, client, and diagnostic entries. Rule-only contracts move to Node; native parser delivery, focus/composition, geometry, storage, readiness, and action/undo checks stay in browsers. Optional overlay diagnostics remain separate from core checks. Native sample reloads retire the departing document’s fault lifetime at the browser’s swap boundary, preserving its replacement and keeping canceled navigation and restored realms able to report real faults. Module delivery and offline export keep logical graph paths separate from URL spellings for Unicode and punctuation in native package dependencies.
Validation: independent read-only review, 427 runtime tests, focused model/browser/consumer checks, and all changed-file lint checks. The latest repair pass includes 13 cache checks, 12 compiled browser cases, four focused native document-lifetime cases, and two composer cohort/fallback cases; earlier selected journeys cover parser delivery, focus, geometry, readiness, native-package actions/undo, and build-free custom-package installation and export. Deterministic races verify edits during cache lock waits, compilation, and publication retry without needing another watcher event. Composer cohort checks use the actual initial freshness reading and a public cancellation signal to isolate native focus/caret preservation from unrelated state admission. Source-versus-compiled startup comparisons record resources at upgrade and authoritative presentation; elapsed timing is diagnostic. The PR test job runs the broad selection and delivery gates.