koala73/worldmonitor · error · Error

[clearKillGate] no ramp configured

Error message

[clearKillGate] no ramp configured

What it means

An internal error thrown by the clearKillGate internalMutation when loadConfig returns no ramp configuration row. It fires when an operator or automated flow calls clearKillGate before any ramp config document has ever been created, so there is no kill gate to clear. It is a sentinel guard on missing state; the input at fault is the absence of the singleton ramp config record. Callers must create/configure a ramp first; clearing the gate is meaningless without one.

Solutions

  1. Run configureRamp to create the ramp configuration before using kill-gate controls
  2. Confirm the target Convex deployment actually has a ramp set up
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at convex/broadcast/rampRunner.ts:248 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/d8dde0a51f7f9f66. Report an issue: GitHub.

Appendix: source

Thrown at convex/broadcast/rampRunner.ts:248

  args: {},
  handler: async (ctx) => {
    const row = await loadConfig(ctx);
    if (!row) throw new Error("[resumeRamp] no ramp configured");
    if (row.killGateTripped) {
      throw new Error(
        "[resumeRamp] kill-gate is tripped; clearKillGate first after investigating.",
      );
    }
    await ctx.db.patch(row._id, { active: true });
    return { ok: true };
  },
});

export const clearKillGate = internalMutation({
  args: { reason: v.string() },
  handler: async (ctx, { reason }) => {
    const row = await loadConfig(ctx);
    if (!row) throw new Error("[clearKillGate] no ramp configured");
    if (!row.killGateTripped) {
      return { ok: true, noop: true };
    }
    await ctx.db.patch(row._id, {
      killGateTripped: false,
      killGateReason: undefined,
      lastRunStatus: `kill-gate-cleared: ${reason.slice(0, 200)}`,
    });
    return { ok: true };
  },
});

/**
 * Last-resort soft-clear of a `partial-failure` status. STRONGLY DISPREFERRED;
 * use `recoverFromPartialFailure` instead in nearly every case.
 *
 * Naive clear is RISKY when the export already succeeded. Concrete failure
 * shape: `assignAndExportWave` stamped contacts with `waveLabel` AND created

View on GitHub (pinned to 7d06c8633d)