MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-3418

Retire Inngest — delete the SDK, the serve route and the dependency, and prove the substrate stands alone

Done
Description

The removal story. It runs only once the three cutovers have left nothing on the old engine, and its job is to make the migration irreversible and provable.

What it deletes

  • lib/jobs/client.ts — the new Inngest({ id: 'prodect-core' }) singleton.
  • app/api/inngest/route.ts — the serve route, and with it the maxDuration = 300 that shaped the supervisors.
  • The Inngest branches of lib/jobs/defineJob.ts, and the per-job cutover switch introduced by the engine story, which has no second lane to route to any more.
  • The inngest and inngest-cli packages from package.json.
  • The dev-server boot in the E2E lane and any CI wiring that starts inngest-cli dev.
  • INNGEST_EVENT_KEY, INNGEST_SIGNING_KEY and INNGEST_DEV from the Fly secrets and from docs/jobs.md § Environment.
  • The ESLint no-restricted-imports rule for inngest — a rule guarding an absent package is dead weight, and its removal is the machine-checkable proof the dependency is gone.

The abandoned path is itself a deliverable

Removing the last caller is not the same as removing the path. Two experiment scripts (scripts/experiments/inngest-concurrency-fairness.mjs, inngest-debounce-coalescing.mjs, and the sleep/lag harnesses added by MOTIR-3246 and MOTIR-3405) measure a scheduler that will no longer be running anything. Each gets an explicit disposition — retargeted at the new engine, or deleted with its finding preserved in the record it produced. Neither may be left as an unmaintained probe against a dependency the repo does not have.

Scope boundary

ENDS at: no Inngest anywhere in motir-core, every job still running, and the substrate documentation describing what actually runs.

Does NOT change any job's behaviour. If this story has to change what a job does, a cutover story left something undone and the fix belongs there.

Verification recipe

grep -ri inngest over the repository returns only historical references in decision records and comments that explain what was replaced. pnpm install produces a tree without either package. The full suite is green, the 24 jobs run, and /settings/workspace/jobs still shows their runs.

Acceptance criteria

  • Neither inngest nor inngest-cli is in package.json or the lockfile, and no source file imports either.
  • All 24 jobs run on the Postgres engine in production; the job_run ledger, the DLQ and the operator dashboard behave as before.
  • The Inngest account can be closed — no deployed configuration reads an INNGEST_* secret, verified by fly secrets list -a motir-core and by grepping the shipped path for each variable, not by reading .env.example.
  • docs/jobs.md and docs/decisions/job-lane-occupancy.md are rewritten to describe the Postgres substrate; every claim specific to Inngest's scheduler is removed or explicitly marked historical.
  • content/legal/subprocessors.md no longer lists Inngest. ⚠️ ADDED 2026-08-26 — that file did not exist when this card was written (created the same day by MOTIR-1160). It currently names Inngest as a live core subprocessor receiving job payloads, which is not "a historical reference explaining what was replaced", so this card cannot pass its own verification recipe while that row stands. Delete the row from the core table, the transfer-basis table and the open-rows list, then re-run the page's own provenance method and re-date Last reviewed. A second card is gated on this: MOTIR-1134 is blocked_by this story precisely so the legal documents never publish naming a processor with no Chapter V transfer basis.
  • Each experiment script has a stated disposition and none references a package the repo no longer has.

Context refs

  • lib/jobs/client.ts · app/api/inngest/route.ts · lib/jobs/defineJob.ts — what is deleted
  • eslint.config.mjs — the import-boundary rule that goes with it
  • docs/jobs.md · docs/decisions/job-lane-occupancy.md · content/legal/subprocessors.md — the documents to rewrite
  • scripts/experiments/ — the probes needing a disposition