test(phase-3): 3B 迁移前把 shopdatacrawl 的建单与回传两段钉成 golden

蓝图 §4 Phase 3 首迁实录写的开工前置第①条——「那五支的 submitResult 同样没有 golden,
各自补完才能动」。本笔只补件、不动生产码一支。

回传段 20 例、建单段 14 例,渲染的是副作用**先后**流水而不是分组清单,三格专门钉住
Phase 2/3 已登记的「不许顺手统一」:
- ownershipCheckedBeforeTerminal:本支先查归属再判终态(底座 admitSubmission 默认序相反),
  套错就 40903 → 「任务已结束」;
- terminalTaskRejectedWithoutCode:终态重复提交本支不带 40901,线协议与孪生两支不同;
- completedRowFlushesWorkbookColumns:收尾刷结果列走 LambdaUpdateWrapper 批量条件更新
  (只刷 success=1 的行、不写 success/errorMessage、objectKey 传 null),publishResultFile 不适用。

建单段另钉一格快照本来看不见的性质:建单时刻一枚复用给头行与每一行结果行,故只断
createdAtEqualsTaskCreatedAt=true 而不打印时钟——底座五参 newTaskHeader 是「逐行各取一次」那一派,
照搬就把这格改成 false。
This commit is contained in:
2026-10-19 02:31:42 +08:00
parent 278eaaec2c
commit b11bc599cd
4 changed files with 1496 additions and 0 deletions
@@ -0,0 +1,63 @@
== case=happySingleShopTwoCountries
vo: taskId=1001 items=1
item: resultId=2001 taskId=1001 shopName=Demo Shop shopId=shop-Demo Shop platform=Amazon companyName=公司-Demo Shop matched=true matchStatus=MATCHED taskStatus=RUNNING success=- error=- countryCodes=[UK, DE] countryResults=0 downloadUrl=-
events=7 taskInserts=1 resultInserts=1 heartbeatTouches=1
evt: task.insert: id=1001 taskNoPrefix=SHOP_DATA_CRAWL moduleType=SHOP_DATA_CRAWL taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=1 ok=0 fail=0 userId=7 createdBy=user:7 deviceId=dev-1 ownerInstanceId=- requestJsonPresent=false resultJsonPresent=false
evt: taskCacheSave: id=1001
evt: result.insert: id=2001 taskId=1001 moduleType=SHOP_DATA_CRAWL sourceFilename=Demo Shop sourceFileUrl=shop-Demo Shop userId=7 success=-1 rowCount=- createdAtEqualsTaskCreatedAt=true
evt: snapshotTable.replace: taskId=1001 items=1
evt: progressSave: taskId=1001 status=RUNNING total=1 ok=0 fail=0
evt: task.update: id=1001 status=RUNNING ok=0 fail=0 requestJsonHasOwner=true requestJsonItems=1 resultJsonItems=1 createdAtEqualsUpdatedAt=true
evt: taskCacheSave: id=1001
== case=requestFieldsOverwrittenByMatch
vo: taskId=1001 items=1
item: resultId=2001 taskId=1001 shopName=Demo Shop shopId=shop-Demo Shop platform=Amazon companyName=公司-Demo Shop matched=true matchStatus=MATCHED taskStatus=RUNNING success=- error=- countryCodes=[UK] countryResults=0 downloadUrl=-
events=7 taskInserts=1 resultInserts=1 heartbeatTouches=1
evt: task.insert: id=1001 taskNoPrefix=SHOP_DATA_CRAWL moduleType=SHOP_DATA_CRAWL taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=1 ok=0 fail=0 userId=7 createdBy=user:7 deviceId=dev-1 ownerInstanceId=- requestJsonPresent=false resultJsonPresent=false
evt: taskCacheSave: id=1001
evt: result.insert: id=2001 taskId=1001 moduleType=SHOP_DATA_CRAWL sourceFilename=Demo Shop sourceFileUrl=shop-Demo Shop userId=7 success=-1 rowCount=- createdAtEqualsTaskCreatedAt=true
evt: snapshotTable.replace: taskId=1001 items=1
evt: progressSave: taskId=1001 status=RUNNING total=1 ok=0 fail=0
evt: task.update: id=1001 status=RUNNING ok=0 fail=0 requestJsonHasOwner=true requestJsonItems=1 resultJsonItems=1 createdAtEqualsUpdatedAt=true
evt: taskCacheSave: id=1001
== case=twoItemsRejected
thrown: BusinessException code=- message=items 必须且只能包含一个店铺
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=emptyItemsRejected
thrown: BusinessException code=- message=items 必须且只能包含一个店铺
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=nullItemsRejected
thrown: BusinessException code=- message=items 必须且只能包含一个店铺
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=rawTwoItemsSameShopRejectedFirstGate
thrown: BusinessException code=- message=items 必须且只能包含一个店铺
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=blankShopNameDropped
thrown: BusinessException code=- message=items 必须且只能包含一个有效店铺
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=reNormalizedToBlankRejects
thrown: BusinessException code=- message=任务数据已失效,请刷新后重试
events=2 taskInserts=1 resultInserts=0 heartbeatTouches=1
evt: task.insert: id=1001 taskNoPrefix=SHOP_DATA_CRAWL moduleType=SHOP_DATA_CRAWL taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=1 ok=0 fail=0 userId=7 createdBy=user:7 deviceId=dev-1 ownerInstanceId=- requestJsonPresent=false resultJsonPresent=false
evt: taskCacheSave: id=1001
== case=unmatchedShopRejected
thrown: BusinessException code=- message=店铺未匹配
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=usIsNotSupportedCountry
thrown: BusinessException code=- message=非法国家代码: US
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=duplicateCountryCodeRejected
thrown: BusinessException code=- message=country_codes 存在重复: UK
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=emptyCountryCodesRejected
thrown: BusinessException code=- message=country_codes 至少选择 1 个国家
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=blankCountryCodeRejected
thrown: BusinessException code=- message=country_codes 含空项
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=nullUserIdRejected
thrown: BusinessException code=- message=user_id 不合法
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0
== case=zeroUserIdRejected
thrown: BusinessException code=- message=user_id 不合法
events=0 taskInserts=0 resultInserts=0 heartbeatTouches=0