WeKnora deployment source with the reviewed wiki identity, summary and recovery fixes
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-weknora) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (latest, advisory) (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Build & Publish (dsh-weknora) / Publish to npm (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-weknora) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (latest, advisory) (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Build & Publish (dsh-weknora) / Publish to npm (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
// Package errors: parse stage error codes.
|
||||
//
|
||||
// These constants are the stable wire format the frontend uses to map a
|
||||
// failure to a localized "what to do about it" message. Adding a new code
|
||||
// is non-breaking; renaming an existing one requires a coordinated
|
||||
// frontend release because the i18n keys are looked up by code.
|
||||
//
|
||||
// Codes are SCREAMING_SNAKE so they survive JSON case transforms and look
|
||||
// distinct from Go identifiers in logs/dashboards.
|
||||
package errors
|
||||
|
||||
const (
|
||||
// ErrCodeDocReaderTimeout — DocReader RPC exceeded
|
||||
// WEKNORA_DOCREADER_CALL_TIMEOUT (default 30m). Suggest splitting
|
||||
// large files or checking docreader load.
|
||||
ErrCodeDocReaderTimeout = "DOCREADER_TIMEOUT"
|
||||
|
||||
// ErrCodeDocReaderUnavailable — no DocReader configured for the
|
||||
// requested file type / engine, or the service refused connection.
|
||||
ErrCodeDocReaderUnavailable = "DOCREADER_UNAVAILABLE"
|
||||
|
||||
// ErrCodeDocReaderParseFailed — DocReader returned an explicit parse
|
||||
// error (encoding, corrupted file, OCR engine crash, ...).
|
||||
ErrCodeDocReaderParseFailed = "DOCREADER_PARSE_FAILED"
|
||||
|
||||
// ErrCodeChunkingFailed — text chunking step itself failed (rare;
|
||||
// usually only on extreme-size inputs).
|
||||
ErrCodeChunkingFailed = "CHUNKING_FAILED"
|
||||
|
||||
// ErrCodeEmbeddingRateLimit — embedding provider returned 429 or
|
||||
// equivalent. Suggest retrying later or scaling out.
|
||||
ErrCodeEmbeddingRateLimit = "EMBEDDING_RATE_LIMIT"
|
||||
|
||||
// ErrCodeEmbeddingProviderFail — non-rate-limit embedding error
|
||||
// (auth, model not found, bad input). Usually permanent without
|
||||
// config changes.
|
||||
ErrCodeEmbeddingProviderFail = "EMBEDDING_PROVIDER_FAIL"
|
||||
|
||||
// ErrCodeVectorStoreWriteFailed — chunks embedded fine but the
|
||||
// vector DB write failed (quota, connectivity, schema mismatch).
|
||||
ErrCodeVectorStoreWriteFailed = "VECTORSTORE_WRITE_FAILED"
|
||||
|
||||
// ErrCodeMultimodalVLMFailed — a single image's OCR or caption call
|
||||
// failed. Note: per-image failures don't fail the whole parent;
|
||||
// see image_multimodal.go finalize-on-last-attempt.
|
||||
ErrCodeMultimodalVLMFailed = "MULTIMODAL_VLM_FAILED"
|
||||
|
||||
// ErrCodeMultimodalAllFailed — every image task hit dead-letter.
|
||||
// The parent still completes (caption / OCR is optional content),
|
||||
// but stage status is marked failed so the UI can warn.
|
||||
ErrCodeMultimodalAllFailed = "MULTIMODAL_ALL_FAILED"
|
||||
|
||||
// ErrCodeTaskTimeout — asynq retry budget exhausted. Used by the
|
||||
// dead-letter callback when promoting a task failure into a stage
|
||||
// failure. Distinct from DocReaderTimeout: this is the asynq-level
|
||||
// timeout (whole task), not the docreader-call-level timeout.
|
||||
ErrCodeTaskTimeout = "TASK_TIMEOUT"
|
||||
|
||||
// ErrCodeUnknown — fallback when a wrapped error doesn't classify.
|
||||
// The full message is still recorded in error_detail so operators
|
||||
// can debug; the UI shows a generic "see admin" hint.
|
||||
ErrCodeUnknown = "UNKNOWN"
|
||||
)
|
||||
Reference in New Issue
Block a user