Inngest foundation: self-hosted orchestration engine - #18
Merged
Conversation
Background work that outlives a request moves to Inngest, self-hosted rather than Inngest Cloud so the Docker deployment and the hosted app run one code path. Replaces the hand-rolled lease-and-chain cron pattern for anything new. - Serve route at /api/inngest, client and functions in apps/app/src/lib/inngest - heartbeat demo function (cron + event trigger, retries: 2) to prove wiring - inngest/inngest container in compose, on its own database on the existing Postgres, created by a one-shot that runs on every `up` - INNGEST_BASE_URL, INNGEST_EVENT_KEY, INNGEST_SIGNING_KEY required with no defaults; INNGEST_DEV switches signing explicitly - ADR 0004 records the decision and the rejected alternatives Closes #8 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
5 tasks
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.
Closes #8. Based on the
knowledge-syncepic branch, per the ticket's target-branch note.Background work that outlives a request is now an Inngest function. Self-hosted rather than Inngest Cloud, so the Docker deployment and the hosted app run one code path instead of two. This replaces the hand-rolled lease-and-chain cron pattern for anything new;
api/cron/sync-integrationsstays until integration sync moves over.Acceptance criteria
pnpm devworkflow has a documented way to run the Inngest dev server, and the demo function executes through it —pnpm dev:inngest, documented in docs/setup.md with a troubleshooting entryinngest/inngest:v1.44.0, owninngestdatabase on the same server/api/inngest,heartbeatwithretries: 2.env.examples, docs/setup.md, docs/docker.mdNotes for review
inngest-dbis a one-shot, not a service. A postgres init script only runs on a fresh volume, which would skip every already-running install, so database creation runs on everyupinstead and the server waits onservice_completed_successfully.INNGEST_SIGNING_KEYis validated as bare hex. The Inngest server refuses asignkey-prefix and the SDK carries a prefix into the hash it signs with, so a prefix on one side alone fails every call. The schema rejects it at boot rather than at the first failed verification.maxDurationon the serve route bounds one step, not a run. Raising it is not the fix for a long run; long model calls belong instep.ai.infer.pnpm dev:inngestrunning,heartbeatappears under Functions at http://localhost:8288. Sendingscibly/heartbeat.requestedwith{ "fail": true }from the event tester shows the three attemptsretries: 2produces.Checks
CI is green:
pnpm check,pnpm test:unit, andpnpm buildall pass.An earlier revision of this description claimed eight pre-existing
pnpm checkfailures across the repo. That was wrong. Those failures were local to my worktree'snode_modules(seven packages failing lint onCannot find module 'next/babel', plus anapps/webi18n typecheck error) and do not reproduce on a clean install. Nothing here needs a follow-up fix.🤖 Generated with Claude Code