Skip to content

RunResult

The outcome of runSource: the validated, deduped documents, the resolved cursor, and the captured log lines. Mirrors enough of what the cloud ingest reports for trove source test to print a useful summary.

PropertyTypeDescription
cursorCursorThe cursor sync returned, or { type: 'none' } if it returned none. {type:'none'} here is not a position, and must never be written to a feed’s cursor as if it were. It is the normalized form of “the source gave no new position”, which is why an omitted cursor and an explicit {type:'none'} arrive here identically — the distinction between them is deliberately erased, because they mean the same thing to an author. That erasure is safe only as long as every consumer treats the value as advisory rather than as a cursor to store. A host that stringifies this straight into a feed’s cursor replaces a real position with a blank one, and no cursor strategy re-offers what is behind it — so the feed does not restart, it skips forward permanently, quietly, on a run that looks clean. Trove’s platform makes that decision in one predicate (isAdvancingCursor); a host embedding this runtime needs its own.
documentsDocument[]The validated, deduped documents sync returned.
duplicatesSkippednumberCount of documents dropped as duplicates of an earlier id.
feedName?stringWhat the feed calls itself, when the source reported one.
feedUrl?stringWhere the feed permanently moved, when the source reported it.
logsunknown[][]Captured ctx.log(...) lines (when no custom logSink was supplied).
stats?{ fetched?: number; remaining?: number; }What the run did and what is left, when the source reported it.
stats.fetched?number-
stats.remaining?number-