Repository navigation
fix: header maps and per-hook header writes match the FastEdge edge - #61
Merged
Merged
Conversation
Measured on preprod with a probe that records the raw status of every header host call for map types 0-8 in all four CDN hooks. - Trailer (1, 3, 7) and gRPC (4, 5) maps return Unimplemented (12) for every header call. They no longer alias the header maps. - http_call response headers are read-only (writes return 12). - Unknown map types return BadArgument (2). - onResponseHeaders: request-header replace returns NotFound (1); add, remove and set-all return BadArgument (2). - onRequestBody/onResponseBody: every header write returns NotFound (1). - A rejected write leaves the headers unchanged; reads are unchanged.
godronus
force-pushed
the
fix/unsupported-header-maps
branch
from
November 5, 2026 10:27
ed5cd78 to
26c8cb5
Compare
qrdl
approved these changes
Nov 5, 2026
Collaborator
Author
|
🎉 This PR is included in version 0.2.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.

What
The proxy-wasm runner's header host functions now return the same statuses as the
FastEdge CDN edge, and leave the headers alone when the edge would reject the call.
Measured on preprod with a probe filter that records the raw status of every header
host call for map types 0–8, in all four CDN hooks (repeated runs, two edge nodes,
consistent with the engine source).
Map types
http_callresponse headers (6)Before this change, trailer maps aliased the header maps (set-all on "request
trailers" wiped the request headers), and gRPC and unknown map types fell through to
the request headers. The Rust SDK panics on status 12, so a filter that uses
trailers now fails locally the way it does on the edge.
Header writes by hook
onRequestHeadersonResponseHeadersonRequestBody,onResponseBodyA rejected write leaves the headers unchanged. Reads are unchanged.
Not copied
Two edge behaviours look like engine bugs and have been reported upstream, so the
runner does not copy them:
NotFound, so Rust SDK getters panic.
Breaking
Tests that relied on trailer aliasing, on writing
http_callresponse headers, or onheader writes the edge rejects will see different results. None of these work on the
edge.
Changes
server/runner/HostFunctions.ts:unsupportedMapStatus()guards every header hostcall (map type and current hook); trailer aliasing removed.
server/runner/types.ts:ProxyStatus.Unimplemented = 12.server/__tests__/unit/runner/HostFunctions.test.ts: table tests per map type andper hook; the http-call write test now checks the headers are read-only.
context/: CHANGELOG entry, trailer notes inHTTP_CALL_IMPLEMENTATION.md,PROJECT_OVERVIEW.md,IMPLEMENTATION_GUIDE.md.Testing
pnpm testpasses (unit 497, integration 342 / 38 / 137 / 81).every call above; read-backs differ only where the two behaviours above are not
copied.