Repository navigation
Conversation
commit: |
reeceyang
added a commit
to convex/workpool
that referenced
this pull request
Nov 19, 2026
reeceyang
added a commit
to convex/aggregate
that referenced
this pull request
Nov 19, 2026
reeceyang
added a commit
to convex/resend
that referenced
this pull request
Nov 19, 2026
reeceyang
added a commit
to convex/resend
that referenced
this pull request
Nov 19, 2026
reeceyang
added a commit
to convex/workpool
that referenced
this pull request
Nov 19, 2026
reeceyang
added a commit
to convex/aggregate
that referenced
this pull request
Nov 19, 2026
reeceyang
added a commit
to convex/resend
that referenced
this pull request
Nov 19, 2026
Also move the init test into example/convex so the root tsc doesn't pull in the example.
reeceyang
added a commit
to convex/workpool
that referenced
this pull request
Nov 19, 2026
Also inline batch-worker in vitest, since convex-test now loads its convex.config, and pass a config to the enqueueHandler calls main added to loop.test.ts.
reeceyang
added a commit
to convex/resend
that referenced
this pull request
Nov 19, 2026
Also move the init test into example/convex so the root tsc doesn't pull in the example, and type the test app's register callback so tsc can check it.
reeceyang
added a commit
to convex/workpool
that referenced
this pull request
Nov 19, 2026
Also inline batch-worker in vitest, since convex-test now loads its convex.config, and pass a config to the enqueueHandler calls main added to loop.test.ts.
reeceyang
added a commit
to convex/resend
that referenced
this pull request
Nov 19, 2026
Also move the init test into example/convex so the root tsc doesn't pull in the example, and type the test app's register callback so tsc can check it.
reeceyang
added a commit
to convex/workpool
that referenced
this pull request
Nov 19, 2026
Also inline batch-worker in vitest, since convex-test now loads its convex.config, and pass a config to the enqueueHandler calls main added to loop.test.ts.
reeceyang
added a commit
to convex/resend
that referenced
this pull request
Nov 19, 2026
Also move the init test into example/convex so the root tsc doesn't pull in the example, and type the test app's register callback so tsc can check it.
reeceyang
added a commit
to convex/resend
that referenced
this pull request
Nov 19, 2026
Also move the init test into example/convex so the root tsc doesn't pull in the example, and type the test app's register callback so tsc can check it.
reeceyang
added a commit
to convex/workpool
that referenced
this pull request
Nov 19, 2026
Also inline batch-worker in vitest, since convex-test now loads its convex.config, and pass a config to the enqueueHandler calls main added to loop.test.ts.
reeceyang
force-pushed
the
ry/component-init
branch
from
November 20, 2026 01:00
8371daf to
1fb9825
Compare
Run each registered component's init before the next function call, the way a
push does: one transaction, each init nested in it with the backend's init
limits, every init run even when one fails, and an error listing each failure
that rolls back all of them. `t.runInits()` runs every init again.
An init's arguments come from the parent's `convex.config` (`use(child, { args })`),
or from `componentArgs` / `registerComponent(..., { args })`. They're resolved
like the backend resolves them: function references become handles to the
parent's functions, child components become objects of handles to their public
functions, and `component.args.<name>` forwards the parent's own argument.
Inits can't read environment variables, call other functions, or use file
storage, as in the runtime.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The init fixtures need component.args and the use() fix, which aren't in a convex release yet. The preview also makes the init and args types public, so the fixtures drop their casts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reeceyang
force-pushed
the
ry/component-init
branch
from
November 21, 2026 00:40
1fb9825 to
10c81df
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.
Run each registered component's init, with the arguments its parent's
convex.configpasses, before the first call after the component is registered, so tests see the same initial state a push sets up. Inits run in one transaction with the backend's init restrictions: they can't call other functions or read environment variables, and they get the init limits on reads, writes, scheduling and file storage. Tests can override arguments withconvexTest({ componentArgs })orregisterComponent(..., { args }), and rerun every init witht.runInits().This needs convex/convex#62236 (draft), which makes init and args public and lets an imported component definition work outside the Convex runtime. Until that ships, the
convexdevDependency points at its pkg-pr-new preview.🤖 Generated with Claude Code