Commit Graph

207 Commits

Author SHA1 Message Date
FFXN
06cd47807c feat(knowledge-fs): add content handling for initial source preview and cleanup tasks 2026-09-03 21:01:21 +08:00
FFXN
43d50ce021 feat(knowledge-fs): enhance capability grant admission middleware with deletion handling options 2026-09-03 18:55:37 +08:00
FFXN
25277f66d6 fix(knowledge-fs): harden semantic chunking and deletion cleanup
- retry semantic chunking when the LLM returns an invalid schema
- add corrective schema instructions to retry prompts
- remove capability grant foreign keys from durable deletion records
- preserve capability grant IDs as immutable audit provenance
- add migration and regression coverage
2026-09-03 17:00:17 +08:00
FFXN
239dedba48 fix(knowledge-fs): enhance website crawl handling with support for exact page fetching 2026-09-03 16:20:42 +08:00
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
Jyong
4d71c4a83a fix(knowledge-fs): allow one unresolved bad case per retrieval trace
A retrieval test record could be flagged as a bad case any number of times,
piling duplicate open cases onto the quality page. Refuse to file another bad
case while the trace already has one that is open or replaying, and let the
retrieval test page know about it.

- knowledge-fs: `createBadCase` looks up an unresolved case for the trace
  inside its transaction and throws `QualityBadCaseAlreadyOpenError`; the
  create route answers 409 with `QUALITY_BAD_CASE_ALREADY_OPEN`. Quality trace
  list items expose `openBadCaseId`.
- api: pass `open_bad_case_id` through the console trace response;
  regenerate the contracts.
- web: show the saved-as-bad-case state instead of the flag action when the
  selected trace already has an unresolved case, treat a 409 on flagging the
  same way, and refresh the history so the state follows the server.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-03 01:40:11 -04:00
Stephen Zhou
af7f2b75b3
fix(knowledge-fs): refresh contract subtree lock 2026-09-03 12:03:14 +08:00
Stephen Zhou
299cf4f45a
fix(knowledge-fs): refresh contract subtree lock 2026-09-02 22:28:11 +08:00
Jyong
afa771dcac feat(knowledge-fs): keep query images with retrieval test history
Query images attached to a retrieval test vanished as soon as the run's
history record was selected, and were never shown again after a reload,
because nothing persisted them: the gateway dropped `queryImages` when writing
`answer_traces`, the console trace/research responses had no image field, and
the composer cleared its images on every record selection.

- knowledge-fs: add a nullable JSON `query_images` column to `answer_traces`
  (migration 0049 for postgres and tidb), persist and read it in the answer
  trace repository, and expose `queryImages` on quality trace list items.
- api: enrich trace and research task responses with
  `KnowledgeFSQueryImageResponse`, resolving file names and short-lived signed
  preview URLs only for files the acting account still owns; regenerate the
  console and service contracts.
- web: keep composer images scoped to the selected record like the query
  text, remember images per run in this session, fall back to persisted
  previews (with a labelled placeholder when the file is gone), show them in
  the result panel and as a count on history records, and carry them into
  retests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-02 09:17:36 -04:00
