Five internal gRPC services expose domain operations over mTLS-protected connections.
Users service
Registration, login, user lookup, and preference updates.
Workflows service
Workflow CRUD, build status, list filters, failure counters, termination, deletion, and internal lookup by ID.
Jobs service
Scheduling, reads, status updates, lease claim and renewal, container attachment, completion, failure, cancellation, retry release, expired-lease recovery, logs, search, live streaming, and job listing.
ScheduleJob accepts MANUAL from a user JWT for a workflow owned by the token subject.
AUTOMATIC requires an internal admin JWT valid for jobs-service and a positive
workflow_generation. A user JWT requesting AUTOMATIC receives PermissionDenied,
even when the caller owns the workflow.
FailJob requires a failure-family terminal reason code, while CancelJob and CancelClaimedJob require a cancellation-family code. Workers must use the dedicated terminal commands so failure kind, diagnostics, status, reason, and replay identity are recorded together. Job list and public detail responses expose only the normalized safe code and message, never the stored raw error.
SearchJobLogs applies typo-tolerant matching to all of the first ten terms
that Meilisearch identifies in filters.message. Terms after the tenth are
ignored. Each search page returns at most 999 rows. Follow the cursor until
it is empty.
Container cleanup RPCs
These are admin-authorized internal gRPC operations, not routes in the public
HTTP OpenAPI document. They use the messages in proto/jobs/jobs.proto.
Every request identifies job_id and intent_id as UUIDs, the immutable
container_id, and the original runtime_instance. Clients invoke named RPCs;
the uppercase operation constants are internal dispatch values, not request fields.
| RPC | Additional request / result contract |
|---|---|
GetContainerCleanupReceipt | Returns whether that exact identity has recorded completion proof |
RecordContainerCleanupReceipt | Records caller-verified original-instance removal/absence and releases only the corresponding hold |
BeginContainerCleanupAttempt | Requires a positive expected cleanup generation; PROCESSING with a token grants one attempt |
FailContainerCleanupAttempt | Requires the generation, Begin token and a nonempty, non-OK error_code of up to 32 bytes; interrupted reports caller cancellation |
RedriveContainerCleanup | Requires the generation and a nonblank reason of at most 2048 bytes; an accepted transition is audited with the validated JWT subject |
Cleanup generations are independent of workflow generations. Attempt responses
contain state, generation, attempts and token; audit identity/reason/time is
persisted separately, not added to public job responses. A stale redrive returns
STALE and a completed identity returns COMPLETED, without another requeue.
A live cleanup lease prevents redrive.
Receipt callers must confirm removal or absence on the verified original daemon before recording proof. Jobs-service validates stored materialization provenance and commits receipt/hold changes; it does not perform the Docker removal itself.
The service rejects redrive without an authenticated admin subject. An actor is never accepted from request fields or unvalidated metadata. Audit actor values are limited to 256 bytes. Shared service credentials cannot provide individual human attribution.
Jobs-service also owns creation-intent Ensure/observation/Create/Start reservation,
discovery claim/report and admin inspection/redrive RPCs. Single-use mutation grants
are not replayed. RedriveContainerIntent controls discovery inspection and has
separate generation/audit state from cleanup execution.
Recovery examples and audit inspection
Jobs protobuf messages and RPC definitionsproto/jobs/jobs.proto
Notifications service
Notification creation, listing, and marking records read.
Analytics service
User and workflow aggregate reads. Each RPC uses the analytics service's
GRPC_REQUEST_TIMEOUT, which defaults to 500 ms.
Transport security
Compose configures service certificates, client certificates, CA trust, and signed authorization metadata. Direct host exposure of development ports is for debugging, not a substitute for authenticated service calls.
In Kubernetes, these five services use headless Service discovery. DNS returns
ready Pod IPs to the gRPC clients, whose round_robin policy distributes calls
across the resolved replicas instead of multiplexing every call through one
ClusterIP connection.
