Skip to content

Hotfix remove reconcile endpoint auth#73

Merged
suguanYang merged 6 commits into
mainfrom
staging
May 13, 2026
Merged

Hotfix remove reconcile endpoint auth#73
suguanYang merged 6 commits into
mainfrom
staging

Conversation

@suguanYang
Copy link
Copy Markdown
Contributor

No description provided.

Sources were getting stuck in "parsing" state in production with no
visibility into why. Added structured logs at every critical transition:

- reconcile.ts: log parsing sources found, job status on each poll,
  and any errors (previously silently swallowed)
- lifecycle.ts: log every transition — job done→ready, done+noDoc→failed,
  failed, or job still in progress
- source-row-repository.ts: log when the atomic status guard blocks a
  transition (race between concurrent workflows)
- background-reconcile.ts: log when triggering Upstash workflows
- route-listing.ts: log when re-triggering reconciliation for sources
  found stuck in parsing during page load
…logging

Add diagnostic logging for source lifecycle transitions
The /api/sources/reconcile endpoint was being blocked by the auth
middleware and redirected to /login because it was not listed in
PUBLIC_PATHS. Upstash workflow requests (no session cookie) could never
reach the reconcile handler, leaving sources stuck in "parsing" state
indefinitely.

The endpoint already validates its own payload (API key, workspace ID)
so making it accessible through the proxy is safe.
Fix reconcile endpoint blocked by auth proxy
- Check QSTASH_TOKEN before calling Upstash — log a clear warning and
  skip instead of crashing with an opaque UnknownException
- Log the reconcile URL for easier debugging
- Use catchAllCause for richer error detail when the trigger fails
Guard missing QSTASH_TOKEN in reconcile workflow trigger
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
knowhere-notebook-staging Ready Ready Preview, Comment May 13, 2026 3:00pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
knowhere-notebook Ignored Ignored May 13, 2026 3:00pm

Request Review

@suguanYang suguanYang merged commit f8259b3 into main May 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant