Fix dotted tsconfig alias workflow discovery#2963
Conversation
🦋 Changeset detectedLatest commit: 65e9288 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Workflow Benchmarkscommit Backend:
📜 Previous results (2)70a16b4Fri, 17 Jul 2026 01:32:43 GMT · run logs
4f04408Thu, 16 Jul 2026 20:45:07 GMT · run logs
Avg deltas compare against the most recent benchmark run on Metrics — TTFS: time to first step body execution · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (time outside step bodies, client start → last step body exit) · SL: stream latency (first chunk write → visible to the reader) Scenarios — stream: one step that streams chunks back to the client; no hooks, so the run stays in turbo mode · hook + stream: registers a hook before the same streaming step, which exits turbo mode · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges 🟢/🔴 mark percentiles within/above target. Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · STSO (1-20) 20/30/60 · STSO (101-120) 30/45/90 · STSO (1001-1020) 40/60/120 TTFS/WO compare client vs deployment clocks and SL compares the step runner’s clock vs the client’s (NTP-synced in CI). WO ends at the last step body exit, the closest observable proxy for the final step-completion request. |
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
✅ vercel-multi-region
|
| forceFollowImports: boolean | ||
| ): Promise<void> => { | ||
| if (shouldSkipFastDiscoveryImport(specifier)) { | ||
| if (NODE_BUILTIN_SPECIFIERS.has(specifier)) { |
There was a problem hiding this comment.
So we're now no longer matching some of the specific things above? Which includes dotted files, BUT also absolute path specifiers, which the description of this PR doesn't mention why it's safe
There was a problem hiding this comment.
All files are still safe to resolve, we still check to see if the file is a .js or .ts file on line 939 of this file 10 lines down.
we resolve() the file before checking if its a js or ts file, which takes time, which the heuristic before was used to avoid by skipping dotted files / unknown extensions.
* Fix dotted alias workflow discovery * Increase streamer stress test cleanup timeout * Increase canary HMR rediscovery timeout Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
|
Backport PR opened against |
Summary
Fast discovery was checking the file extension on the unresolved import string. For an aliased import such as
@/workflows/hello.index,extname()returns.index, so discovery assumed it was not a JavaScript or TypeScript file and skipped it.The actual file is
src/workflows/hello.index.ts. Because discovery skipped the import before applying the tsconfig alias and resolving the real file, the workflow implementation was omitted from the workflow bundle. The runtime still knew the workflow ID, but could not find its implementation, resulting inWorkflowNotRegisteredError.This fixes the issue by resolving every non-builtin import first and then checking the extension of the actual resolved file. The alias now resolves to
hello.index.ts, whose real extension is.ts. Node built-ins are still skipped early, and non-source assets are still excluded after resolution.The PR also gives the existing 2,000-file
@workflow/world-localstreamer stress test a 30-second cleanup-hook timeout. Windows runners can exceed Vitest's default 10 seconds while deleting that fixture; the longer timeout is scoped to that test and does not change production behavior.Validation
@workflow/builderstests pass, along with build, typecheck, Biome, changeset, and diff checks.@workflow/world-localtests pass, along with package typecheck and Biome.Fixes #2957