v0.4.1
Patch Changes
-
4d3efd3: Fix silent terminal-state loss on the observability final flush — a
job_executions
row could stayrunningwithduration_ms: nullafter its invocation already read
completed. The final flush deleted the per-invocation buffer BEFORE awaiting the sink and
swallowed any error, so a partial batch (the invocations mutation lands, then the
events/jobs mutation throws a deterministic GraphQL-level error, which is never retried)
permanently and silently lost the job's terminal state.Three defenses:
flush()no longer discards state before it's durable — the buffer is deleted only
AFTER the sink resolves. A failed final flush now RETAINS the buffer, soonFlush(which
runs in the samehandle()finally, right afteronInvocationEnd) retries the terminal
write instead of dropping it.- Sink failures are surfaced, not swallowed — new
onSinkError?(err, { invocationId, final })option onobservability(...), defaulting to a[eventkit]console.warn.
Ignored understrict(the error is rethrown as before). Silent telemetry loss was the
worst failure mode for a telemetry system. graphqlSinkgraceful-degrades an events/jobs GraphQL error — a deterministic
GraphqlResponseErroron thejob_executions/event_executionsmutation retries ONCE
with the droppable payload columns shed (result,job_options, error stacks), mirroring
the existingsource_job_iddegrade, so the row lands lossy-but-terminal (status
preserved) rather than being lost entirely.
Additive and backward-compatible:
onSinkErrordefaults to the console warning, and the
sink degrade only triggers on a mutation that would otherwise have thrown.