GeezerVison is showing github.com — fix(site): return 410 for server function requests on the static site by hearnadam · Pull Request #66672 · anomalyco/opencode
Conversation
hearnadam
commented
Nov 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Observed problem
On opencode-site-production, /_server returns about 60 HTTP 500s a day:
- Mostly real browsers on tabs opened before the site went static, calling a server function that no longer exists.
- The rest are scanner probes with made-up function ids.
- Error:
invalid server function: <id> thrown from SolidStart's getServerFunction.
Diagnosis
services/site stopped hydrating pages and stopped shipping SolidStart's app JavaScript in production in #63067. Every production page renders statically via staticPages (services/site/src/static/render.tsx), and no production client code calls /_server.
answered() still forwarded every /_server* request to SolidStart's handleServerFunction, which throws an unhandled 500 for a function id it doesn't know (@solidjs/[email protected]).
Changes
services/site/src/static/render.tsx (production only; vite dev still passes through, so dev server functions are intact): answer /_server and /_server/* with 410 Gone and Cache-Control: private, no-store, and drop /_server from answered().
services/site/script/check-worker-start.ts: check that /_server, /_server?id=any and /_server/any answer 410 in the built Worker.
Testing
bun test in services/site: 244 pass, 0 fail.
bun run build in services/site, including check-worker-start.ts running the built Worker in workerd via Miniflare.
bun run typecheck in services/site, plus oxlint and prettier --check.
Open question
About 130 requests a day to /_server still get a 200 today, from stale tabs calling a few old function ids that still resolve. With this change those tabs get 410 too. They predate the static site by more than two weeks, past the 7-day chunk retention in retain-assets.ts.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
hearnadam
changed the title
fix(site): answer /_server with 410 in production
fix(site): return 410 for server function requests on the static site
Nov 27, 2026
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.