dify/api/services/knowledge_fs
Jyong c8aa2d4f59 feat(knowledge-fs): report specific, actionable background task failures
Every document-processing failure surfaced as "the document could not be
processed", and every data-source failure as "the source could not be read",
because the root cause was erased at three points: the compilation classifier
collapsed any coded-but-non-retryable error into DOCUMENT_COMPILATION_FAILED,
datasource runtime errors were reduced to per-operation constants, and the
console mapped dozens of codes onto a handful of generic sentences without the
stage or a support reference.

- knowledge-fs: keep the specific public code for any coded error in the
  compilation classifier (retry follows the error or the catalog policy), tag
  previously uncoded failures (semantic chunking output, embedding dimension,
  PDF rendering, lease loss, generation model, unsupported file type) with
  public codes, give embedding provider errors their own codes instead of the
  parser's, alias datasource runtime codes, and register 17 catalog entries
  (model response invalid, parser unsupported type, PDF render, crawl page
  not found, provider timeout/unavailable/rejected, content too large, ...).
- api: extend the public error-code enum (including the missing
  DOCUMENT_PARSER_TIMEOUT) and regenerate the contracts.
- web: per-code copy that says what happened and what to do, in all 24
  locales, plus a "failed while <stage> · reference <id>" line under each
  failed task in the background-task drawer and the document task list.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-03 03:09:29 -04:00
..
__init__.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
app_admission_service.py fix(workflow): stabilize KnowledgeFS retrieval access 2026-08-11 11:51:17 -04:00
app_binding_management.py Fix workflow binding sync session handling 2026-08-09 22:50:44 -04:00
app_execution_capability.py feat(knowledge-fs): add automatic metadata filtering to retrieval node 2026-09-02 02:55:12 -04:00
batch_capability.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
buffered_upload_admission.py perf(knowledge-fs): harden cross-format document ingestion 2026-08-31 07:48:35 -04:00
capability_broker.py refactor(knowledge_fs): replace credential service with dataset API key authorization. Remove the API token feature at the space level for knowledgeFs. 2026-08-26 15:40:18 +08:00
cleanup.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
control_plane_service.py fix(knowledge-fs): persist icon style selection (WTA-2068) 2026-08-17 17:31:25 +08:00
control_space_commands.py default KnowledgeFS external access on creation 2026-08-19 00:33:43 -04:00
control_space_lifecycle.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
control_space_management.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
cutover_runtime_gate.py feat(knowledge-fs): automate greenfield workspace cutover 2026-07-28 09:12:50 -04:00
cutover.py feat(knowledge-fs): automate greenfield workspace cutover 2026-07-28 09:12:50 -04:00
data_facade.py feat(knowledge-fs): keep query images with retrieval test history 2026-09-02 09:17:36 -04:00
download_service.py fix(knowledge-fs): align document download contracts 2026-08-12 11:43:32 +08:00
greenfield_initializer.py feat(knowledge-fs): automate greenfield workspace cutover 2026-07-28 09:12:50 -04:00
initial_source_preview_job.py feat(knowledge-fs): support datasource-driven source previews 2026-08-12 08:33:52 +08:00
initial_source_preview.py fix(knowledge-fs): disambiguate preview page types 2026-08-12 09:59:43 +08:00
lifecycle_port.py feat(dataset): support deferred New RAG model setup 2026-07-28 23:19:25 +08:00
lifecycle_readiness.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
lifecycle_remote_http.py feat(dataset): support deferred New RAG model setup 2026-07-28 23:19:25 +08:00
lifecycle_saga.py feat(dataset): support deferred New RAG model setup 2026-07-28 23:19:25 +08:00
membership_changes.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
object_storage.py feat(knowledge): stage document uploads before admission 2026-08-10 10:58:17 -04:00
observability.py Refactor frontend architecture and simplify implementation 2026-07-29 02:30:27 -04:00
orphan_reconciler.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
product_application_service.py fix(knowledge-fs): persist icon style selection (WTA-2068) 2026-08-17 17:31:25 +08:00
product_authorization.py feat(dataset): add New Knowledge space actions 2026-07-29 12:15:33 +08:00
product_dto.py feat(knowledge-fs): report specific, actionable background task failures 2026-09-03 03:09:29 -04:00
product_operations.py perf(knowledge-fs): harden cross-format document ingestion 2026-08-31 07:48:35 -04:00
product_remote_http.py feat(knowledge-fs): add profile-driven multimodal retrieval 2026-09-02 01:01:57 -04:00
product_remote.py feat(knowledge-fs): add profile-driven multimodal retrieval 2026-09-02 01:01:57 -04:00
product_service.py fix(knowledge-fs): persist icon style selection (WTA-2068) 2026-08-17 17:31:25 +08:00
query_images.py feat(knowledge-fs): keep query images with retrieval test history 2026-09-02 09:17:36 -04:00
remote_images.py fix(knowledge-fs): persist document images across formats 2026-08-26 03:58:04 -04:00
remote_registry.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
revocation_commands.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
revocation_reconciler.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
runtime.py fix(knowledge-fs): align retrieval test timeout 2026-09-01 13:51:15 -04:00
service_api_authorization.py refactor(knowledge_fs): replace credential service with dataset API key authorization. Remove the API token feature at the space level for knowledgeFs. 2026-08-26 15:40:18 +08:00
source_import_commit_service.py fix(knowledge-fs): enhance source import handling and error recovery for remote updates 2026-09-02 18:38:38 +08:00
space_tag_service.py feat(knowledge-fs): update space tag management and improve type annotations 2026-08-13 11:14:52 +08:00
staged_upload_service.py feat(knowledge_fs): expand supported document upload formats 2026-08-25 19:58:15 +08:00