Skip to content
Source
Sign inSign up
TanStack/schemas

docs-failing row never clears when an adapter stops loading docs (opencode-go stuck after #676) #677

Send to my agent
Closedtombeckenham opened this issue 0 comments
tombeckenhamcommented

What fails

GET /v1/status still reports opencode-go as docsFailing after the fix (#676, deployed 2026-11-17 04:03 UTC) stopped the failure:

{"lastPolledAt":1794889129,"docsFailing":{"since":1794884821,"polls":5,"lastAt":1794888237, ... "error":"opencode-go: privacy training cell \"30 days\" for Grok 4.7"}}

The 04:18 poll (lastPolledAt 1794889129) emitted no ingest_failed in PostHog, but lastAt is stuck at the 04:03 poll. The home page keeps marking the row too. It will stay that way forever.

Cause

src/server/ingest/poll-models.ts:698-715 only calls recordDocsFailing when the adapter returns docsFailures:

const docs = listed.docsFailures
if (docs) {
  const failing = await recordDocsFailing(db, provider.id, docs, now)

recordDocsFailing deletes the docs-failing:<providerId> row when nothing failed, but an adapter that no longer loads any docs (opencode-go after #676 returns { models } with no docsFailures) never reaches it, so the old row is never deleted.

Fix

When listed.docsFailures is absent, treat it as a healthy docs run and delete the provider's docs-failing: row (e.g. call recordDocsFailing with { failed: 0, skipped: 0, ... }, or delete directly). Keep the existing behaviour for adapters that do report. Add a worker test like nvidia-docs-recovery.worker.test.ts: record a docs outage, poll an adapter whose listModels returns no docsFailures, expect readDocsFailing to be null.

  1. tanstack-source added labelsbug

  2. tombeckenham linked this to #678

  3. tombeckenham closed this

Sign in to join this conversation.