Conversation
Expose wait-until state through vercel.functions.context so runtimes and SDK packages can share invocation ownership without depending on cache. Preserve meta package ownership of the existing Functions API.
Include the public API and error namespace portions in the package mypy roots so every module shipped by internal core is checked.
fantix
force-pushed
the
fantix/invocation-background-tasks
branch
from
September 3, 2026 20:17
6e7df0d to
11e97d2
Compare
wait_until context from cache
fantix
marked this pull request as ready for review
September 3, 2026 20:58
Member
Author
|
This is decided in a meeting to get moved into |
This branch was successfully deployed
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.
Upcoming workflow
ReadableStreamwould start background tasks to pump data from user generators into a workflow stream. Such task should continue to run to completion even after the step handler returns. This is whatvercel.functions.wait_until(awaitable)offers, and the Workflow JS SDK is using similar mechanism.The problem is, neither
vercel.functions(thevercelpackage) nor the underlying context storage ofwait_until(currently stored invercel.cache.context, invercel-cachepackage) can be imported fromvercel-workflow- workflow doesn't have to depend on cache.This PR moves that context storage to
vercel.functions.contextinvercel-internal-core. The rest ofvercel.functionsstays in thevercelmeta package, withpkgutil.extend_path()allowing the workspace to combine it with the context subpackage from internal core.vercel.functions.contextis not considered public API - it's only used by the runtime and othervercel-*packages internally. Therefore,vercel.functionsdidn't re-export what's in the context module.This also allows the runtime to avoid using the confusing
vercel.cache.context.set_context(), but rather use the more accuratevercel.functions.context.set_wait_until(). See also the paired runtime change: https://github.com/vercel/vercel-internal/pull/786See also: #2, #59, #149, #218