{"id":"jobs.queue.turbineh","compat":{"runtime":"node@>=20","framework":"next@^16.0.0"},"schema":"turbineh.component/v0.1","source":{"purl":"pkg:generic/turbineh/jobs.queue.turbineh@0.1.0","repo":"https://github.com/alejandroruiz3c/code-api-turbineh"},"status":"approved","effects":{"db":true,"fs":false,"network":false,"external_services":[]},"license":{"declared":"Apache-2.0","detected":"Apache-2.0","obligations":["preserve-notice"]},"quality":{"tests":{"date":"2026-10-11","passed":true,"command":"unit tests in the app (backoff, typed registry) + pipeline builds of every recipe (sandbox)"}},"version":"0.1.0","category":"jobs","contract":{"errors":["unknown or invalid job type throws; payloads failing the schema throw on enqueue and on run"],"inputs":["defineJob(type, zodSchema, handler); enqueue(type, payload, { organizationId, runAt?, maxAttempts? })"],"limits":["max 50 jobs per run, maxAttempts 1–20, backoff capped at 1 h, stored error = error name only"],"outputs":["runDueJobs(limit) → { done, retried, failed }; POST /api/jobs/run with Bearer JOBS_RUNNER_SECRET"]},"evidence":[{"ref":"bench/results (WP16 re-run after G2)","claim":"Builds that need background work select this component and pass the full verification without corrections","origin":"tested"}],"security":{"scope":"First-party source reviewed: parameterized SQL only, constant-time secret comparison, runner disabled without a secret, no user data in stored errors.","tools":["gitleaks","semgrep","review"],"findings":[],"scanned_at":"2026-10-11"},"relations":{"provides":["jobs.queue"],"requires":[],"conflicts":[],"tested_with":["recipe.saas-crud","recipe.landing-waitlist","recipe.bookings","recipe.client-portal"]},"capability":{"cons":["Polling via the runner endpoint; not for sub-second latency"],"does":"Postgres-backed background job queue: typed jobs, retries with exponential backoff, safe concurrent claiming, cron-triggered runner endpoint","pros":["Maintained by TurbineH","No third-party runtime dependency","Uses the app's own Postgres"],"does_not":"Does not run a long-lived worker process or schedule recurring jobs by itself (call the runner endpoint from a scheduler)","use_cases":["saas-crud","internal-tool","landing-waitlist","bookings","client-portal"],"alternatives":[]},"integration":{"config":["JOBS_RUNNER_SECRET"],"install":"Copied by the assembler from files/ when selected: src/lib/jobs.ts, src/db/component-jobs.ts, src/app/api/jobs/run/route.ts, tests/unit/jobs.test.ts","strategy":"vendored-with-provenance","migrations":true}}