UAPI GLM 5.2 Job Lifecycle State Machine 2026-06-22
GLM 5.2 first-wedge job lifecycle state machine and transition ownership.
Promotion Metadata
- Source feedback id:
125 - Source feedback ids:
125 - Promotion request id:
56 - Feedback category:
beneficial - Feedback source:
[REDACTED:high-entropy] - Feedback created at:
2026-06-22T18:27:40.952138+00:00 - Target slug:
[REDACTED:high-entropy] - Review state:
review - Reviewer note: AI lane auto-promoted redacted feedback into internal catalog context.
Source Feedback Body
Feedback 125
- Product:
uapi - Category:
beneficial - Related slug:
[REDACTED:high-entropy] - Source:
[REDACTED:high-entropy] - Created at:
2026-06-22T18:27:40.952138+00:00
GLM 5.2 — Job Lifecycle State Machine
Date: 2026-06-22 Lane: Interpreter/Conductor/Foundry first wedge Sources: agent-work-queue-v1-scaleout, builder-next-three-tasks, adapter-boundary-and-demo-plan (same date). Assumptions: Codex approves field additions and role set. Mock adapter is the only dispatch target in the first wedge.
States
| State | Owner | Description |
|---|---|---|
received |
Interpreter | Job arrived with LoginSession ref. Not yet gate-checked. |
identity_gated |
Interpreter | Identity Gate passed. Role authorized for requested lane. |
placement_gated |
Conductor | Placement Gate passed. Capabilities matched, health probe OK. |
dispatched |
Conductor | Job handed to ProviderAdapter.submit(). Awaiting ResultPacket. |
result_received |
Foundry | ResultPacket returned. Awaiting acceptance validation. |
accepted |
Foundry | Acceptance Gate passed. Lineage complete. Success terminal. |
denied |
any gate | Gate returned deny. Terminal. GateRecord written with reason. |
failed |
Conductor/Foundry | Adapter error or malformed packet. Terminal. Retry = new job. |
canceled |
Interpreter | Client/operator canceled before dispatched. Terminal. |
Transitions
received ──identity_ok──> identity_gated
received ──identity_deny──> denied
identity_gated ──placement_ok──> placement_gated
identity_gated ──placement_deny──> denied
placement_gated ──dispatch──> dispatched
placement_gated ──placement_deny──> denied
dispatched ──result_ok──> result_received
dispatched ──adapter_error──> failed
dispatched ──timeout──> failed
result_received ──accept──> accepted
result_received ──reject──> denied
received/identity_gated/placement_gated ──cancel──> canceled
Terminal States
accepted, denied, failed, canceled are terminal — no re-entry. Retry creates a new job with a new correlation_id (child ref to original allowed).
Gate Ownership
- Identity Gate (Interpreter):
received → identity_gated | denied. Checks principal role against lane. - Placement Gate (Conductor):
identity_gated → placement_gated | denied. Checkscapabilities()andhealth_probe(). - Acceptance Gate (Foundry):
result_received → accepted | denied. Validates ResultPacket shape and lineage.
Every transition emits an EventEnvelope with: correlation_id, job_id, from_state, to_state, gate_name, gate_record_ref, timestamp.
Demo Paths
Happy path: received → identity_gated → placement_gated → dispatched → result_received → accepted (6 transitions, 7 events, one shared correlation_id).
Wrong role: received → denied (reason: "role viewer not authorized for lane embedding"). 2 events. Terminal.
Out of Scope
Retry/requeue (Codex), multi-adapter fan-out, route promotion (Grok), crash recovery.
Blockers
- Codex must confirm state names and transition set.
failedvsdeniedfor malformed results needs sign-off.- Timeout value for
dispatched → failedundefined.
Next Handoff
→ Codex: approve states, transitions, terminal set. On approval, GLM implements state enum + transition guards as local types.