All runbooks
runbookuapiredacted view

UAPI GLM 5.2 Event Threading and Result Lineage 2026-06-22

GLM 5.2 EventEnvelope correlation, GateRecord evidence refs, ResultPacket lineage, and mock adapter validation plan.

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

UAPI GLM 5.2 Event Threading and Result Lineage 2026-06-22

GLM 5.2 EventEnvelope correlation, GateRecord evidence refs, ResultPacket lineage, and mock adapter validation plan.

Promotion Metadata

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

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

GLM 5.2 — Event Threading and Result Lineage

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 confirms EventEnvelope and ResultPacket field shapes. Mock adapter is sole result producer.

EventEnvelope Correlation

One correlation_id is minted at LoginSession creation (Interpreter). It propagates through every EventEnvelope and the ResultPacket unchanged:

LoginSession → received event → identity_gated event → placement_gated event → dispatched event → ResultPacket → result_received event → accepted/denied event

Required Fields

Field Source Notes
correlation_id LoginSession Constant through entire flow.
job_id Interpreter Unique per job.
session_ref LoginSession Back-ref to identity context.
event_type Gate/state gate_passed, gate_denied, state_transition, result_accepted.
gate_name Gate logic identity/placement/acceptance. Empty for non-gate events.
gate_record_ref GateRecord Pointer to evidence written by gate.
timestamp System ISO 8601.

No orphan events: Every EventEnvelope must carry a correlation_id resolving to an active LoginSession. Unresolvable events are dropped and logged. This is the first Acceptance Gate validation rule.

GateRecord Evidence Refs

Each gate writes one GateRecord per decision. Fields: gate_name, decision (pass/deny), reason, evidence_ref (optional), correlation_id, timestamp.

Evidence Sources per Gate

  • Identity Gate: role assertion blob (mock JSON in first wedge).
  • Placement Gate: adapter capability list + health probe result. Null when healthy; failure detail when unhealthy.
  • Acceptance Gate: ResultPacket lineage hash on pass; missing-field pointer on deny.

ResultPacket Lineage

Required Lineage Fields

Field Filled By Validation
adapter_id ProviderAdapter Must match Placement-selected adapter.
route_candidate_id ProviderAdapter Non-empty. Mock: "mock-route-001".
gate_decision_id Conductor Resolves to Placement GateRecord with decision=pass.
correlation_id Session Must match originating session.
submit_timestamp Adapter ISO 8601. After placement, before acceptance.

Acceptance Gate Checks

  1. correlation_id resolves to active session.
  2. adapter_id matches Placement-selected adapter.
  3. gate_decision_id resolves to Placement pass record.
  4. submit_timestamp chronologically valid.
  5. All five lineage fields non-empty.

Any failure → deny, GateRecord with failed check name as reason.

Mock Adapter Validation

Mock produces: adapter_id="mock-adapter-001", route_candidate_id="mock-route-001", gate_decision_id=<placement ref>, synthetic embedding payload. No network calls.

Test Cases

Case Expected Fails Check
All fields valid accepted
Missing adapter_id denied #2
correlation_id mismatch denied #1
gate_decision_id → deny record denied #3
submit_timestamp before placement denied #4
Empty route_candidate_id denied #5

Blockers

  • Codex must confirm EventEnvelope and ResultPacket field names.
  • gate_decision_id format (UUID vs sequential) undecided.
  • EventEnvelope delivery (in-memory vs file log) is Codex-owned; GLM assumes append-only sink.

Next Handoff

→ Codex: confirm field names. On approval, GLM implements correlation threading + acceptance gate checks per Task 3.