Repository navigation
feat: push line ingest and tail streaming jobs (#13) - #41
Conversation
POST /v1/ingestions/lines accepts NDJSON; tail mode plus pause/resume/stop are worker-managed. Queue-full requests return 429. Refs #13. Co-authored-by: Leonardo <leo-aa88@users.noreply.github.com>
Regenerate clients/openapi.json after adding /v1/ingestions/lines and tail lifecycle paths. Refs #13. Co-authored-by: Leonardo <leo-aa88@users.noreply.github.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Code review — PR #41 (issue #13)Reviewed must-fixNone should-fix
nice-to-have
Verdictmust-fix count: 0 |
Failed ticks stamp last_polled_at so jobs wait TAIL_POLL_INTERVAL. Open pagination cursors keep the original window until exhausted. Refs #13. Co-authored-by: Leonardo <leo-aa88@users.noreply.github.com>
Code review — PR #41 (issue #13), round 2Reviewed Previous should-fix status
must-fixNone should-fix
nice-to-haveNone new (round-1 nice-to-haves still apply; not re-raised). Verdictmust-fix count: 0 |
Store tail_window_start/end in metadata; last_polled_at is poll backoff only so a failed continuation tick cannot drop an open page. Refs #13. Co-authored-by: Leonardo <leo-aa88@users.noreply.github.com>
Code review — PR #41 (issue #13), round 3Reviewed Previous should-fix status
must-fixNone should-fixNone nice-to-haveNone (round-1 nice-to-haves still apply; not re-raised) Verdictmust-fix count: 0 |
Closes #13.
Adds direct line push and long-lived tail ingestion so callers do not have to re-upload batch files for every analysis.
Push
POST /v1/ingestions/lines(unversioned alias too) accepts NDJSON of raw lines or JSON objects (message/text/raw). Lines go through the existing parse → fingerprint → persist path. CreatesIngestionJob(mode=push). OverINGEST_PUSH_MAX_LINES(default 5000) → 400.Tail
POST /v1/ingestionswith"mode": "tail"(cloudwatch / datadog / loki). One long-lived job; the worker ticksSourceAdapter.readfrom the saved cursor so new lines stay on the sameingestion_job_id.Lifecycle:
POST /v1/ingestions/{id}:pausePOST /v1/ingestions/{id}:resumePOST /v1/ingestions/{id}:stop(terminal)N consecutive tail errors (
TAIL_ERROR_THRESHOLD, default 5) auto-pause./healthincludestail_jobs: {running, paused}.Backpressure
Pending worker queue at
INGEST_QUEUE_MAX(default 100) →429withRetry-Afterand{ "error_code": "INGEST_QUEUE_FULL" }. This is a stand-in for full G9.Schema
Alembic
0005_ingest_modes:mode,cursor,last_polled_at,consecutive_errorsoningestion_jobs. Existing rows backfillmode=batch.Out of scope
G6 content dedup / Idempotency-Key — overlapping tail windows can double-count until that lands. Full G9 API/LLM rate limits are not in this PR.