Skip to content

Inngest foundation: self-hosted orchestration engine - #18

Merged
scibly merged 1 commit into
knowledge-syncfrom
claude/github-issue-8-8ff15b
Aug 28, 2026
Merged

Inngest foundation: self-hosted orchestration engine#18
scibly merged 1 commit into
knowledge-syncfrom
claude/github-issue-8-8ff15b

Conversation

@NiclasDev63

@NiclasDev63 NiclasDev63 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Closes #8. Based on the knowledge-sync epic 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-integrations stays until integration sync moves over.

Acceptance criteria

  • pnpm dev workflow 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 entry
  • docker-compose includes the Inngest server backed by the existing Postgres, app connects via env vars — inngest/inngest:v1.44.0, own inngest database on the same server
  • App exposes the serve route and registers a working function with retries observable — /api/inngest, heartbeat with retries: 2
  • ADR 0004 committed, covering alternatives and the self-hosting decision — docs/adr/0004
  • Env var requirements documented alongside the other required vars — both .env.examples, docs/setup.md, docs/docker.md

Notes for review

  • inngest-db is 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 every up instead and the server waits on service_completed_successfully.
  • INNGEST_SIGNING_KEY is validated as bare hex. The Inngest server refuses a signkey- 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.
  • maxDuration on the serve route bounds one step, not a run. Raising it is not the fix for a long run; long model calls belong in step.ai.infer.
  • Verifying by hand: with pnpm dev:inngest running, heartbeat appears under Functions at http://localhost:8288. Sending scibly/heartbeat.requested with { "fail": true } from the event tester shows the three attempts retries: 2 produces.

Checks

CI is green: pnpm check, pnpm test:unit, and pnpm build all pass.

An earlier revision of this description claimed eight pre-existing pnpm check failures across the repo. That was wrong. Those failures were local to my worktree's node_modules (seven packages failing lint on Cannot find module 'next/babel', plus an apps/web i18n typecheck error) and do not reproduce on a clean install. Nothing here needs a follow-up fix.

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
startup-app Ignored Ignored Aug 28, 2026 4:05pm
startup-web Ignored Ignored Aug 28, 2026 4:05pm

Request Review

@scibly
scibly merged commit c8f4ab5 into knowledge-sync Aug 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants