Skip to content

Serve private revision modules through the active website container - #2156

Merged
leaf-agent merged 1 commit into
mainfrom
fix/ci-37913111514
Oct 9, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/ci-37913111514

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

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) and npm run typecheck --prefix worker pass.

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.

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
leaf-agent merged commit 8702c56 into main Oct 9, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-37913111514 branch October 9, 2026 10:43
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant