Skip to content

fix(triggers/streams): job executions are never published to the durable job stream, so no execution trace can span producer → stream → consumer #1398

Description

@rickylabs

Summary

A triggered job execution completes successfully and emits a job.execute span, but no record for
that execution is ever published to the durable job stream
. The stream contains only the three
startup job-definition snapshots. Any check that expects an execution to appear on the stream — and
therefore any end-to-end trace spanning producer → durable stream → SSE consumer — cannot pass,
because there is nothing to consume.

Found by empirical audit during #1329's runtime gate work. This is a product gap, deliberately not
folded into that PR.

Evidence

Full audit: .llm/runs/release-0.0.5--orchestration/slices/w2-b-1329/join-audit.md, evidence commit
6c6e5980a.

A fresh execution was triggered against a real generated service:

  • event/correlation trg_evt_ea436f98-c6b3-4c14-8138-14610897da80
  • execution id f27ee619-5c8f-426c-ab34-e78b3da5c877
  • job flow-b-callback, completed in 43 ms
  • job.execute trace/span 02512162b8ecc8b0c75d4fc532656080 / 98f63759e649fccb

Stream state around it:

  • Before the trigger, the complete stream was exactly three startup job snapshots at committed
    offset 0000000000000000_0000000000000926: flow-b-callback, health-check,
    workers-plugin-health-check.
  • A live subscription was opened from that committed offset before the trigger and held for 25
    seconds. It emitted no data.
  • After the trigger, the complete snapshot still contained the same three records at the same
    committed offset. Only the control cursor advanced (28901282890130).

Join result — no stream record contains any of:

  • the execution id f27ee619-…
  • the correlation trg_evt_ea436f98-…
  • the producer trace id 02512162…

None of the three snapshots' traceparent trace ids equals the execution trace. The only shared
values are definition-level job id/name, which join job.execute to the job definition, not to
the execution.

This distinguishes "published but unmatchable" from "never published": the subscription was held
open across the trigger and received nothing.

Acceptance criteria

  • A completed job execution results in a record published to the durable job stream, or the
    design decision not to publish executions is documented and the surfaces that assume otherwise
    are corrected
  • If executions are published, the record carries an identifier that joins it to its job.execute
    span — execution id, correlation, or W3C trace context — so a consumer can correlate without
    guessing
  • A live subscription opened before a trigger observes the execution record within a bounded time
  • A test asserts the join, so a future change that stops publishing executions fails rather than
    silently emptying the stream

Impact

#1329 acceptance row 6 — "producer → durable stream → SSE consumer in one Aspire trace" — cannot be
proven while this holds. #1329's other seven rows are independently proven and its versioned SSE
envelope ships regardless; row 6 is tracked here.

Note the envelope work is not blocked by this and is not the cause: the consumer, offset commit,
reconnect, heartbeat, malformed-frame handling and the extracted-verbatim EventSource example all
work against real service traffic. There is simply no execution record on the wire to correlate.

Provenance

0.0.5 stable-cut orchestration, W2-B slice, 2026-08-09. Split from #1329 row 6.

Refs #1329.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions