feat(shipping-notice): 完善处理投影与待办轮询
- 统一处理阶段、Gate 状态及跨页面投影 - 优化订单提取自动推进与待办分类查询 - 完善任务中心待办与批次轮询逻辑 - 补充后端投影、Gate、查询及 Worker 测试 - 新增待办轮询设计文档并更新技术文档
This commit is contained in:
1 parent
9d2fa522fa
commit
fbca0b485c
22 files changed
+1454
-225
No files matched your search
@@ -36,6 +36,23 @@ def test_fifteen_processing_stages_all_map_to_a_lifecycle_stage():
|
||||
)
|
||||
|
||||
|
||||
def test_legacy_step_key_stage_maps_to_fulfillment_prep():
|
||||
"""OT.stage 若残留 step5_match_inventory,生命周期必须进通知准备而非接收解析。"""
|
||||
from app.services.shipping_notice.lifecycle_projection import project_lifecycle
|
||||
|
||||
result = project_lifecycle(
|
||||
current_gate={'gate_code': 'task_creation', 'status': 'invalidated'},
|
||||
blocking_reason={'code': 'gate_invalidated'},
|
||||
has_candidate_context=True,
|
||||
processing_stage='step5_match_inventory',
|
||||
)
|
||||
# processing_stage 权威高于错误的 task_creation 门禁。
|
||||
assert result['lifecycle_stage'] == 'fulfillment_prep'
|
||||
assert result['lifecycle_authority'] == 'processing_stage'
|
||||
current = next(e for e in result['lifecycle_entries'] if e['state'] == 'current')
|
||||
assert current['code'] == 'fulfillment_prep'
|
||||
|
||||
|
||||
def test_fifteen_stages_inventory_source_before_review():
|
||||
"""库存源解析必须排在人工复核与建单之前(跨面共用同一有序元组)。"""
|
||||
stages = list(SHIPPING_PROCESSING_STAGES)
|
||||
|
||||
Reference in new issue
Block a user