Repository navigation
Mount the OSA worker on edge.osc.earth - #622
Merged
Merged
Conversation
Adds the edge.<domain>/<project> routes for both environments, keeping the #500 route pair, and strips /osa-dev for the dev worker on the shared edge host (mountPrefixFor). widget.osc.earth stays as an alias (#621). test-routing.js: 158 passed; test-mounted-hosts.js: 33 passed and catches a dev edge route mounted at the wrong prefix.
The schedule runs from main, so the probes go live with the release that deploys the production edge routes (#621). YAML parses.
Review fixes (#621): test-mounted-hosts.js asserts edge.osc.earth is routed in production and dev by name, so deleting the dev edge routes now fails (verified: 2 failures; it passed before). The health job name and likely causes cover the edge host. Tests: mounted-hosts 37, routing 158 passed.
Contributor
|
Worker changes detected. After merging to Manual deployment (if needed): cd workers/osa-worker
wrangler deploy --env dev # for develop branch
wrangler deploy # for main branch |
2 of 12 tasks
This was referenced Nov 11, 2026
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.
Closes #621
Adopts the
<role>.<domain>/<project>convention for the browser-facing worker: production atedge.osc.earth/osa, dev atedge.osc.earth/osa-dev.api.osc.earth/osastays the backend for key-authenticated clients.Changes
wrangler.toml: the An OSA address without its trailing slash fails: widget.osc.earth/osa is 522 #500 route pair onedge.osc.earthfor both environments (/osa/*and/osa*; dev/osa-dev/*and/osa-dev*), with the convention documented beside the routes. The DNS recordedge.osc.earth AAAA 100::(proxied) already exists.index.js:mountPrefixFor(hostname, env)returns the mount prefix per host. The dev worker is mounted at/osa-devon the shared edge host; everything else stays at/osa. The bare-path redirect, the outside-mount 404 and the strip all use it. If the dev routes are ever missing, production answers/osa-dev/...with 404 instead of serving it.widget.osc.earth/osaanddevelop-widget.osc.earth/osastay as aliases, and the widget's default endpoint is unchanged, because other sites allowlist that host.widget-route-health.ymlprobes the edge host. The job name and the "likely causes" list cover it, including detached dev edge routes (production answers/osa-dev/healthwith 404). Scheduled runs usemain, so the probes go live in the same release that deploys the production edge routes.Rollout
/osa-devroutes./osa-dev*route over production's/osa*.Testing
bun workers/osa-worker/test-routing.js: 158 passed (new: edge host in both environments, bare-path redirect with query, outside-mount 404, forwarded path for/osa-dev/hed/chat)bun workers/osa-worker/test-mounted-hosts.js: 37 passed. It checks each route's prefix against its own wrangler environment and requires the edge host in both environments by name.test-mounted-hosts.js: deleting the dev edge routes fails 2 assertions (it passed before the review fix); a dev edge route pointed at/osa/*fails 2.bun frontend/test-endpoint-resolution.js: passedwrangler.tomlparses as TOML; workflow parses as YAMLThis touches
wrangler.tomlandwidget-route-health.yml, as does #620; the two branches merge cleanly (git merge-tree).