{"record":{"id":"8b7534bcd312af29","repo":"koala73/worldmonitor","slug":"recordpendingexport-no-ramp-configured","errorCode":null,"errorMessage":"[_recordPendingExport] no ramp configured","messagePattern":"\\[_recordPendingExport\\] no ramp configured","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"convex/broadcast/rampRunner.ts","lineNumber":720,"sourceCode":" * `assignAndExportWave` returns successfully. Lets `recoverFromPartialFailure`\n * recover the (segmentId, assigned, waveLabel) without operator-supplied\n * metadata if the action dies between this point and a successful\n * `_recordWaveSent`.\n *\n * Lease-validating: throws if the lease has changed (operator\n * `forceReleaseLease` mid-flight, or a different run claimed). The throw\n * bubbles to Convex auto-Sentry; the runner stops without advancing.\n */\nexport const _recordPendingExport = internalMutation({\n  args: {\n    runId: v.string(),\n    waveLabel: v.string(),\n    segmentId: v.string(),\n    assigned: v.number(),\n  },\n  handler: async (ctx, args) => {\n    const row = await loadConfig(ctx);\n    if (!row) throw new Error(\"[_recordPendingExport] no ramp configured\");\n    if (row.pendingRunId !== args.runId) {\n      throw new Error(\n        `[_recordPendingExport] lease lost: expected runId=${args.runId}, found ${row.pendingRunId ?? \"<cleared>\"}. Refusing to persist export progress — operator/another run owns the state.`,\n      );\n    }\n    await ctx.db.patch(row._id, {\n      pendingWaveLabel: args.waveLabel,\n      pendingSegmentId: args.segmentId,\n      pendingAssigned: args.assigned,\n      pendingExportAt: Date.now(),\n    });\n    return { ok: true as const };\n  },\n});\n\n/**\n * Persist post-`createProLaunchBroadcast` progress. Called by the runner\n * AFTER `createProLaunchBroadcast` returns successfully. Lets","sourceCodeStart":702,"sourceCodeEnd":738,"githubUrl":"https://github.com/koala73/worldmonitor/blob/7d06c8633d256c18e38133030bc3613976a96ec9/convex/broadcast/rampRunner.ts#L702-L738","documentation":"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.","triggerScenarios":"Thrown at convex/broadcast/rampRunner.ts:718 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check whether the broadcastRampConfig row was deleted or reset while a wave run was in flight","Re-create the ramp configuration and re-run the wave from a clean state via the documented recovery flow"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d06c8633d256c18e38133030bc3613976a96ec9","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}