All runbooks
runbookuapiredacted view

UAPI Codex Contract Decisions v0.2 2026-06-22

Codex provisional first-wedge schema and integration decisions for roles, sessions, state machine, adapter interface, events, gates, and result lineage.

Updated 2026-06-22·Freshness: Reference·Sensitive tokens or credentials were hidden before display.

UAPI Codex Contract Decisions v0.2 2026-06-22

Codex provisional first-wedge schema and integration decisions for roles, sessions, state machine, adapter interface, events, gates, and result lineage.

Promotion Metadata

  • Source feedback id: 127
  • Source feedback ids: 127
  • Promotion request id: 58
  • Feedback category: beneficial
  • Feedback source: [REDACTED:high-entropy]
  • Feedback created at: 2026-06-22T18:28:26.096347+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 127

  • Product: uapi
  • Category: beneficial
  • Related slug: [REDACTED:high-entropy]
  • Source: [REDACTED:high-entropy]
  • Created at: 2026-06-22T18:28:26.096347+00:00

UAPI Codex Contract Decisions v0.2 (2026-06-22)

Authority: Codex provisional schema/integration decision packet for the UAPI first wedge. This unblocks GLM artifact/scaffolding work only. Real infrastructure activation remains gated.

Decisions

Identity and Session

  • UnifiedIdentityPrincipal.role_assertions is approved as an array of role strings.
  • LoginSession must include session_id, principal_ref, lane, issued_at, expires_at, and correlation_id.
  • correlation_id is minted once at session creation and copied unchanged through all EventEnvelope and ResultPacket records.
  • First-wedge session expiry is 15 minutes.

Roles

Approved first-wedge role strings:

  • operator
  • viewer
  • service-provider
  • agent-dispatcher
  • device-endpoint
  • hardware-researcher

Lane mapping:

  • operator: embedding, light-inference, foundry-demo
  • viewer: read-only only; no dispatch lanes
  • service-provider: embedding
  • agent-dispatcher: embedding, light-inference
  • device-endpoint: device-local
  • hardware-researcher: hardware diary/research only; no Conductor dispatch

Job State Machine

Approved first-wedge states:

  • received
  • identity_gated
  • placement_gated
  • dispatched
  • result_received
  • accepted
  • denied
  • failed
  • canceled

Terminal states: accepted, denied, failed, canceled.

Boundary decision: denied means a gate rejected the request or result by policy/shape; failed means adapter runtime error, timeout, provider error, or infrastructure failure. Malformed ResultPacket at Acceptance Gate is denied, not failed, because the gate is functioning and rejecting invalid output.

ProviderAdapter

First-wedge interface requires:

  • capabilities()
  • health_probe()
  • submit(job) -> ResultPacket

Real adapters remain blocked until benchmark/evidence gates. GLM may build mock adapter scaffolding only.

GateRecord

Required fields:

  • gate_record_id
  • correlation_id
  • job_id
  • gate_name
  • decision
  • reason
  • evidence_ref
  • timestamp

gate_record_id format: UUID string.

EventEnvelope

Required fields:

  • event_id
  • correlation_id
  • job_id
  • session_ref
  • event_type
  • from_state
  • to_state
  • gate_name
  • gate_record_ref
  • timestamp

Delivery mechanism for first wedge: append-only local event sink abstraction. Actual transport/event bus remains Codex-owned post-wedge.

ResultPacket Lineage

Required lineage fields:

  • adapter_id
  • route_candidate_id
  • gate_decision_id
  • correlation_id
  • submit_timestamp

Acceptance Gate must reject missing or mismatched lineage.

Timeouts

First-wedge mock adapter timeout: 30 seconds. Real adapter timeouts are route/provider-specific and remain blocked.

Unblocks

GLM may proceed with local artifact/scaffolding plans for:

  1. LoginSession + Identity Gate scaffolding
  2. Mock ProviderAdapter + Placement Gate
  3. Event threading + Acceptance Gate wiring

No real auth, packages, model calls, route changes, or infrastructure mutations are approved by this packet.