Backend workflow management
Backend workflow management turns a configured workflow into a controlled, observable run. It defines the workflow and its deployable forms, accepts manual or external triggers, schedules recurring runs, sends work to workers, and records results for users and downstream systems. Failure monitoring also identifies workflows with repeated errors for dashboard attention. See the backend API platform page for the wider backend boundary, backend API v2 for the public API surface, workflow execution for the execution model, worker operations and worker queue orchestration for worker-side processing, and agent KV extraction and MCP server for related execution clients.
Workflow resources
The backend treats a workflow as the reusable business process and attaches one or more execution surfaces to it. These resources are organization-scoped and use shared access rules so that the same workflow definition can support internal runs, scheduled pipelines, and public API calls.
Workflow definitions
The Workflow is the reusable definition of a process. It identifies the workflow type and state, stores source and destination settings, and provides the base to which tools and execution records belong. A workflow can be shared with users, groups, or its organization while ownership controls who can change it.
Workflow lifecycle actions also have platform controls. Owners manage the resource, organization capability rules can block deletion, and create or delete actions produce audit events for later review.
References: backend/…/workflow.py• L26-52 backend/…/workflow.py• L66-94 backend/…/views.py• L92-188
Pipeline definitions
The Pipeline is a runnable form of a workflow. It adds the operational state needed for a recurring or on-demand run, such as whether the pipeline is active, whether it has a schedule, when it last ran, and how that run ended. A pipeline also exposes a stable API endpoint and key-based access for external callers.
Pipeline configuration is owner-controlled. Shared users and organization-shared users can view a pipeline, while an activation-only update follows the wider sharing access because activation is a use action rather than a configuration change. Pipeline creation commits the pipeline, its owner access, and its API key as one unit, so a schedule or key setup error does not leave an unusable resource behind. The separate serializer scoping rule also keeps workflow selection safe for list and detail responses.
References: backend/…/models.py• L54-109 backend/…/models.py• L147-165 backend/…/views.py• L70-125 backend/…/views.py• L127-176 backend/…/crud.py• L53-81 backend/…/test_pipeline_serializer_list_scoping.py• L1-60
Deployment surfaces
An APIDeployment is the public request surface for a workflow. It has a public name and endpoint, can be enabled or disabled, and uses an API key to authorize execution. The backend requires the linked workflow to have valid source and destination setup before it creates an API deployment, which keeps an exposed endpoint tied to a runnable process.
References: backend/…/models.py• L60-95 backend/…/serializers.py• L41-173 backend/…/api_deployment_views.py• L315-347
Execution lifecycle
An execution is the durable record of one workflow run. The backend creates this record before work starts, sends the run to the selected execution path, and updates its state as workers process files and produce results.
Trigger and dispatch
Manual pipeline runs, scheduled runs, and public API requests converge on the workflow execution service. A trigger identifies the workflow and its optional pipeline or API deployment, creates an execution record, and then dispatches an asynchronous orchestrator. The orchestrator prepares source and destination work before workers process the input.
The main flow is:
flowchart LR
A[Manual or external trigger] --> B[Validate resource and access]
B --> C[Create execution record]
C --> D[Select transport]
D --> E[Dispatch orchestrator]
E --> F[Read source and prepare work]
F --> G[Send file work to workers]
G --> H[Aggregate results]
H --> I[Persist status and expose result]
The transport choice is carried with the run from dispatch through completion. A positive dispatch marker records that the handoff occurred even when a later attempt to save the transport handle fails.
References: backend/…/manager.py• L20-43 backend/…/views.py• L215-312 backend/…/workflow_helper.py• L621-799
File processing
The execution service changes a workflow run into batches of input files. It sends those batches to dedicated processing queues and uses a callback to join the results. Source and destination connectors supply the run with its input and output behavior, while file history can prevent repeat work for files that already completed.
References: backend/…/workflow_helper.py• L97-141 backend/…/workflow_helper.py• L143-256 backend/…/workflow_helper.py• L301-390
Execution tracking
WorkflowExecution is the system record for run state, mode, trigger method, file counts, attempts, errors, timing, and dispatch identity. It links a run to its workflow and, when present, to a pipeline or API deployment. Celery executions use a task handle, while Postgres executions use a queue message handle and a positive marker that orchestration reached its transport.
Execution status is also reflected in a short-lived execution cache for fast reads. Terminal updates protect completed results from stale writers, and API deployment rate-limit slots are released only after the terminal status is durable. Status, file counts, and dispatch bookkeeping use field-scoped or locked updates so a stale object cannot overwrite newer run state. An explicit STOPPED result remains final, while a Postgres COMPLETED result is also protected from later status writes.
References: backend/…/execution.py• L122-227 backend/…/execution.py• L399-602 backend/…/internal_views.py• L520-657 backend/…/execution.py• L459-519
Stuck execution visibility
Stuck execution visibility identifies active runs that have not changed for longer than the configured threshold. The last activity is the later of the run update and its newest file update, so file work keeps a run out of the stuck view while it is making progress.
The execution API adds two operational views:
GET execution/?stuck=truekeeps the normal filters, permissions, ordering, and pagination and addsstuck_sinceto each row.GET execution/stuck-count/returns the visible total, the threshold, and counts for API, ETL, TASK, and workflow runs.
The default threshold is 9,000 seconds. The entity labels distinguish API deployments, ETL pipelines, TASK pipelines, and workflow runs without a pipeline. The filter is additive, so normal execution list and detail responses keep their existing contract.
References: backend/…/README.md• L16-75 backend/…/stuck.py• L17-65 backend/…/filter.py• L22-61 backend/…/execution.py• L40-75 backend/…/stuck_abort.py• L29-51
Execution aborts
Execution aborts give an owner or organization-level operator a controlled way to stop a pending or running execution. The abort keeps completed file work, stops open file rows, records failed counts for the remaining work, and publishes the final STOPPED state to the run and its callers.
The operation processes each requested id independently and returns one outcome per unique id. A permitted active run is aborted, a terminal run is reported as already finished, and an unknown or unauthorized id is reported without revealing whether it exists. A successful abort also updates the owning pipeline or deployment, sends its notification, and records an audit event.
The stop flow is:
flowchart LR
A[Abort request] --> B[Check visible owner or admin access]
B --> C[Lock one execution]
C --> D[Stop open file work and write counts]
D --> E[Persist STOPPED]
E --> F[Notify resource and record audit event]
Workers observe the stopped state between files. Queued work is skipped, while the file already in progress can finish. Later status writes cannot replace the stop or its error.
References: backend/…/README.md• L76-181 backend/…/abort.py• L70-182 backend/…/abort.py• L185-282 backend/…/stuck_abort.py• L54-72 backend/…/test_abort_executions.py• L53-83
Failure streak tracking
Failure monitoring marks an active pipeline or API deployment as failing when its five most recent finished runs all end in ERROR. Pending and executing runs do not hide the latest finished failures, and any finished non-error run ends the streak. The resulting record gives dashboard consumers the failure count, start time, latest failure, and last success.
Date filters apply to the latest failure rather than rebuilding history as of an earlier date. This lets the attention feed show current repeated failures while still limiting the results to a reporting window. The rule is specific to repeated ERROR runs and does not treat an intentional STOPPED run as a broken resource.
References: backend/…/failing_streaks.py• L1-15 backend/…/failing_streaks.py• L28-115 backend/…/attention.py• L187-225 backend/…/attention.py• L228-266
File execution records
WorkflowFileExecution is the durable record for one input file inside a run. It stores file identity, metadata, status, timing, and errors. Internal worker endpoints create or reuse these records, update their status or hash, and provide batch operations and metrics for service callers.
These records let the backend relate a run-level result to the files that produced it. The file identity rules also prevent the same input from creating duplicate work within one execution. File-facing responses add a useful status message from the file error or latest log so callers can explain pending, failed, and stopped work without reading internal logs.
References: backend/…/models.py• L18-65 backend/…/models.py• L68-219 backend/…/serializers.py• L17-43 backend/…/internal_views.py• L27-269 backend/…/internal_views.py• L271-701
Execution query access
Run history and file metrics use time-window queries as execution data grows. The backend provides database access paths for broad execution-date scans and for file status plus date scans, so dashboards and recent-run views do not depend on full history scans. The deploy guards check that these access paths are valid and match the model state.
References: backend/…/execution.py• L230-279 backend/…/models.py• L175-209 backend/…/0029_we_created_at_idx.py• L1-91 backend/…/0007_wfe_status_created_idx.py• L1-100
Undispatched execution recovery
An undispatched execution is a pending run record that remains after the request ends before it hands work to a transport. The backend sweeps old records with no dispatch marker and changes them to an error that tells the caller that no files were processed. This closes a gap that the normal worker recovery path cannot see because no queue work or barrier exists.
The sweep releases leaked API concurrency capacity when it can. It retains staged input because a missing transport handle can also occur after work was sent but before handle bookkeeping finished. The positive dispatched_at marker makes transport reach explicit instead of relying only on absent task handles.
A separate recovery path handles dispatched executions from either Celery or Postgres whose files are all terminal but whose run record remains active. It recomputes the run result from the file records and aligns non-terminal file records with a recovered terminal run. The two paths use disjoint dispatch evidence so a real dispatch is not mistaken for a request that never started.
References: backend/…/undispatched_sweep.py• L1-37 backend/…/undispatched_sweep.py• L96-120 backend/…/undispatched_sweep.py• L161-215 backend/…/undispatched_sweep.py• L218-303 backend/…/execution.py• L216-225 backend/…/internal_views.py• L666-887
Schedule management
Scheduling converts a pipeline's cron rule into a recurring trigger. The backend keeps the schedule aligned with the pipeline's active state and controls which scheduler can fire it.
Schedule creation
When a pipeline has a cron rule, the scheduler validates the rule and creates or updates its recurring Beat job. It also mirrors the schedule in the Postgres scheduler and reconciles the effective firer. Removing the rule removes the recurring job; pausing or resuming a pipeline changes whether the schedule can fire. Ownership changes establish a fresh timing baseline so a handoff does not create an unscheduled immediate run.
References: backend/…/crud.py• L91-199 backend/…/crud.py• L242-258 backend/…/helper.py• L25-83 backend/…/tasks.py• L44-213
Schedule ownership
Each scheduled pipeline has one effective firer. PG_SCHEDULER_ENABLED is the single rollout gate: it defaults to enabled and gives ownership to the Postgres scheduler; setting it to false keeps ownership with Celery Beat. The backend no longer uses a second per-schedule feature flag for this decision.
Ownership reconciliation updates the Postgres mirror and the Beat schedule in one transaction. A Postgres-owned schedule disables its Beat job, while a Beat-owned schedule is enabled only when the pipeline is active. The reconciliation also resets the Postgres timing baseline when ownership changes and resets Beat's clock when a schedule returns to Beat. These baselines prevent missed intervals from replaying as a burst after a handoff.
When the gate is off, normal reconciliation does not rewrite either scheduler's tables. If it finds a stale Postgres-owned row left by an earlier rollout, it releases that row to Beat while preserving the pipeline's paused state. A database error during the stale-row check fails closed and leaves the current firer unchanged.
References: backend/…/ownership.py• L38-73 backend/…/ownership.py• L76-121 backend/…/ownership.py• L123-255 backend/…/models.py• L327-381
Schedule reconciliation
Schedule edits reconcile the affected pipeline. Operators can also run reconciliation to backfill schedules created before the mirror existed or to apply a new rollout decision to all schedules. The convergence command handles both adoption by Postgres and release back to Celery Beat. These operations are idempotent and support a dry run so the handoff can be inspected before it changes live firing behavior.
Pipeline schedules and other recurring tasks use separate rollout choices. The optional periodic-task path must be enabled only when its matching consumer is deployed. Releasing schedules to Beat also requires the Beat-side scheduler and its consumers to be running.
References: backend/…/reconcile_pg_schedules.py• L1-14 backend/…/reconcile_pg_schedules.py• L41-69 backend/…/reconcile_pg_schedules.py• L96-148 backend/…/converge_pg_scheduler.py• L1-39 backend/…/converge_pg_scheduler.py• L49-115 backend/…/models.py• L385-460
Queue and transport
The execution system supports the established Celery path and a Postgres queue path. A single rollout decision selects the path for an execution, and the choice stays with that execution from orchestration through completion.
Transport selection
Transport selection is a per-execution decision based on the Postgres queue feature flag and organization context. The default and failure-safe choice is Celery, so an unavailable flag service or missing organization context does not block execution creation. The selected value travels with the dispatched work instead of being inferred again later.
References: backend/…/transport.py• L1-27 backend/…/transport.py• L51-80 backend/…/transport.py• L84-145
Postgres queue
The Postgres queue provides durable task rows for work that must run on the Postgres transport. The backend producer writes worker-compatible task payloads with queue, organization, and fairness context, while workers claim, process, acknowledge, and recover those rows through message state and visibility leases. Priority controls claim order, and delayed rows remain unavailable until the reaper makes them ready.
The producer supports fire-and-forget tasks, request-reply results, and success or error continuations. It converts task values to JSON-safe data before the database write and rejects conflicting dispatch modes or invalid priority values. A failed Postgres enqueue propagates to the caller; the orchestrator does not silently switch to Celery because that could hide a failed handoff or dispatch the work twice.
The queue also provides coordination records for barriers, batch deduplication, orchestration claims, and request-reply results. These records support at-least-once delivery while limiting duplicate effects and allowing stranded work to be recovered.
References: backend/…/models.py• L14-149 backend/…/models.py• L152-228 backend/…/models.py• L259-325 backend/…/models.py• L463-570 backend/…/producer.py• L103-221 backend/…/test_producer.py• L21-280
Dispatch identity
The backend records the identifier returned by the selected transport so operators and status flows can relate an execution to its queued work. Celery uses a task identifier, while Postgres uses the queue row's numeric message identifier. The separate fields keep a queue handle from being mistaken for a Celery task. dispatched_at records successful handoff even when later handle bookkeeping fails.
References: backend/…/execution.py• L138-164 backend/…/execution.py• L216-225 backend/…/execution.py• L459-519 backend/…/workflow_helper.py• L686-739
Plugin integrations
Plugins provide optional behavior without making the core workflow path depend on every deployment feature. The backend discovers backend services through its Django plugin manager, while workers discover worker and client extensions from their own configuration.
Backend services
Backend plugins expose service classes and metadata to Django features such as notifications and subscription usage. Callers check whether a plugin is available before using it, so an optional service can be absent in an open-source or reduced deployment. Plugin failures are normally isolated from the main workflow state change when the integration is not required for correctness.
References: backend/…/__init__.py• L1-57 backend/…/views.py• L19-44 backend/…/workflow_helper.py• L258-283
Worker extensions
Worker plugins add execution-side features such as manual review or external API clients. The worker registry loads enabled modules from environment-based configuration and exposes their availability to task code. Client plugins use a common base and cached instances so a worker can acquire an extension when a workflow needs it and close it during shutdown.
References: workers/plugin_registry.py• L1-10 workers/plugin_registry.py• L21-105 workers/plugin_registry.py• L111-154 workers/client_plugin_registry.py• L17-68 workers/client_plugin_registry.py• L241-301
Deployment integrations
Deployment integrations connect workflow execution to callers outside the workflow editor. They combine resource configuration, authentication, input staging, asynchronous execution, status lookup, and result shaping into a stable contract.
API deployment execution
An API deployment accepts uploaded files or approved presigned URLs and validates the request before it creates work. It acquires an organization-level concurrency slot, stages the input, starts the workflow, and returns either a completed result or a status endpoint for later polling. Completed responses can include selected metadata, metrics, extracted text, and usage data.
Input staging checks the file content rather than trusting the declared media type. Unsupported files are rejected before dispatch and recorded as individual file failures, so valid files in the same request can continue. This keeps an input problem visible to the caller and prevents it from appearing later as an extraction failure.
References: backend/…/api_deployment_views.py• L53-170 backend/…/deployment_helper.py• L183-367 backend/…/serializers.py• L221-394 backend/…/test_api_storage_mime_validation.py• L109-181 backend/…/test_api_storage_mime_validation.py• L255-265
API authentication
Public execution requires an active deployment and a valid deployment-specific or global deployment key. The backend resolves the deployment before execution and keeps the authorization result with the request context, which allows the same workflow run path to serve both key types without weakening organization checks.
References: backend/…/deployment_helper.py• L48-122 backend/…/api_deployment_views.py• L66-87 backend/…/models.py• L225-260
Pipeline status bridge
The internal pipeline bridge gives service callers one organization-scoped lookup for either a pipeline or an API deployment. It returns the resource context and accepts execution status updates, so workers can report progress to the resource that started the run without crossing organization boundaries.
References: backend/…/internal_api_views.py• L15-82 backend/…/internal_api_views.py• L84-172
Internal worker interface
Workers use internal execution endpoints to read the workflow definition and its source, destination, organization, and file execution context. They also report status and create file execution records through this service boundary. Batch file changes and metrics use the same organization-scoped boundary. This keeps worker processes independent from direct database access to the full workflow model while preserving organization-aware reads.
The worker interface also provides a light status check for stopping work between files. Status updates validate file aggregates, protect deliberate terminal results from stale writers, and can close stranded file rows together with a recovered terminal execution. Internal reads fail closed when the organization context is missing, so the organization header is part of the service contract rather than an optional filter.
References: backend/…/internal_views.py• L47-105 backend/…/internal_views.py• L112-197 backend/…/internal_views.py• L520-657 backend/…/internal_views.py• L666-887 backend/…/internal_serializers.py• L151-245 backend/…/internal_views.py• L27-139 backend/…/internal_views.py• L271-701
Change checklist
When these files or sections are changed, remember to consider these:
- Changes to pipeline execution inputs must stay aligned across the manual trigger, scheduled task arguments, public API staging path, and asynchronous orchestrator payload.
- Changes to pipeline access or lifecycle actions must keep configuration permissions separate from activation permissions. Pipeline creation must keep owner access, API key creation, and schedule setup in one resource lifecycle.
- Changes to workflow lifecycle permissions or events must keep owner checks, organization capability checks, and audit records aligned with the actual create and delete outcomes.
- Changes to execution status or terminal rules must preserve the database record, execution cache, pipeline status, API rate-limit release, worker callback contract, and the positive dispatch marker.
- Changes to stuck or abort behavior must keep visibility, entity classification, owner checks, per-id outcomes, file counts, notifications, audit events, and worker stop checks aligned.
- Changes to terminal status meaning must keep failure streak detection aligned with dashboard attention behavior and with the separate failure rule used for notifications.
- Changes to file status or file identity must stay aligned across single-file and batch internal endpoints, manager deduplication, run-level aggregates, and dashboard metric filters.
- Changes to execution recovery must keep never-dispatched selection separate from dispatched-but-stuck selection. Recheck the dispatch marker, transport handles, file terminal checks, terminal status cascade, and both transport types together.
- Changes to date or status metric queries must preserve the leading filter shape served by the execution and file-record access paths. Keep the model declaration, migration state, and live database definition aligned.
- Changes to cron or active-state behavior must update both the Celery schedule and the Postgres schedule mirror. Recheck ownership so one scheduler remains disabled and recheck timing baselines on handoff and release.
- Changes to the scheduler rollout gate must preserve its default and rollback behavior. A gate change must be paired with the matching scheduler deployment and an explicit convergence run for schedules already handed off.
- Changes to queue payload fields or message states must stay compatible with the shared worker payload contract, delayed delivery, recovery sweep, and both fire-and-forget and request-reply dispatch.
- Changes to the backend queue producer must preserve the worker payload shape, JSON-safe value conversion, priority bounds, delayed-delivery state, and the no-fallback behavior after a failed enqueue.
- Changes to workflow selection or pipeline serializer binding must preserve requester scoping, the update carve-out for the stored workflow, the no-reparent rule, and the separate list-versus-detail instance handling.
- Changes to workflow or deployment sharing must preserve the independent access checks used for resource lists and execution history.
- Changes to optional plugin names or service contracts must cover both the backend registry and the worker registry. An absent plugin must still produce the intended reduced-feature behavior.
- Changes to internal worker endpoints must preserve fail-closed organization scoping, the lightweight status route, terminal-write guards, and the request shapes used by both single-record and batch callers.
- Changes to API upload validation must keep content detection, archive checks, per-file failure recording, and valid-sibling processing aligned with the extractor's supported types.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A pipeline is inactive when a scheduled or public trigger arrives | The run does not start and the caller receives an inactive-resource failure | Validate the active state before dispatch in PipelineProcessor and deployment validation |
| A request ends after creating a pending execution but before dispatch | The run stays pending and can leak API concurrency capacity | Sweep aged pending rows with no dispatch marker and release the rate-limit slot best-effort |
| A live dispatch has no recorded handle when the sweep checks it | A real queued run can be marked as not started and dropped by terminal-state worker guards | Stamp dispatched_at as soon as dispatch succeeds and keep the grace period conservative |
| A dispatched run has terminal files but its execution row stays active | The run can remain visible as pending or executing forever | Recompute the terminal result under a row lock and cascade terminal state to non-terminal file records |
| A run is pending or executing beyond the stuck threshold without run or file activity | Operators cannot distinguish an idle run from normal history without the stuck view | Use the latest run-or-file activity and restrict the view to active statuses |
| An abort races with a finishing worker | A finished run can be changed or a stop can be lost | Lock the execution row and protect terminal COMPLETED and STOPPED states |
A stale worker update tries to replace COMPLETED or STOPPED on a Postgres execution | A finished run can move backward or lose the user's stop decision | Lock the row and reject changes to protected terminal states |
| An abort fails after changing the cache but before its transaction commits | Redis can show STOPPED while the database still shows an active run | Write file state before the final stop and restore the stored cache status on rollback |
| An internal worker request omits organization context | The service returns no records and the worker cannot read or update its run | Apply organization filtering that fails closed on execution, file, pipeline, and deployment lookups |
| A pipeline list is bound to one-pipeline serializer logic | List requests can fail while building the workflow field instead of returning pipeline rows | Apply the stored-workflow merge only when the serializer instance is a single Pipeline |
| Pipeline creation fails during schedule or key setup without one transaction | A partial resource can remain without owner access or a usable API key | Create the pipeline, grant owner access, and create its key inside one atomic operation |
| A schedule is handed to Postgres without disabling its Beat task | The pipeline can run twice for one cron event | Reconcile pg_owned and Beat enabled state in one transaction and signal Beat to reload |
PG_SCHEDULER_ENABLED is true while no Postgres scheduler is running | Beat is disabled and the pipeline has no firer | Keep the gate off until the Postgres scheduler is deployed; the gate defaults on only for deployments that include it |
| A schedule mirror is missing or stale during a rollout | A pipeline can remain on the wrong firer or fail to fire after handoff | Backfill and converge with the scheduler management commands; keep mirror writes best-effort but visible |
| The gate is turned off while a stale row still claims Postgres ownership | Beat and Postgres can both fire the same pipeline or the release can leave no firer | Detect stale ownership and release it in the same reconciliation; if the check fails, write nothing and retry later |
| A Postgres task is delivered again after a worker crash | A batch or orchestration step can repeat and corrupt counts or results | Use durable batch and orchestration claims plus lease and barrier recovery |
| A Postgres task has non-finite JSON data or an invalid priority | The enqueue is rejected before a queue row is written and the caller must handle the dispatch failure | Convert values through the shared JSON-safe path and validate priority against the queue bounds |
| A public request has no valid key, no active deployment, or no configured endpoints | The request is rejected before work is created | Validate deployment state, key scope, and source/destination configuration |
| Input staging finds an unsupported or unreadable file | That file is rejected before dispatch and the caller receives a file-level failure | Detect file content, record the actual type or read error, and continue valid sibling files |
| Input staging fails before asynchronous dispatch | The execution can remain pending and the rate-limit slot can leak | Mark the pending execution as failed, release the slot, and remove staged storage |
| A dashboard metric loses its status or date filter | The supporting access path becomes unused and the query can scan large history tables | Keep the metric predicate and the status/date index contract aligned |
Key files
| File | Why to read it |
|---|---|
| backend/…/workflow.py | Defines the reusable workflow resource and its organization and sharing boundary. |
| backend/…/models.py | Defines the runnable pipeline state and schedule-facing fields. |
| backend/…/execution.py | Defines the durable run record, access filtering, status rules, dispatch marker, transport handles, cache behavior, and date access path. |
| backend/…/serializers.py | Defines the workflow and execution representations used by API callers. |
| backend/…/views.py | Shows how workflow lifecycle, execution requests, worker-facing reads, and internal file-history access meet. |
| backend/…/README.md | Publishes the stuck-run and abort API contract and its worker rollout limits. |
| backend/…/stuck.py | Defines the active-run inactivity rule and entity counts for stuck execution views. |
| backend/…/abort.py | Defines authorization, per-run abort outcomes, file-count handling, notifications, and audit recording. |
| backend/…/failing_streaks.py | Defines the repeated-error rule used to identify failing pipelines and API deployments. |
| backend/…/attention.py | Connects failing streaks to dashboard attention items. |
| backend/…/workflow_helper.py | Shows the high-level path from execution creation to dispatch, transport marking, and file processing. |
| backend/…/undispatched_sweep.py | Recovers pending executions that never reach a transport and releases leaked capacity. |
| backend/…/internal_views.py | Defines the internal execution status, context, terminal-write guard, file aggregate handling, and dispatched-run recovery boundary. |
| backend/…/internal_serializers.py | Defines internal status-update validation and execution context representations. |
| backend/…/models.py | Defines per-file identity, status, deduplication, and the file status/date access path. |
| backend/…/serializers.py | Defines the file-facing status message and display fields. |
| backend/…/internal_views.py | Defines worker operations for file records, batches, status changes, hashes, and metrics. |
| backend/…/views.py | Defines pipeline access, activation and execution actions, transactional creation, and deployment-facing downloads. |
| backend/…/internal_api_views.py | Connects internal callers to organization-scoped pipeline and API deployment status. |
| backend/…/crud.py | Shows how pipeline access and configuration become a schedule and how run summaries are exposed. |
| backend/…/helper.py | Connects pipeline schedule changes to Beat jobs, the Postgres mirror, and ownership reconciliation. |
| backend/…/tasks.py | Mirrors pipeline schedule state and handles pause, resume, and pipeline triggers. |
| backend/…/ownership.py | Defines the single-firer rule, rollout gate, transition baselines, and rollback repair. |
| backend/…/converge_pg_scheduler.py | Converges scheduler ownership to deployment intent in both directions. |
| backend/…/models.py | Describes the durable queue, schedule mirrors, barriers, delayed work, and recovery records. |
| backend/…/producer.py | Defines the backend-to-worker queue payload, dispatch modes, delay handling, and enqueue failure contract. |
| backend/…/api_deployment_views.py | Shows the public deployment request and status lifecycle. |
| backend/…/deployment_helper.py | Connects API authentication, staging, asynchronous execution, and result shaping. |
| backend/…/source.py | Defines the input staging boundary used by API deployments and file type checks. |
| backend/…/__init__.py | Shows how optional backend services are resolved. |
| workers/plugin_registry.py | Shows how worker-side extensions are selected from deployment configuration. |
| backend/…/0029_we_created_at_idx.py | Defines the safe deployment path for the execution date access path. |
| backend/…/0007_wfe_status_created_idx.py | Defines the safe deployment path for the file status/date access path. |