Files
knowledge-governance/web/src/qaQuality.fixture.ts
T
姚章浩 828c2c5fa0
build / build (push) Successful in 1m6s
feat(qa-ops): 按确认口径补齐质量比例与分母明细
使用完整筛选范围的当前有效结论计算覆盖率和正确率,人工优先,失效与对应待确认/未评估/不计入排除;零分母返回null,界面展示原始分子分母和排除构成,前端拒绝不守恒或比例不一致的响应。

验证:make verify退出码0,Go658及前端257通过,91项声明可选集成跳过;隔离PG、三包竞态及合成/真实只读源浏览器验证通过。无新增迁移,不接AI模型,不改绩效,不写源库;本批未推送或部署,8088运行版保持0.1.21。
2026-10-18 02:00:31 +08:00

76 lines
1.7 KiB
TypeScript

export const hash = 'a'.repeat(64)
export const fields = {
coverage: 'covered',
correctness: 'correct',
product_category: 'MG400',
problem_type: '咨询',
root_cause: '',
exclusion_reason: '',
}
export const check = {
input_available: true,
id: 1,
input_epoch: 1,
input_hash: hash,
result: {
state: 'checked',
verdict: 'uncovered',
rule_version: 'governance-answer-substring-v1',
matched_text: '暂无已发布',
},
source: { verdict: 'covered', reason_code: 'source only', evaluator_version: 'v5' },
created_at: '2026-10-17T12:00:00Z',
}
export const review = {
revision: 1,
input_epoch: 1,
input_hash: hash,
fields,
reason: '<script>示例理由</script>',
reviewer: 'fixture-admin',
created_at: '2026-10-17T12:01:00Z',
}
export const qualityFixture = {
input_hash: hash,
input_epoch: 1,
revision: 1,
state: 'reviewed',
automatic: check,
latest_review: review,
effective: fields,
}
export const summaryFixture = {
summary: {
total: 3,
reviewed: 1,
unreviewed: 1,
stale: 1,
pending_confirmation: 0,
rule_uncovered: 2,
rates: {
policy_version: 'quality-rates-human-first-v1',
coverage: { numerator: 1, denominator: 2, percent: 50 },
correctness: { numerator: 1, denominator: 1, percent: 100 },
breakdown: {
covered: 1,
uncovered: 1,
partial: 0,
pending: 0,
unassessed: 0,
excluded: 0,
stale: 1,
covered_correct: 1,
covered_incorrect: 0,
covered_pending: 0,
covered_unassessed: 0,
},
},
},
start: '2026-10-14T00:00:00Z',
end: '2026-10-15T00:00:00Z',
keyword: '',
as_of: '2026-10-17T12:01:00Z',
scope: 'whole_filter',
ai_state: 'not_configured',
}