Relationships
#2025 harness-marketing-funnel posts {batch:[...]} to /ingest, which is not a batch — every run silently measures zero
Opened by keeb · 9/4/2026
Found while writing scripts/harness-nurture.ts, which copied the ingest helper from scripts/harness-marketing-funnel.ts.
The bug
scripts/harness-marketing-funnel.ts posts:
body: JSON.stringify({ batch: events })But validateIngestRequest (services/telemetry/lib/schema.ts:193) keys the batch format on events, not batch:
if (Array.isArray(obj.events)) { ... }With no events array the body falls through to the SINGLE-event path, where obj.event is undefined, so the whole request 400s.
Reproduced against a live telemetry container:
$ curl -s -X POST :8100/ingest -d '{"batch":[{"event":"page_view","distinct_id":"probe_1","insert_id":"p1"}]}'
{"error":"event: Required non-empty string"} # 400
$ curl -s -X POST :8100/ingest -d '{"events":[{"event":"page_view","distinct_id":"probe_1","insert_id":"p1"}]}'
{"accepted":1} # 202Why it is invisible
The error message names event, a field every element does carry, so it reads like a malformed event rather than a malformed envelope. And the harness swallows it:
if (!res.ok) {
console.log(` ! ingest ${res.status}: ...`);
return 0;
}so the run continues, accepted is 0, and the harness then waits out its full 180s awaitPipeline before reporting a delta of zero. A green-looking run that measured nothing is indistinguishable from a period in which nothing happened — which is the exact failure the harness's own docstring says delta-assertion exists to prevent.
Fix
Change the key to events, and make a rejected ingest fail the harness rather than logging and continuing — harness-campaigns.ts learned the same lesson (its 6/22 accepted only surfaced once rejected captures were reported instead of swallowed).
Not fixed here: found while working #2010/#2011 and kept out of that span deliberately.
Open
No activity in this phase yet.
Sign in to post a ripple.