backend βΊ artifacts βΊ preprocessor βΊ controller
This package holds the controller-side definition of the saved PDF conversion task. A workflow is saved work that can continue after a restart. The handler asks the server for one claim, creates or adopts a suspended Job, records its Kubernetes Job and Pod IDs through the server authority, then releases only that recorded Job. A named one-second recovery heartbeat reloads product state and observes the exact Job until a saved outcome authorizes deletion of that UID.
saved PDF task βββΊ controller βββ server claim + binding authority
β
βΌ
suspended PDF Job βββΊ record IDs βββΊ release βββΊ outcome βββΊ delete
β retryable
βββ sleep βββΊ next delivery
In this flow: workflow contract Β· Job builder Β· server artifact authority.
The agent-controller registers this handler when the deployment enables PDF preprocessing. Its tests verify that OpenCrane records the Job and first Pod before release, reloads a committed success or failure, and then asks Kubernetes to delete only the saved Job UID. If the worker dies first, the heartbeat records a fenced retryable or terminal outcome before cleanup. A retryable failure sleeps until the server's database-owned retry time before it claims the next delivery. An ambiguous delete response replays the same UID-fenced cleanup, and an already missing Job counts as cleaned up.
Cancelling the Absurd task itself does not authorize Job deletion. A real product cancellation path must first save a cancelled artifact outcome and hand cleanup to work that was not itself cancelled.
__CreateArtifactPreprocessHandlerβ creates the controller task definition.__CreateHttpArtifactPreprocessControllerAuthorityβ calls the private server claim and binding API with the controller's rotating token.ArtifactPreprocessControllerHttpAuthorityOptionsand its fetch/token types configure that authenticated server adapter and its isolated test seams.ArtifactPreprocessHandlerOptions,ArtifactPreprocessKubernetesStore, and related types define the server authority, Kubernetes operations, and task result the handler needs.
This package never uses Prisma, reads PDF bytes, grants storage access, or selects a namespace. The server owns product state and the broker; deployment config owns the Job profile.
Tagged scope:artifact-preprocessor-controller and layer:backend, it may use the PDF Job builder,
the workflow contracts, the shared runtime workload-claim contract, and the governed Kubernetes
controller contract only. An application composition must provide its server and Kubernetes
adapters; this package does not provide either.
- Parent: artifact preprocessing
- Task facts: workflow contract