Stephen Zhou
2b16c5baf1
fix(knowledge-fs): refresh contract subtree lock 2026-09-02 20:33:15 +08:00
FFXN
46c345401f fix(knowledge-fs): cap object-list page size and enforce entity name length limits 2026-09-02 19:18:18 +08:00
FFXN
567f4f5ab4 fix(knowledge-fs): enhance source import handling and error recovery for remote updates 2026-09-02 18:38:38 +08:00
FFXN
9dd7e3f5f8 fix(knowledge-fs): repair sync policy version handling to accommodate concurrent updates 2026-09-02 18:07:57 +08:00
Jyong
049a4c514e fix(knowledge-fs): show task object titles 2026-09-02 01:43:16 -04:00
Jyong
222d09f474 feat(knowledge-fs): add profile-driven multimodal retrieval 2026-09-02 01:01:57 -04:00
FFXN
b55ec59d37 fix(knowledge-fs): handle source selection mismatch and improve error handling, make source selection replacement durable. 2026-09-02 12:56:37 +08:00
Jyong
a15ca672a1 fix(knowledge-fs): align retrieval test timeout 2026-09-01 13:51:15 -04:00
Jyong
2ad192fce7 fix(knowledge-fs): harden research retrieval execution 2026-09-01 13:26:43 -04:00
FFXN
66a93d5dfb fix(knowledge-fs): update subtreeTree hash in lock file 2026-09-01 20:17:51 +08:00
FFXN
2e6af36f77 fix(knowledge-fs): ensure balanced parentheses in SQL query for document retrieval 2026-09-01 20:02:36 +08:00
FFXN
aff51ae6f3 fix(knowledge-fs): retry source selection CAS conflicts and log workflow errors 2026-09-01 19:32:54 +08:00
Jyong
dbcc3a11e5 fix(knowledge-fs): type retrieval lease clock 2026-09-01 05:37:51 -04:00
Jyong
7876f6e670 fix(knowledge-fs): scope child deletion conflicts 2026-09-01 05:18:38 -04:00
Jyong
4f3a2952d6 perf(knowledge-fs): harden cross-format document ingestion 2026-08-31 07:48:35 -04:00
FFXN
2bcfc139c3 fix(knowledge-fs): add SOURCE_DOCUMENT_COMPILATION_FAILED error code and update DTOs 2026-08-31 18:19:23 +08:00
Stephen Zhou
9abfd110cc
fix(knowledge-fs): refresh contract subtree lock 2026-08-31 13:08:59 +08:00
Jyong
b2aff3432c fix(knowledge): preserve traces with deleted evidence 2026-08-30 23:16:37 -04:00
FFXN
d23b9229db feat(knowledge-fs): enhance source update payload with selection and sync policy validation 2026-08-31 00:00:37 +08:00
Stephen Zhou
0fd0122400
fix(knowledge-fs): refresh contract subtree lock 2026-08-30 23:53:18 +08:00
FFXN
72461af522 feat(knowledge-fs): support source config updates and deferred sync
- allow updating mutable source configuration fields
- enqueue sync after active business configuration changes
- pause scheduled sync while a source is disabled
- preserve and rebind sync policies across source version updates
- support website, online document, and online drive sources
2026-08-30 22:12:21 +08:00
Stephen Zhou
adf650cc83
fix(knowledge-fs): refresh contract subtree lock 2026-08-30 22:08:44 +08:00
FFXN
7a16aaf0a1 fix(knowledge-fs): add rebase functionality for publication head revision and enhance error handling 2026-08-28 15:56:09 +08:00
FFXN
1212b92bf1 fix(knowledge-fs): remove provider mode from sync policies and update related constraints 2026-08-28 15:08:11 +08:00
FFXN
65dda2d1fb fix(knowledge-fs): remove provider mode from sync policies and update related constraints 2026-08-28 14:43:44 +08:00
FFXN
90b6c32549 fix(knowledge-fs): remove provider mode from sync policies and update related constraints 2026-08-28 14:24:38 +08:00
Stephen Zhou
3938d91c75
fix(knowledge-fs): refresh contract lock 2026-08-28 00:23:10 +08:00
Jyong
7d1b7f97f0 fix(knowledge-fs): unblock upload completion 2026-08-27 07:24:56 -04:00
Jyong
6702314998 fix(knowledge-fs): scope deletion admission to target 2026-08-27 06:29:09 -04:00
Stephen Zhou
90c8ea48e2
fix(knowledge-fs): refresh contract lock 2026-08-27 18:07:47 +08:00
Jyong
42b1be58f3 fix(knowledge-fs): repair document deletion task progress 2026-08-27 04:35:05 -04:00
Jyong
e902bfc502 chore(knowledge-fs): refresh contract lock 2026-08-27 03:02:14 -04:00
FFXN
6feed72a06 fix(knowledge-fs): enhance embedding profile migration handling and retry logic 2026-08-27 11:27:51 +08:00
FFXN
31523c240b fix(knowledge-fs): implement profile migration projection promotion logic 2026-08-27 10:25:37 +08:00
FFXN
9ec1e4e8c3 fix(knowledge-fs): update projection status to 'building' during profile migration 2026-08-27 10:00:04 +08:00
Stephen Zhou
98caad8a6a
fix(knowledge-fs): refresh contract lock 2026-08-26 19:36:05 +08:00
Jyong
499abe4fca fix(knowledge-fs): segment structured tables by record 2026-08-26 06:38:30 -04:00
Jyong
c195854260 fix(knowledge-fs): bound document compilation memory 2026-08-26 04:51:07 -04:00
Jyong
77a5de2fc9 fix(knowledge-fs): persist document images across formats 2026-08-26 03:58:04 -04:00
FFXN
18155535cf 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
FFXN
b64952b71f fix(knowledge_fs): add support for indexing object-backed images with no text 2026-08-26 11:22:42 +08:00