koala73/worldmonitor · error · Error
[pickWaveAction] waveLabel must be 1-64 chars
Error message
[pickWaveAction] waveLabel must be 1-64 chars
What it means
Argument validation in pickWaveAction: waveLabel is empty or longer than 64 characters. The label becomes the waveRuns identifier and a Resend segment-name component, so it must be a non-empty bounded string.
Source
Thrown at convex/broadcast/waveRuns.ts:706
// Filter contacts whose locale (from `users.localePrimary` or email-TLD
// heuristic fallback) is non-English. Filter runs INSIDE the registration
// pagination loop, BEFORE reservoir sampling — sampling-then-filtering
// would silently underfill (sample 1000, exclude 200, send 800 even
// though thousands of eligible English contacts existed elsewhere).
excludeNonEnglish: v.optional(v.boolean()),
},
handler: async (ctx, args): Promise<{ ok: boolean; reason?: string }> => {
const apiKey = process.env.RESEND_API_KEY;
if (!apiKey) {
throw new Error("[pickWaveAction] RESEND_API_KEY not set");
}
if (!Number.isFinite(args.requestedCount) || args.requestedCount <= 0) {
throw new Error(
`[pickWaveAction] requestedCount must be a positive integer; got ${args.requestedCount}`,
);
}
if (args.waveLabel.length === 0 || args.waveLabel.length > 64) {
throw new Error("[pickWaveAction] waveLabel must be 1-64 chars");
}
const batchSize = args.batchSize ?? DEFAULT_BATCH_SIZE;
const excludeNonEnglish = args.excludeNonEnglish === true;
// Step 1: claim lease + insert waveRuns row.
const claim: ClaimLeaseResult = await ctx.runMutation(
internal.broadcast.waveRuns._claimWaveRunLease,
{
waveLabel: args.waveLabel,
runId: args.runId,
requestedCount: args.requestedCount,
batchSize,
},
);
if (!claim.ok) {
throw new Error(
`[pickWaveAction] could not claim lease: ${claim.reason}` +
(claim.current ? ` (current: ${claim.current})` : ""),View on GitHub (pinned to eeab0a219f)
Solutions
- Use the configured waveLabelPrefix plus tier label (e.g. 'pro-8'), which is well under 64 chars
- Validate label length in the ramp runner before dispatching the pick action
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at convex/broadcast/waveRuns.ts:706 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/7cd396a282baa137.
Report an issue: GitHub.