koala73/worldmonitor · error · Error

[_recordPendingExport] no ramp configured

Error message

[_recordPendingExport] no ramp configured

What it means

Internal guard in the _recordPendingExport mutation: loadConfig returned no broadcastRampConfig row, so export progress cannot be persisted. This is a runner-internal invariant failure — the action only runs after configuration exists, so a missing row means the config was deleted mid-flight or the environment is wrong.

Solutions

  1. Check whether the broadcastRampConfig row was deleted or reset while a wave run was in flight
  2. Re-create the ramp configuration and re-run the wave from a clean state via the documented recovery flow
Defensive patterns

Strategy: validation

When it happens

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

Common situations: See trigger scenarios.


AI-assisted analysis of koala73/worldmonitor@7d06c8633d (2026-08-21). Data as JSON: /api/errors/8b7534bcd312af29. Report an issue: GitHub.

Appendix: source

Thrown at convex/broadcast/rampRunner.ts:720

 * `assignAndExportWave` returns successfully. Lets `recoverFromPartialFailure`
 * recover the (segmentId, assigned, waveLabel) without operator-supplied
 * metadata if the action dies between this point and a successful
 * `_recordWaveSent`.
 *
 * Lease-validating: throws if the lease has changed (operator
 * `forceReleaseLease` mid-flight, or a different run claimed). The throw
 * bubbles to Convex auto-Sentry; the runner stops without advancing.
 */
export const _recordPendingExport = internalMutation({
  args: {
    runId: v.string(),
    waveLabel: v.string(),
    segmentId: v.string(),
    assigned: v.number(),
  },
  handler: async (ctx, args) => {
    const row = await loadConfig(ctx);
    if (!row) throw new Error("[_recordPendingExport] no ramp configured");
    if (row.pendingRunId !== args.runId) {
      throw new Error(
        `[_recordPendingExport] lease lost: expected runId=${args.runId}, found ${row.pendingRunId ?? "<cleared>"}. Refusing to persist export progress — operator/another run owns the state.`,
      );
    }
    await ctx.db.patch(row._id, {
      pendingWaveLabel: args.waveLabel,
      pendingSegmentId: args.segmentId,
      pendingAssigned: args.assigned,
      pendingExportAt: Date.now(),
    });
    return { ok: true as const };
  },
});

/**
 * Persist post-`createProLaunchBroadcast` progress. Called by the runner
 * AFTER `createProLaunchBroadcast` returns successfully. Lets

View on GitHub (pinned to 7d06c8633d)