refactor(shipping-notice): 进度信号统一为 15 阶 stage 契约码并透传阻断原因
- 后端进度写入 step_key 全量切换为 15 阶契约 stage 码 - 投影层清除 CheckPoint stepN_* 遗留别名与子串/前缀启发式,阶段信号按契约码精确匹配 - 建单前 Case 摘要透传草稿首要阻断原因 - 前端标签/归一化/处理卡片同步契约码,阻断原因按 i18n 优先展示 - 修复正式下游回看时 activeCase 刻意为空导致队列定位与接收解析上下文静默跳过 - 同步更新投影/门禁/工作台/RPA 流程测试
This commit is contained in:
1 parent
d1adbe5ec5
commit
18af972d20
34 files changed
+903
-111
No files matched your search
@@ -108,6 +108,46 @@ describe('normalizeShippingProcessingProjection', () => {
|
||||
expect(normalized?.stageNodes?.[1]?.absoluteIndex).toBe(2);
|
||||
});
|
||||
|
||||
it('preserves explainability message and next_action on blocking_reason', () => {
|
||||
// v4 阻塞原因具体化:冻结 explainability 契约透传的 message / next_action
|
||||
// 是「阻塞原因行」与「下一步建议动作」的数据源,归一化不得剥离。
|
||||
const normalized = normalizeShippingProcessingProjection({
|
||||
work_item_no: 'OT-REASON',
|
||||
work_item_type: 'order_task',
|
||||
status: 'waiting_human',
|
||||
stage: 'order_review',
|
||||
ui_state: {
|
||||
status: 'waiting_human',
|
||||
stage: 'order_review',
|
||||
blocking_reason: {
|
||||
code: 'customer_unresolved',
|
||||
message: '客户尚未确认',
|
||||
next_action: 'confirm_customer',
|
||||
},
|
||||
primary_action: null,
|
||||
secondary_actions: [],
|
||||
},
|
||||
source_summary: {
|
||||
email_subject: null,
|
||||
filename: 'reason.pdf',
|
||||
document_id: 91,
|
||||
document_count: 1,
|
||||
parsed_document_count: 1,
|
||||
candidate_count: 1,
|
||||
customer_name: null,
|
||||
po_number: null,
|
||||
failure_reason_code: null,
|
||||
parse_attempt_count: 0,
|
||||
asset_status: 'ready',
|
||||
},
|
||||
child_order_tasks: [],
|
||||
});
|
||||
const reason = normalized?.uiState?.blocking_reason;
|
||||
expect(reason?.code).toBe('customer_unresolved');
|
||||
expect(reason?.message).toBe('客户尚未确认');
|
||||
expect(reason?.nextAction).toBe('confirm_customer');
|
||||
});
|
||||
|
||||
it('normalizes the EML status-partition file count', () => {
|
||||
const normalized = normalizeShippingProcessingProjection({
|
||||
work_item_no: 'INTAKE:SNI-EML',
|
||||
|
||||
Reference in new issue
Block a user