koala73/worldmonitor · error · Error

[pushBatchAction] runId=${runId} has no segmentId

Error message

[pushBatchAction] runId=${runId} has no segmentId

What it means

State guard in pushBatchAction: the waveRuns row for runId exists and holds the lease, but has no segmentId recorded. Batch pushes target the Resend segment created during the pick phase, so a missing segmentId means the run never completed segment creation and there is nothing to push to.

Source

Thrown at convex/broadcast/waveRuns.ts:1159

      { runId },
    );
    if (!info) {
      console.warn(`[pushBatchAction] runId=${runId} not found; exiting`);
      return { ok: false, reason: "no-run" };
    }
    if (!info.configHoldsLease) {
      console.warn(`[pushBatchAction] runId=${runId} lost lease; exiting`);
      return { ok: false, reason: "lost-lease" };
    }
    const allowedStatuses: WaveRunStatus[] = ["segment-created", "pushing"];
    if (!allowedStatuses.includes(info.run.status)) {
      console.warn(
        `[pushBatchAction] runId=${runId} status=${info.run.status} not pushable; exiting`,
      );
      return { ok: false, reason: `wrong-status-${info.run.status}` };
    }
    if (!info.run.segmentId) {
      throw new Error(`[pushBatchAction] runId=${runId} has no segmentId`);
    }

    // First-batch transition picking → pushing (idempotent).
    if (info.run.status === "segment-created") {
      await ctx.runMutation(
        internal.broadcast.waveRuns._markPushingStarted,
        { runId },
      );
    }

    // Pull this batch's pending contacts.
    const batch = await ctx.runQuery(
      internal.broadcast.waveRuns._getPendingBatch,
      { runId, limit: info.run.batchSize },
    );
    if (batch.length === 0) {
      // Nothing pending — schedule finalize.
      await ctx.scheduler.runAfter(

View on GitHub (pinned to eeab0a219f)

Solutions

  1. Check the run's status — if picking never completed, re-run the pick phase to create and record the segment
  2. If the segmentId was lost, create the Resend segment manually and recover the run via the documented recovery flow before pushing
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at convex/broadcast/waveRuns.ts:1159 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of koala73/worldmonitor@eeab0a219f (2026-08-21). Data as JSON: /api/errors/506b56de958da729. Report an issue: GitHub.