Confluye
Operations

Research recovery

Symptom-to-verification for durable Research runs.

Use this when a run stays queued, finishes failed, or the Markdown result is missing. There is no Knowledge-Sync-style terminal retry on the same create key. Read Research and the API reference first.

Verify first

  1. Workspace API key only (401/403 otherwise). Foreign ids are 404.
  2. GET /api/v1/research/{id}: status, error, resultDocumentId, sources[].
  3. On create, read data.dispatch. mode: "direct" means the fetch ran in the HTTP request (REDIS_URL unset). mode: "bullmq" means a worker must process research-runs.
  4. Prisma vs in-memory: if the process is not using the Prisma research store, runs and documents do not survive restart and may be invisible to Documents.
  5. If create returned 202 with status: failed, the run is already persisted; GET it. Do not assume HTTP 202 means success.

Symptom table

SymptomVerifyRecover
401 / 403Bearer / key scopeWorkspace API key.
400 idempotency_key_invalidCreate/cancel without keySend a valid Idempotency-Key.
400 on liststatus not in the enum, limit not 1–100, bad cursorFix query. Default list limit is 25 when limit is omitted.
409 idempotency belongs to a different requestSame key, different query / sourceUrls / limitsNew key, or replay the original body.
Replay returns 200 deduplicated: true and still failedDedup does not re-enqueueGap: use a new idempotency key to create another run.
dispatch.mode: "bullmq" but run stays queuedWorker, REDIS_URL, queue research-runs, job id = run idProcess/retry the BullMQ job (up to 3 attempts, exponential backoff from 1s). Processor failures call store.fail.
Research dispatch failed before queue acceptance.queue.add threw; run already failedFix Redis; create with a new key.
failed with robots / HTTP / content-type / limit / SSRF messageEgress guardUse public https URLs allowed by FluxusResearchBot robots, HTML/XHTML/plain text, within limits. Loopback/private URLs fail.
canceled unexpectedlyCancel route or in-flight abortCreate a new run. Cancel of queued/running is terminal.
Cancel of failed still failedCancel only transitions queued/runningExpected. HTTP 200 with current status.
succeeded but no Docs UI documentIn-memory store, or Prisma document id research_document_{runId}Prisma: GET /api/v1/documents/{resultDocumentId}. Confirm indexingStatus may be pending.
Result missing untrusted cautionDocument should start with the caution markerIf missing, treat as incomplete persist; re-run with a new key.
snapshotFileId always nullExecutor does not write Workspace FilesExpected. Snapshots live in snapshotText on the run.
Agent research.run vs HTTPSame store/dispatcherHTTP also wraps withApiIdempotency; agent tool requires idempotencyKey in tool input.
Expected crawl from sourceUrlsExecutor depth is always 0Use capability web.crawl, or pass every URL in sourceUrls (max 20).

After a failed run

  1. Read run.error.
  2. Fix URL allowlisting, robots, content type, or limits (within schema maxima).
  3. POST /api/v1/research with a new Idempotency-Key and the corrected body.
  4. Confirm status: succeeded, resultDocumentId set, sources canonical URLs, and (Prisma) document tags include research.
  5. If using BullMQ, confirm the worker is running before expecting queuedrunning.

What not to do

  • Do not replay the original create key expecting a new fetch after failed/canceled.
  • Do not POST caller HTML or a document body; the service only fetches sourceUrls.
  • Do not treat web.* capabilities as substitutes for the durable run’s result document.
  • Do not assume maxDepth causes the durable run to spider; it does not.