Repository navigation
Serve private revision modules through the active website container - #2156
Merged
Merged
Conversation
A release-scoped module missing from static assets belongs to the user's new revision. Route that miss through the existing session-file fallback, while published assets remain immutable at the edge. The new Worker checks cover both active and anonymous requests; the deployed journey's reload can now fetch the revision's runtime.
leaf-agent
added a commit
that referenced
this pull request
Oct 9, 2026
The [deployed journey](https://github.com/max-sixty/leaf/actions/runs/37919395444) still failed after #2156: the agent answered, but the browser verifier imported `runtime/semantic-state.js` from the release and received 404. The site build deliberately bundles away that private module. The verifier now imports `runtime/check-api.js`, the published diagnostic entry that exports the same application reading and watch. This addresses the final reload failure in the [original run](https://github.com/max-sixty/leaf/actions/runs/37913111514). This also reverts #2156's Worker routing change, which could not supply a file absent from the bundled release. A new regression check builds the production runtime and verifies every module the browser verifier imports exists in that bundle; it failed on `semantic-state.js` before the fix and passes now. `npm test --prefix worker` (70 tests), `uv run pytest tests/test_journey.py -q -n0` (11 tests), and `npm run typecheck --prefix worker` pass. 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.
The failed deployment run reached the new release and got an agent reply, but its final reload could not import a revision-scoped
runtime/semantic-state.js: the release asset URL returned 404. The Worker sent every release-scoped request only to built static assets, while an active user's newly published revision exists only in that user's container.This routes a missing release-scoped session file through the existing active-container fallback, using the page's canonical path. Built assets continue to come from the edge; anonymous misses remain 404 and are not cached as immutable. The failing Worker regression test passed after the change, and
npm test --prefix worker(72 tests) andnpm run typecheck --prefix workerpass.The failure followed #2144, which added the browser journey's revision-state import on the deployed page. The deployment journey itself still needs the PR gate to verify the Worker and container together.