Skip to content

Commit f35d46c

Browse files
authored
Merge pull request #3 from chendbox/codex-final-acceptance
refine README overview
2 parents 76ec6c0 + 71ca229 commit f35d46c

2 files changed

Lines changed: 153 additions & 22 deletions

File tree

README.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,33 @@
2929

3030
This platform map shows the major control-plane, execution-plane, persistence,
3131
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.
3334

3435
![MLIS platform map](docs/images/platform-map.svg)
3536

37+
The diagram below connects those domains along the primary request, scheduling,
38+
execution, and persistence path.
39+
40+
![Primary control and execution flow](docs/images/primary-control-execution-flow.svg)
41+
3642
`/internal/workers` and `/internal/assignments` are worker/data-plane protocol
3743
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
4047
[worker protocol runbook](docs/runbooks/worker-protocol.md).
4148

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.
6055

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.
6259

6360
<!-- Screenshot slot: docs/images/console-overview.png -->
6461
<!-- ![Console overview](docs/images/console-overview.png) -->
Lines changed: 134 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)