Repository navigation
Conversation
- 评估链路强制检索 fail-fast:run_evaluation 写入 raise_on_error=true,
evaluate_question 拆分开关后透传,避免作为普通检索参数泄漏。
- 查询失败语义归位:KnowledgeBaseManager.aquery 只透传 raise_on_error,
不再捕获配置/实例/查询异常;Dify 与 Notion 在执行器层保留默认静默降级和严格上抛两种模式,
Milvus 保持原生 fail-fast。
- 新增评估运行取消接口 POST /databases/{kb_id}/runs/{run_id}/cancel,
使用知识库 manage 权限定位活跃 Durable Task 并复用通用取消;
cancel_requested 投影为 Run 的 cancelled 状态,其余失败保持 failed。
- running Run 删除前拒绝,防止任务继续写入已删除的评估记录。
- Dataset 删除前同步生成任务终态,并拒绝 pending/running 状态,防止活跃生成任务继续写入。
- 前端补齐 cancelled 状态展示与取消按钮,取消后刷新任务中心和评估概览。
- 新增查询层回归测试与评估服务生成/取消/删除保护测试。
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
bug-fix(含评估运行取消入口补全)工程主张与 Owner
KnowledgeBaseManager.aquery与 Dify / Notion / Milvus 实现拥有;评估强制 fail-fast 由run_evaluation写入 Task payload 时提交,可从evaluation_runs.retrieval_config与评估失败结果观察;取消意图由Tasker.cancel_task/TaskRepository.request_cancel拥有,可从 Task 终态与 Run 投影观察;HTTP 与权限由knowledge_eval_router及知识库 manage 依赖拥有。docs/develop-guides/decisions/implemented/2026-10-12-evaluation-run-cancel-and-query-failure.md验证情况
评估检索故障整条 Run 失败
evaluator.py、manager.py、各知识库实现。test_knowledge_manager_aquery.py9 个参数化用例及 evaluator 开关拆分用例;本轮py_compile通过,pytest 未执行。test_aquery_propagates_executor_error、test_notion_executor_preserves_default_silent_degradation。running Run 与活跃 Dataset 删除保护
service.py的delete_run、delete_dataset、_sync_dataset_build_metadata。前端取消入口与 cancelled 展示
knowledge_api.js、KnowledgeEvaluationWorkspace.vue、EvaluationBenchmarkDetailView.vue。静态与契约检查
scripts/verify_engineering_contracts.py、git diff --check。python -B -m py_compile(9 个改动/相关文件)通过;python -B scripts/verify_engineering_contracts.py通过;staged 与 unstagedgit diff --check通过(仅 CRLF 警告)。简化 / 删除验收
不涉及。
独立语义 Review
Not run。本轮未引入全新上下文的独立 Reviewer Agent,仅由同一开发上下文内完成完整 staged diff 复核,覆盖查询失败边界、取消链路、run_id 契约、权限依赖、前端绑定和测试签名;该复核不能替代独立 Review 要求。
未验证范围与风险
completed_items依赖每 5 题 checkpoint,可能小于已落盘 RunItem 数。事故反馈
不涉及。本次修复未达到高影响逃逸缺陷的事故门槛。
界面变更
涉及:评估列表新增取消按钮(仅 running 状态显示)、
cancelled状态图标与文案、详情页时长显示“已停止”。关联事项
无。
补充说明
cancelledRun 状态值,前端按新状态渲染。retrieval_config会包含raise_on_error,由 evaluator 拆分后透传,不会泄漏给底层检索参数。