Repository navigation
fix(test): runtime file-route tests send the real file name - #484
Merged
Merged
Conversation
Effect's typed client only fills `:name` path segments, so calls to the wildcard file routes sent a literal `*` and handlers never saw the name. The wide-events filename-privacy assertion could not fail. The runtime fixtures gain `fileUrl`, derived from the route like the Files HTTP suite's helper, and `socket`, the same routes on `NodeHttpServer.layerTest` for raw requests. File-route tests use them, and the wide-events test asserts its handlers received the real store and name and checks all five events for it. `UndeclaredHeadersApi` is gone: a raw request already sends every header. Closes #474 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
allisonmahmood
force-pushed
the
t3code/8ceb7428
branch
from
October 2, 2026 19:48
912c784 to
971408a
Compare
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 changed
Effect's typed
HttpApiClientonly fills:namepath segments, so runtime tests that called the wildcard file routes sent a literal*and the handlers never saw the file name. The wide-events test's "no filename in any event" assertion could not fail.The runtime test fixtures gain
fileUrl, derived fromRuntimeGroup.endpoints.getFile.pathlike the Files HTTP suite's helper, andsocket, the same routes onNodeHttpServer.layerTestfor raw requests. Every runtime test that hits a file route now sends the real, encoded URL. The wide-events test asserts its handlers receivedprivate-store/private-filenameand then checks all five events for them (it checked three before).UndeclaredHeadersApiis gone, since a raw request already sends every header.Closes #474
How it was verified
pnpm testpasses locallyAdded or updated tests covering this change
Putting the literal
*back infileUrlfails the wide-events test withname: "*"in the diff.A throwaway check confirmed
folder/a b%#?é.pngreaches the handler intact over the socket.pnpm verify: format, lint, typecheck, postgres-concurrency, cli-smoke, tier2-smoke and browser pass. The offline test step hit 25 timeouts in untouched packages while another worktree's verify ran right after a reboot; those 11 files pass on their own (177 tests).Release impact
Follow-up outside this issue: the file-route contract text in
packages/api/src/api.tssays to encode the whole name so slashes travel as%2F, while every real caller splits on/. Both work; the docs should probably describe what callers do.Review
GPT 6.1 Sol (codex) reviewed twice.
NodeHttpServer.layerTestshape.Made by Claude Opus 5.5 via Claude Code; reviewed by GPT 6.1 Sol via codex.