|
29 | 29 |
|
30 | 30 | This platform map shows the major control-plane, execution-plane, persistence, |
31 | 31 | and observability domains. The public demo path is intentionally narrower than |
32 | | -the full platform surface. |
| 32 | +the full platform surface, but the same boundaries carry through the production |
| 33 | +shape of the system. |
33 | 34 |
|
34 | 35 |  |
35 | 36 |
|
| 37 | +The diagram below connects those domains along the primary request, scheduling, |
| 38 | +execution, and persistence path. |
| 39 | + |
| 40 | + |
| 41 | + |
36 | 42 | `/internal/workers` and `/internal/assignments` are worker/data-plane protocol |
37 | 43 | routes, not public user APIs. Users submit and inspect work through `/v1/jobs`, |
38 | | -the CLI, or the console; worker containers use `/internal/*` to register |
39 | | -capacity, poll assignments, and report execution state. See the |
| 44 | +the CLI, or the console. Worker containers use `/internal/*` to register |
| 45 | +capacity, claim assignments, heartbeat lease ownership, and report execution |
| 46 | +state. See the |
40 | 47 | [worker protocol runbook](docs/runbooks/worker-protocol.md). |
41 | 48 |
|
42 | | -```mermaid |
43 | | -stateDiagram-v2 |
44 | | - [*] --> PENDING: admission accepted |
45 | | - PENDING --> RUNNING: assignment claimed |
46 | | - RUNNING --> SUCCEEDED: worker finish |
47 | | - RUNNING --> FAILED: worker/report failure |
48 | | - RUNNING --> PENDING: lease expired / reclaim |
49 | | - PENDING --> CANCELLED: user cancel |
50 | | - RUNNING --> CANCELLED: user cancel |
51 | | - SUCCEEDED --> [*] |
52 | | - FAILED --> [*] |
53 | | - CANCELLED --> [*] |
54 | | -``` |
55 | | - |
56 | | -This diagram shows the public `job` lifecycle. Execution attempts are modeled |
57 | | -separately as `job_assignments`, which is what makes lease expiry and reclaim |
58 | | -possible without collapsing user intent and worker execution into one state |
59 | | -machine. |
| 49 | +The public lifecycle is modeled at two levels: `job` captures durable user |
| 50 | +intent, while `job_assignment` captures individual execution attempts. That |
| 51 | +separation makes lease expiry, reclaim, and worker recovery possible without |
| 52 | +collapsing user intent and worker execution into one state machine. See |
| 53 | +[job lifecycle](docs/design/job-lifecycle.md) and |
| 54 | +[lease-based recovery](docs/design/lease-recovery.md) for the full state model. |
60 | 55 |
|
61 | | -Authentication and tenant binding happen in middleware before route handlers. Tenant context comes from the verified token; database queries are filtered by `tenant_id` from `request.state.identity`, not from request bodies. |
| 56 | +Authentication and tenant binding happen in middleware before route handlers. |
| 57 | +Tenant context comes from the verified token; database queries are filtered by |
| 58 | +`tenant_id` from `request.state.identity`, not from request bodies. |
62 | 59 |
|
63 | 60 | <!-- Screenshot slot: docs/images/console-overview.png --> |
64 | 61 | <!--  --> |
|
0 commit comments