fix(short-drama-agent-front): 修复代码格式检查问题
This commit is contained in:
1 parent
81d6a85260
commit
48fce3975f
87 files changed
+5714
-1436
No files matched your search
@@ -7,9 +7,27 @@ import type { LegacyActionDiagnosisResults } from '@/features/breakdown/types'
|
||||
* @returns 与真实诊断列表一致的最小记录
|
||||
*/
|
||||
function repaired(): LegacyActionDiagnosisResults['shots'][number] {
|
||||
return { shotId: 'repaired-shot', episodeNo: 1, beatNo: 7, shotNo: 1, title: '已修订镜头', diagnosisId: null,
|
||||
status: 'not_diagnosed', issues: [], createdAt: null, repairStatus: 'repaired', requiresPostRepairDiagnosis: true,
|
||||
resourceAudit: { status: 'insufficient_evidence', issueCount: 0, evidenceCount: 2, expectedActionCount: 0, coveredActionCount: 0, coverage: null } }
|
||||
return {
|
||||
shotId: 'repaired-shot',
|
||||
episodeNo: 1,
|
||||
beatNo: 7,
|
||||
shotNo: 1,
|
||||
title: '已修订镜头',
|
||||
diagnosisId: null,
|
||||
status: 'not_diagnosed',
|
||||
issues: [],
|
||||
createdAt: null,
|
||||
repairStatus: 'repaired',
|
||||
requiresPostRepairDiagnosis: true,
|
||||
resourceAudit: {
|
||||
status: 'insufficient_evidence',
|
||||
issueCount: 0,
|
||||
evidenceCount: 2,
|
||||
expectedActionCount: 0,
|
||||
coveredActionCount: 0,
|
||||
coverage: null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
describe('实际修复问题与独立 AI 复查分类', () => {
|
||||
@@ -17,15 +35,43 @@ describe('实际修复问题与独立 AI 复查分类', () => {
|
||||
expect(diagnosisHasAttention(repaired())).toBe(false)
|
||||
})
|
||||
it('过期的冲突或待核对建议不能当成当前动作问题', () => {
|
||||
expect(diagnosisHasAttention({ ...repaired(), status: 'stale', shotStale: true,
|
||||
bodyMotionFindings: [{ dimension: 'balance', status: 'conflict', description: '旧冲突', quote: '旧原文' }] })).toBe(false)
|
||||
expect(
|
||||
diagnosisHasAttention({
|
||||
...repaired(),
|
||||
status: 'stale',
|
||||
shotStale: true,
|
||||
bodyMotionFindings: [
|
||||
{ dimension: 'balance', status: 'conflict', description: '旧冲突', quote: '旧原文' }
|
||||
]
|
||||
})
|
||||
).toBe(false)
|
||||
expect(diagnosisHasAttention({ ...repaired(), status: 'insufficient_evidence' })).toBe(false)
|
||||
})
|
||||
it('当前明确冲突和实时资源问题始终保留,不能因已经修订而隐藏', () => {
|
||||
expect(diagnosisHasAttention({ ...repaired(), status: 'conflict_found', policyStatus: 'current', shotStale: false })).toBe(true)
|
||||
expect(diagnosisHasAttention({ ...repaired(), resourceAudit: { ...repaired().resourceAudit!, status: 'conflict_found', issueCount: 1 } })).toBe(true)
|
||||
expect(diagnosisHasAttention({ ...repaired(), status: 'no_conflict_found', policyStatus: 'current',
|
||||
bodyMotionFindings: [{ dimension: 'balance', status: 'conflict', description: '当前冲突', quote: '原文' }] })).toBe(true)
|
||||
expect(
|
||||
diagnosisHasAttention({
|
||||
...repaired(),
|
||||
status: 'conflict_found',
|
||||
policyStatus: 'current',
|
||||
shotStale: false
|
||||
})
|
||||
).toBe(true)
|
||||
expect(
|
||||
diagnosisHasAttention({
|
||||
...repaired(),
|
||||
resourceAudit: { ...repaired().resourceAudit!, status: 'conflict_found', issueCount: 1 }
|
||||
})
|
||||
).toBe(true)
|
||||
expect(
|
||||
diagnosisHasAttention({
|
||||
...repaired(),
|
||||
status: 'no_conflict_found',
|
||||
policyStatus: 'current',
|
||||
bodyMotionFindings: [
|
||||
{ dimension: 'balance', status: 'conflict', description: '当前冲突', quote: '原文' }
|
||||
]
|
||||
})
|
||||
).toBe(true)
|
||||
})
|
||||
it('可选 AI 复查受限不要求重新拆解或替用户放开模型请求', () => {
|
||||
for (const code of ['QUALITY_POLICY_SNAPSHOT_UNKNOWN', 'QUALITY_POLICY_SNAPSHOT_INVALID']) {
|
||||
|
||||
Reference in new issue
Block a user