Skip to content

feat(research): 增加 claim verifier 核心 - #90

Open
KKK-keria wants to merge 1 commit into
helsome:mainfrom
KKK-keria:feat/13-claim-verifier-core
Open

KKK-keria wants to merge 1 commit into
helsome:mainfrom
KKK-keria:feat/13-claim-verifier-core

Conversation

@KKK-keria

@KKK-keria KKK-keria commented Sep 12, 2026

Copy link
Copy Markdown

改动说明

为 Issue #13 增加独立的 claim-level verifier core:

  • 支持 supported / contradicted / insufficient_evidence
  • claim 没有 evidence 时确定性返回 insufficient_evidence,不调用 JudgeClient
  • 有 evidence 时复用现有 JudgeClient 执行语义判断
  • Judge API 失败、非法 JSON、未知 status 均 fail closed,不会伪装成 supported
  • verifier 生成的 reason 只用于解释,不会成为新的 evidence
  • machine-readable 输出包含 claimIdstatusevidenceIdsreasonverifierVersion

关联 Issue

Related to #13

测试报告(正式审核前必填)

环境

  • Bun:1.4.2
  • OS:Microsoft Windows 11 家庭中文版 10.0.26200(AMD64)
  • 基线:upstream/main @ 4eca2d1
  • 提交:2c232cf

实际执行命令与结果

npx --yes bun@1.4.2 test packages/shared/src/research/claim-verifier.test.ts
→ 9 passed / 0 failed / 21 assertions

npx --yes bun@1.4.2 run typecheck
→ core / i18n / shared / ui / electron 全部 exit 0

git diff --check upstream/main...HEAD
→ exit 0

已知失败 / Baseline

无。

  • 已提供实际测试命令与 pass/fail 结果
  • 已说明测试环境
  • 不存在需要说明的已知失败
  • 核心改动已有 focused tests

UI 截图(涉及 UI 时必填)

  • 本 PR 不涉及 UI 变化

Scope / 后续

本 PR 仅实现可独立审核的 Claim Verifier Core,不依赖尚未合并的 PR #67,也没有复制其临时类型。

本 PR 暂不包含:

  • ResearchClaim / EvidenceRef integration
  • claim-evidence mapping integration
  • ResearchRunner integration
  • passage/span provenance
  • Markdown export
  • UI
  • 真实 Deep Research E2E

在确认 PR #67 已合并到 upstream/main 之前,不开始上述正式 integration。

@KKK-keria
KKK-keria force-pushed the feat/13-claim-verifier-core branch from b79408b to 2c232cf Compare September 13, 2026 01:55
@KKK-keria
KKK-keria marked this pull request as ready for review September 13, 2026 01:56

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 verifier core 可以作为 #13 的独立增量先落:无 evidence 时确定性 insufficient、judge 失败/非法 JSON fail-closed、causal/root-cause 不凭 plausibility 放行,focused tests 也覆盖了关键分支。它当前没有接 production/report persistence,也不关闭 #13,因此真实 Deep Research E2E 留到 integration/final acceptance,不阻塞本 PR。

当前 main 已继续前进且 GitHub 显示不可直接合并,请只 rebase 最新 main 后重跑 claim-verifier focused test + typecheck/basic CI。后续正式接线时必须复用 #104 的统一 EvidenceClaim / verification status / evidence IDs,不要把本文件的临时输入类型发展成第二套持久化 contract。action_required 不作为质量失败。

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.

2 participants