mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
emitIngestCompleted was called only in runKtxPublicIngest's plain/json loop, so the foreground 'ktx ingest' view and all of 'ktx setup' — which delegate to runContextBuild -> executePublicIngestTarget — never emitted the event. That left ingest_completed near-useless for measuring ingestion. Move the emit into executePublicIngestTarget, the single per-target chokepoint every entrypoint funnels through: a thin wrapper now captures timing, runs the existing steps (extracted to runIngestTargetSteps), and emits exactly once. The telemetry echo targets deps.runtimeIo (the real user stream) so a capture buffer used for step output doesn't swallow it. Thread project through the context-build call site. No schema/field changes, so Node<->Python telemetry parity is unaffected. Add tests: the shared chokepoint emits exactly one ingest_completed for any caller, and a multi-target run emits one per target with no double-emit. |
||
|---|---|---|
| .. | ||
| assets/demo/orbit | ||
| scripts | ||
| src | ||
| test | ||
| package.json | ||
| tsconfig.json | ||
| tsconfig.test.json | ||
| vitest.config.ts | ||