---
id: ADR-PFM-DJE-019
title: Platform executes small jobs within requests
product_area: platform
module: data-job-engine
revision: 1
status: proposed
design_intent: proposed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
decision: >-
  Platform caps its job inputs at 500 lines and runs queued workspace batches
  inside submission or control requests, without a worker queue or recovery
  schedule.
constrains:
  - WF-PFM-DJE-009
  - SVC-PFM-DJE-data-jobs
origin: >-
  services-platform:docs/data-jobs/platform-data-operations.md#3. The batches
  run in the submitting request
alternatives:
  - option: Adopt CRM-style dispatch and worker infrastructure
    why_not: >-
      The cited implementation chooses in-request execution to reduce
      infrastructure for small datasets.
  - option: Add a recovery sweep for orphaned batches
    why_not: >-
      A recovery sweep remains a recommended addition rather than an implemented
      facility.
consequences:
  - Interrupted requests can leave claimed batches without a recovery runner.
  - >-
    Submitting or controlling a job also drains other queued work in that
    workspace.
  - Platform does not participate in bulk batch-budget admission.
supersedes: []
evidence:
  - >-
    services-platform at ad3f6a65: services/jobs/custom-field-data-jobs.ts
    (module comment, section 3)
---

# Platform Executes Small Jobs Within Requests

## Context

Platform definition datasets are small, but request execution can end before all work is settled.

## Decision and Origin

Platform caps its job inputs at 500 lines and runs queued workspace batches inside submission or control requests, without a worker queue or recovery schedule. The origin recorded above supplies the authority for this choice; implementation evidence supplies the limits described here.

## Alternative Comparison

Adopt CRM-style dispatch and worker infrastructure: The cited implementation chooses in-request execution to reduce infrastructure for small datasets.

Add a recovery sweep for orphaned batches: A recovery sweep remains a recommended addition rather than an implemented facility.

## Consequences

Interrupted requests can leave claimed batches without a recovery runner.

Submitting or controlling a job also drains other queued work in that workspace.

Platform does not participate in bulk batch-budget admission.
