feat(freight-rpa): 批次R解耦编排层并切换 onhand/inbound 契约

将 RPA 编排收编至 freight_rpa,回调迁 /api/freight-rpa/*。
共享目录与 Worker 契约一次切换至 onhand/inbound/upload,
并补 outbound 骨架与 tt16 排程 job key 迁移。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-10-17 23:18:48 +08:00
1 parent bf3154033b
commit ffc0d4a430
147 files changed
+4221 -2678

No files matched your search

@@ -412,7 +412,7 @@ def test_per_source_callback_rejects_candidate_set_identity_mismatch(app):
source_code='DBS',
run_no=attempt.source_run_no,
callback_payload={
'schema_version': 'shipping_inventory_rpa.v2',
'schema_version': 'freight_rpa.onhand.v1',
'callback_id': 'PSR-SN-PREP-CALLBACK-IDENTITY-DBS-A1-X:C2',
'task_no': task.task_no,
'source_code': 'DBS',
@@ -461,7 +461,7 @@ def test_rpa_report_inventory_fails_closed_on_per_source_identity_mismatch(app,
)
response = inventory_rpa_workflow.rpa_report_inventory({
'schema_version': 'shipping_inventory_rpa.v2',
'schema_version': 'freight_rpa.onhand.v1',
'callback_id': 'PSR-SNCALLBACKIDENTITYENTRY-DBS-A1-X:C1',
'task_no': task.task_no,
'task_id': task.task_no,
@@ -504,7 +504,7 @@ def test_rpa_report_inventory_parses_per_source_run_with_hyphenated_task_no(app,
)
inventory_rpa_workflow.rpa_report_inventory({
'schema_version': 'shipping_inventory_rpa.v2',
'schema_version': 'freight_rpa.onhand.v1',
'callback_id': 'PSR-SN-2026-001-DBS-A1-X:C1',
'task_no': task.task_no,
'task_id': task.task_no,
@@ -546,7 +546,7 @@ def test_rpa_report_inventory_batch_fails_closed_on_per_source_identity_mismatch
# HTTP 入口只负责受控收件和入队;身份围栏属于 Worker 正式处理体。
response = inventory_rpa_workflow.process_rpa_report_inventory_batch({
'schema_version': 'shipping_inventory_rpa.v2',
'schema_version': 'freight_rpa.onhand.v1',
'callback_id': 'batch-callback-identity',
'batch_run_no': 'BATCH-CALLBACK-IDENTITY',
'results': [{
@@ -574,7 +574,7 @@ def test_batch_callback_inherits_authenticated_top_level_schema_version():
merged = _merge_batch_callback_item(
{
'schema_version': 'shipping_inventory_rpa.v2',
'schema_version': 'freight_rpa.onhand.v1',
'run_no': 'BATCH-1',
'task_no': 'SN-1',
},
@@ -584,7 +584,7 @@ def test_batch_callback_inherits_authenticated_top_level_schema_version():
},
)
assert merged['schema_version'] == 'shipping_inventory_rpa.v2'
assert merged['schema_version'] == 'freight_rpa.onhand.v1'
assert merged['run_no'] == 'BATCH-1'
assert merged['task_no'] == 'SN-1'