fix(b82-01): 任务行部分字段落库改 update(null, wrapper),13 处部分实体 updateById 不再抹 failure_category
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不适用。
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
== case=main files=1
|
||||
task.insert: id=1001 moduleType=DELETE_BRAND status=RUNNING taskMode=IMMEDIATE userId=7 createdBy=user:7 deviceId=dev-1 sourceFileCount=1
|
||||
task.update: id=1001 status=RUNNING sourceFileCount=1 successFileCount=1 failedFileCount=0 errorMessage=-
|
||||
task.update: id=1001 status=- sourceFileCount=1 successFileCount=1 failedFileCount=0 errorMessage=-
|
||||
result.insert: id=2001 taskId=1001 moduleType=DELETE_BRAND sourceFileUrl=uploads/魏振峰.xlsx rowCount=4 success=0 resultFilename=- errorMessage=-
|
||||
vo: total=1 successCount=1 failedCount=0
|
||||
item: resultId=2001 fileKey=uploads/魏振峰.xlsx shopName=魏振峰 matched=true matchStatus=MATCHED countryCount=2 totalRows=4 truncated=false success=true error=- taskStatus=RUNNING
|
||||
@@ -48,7 +48,7 @@ item: resultId=2001 fileKey=uploads/缺字段行.xlsx shopName=缺字段行 matc
|
||||
payload.files=0
|
||||
== case=shopNameColumnSkipped files=1
|
||||
task.insert: id=1001 moduleType=DELETE_BRAND status=RUNNING taskMode=IMMEDIATE userId=7 createdBy=user:7 deviceId=dev-1 sourceFileCount=1
|
||||
task.update: id=1001 status=RUNNING sourceFileCount=1 successFileCount=1 failedFileCount=0 errorMessage=-
|
||||
task.update: id=1001 status=- sourceFileCount=1 successFileCount=1 failedFileCount=0 errorMessage=-
|
||||
result.insert: id=2001 taskId=1001 moduleType=DELETE_BRAND sourceFileUrl=uploads/英国.xlsx rowCount=3 success=0 resultFilename=- errorMessage=-
|
||||
vo: total=1 successCount=1 failedCount=0
|
||||
item: resultId=2001 fileKey=uploads/英国.xlsx shopName=英国 matched=true matchStatus=MATCHED countryCount=1 totalRows=3 truncated=false success=true error=- taskStatus=RUNNING
|
||||
|
||||
@@ -4,7 +4,7 @@ vo: taskId=1001 items=2
|
||||
item: resultId=2002 shopName=店铺B matched=true taskStatus=RUNNING success=false
|
||||
vo: asinRowsByCountry=0 skipAsinsByCountry=0 minimumPriceByCountry=0
|
||||
task.insert: id=1001 moduleType=PRICE_TRACK taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=2
|
||||
task.update: id=1001 status=RUNNING requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=2
|
||||
task.update: id=1001 status=- requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=2
|
||||
result.insert: id=2001 moduleType=PRICE_TRACK sourceFilename=店铺A sourceFileUrl=shop-店铺A success=0
|
||||
result.insert: id=2002 moduleType=PRICE_TRACK sourceFilename=店铺B sourceFileUrl=shop-店铺B success=0
|
||||
payloadSaves=1
|
||||
@@ -19,7 +19,7 @@ vo: taskId=1001 items=1
|
||||
item: resultId=2001 shopName=店铺A matched=true taskStatus=RUNNING success=false
|
||||
vo: asinRowsByCountry=0 skipAsinsByCountry=0 minimumPriceByCountry=0
|
||||
task.insert: id=1001 moduleType=PRICE_TRACK taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=1
|
||||
task.update: id=1001 status=RUNNING requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
task.update: id=1001 status=- requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
result.insert: id=2001 moduleType=PRICE_TRACK sourceFilename=店铺A sourceFileUrl=shop-店铺A success=0
|
||||
payloadSaves=1
|
||||
payload country=FR rows=1
|
||||
@@ -30,7 +30,7 @@ vo: taskId=1001 items=1
|
||||
item: resultId=2001 shopName=店铺A matched=true taskStatus=RUNNING success=false
|
||||
vo: asinRowsByCountry=0 skipAsinsByCountry=0 minimumPriceByCountry=0
|
||||
task.insert: id=1001 moduleType=PRICE_TRACK taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=1
|
||||
task.update: id=1001 status=RUNNING requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
task.update: id=1001 status=- requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
result.insert: id=2001 moduleType=PRICE_TRACK sourceFilename=店铺A sourceFileUrl=shop-店铺A success=0
|
||||
payloadSaves=1
|
||||
heartbeatTouches=1
|
||||
@@ -39,7 +39,7 @@ vo: taskId=1001 items=1
|
||||
item: resultId=2001 shopName=店铺A matched=true taskStatus=RUNNING success=false
|
||||
vo: asinRowsByCountry=0 skipAsinsByCountry=0 minimumPriceByCountry=0
|
||||
task.insert: id=1001 moduleType=PRICE_TRACK taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=1
|
||||
task.update: id=1001 status=RUNNING requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
task.update: id=1001 status=- requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
result.insert: id=2001 moduleType=PRICE_TRACK sourceFilename=店铺A sourceFileUrl=shop-店铺A success=0
|
||||
payloadSaves=1
|
||||
payload country=UK rows=2
|
||||
@@ -63,7 +63,7 @@ vo: taskId=1001 items=1
|
||||
item: resultId=2001 shopName=店铺A matched=true taskStatus=RUNNING success=false
|
||||
vo: asinRowsByCountry=0 skipAsinsByCountry=0 minimumPriceByCountry=0
|
||||
task.insert: id=1001 moduleType=PRICE_TRACK taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=1
|
||||
task.update: id=1001 status=RUNNING requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
task.update: id=1001 status=- requestJsonHasAsinFiles=true requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
result.insert: id=2001 moduleType=PRICE_TRACK sourceFilename=店铺A sourceFileUrl=shop-店铺A success=0
|
||||
payloadSaves=1
|
||||
payload country=UK rows=2
|
||||
@@ -77,7 +77,7 @@ vo: taskId=1001 items=1
|
||||
item: resultId=2001 shopName=店铺A matched=true taskStatus=RUNNING success=false
|
||||
vo: asinRowsByCountry=0 skipAsinsByCountry=0 minimumPriceByCountry=0
|
||||
task.insert: id=1001 moduleType=PRICE_TRACK taskMode=PYTHON_QUEUE status=RUNNING sourceFileCount=1
|
||||
task.update: id=1001 status=RUNNING requestJsonHasAsinFiles=false requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
task.update: id=1001 status=- requestJsonHasAsinFiles=false requestJsonHasListingStatuses=true resultJsonItems=1
|
||||
result.insert: id=2001 moduleType=PRICE_TRACK sourceFilename=店铺A sourceFileUrl=shop-店铺A success=0
|
||||
payloadSaves=0
|
||||
heartbeatTouches=1
|
||||
|
||||
@@ -7,7 +7,7 @@ events=7 taskInserts=1 resultInserts=1 heartbeatTouches=1
|
||||
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: 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
|
||||
@@ -18,7 +18,7 @@ events=7 taskInserts=1 resultInserts=1 heartbeatTouches=1
|
||||
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: 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 必须且只能包含一个店铺
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user