b231a67dd7
B82-01:failureCategory 标 FieldStrategy.ALWAYS(V186 让清错误分支的 null 真落库)的代价是任何 new 出来的部分实体走 updateById 都把该列无条件抹回 NULL。现网只读探针(2026-11-05,SSH 主机B)实证列全表零非空:近 7 天 194 条 FAILED 全空,9 条文案命中 CREDENTIAL/DELIVERY markers 的行列也是空。本笔只动调用点一边;注解半边由 TaskFailureCategoryMigrationV186Test 的 ALWAYS 钉守住。 写点转换(13 处 updateById,12 个条目,DedupeRunService 收尾一处两调用):convert/split/productrisk/queryasin/withdraw/similarasin/appearance-patent/pricetrack 显式两到四列;shopdatacrawl 快照+归属三列;deletebrand 终态分支 error_message 与分类同笔配对 TaskFailureLedger.categoryOf(护栏格1连线语义);dedupe FAILED 收尾同笔配对;similarasin 归属绑定(rustfs 回退)。Explore 初判 12 处漏了 withdraw/pricetrack 族——逐支验明全是 loadTaskForExecution 全实体(selectById/缓存血统),非抹列点,留痕不扩 scope;DELIVERY/CREDENTIAL 两族终态写点接 ledger 属后续批,不在本笔。 护栏 TaskFailureCategoryGuardrailTest 5→7:① ledger 对六组 markers 各出一条值非空断言(配对写恒 NULL 也绿那半堵上);② .updateById( 总量棘轮 173→160(本仓 ALWAYS 字段还有 PriceTrackLoopRun/ShopKey/SkipPriceAsin 四实体,棘轮按全量钉,新增写法必须登记复审)。测试适配:共享探针 UpdateWrapperProbe(getSqlSet 列序+MPGENVAL 精确取值+列名 snake 归一——单测 JVM 的 Lambda 列缓存可能被自动初始化成驼峰,不归一则快照取决于测试类执行顺序);4 份 golden 重钉 11 行(窄写面 status 不在写面渲染成 -);ShopDataCrawlOwnerColumnTest 假 DB 从只会 CAS 升级为按 SQL 语义应用 SET 段(whereEq 校验 id/status eq);SimilarAsinTaskServiceSubmitTest 归属断言改为录 SET 段断言零 owner_instance_id(touchJavaSideTaskActivity 本就合法走 update(null,wrapper),verify(never) 会误杀)。 门禁:受影响七支定向 50/0 失败/0 错误/3 skipped(既有 skip,零新增);mvn -o test 整量 5321/0 失败/0 错误/19 skipped BUILD SUCCESS(5:01,skip 数与在册基线逐字相同);后端无 lint/格式器如实跳过;未动 application.yml/路由/Flyway/env,门禁5不适用。
64 lines
4.6 KiB
Plaintext
64 lines
4.6 KiB
Plaintext
== 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=- ok=null fail=null requestJsonHasOwner=true requestJsonItems=1 resultJsonItems=1 createdAtEqualsUpdatedAt=false
|
|
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=- ok=null fail=null requestJsonHasOwner=true requestJsonItems=1 resultJsonItems=1 createdAtEqualsUpdatedAt=false
|
|
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
|